diff --git a/README.md b/README.md index 4535dd47..df5a5875 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,14 @@ NO_DOCKER=1 yarn test # all tests ... ``` +## Development + +If you're developing integration tests and need to add additional helper methods to the @neutron-org/neutronjs packages, start by cloning the package repository. Use the command git clone git@github.com:neutron-org/neutronjs.git. After cloning, you have two options: either alter the package reference in the package.json file to point to your cloned repository, or use yarn link. + +Once the JavaScript helper code in your local repository is ready, your next step is to create a Pull Request (PR). This PR must be reviewed and approved before it can be merged into the main branch. + +However, even after the merge, you cannot immediately use the new package version in your integration tests. First, you need to wait until the updated version of the package will be published to the npmjs repository. After the new version has been published, you can incorporate it into your integration tests. This will allow you to complete the testing sequence in your GitHub Actions workflow. + ## Warning Since docker-compose doesn't rebuild images on file changing, there is a chance for one to launch the tests with an diff --git a/gen-proto-ibc-go.sh b/gen-proto-ibc-go.sh deleted file mode 100755 index 506cbe1d..00000000 --- a/gen-proto-ibc-go.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env bash - -rm -r ./proto -rm -r ./proto-thirdparty-tmp -rm -rf ./ibc-go - -git clone git@github.com:cosmos/ibc-go.git -cd ibc-go && git checkout v7.2.0 && cd proto && buf export . --output=../../proto-thirdparty-tmp && cd ../.. - - git clone git@github.com:neutron-org/admin-module.git - cd admin-module && git checkout feat/admin-module-sdk47 && cd proto && buf export . --output=../../proto-thirdparty-tmp && cd ../.. - -cp -r ibc-go/proto ./proto -mv ./proto-thirdparty-tmp/tendermint ./proto/ -cp -r ./admin-module/proto/cosmos ./proto/ - -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -proto_files=() - -for dir in $proto_dirs; do - proto_files=("${proto_files[@]} $(find "${dir}" -maxdepth 1 -name '*.proto')") -done - -echo ${proto_files[@]} - -npx pbjs \ - -o ./src/generated/ibc/proto.cjs \ - -t static-module \ - --force-long \ - --keep-case \ - --no-create \ - --path=./proto/ \ - --path=./proto-thirdparty-tmp/ \ - --path=./proto-thirdparty/ \ - --root="@cosmos-client/ibc" \ - ${proto_files[@]} - -npx pbjs \ - -o ./src/generated/ibc/proto.js \ - -t static-module \ - -w es6 \ - --es6 \ - --force-long \ - --keep-case \ - --no-create \ - --path=./proto/ \ - --path=./proto-thirdparty-tmp/ \ - --path=./proto-thirdparty/ \ - --root="@cosmos-client/ibc" \ - ${proto_files[@]} - -npx pbts \ - -o ./src/generated/ibc/proto.d.ts \ - ./src/generated/ibc/proto.js - -rm -r ./proto -rm -r ./proto-thirdparty-tmp -rm -rf ./ibc-go -rm -rf ./admin-module diff --git a/gen-proto-pob.sh b/gen-proto-pob.sh deleted file mode 100755 index 3111e38f..00000000 --- a/gen-proto-pob.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env bash - -rm -r ./proto -rm -r ./proto-thirdparty-tmp -rm -rf ./pob - -git clone git@github.com:skip-mev/block-sdk.git -# cd ibc-go && git checkout v4.3.0 && cd ../ - -# git clone git@github.com:Ethernal-Tech/admin-module.git - -cp -r block-sdk/proto ./proto -# cp -r ibc-go/third_party/proto ./proto-thirdparty-tmp -# mv ./proto-thirdparty-tmp/tendermint ./proto/ -# cp -r ./admin-module/proto/adminmodule ./proto/ - -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -proto_files=() - -for dir in $proto_dirs; do - proto_files=("${proto_files[@]} $(find "${dir}" -maxdepth 1 -name '*.proto')") -done - -echo ${proto_files[@]} - -npx pbjs \ - -o ./src/generated/pob/proto.cjs \ - -t static-module \ - --force-long \ - --keep-case \ - --no-create \ - --path=./proto/ \ - --path=./proto-thirdparty/ \ - --root="@skip-mev/pob" \ - ${proto_files[@]} - -npx pbjs \ - -o ./src/generated/pob/proto.js \ - -t static-module \ - -w es6 \ - --es6 \ - --force-long \ - --keep-case \ - --no-create \ - --path=./proto/ \ - --path=./proto-thirdparty/ \ - --root="@skip-mev/pob" \ - ${proto_files[@]} - -npx pbts \ - -o ./src/generated/pob/proto.d.ts \ - ./src/generated/pob/proto.js - -rm -r ./proto -# rm -r ./proto-thirdparty-tmp -rm -rf ./block-sdk -# rm -rf ./admin-module diff --git a/gen-proto.sh b/gen-proto.sh deleted file mode 100755 index 3b9f005a..00000000 --- a/gen-proto.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -rm -r ./proto -cp -r ../neutron/proto ./proto - -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) -proto_files=() - -for dir in $proto_dirs; do - proto_files=("${proto_files[@]} $(find "${dir}" -maxdepth 1 -name '*.proto')") -done - -npx pbjs \ - -o ./src/generated/proto.cjs \ - -t static-module \ - --force-long \ - --keep-case \ - --no-create \ - --path=./proto/ \ - --path=./proto-thirdparty/ \ - --root="@neutron-org/neutron" \ - ${proto_files[@]} - -npx pbjs \ - -o ./src/generated/proto.js \ - -t static-module \ - -w es6 \ - --es6 \ - --force-long \ - --keep-case \ - --no-create \ - --path=./proto/ \ - --path=./proto-thirdparty/ \ - --root="@neutron-org/neutron" \ - ${proto_files[@]} - -npx pbts \ - -o ./src/generated/proto.d.ts \ - ./src/generated/proto.js - -rm ./src/generated/proto.js -rm -r ./proto diff --git a/globalSetup.ts b/globalSetup.ts index 4455dd0c..4d53a8d6 100644 --- a/globalSetup.ts +++ b/globalSetup.ts @@ -1,7 +1,7 @@ -import { setup } from './src/helpers/env'; +import { env } from '@neutron-org/neutronjsplus'; export default async () => { const host1 = process.env.NODE1_URL || 'http://localhost:1317'; const host2 = process.env.NODE2_URL || 'http://localhost:1316'; - !process.env.NO_DOCKER && (await setup(host1, host2)); + !process.env.NO_DOCKER && (await env.setup(host1, host2)); }; diff --git a/package.json b/package.json index 16b36266..344d0675 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "test": "yarn test:parallel && yarn test:run_in_band", "test:parallel": "jest -b src/testcases/parallel", - "test:run_in_band": "yarn test:tge:auction && yarn test:tge:airdrop && yarn test:tge:credits && yarn test:interchaintx && yarn test:interchain_kv_query && yarn test:interchain_tx_query_plain && yarn test:tokenomics && yarn test:reserve && yarn test:ibc_hooks && yarn test:float", + "test:run_in_band": "yarn test:tge:auction && yarn test:tge:airdrop && yarn test:tge:credits && yarn test:interchaintx && yarn test:interchain_kv_query && yarn test:interchain_tx_query_plain && yarn test:tokenomics && yarn test:reserve && yarn test:ibc_hooks && yarn test:float && yarn test:parameters", "test:simple": "jest -b src/testcases/parallel/simple", "test:stargate_queries": "jest -b src/testcases/parallel/stargate_queries", "test:interchaintx": "jest -b src/testcases/run_in_band/interchaintx", @@ -29,8 +29,8 @@ "test:tge:vesting_lp_vault": "jest -b src/testcases/parallel/tge.vesting_lp_vault", "test:tge:credits_vault": "jest -b src/testcases/parallel/tge.credits_vault", "test:tge:investors_vesting_vault": "jest -b src/testcases/parallel/tge.investors_vesting_vault", + "test:voting_registry": "jest -b src/testcases/parallel/voting_registry", "test:float": "NO_WAIT_CHANNEL1=1 NO_WAIT_HTTP2=1 NO_WAIT_CHANNEL2=1 NO_WAIT_DELAY=1 jest -b src/testcases/run_in_band/float", - "gen:proto": "bash ./gen-proto.sh", "lint": "eslint ./src", "fmt": "eslint ./src --fix" }, @@ -38,9 +38,10 @@ "license": "Apache-2.0", "dependencies": { "@babel/plugin-transform-modules-commonjs": "^7.18.6", - "@cosmos-client/core": "^0.47.1", - "@cosmos-client/cosmwasm": "^0.40.1", + "@cosmos-client/core": "^0.47.4", + "@cosmos-client/cosmwasm": "^0.40.3", "@cosmos-client/ibc": "^1.2.1", + "@neutron-org/neutronjsplus": "0.1.0", "@types/lodash": "^4.14.182", "@types/long": "^4.0.2", "axios": "^0.27.2", @@ -48,8 +49,9 @@ "commander": "^10.0.0", "date-fns": "^2.16.1", "express": "^4.18.2", - "jest": "^27.5.1", - "jest-junit": "^15.0.0", + "jest": "^29.7.0", + "jest-junit": "^16.0.0", + "jest-extended": "^4.0.2", "lodash": "^4.17.21", "long": "^5.2.1", "merkletreejs": "^0.3.9", @@ -59,14 +61,13 @@ "@babel/preset-env": "^7.20.2", "@babel/preset-typescript": "^7.18.6", "@types/express": "^4.17.9", - "@types/jest": "^28.1", + "@types/jest": "^29.5", "@typescript-eslint/eslint-plugin": "^5.19.0", "@typescript-eslint/parser": "^5.19.0", "core-js": "^3.23.5", "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.0.0", - "jest-extended": "^3.0.2", "lint-staged": "^12.3.8", "prettier": "^2.6.2", "regenerator-runtime": "^0.13.9", @@ -84,6 +85,6 @@ ] }, "engines": { - "node": ">=11.0 <17" + "node": ">=16.0 <17" } } \ No newline at end of file diff --git a/proto-thirdparty/confio/proofs.proto b/proto-thirdparty/confio/proofs.proto deleted file mode 100644 index da43503e..00000000 --- a/proto-thirdparty/confio/proofs.proto +++ /dev/null @@ -1,234 +0,0 @@ -syntax = "proto3"; - -package ics23; -option go_package = "github.com/confio/ics23/go"; - -enum HashOp { - // NO_HASH is the default if no data passed. Note this is an illegal argument some places. - NO_HASH = 0; - SHA256 = 1; - SHA512 = 2; - KECCAK = 3; - RIPEMD160 = 4; - BITCOIN = 5; // ripemd160(sha256(x)) -} - -/** -LengthOp defines how to process the key and value of the LeafOp -to include length information. After encoding the length with the given -algorithm, the length will be prepended to the key and value bytes. -(Each one with it's own encoded length) -*/ -enum LengthOp { - // NO_PREFIX don't include any length info - NO_PREFIX = 0; - // VAR_PROTO uses protobuf (and go-amino) varint encoding of the length - VAR_PROTO = 1; - // VAR_RLP uses rlp int encoding of the length - VAR_RLP = 2; - // FIXED32_BIG uses big-endian encoding of the length as a 32 bit integer - FIXED32_BIG = 3; - // FIXED32_LITTLE uses little-endian encoding of the length as a 32 bit integer - FIXED32_LITTLE = 4; - // FIXED64_BIG uses big-endian encoding of the length as a 64 bit integer - FIXED64_BIG = 5; - // FIXED64_LITTLE uses little-endian encoding of the length as a 64 bit integer - FIXED64_LITTLE = 6; - // REQUIRE_32_BYTES is like NONE, but will fail if the input is not exactly 32 bytes (sha256 output) - REQUIRE_32_BYTES = 7; - // REQUIRE_64_BYTES is like NONE, but will fail if the input is not exactly 64 bytes (sha512 output) - REQUIRE_64_BYTES = 8; -} - -/** -ExistenceProof takes a key and a value and a set of steps to perform on it. -The result of peforming all these steps will provide a "root hash", which can -be compared to the value in a header. - -Since it is computationally infeasible to produce a hash collission for any of the used -cryptographic hash functions, if someone can provide a series of operations to transform -a given key and value into a root hash that matches some trusted root, these key and values -must be in the referenced merkle tree. - -The only possible issue is maliablity in LeafOp, such as providing extra prefix data, -which should be controlled by a spec. Eg. with lengthOp as NONE, - prefix = FOO, key = BAR, value = CHOICE -and - prefix = F, key = OOBAR, value = CHOICE -would produce the same value. - -With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field -in the ProofSpec is valuable to prevent this mutability. And why all trees should -length-prefix the data before hashing it. -*/ -message ExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - repeated InnerOp path = 4; -} - -/* -NonExistenceProof takes a proof of two neighbors, one left of the desired key, -one right of the desired key. If both proofs are valid AND they are neighbors, -then there is no valid proof for the given key. -*/ -message NonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - ExistenceProof left = 2; - ExistenceProof right = 3; -} - -/* -CommitmentProof is either an ExistenceProof or a NonExistenceProof, or a Batch of such messages -*/ -message CommitmentProof { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - BatchProof batch = 3; - CompressedBatchProof compressed = 4; - } -} - -/** -LeafOp represents the raw key-value data we wish to prove, and -must be flexible to represent the internal transformation from -the original key-value pairs into the basis hash, for many existing -merkle trees. - -key and value are passed in. So that the signature of this operation is: - leafOp(key, value) -> output - -To process this, first prehash the keys and values if needed (ANY means no hash in this case): - hkey = prehashKey(key) - hvalue = prehashValue(value) - -Then combine the bytes, and hash it - output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) -*/ -message LeafOp { - HashOp hash = 1; - HashOp prehash_key = 2; - HashOp prehash_value = 3; - LengthOp length = 4; - // prefix is a fixed bytes that may optionally be included at the beginning to differentiate - // a leaf node from an inner node. - bytes prefix = 5; -} - -/** -InnerOp represents a merkle-proof step that is not a leaf. -It represents concatenating two children and hashing them to provide the next result. - -The result of the previous step is passed in, so the signature of this op is: - innerOp(child) -> output - -The result of applying InnerOp should be: - output = op.hash(op.prefix || child || op.suffix) - - where the || operator is concatenation of binary data, -and child is the result of hashing all the tree below this step. - -Any special data, like prepending child with the length, or prepending the entire operation with -some value to differentiate from leaf nodes, should be included in prefix and suffix. -If either of prefix or suffix is empty, we just treat it as an empty string -*/ -message InnerOp { - HashOp hash = 1; - bytes prefix = 2; - bytes suffix = 3; -} - - -/** -ProofSpec defines what the expected parameters are for a given proof type. -This can be stored in the client and used to validate any incoming proofs. - - verify(ProofSpec, Proof) -> Proof | Error - -As demonstrated in tests, if we don't fix the algorithm used to calculate the -LeafHash for a given tree, there are many possible key-value pairs that can -generate a given hash (by interpretting the preimage differently). -We need this for proper security, requires client knows a priori what -tree format server uses. But not in code, rather a configuration object. -*/ -message ProofSpec { - // any field in the ExistenceProof must be the same as in this spec. - // except Prefix, which is just the first bytes of prefix (spec can be longer) - LeafOp leaf_spec = 1; - InnerSpec inner_spec = 2; - // max_depth (if > 0) is the maximum number of InnerOps allowed (mainly for fixed-depth tries) - int32 max_depth = 3; - // min_depth (if > 0) is the minimum number of InnerOps allowed (mainly for fixed-depth tries) - int32 min_depth = 4; -} - -/* -InnerSpec contains all store-specific structure info to determine if two proofs from a -given store are neighbors. - -This enables: - - isLeftMost(spec: InnerSpec, op: InnerOp) - isRightMost(spec: InnerSpec, op: InnerOp) - isLeftNeighbor(spec: InnerSpec, left: InnerOp, right: InnerOp) -*/ -message InnerSpec { - // Child order is the ordering of the children node, must count from 0 - // iavl tree is [0, 1] (left then right) - // merk is [0, 2, 1] (left, right, here) - repeated int32 child_order = 1; - int32 child_size = 2; - int32 min_prefix_length = 3; - int32 max_prefix_length = 4; - // empty child is the prehash image that is used when one child is nil (eg. 20 bytes of 0) - bytes empty_child = 5; - // hash is the algorithm that must be used for each InnerOp - HashOp hash = 6; -} - -/* -BatchProof is a group of multiple proof types than can be compressed -*/ -message BatchProof { - repeated BatchEntry entries = 1; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message BatchEntry { - oneof proof { - ExistenceProof exist = 1; - NonExistenceProof nonexist = 2; - } -} - - -/****** all items here are compressed forms *******/ - -message CompressedBatchProof { - repeated CompressedBatchEntry entries = 1; - repeated InnerOp lookup_inners = 2; -} - -// Use BatchEntry not CommitmentProof, to avoid recursion -message CompressedBatchEntry { - oneof proof { - CompressedExistenceProof exist = 1; - CompressedNonExistenceProof nonexist = 2; - } -} - -message CompressedExistenceProof { - bytes key = 1; - bytes value = 2; - LeafOp leaf = 3; - // these are indexes into the lookup_inners table in CompressedBatchProof - repeated int32 path = 4; -} - -message CompressedNonExistenceProof { - bytes key = 1; // TODO: remove this as unnecessary??? we prove a range - CompressedExistenceProof left = 2; - CompressedExistenceProof right = 3; -} diff --git a/proto-thirdparty/cosmos/auth/v1beta1/auth.proto b/proto-thirdparty/cosmos/auth/v1beta1/auth.proto deleted file mode 100644 index 72e1d9ec..00000000 --- a/proto-thirdparty/cosmos/auth/v1beta1/auth.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// BaseAccount defines a base account type. It contains all the necessary fields -// for basic account functionality. Any custom account type should extend this -// type for additional functionality (e.g. vesting). -message BaseAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - option (cosmos_proto.implements_interface) = "AccountI"; - - string address = 1; - google.protobuf.Any pub_key = 2 - [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; - uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; - uint64 sequence = 4; -} - -// ModuleAccount defines an account for modules that holds coins on a pool. -message ModuleAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "ModuleAccountI"; - - BaseAccount base_account = 1 [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - string name = 2; - repeated string permissions = 3; -} - -// Params defines the parameters for the auth module. -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - uint64 max_memo_characters = 1 [(gogoproto.moretags) = "yaml:\"max_memo_characters\""]; - uint64 tx_sig_limit = 2 [(gogoproto.moretags) = "yaml:\"tx_sig_limit\""]; - uint64 tx_size_cost_per_byte = 3 [(gogoproto.moretags) = "yaml:\"tx_size_cost_per_byte\""]; - uint64 sig_verify_cost_ed25519 = 4 - [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; - uint64 sig_verify_cost_secp256k1 = 5 - [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; -} diff --git a/proto-thirdparty/cosmos/auth/v1beta1/genesis.proto b/proto-thirdparty/cosmos/auth/v1beta1/genesis.proto deleted file mode 100644 index c88b94ee..00000000 --- a/proto-thirdparty/cosmos/auth/v1beta1/genesis.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// GenesisState defines the auth module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // accounts are the accounts present at genesis. - repeated google.protobuf.Any accounts = 2; -} diff --git a/proto-thirdparty/cosmos/auth/v1beta1/query.proto b/proto-thirdparty/cosmos/auth/v1beta1/query.proto deleted file mode 100644 index 4d9759ca..00000000 --- a/proto-thirdparty/cosmos/auth/v1beta1/query.proto +++ /dev/null @@ -1,74 +0,0 @@ -syntax = "proto3"; -package cosmos.auth.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "cosmos/auth/v1beta1/auth.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/types"; - -// Query defines the gRPC querier service. -service Query { - // Accounts returns all the existing accounts - // - // Since: cosmos-sdk 0.43 - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts"; - } - - // Account returns account details based on address. - rpc Account(QueryAccountRequest) returns (QueryAccountResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/accounts/{address}"; - } - - // Params queries all parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/auth/v1beta1/params"; - } -} - -// QueryAccountsRequest is the request type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAccountsResponse is the response type for the Query/Accounts RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryAccountsResponse { - // accounts are the existing accounts - repeated google.protobuf.Any accounts = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAccountRequest is the request type for the Query/Account RPC method. -message QueryAccountRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address defines the address to query for. - string address = 1; -} - -// QueryAccountResponse is the response type for the Query/Account RPC method. -message QueryAccountResponse { - // account defines the account of the corresponding address. - google.protobuf.Any account = 1 [(cosmos_proto.accepts_interface) = "AccountI"]; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/authz/v1beta1/authz.proto b/proto-thirdparty/cosmos/authz/v1beta1/authz.proto deleted file mode 100644 index 05b1feef..00000000 --- a/proto-thirdparty/cosmos/authz/v1beta1/authz.proto +++ /dev/null @@ -1,39 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// GenericAuthorization gives the grantee unrestricted permissions to execute -// the provided method on behalf of the granter's account. -message GenericAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - // Msg, identified by it's type URL, to grant unrestricted permissions to execute - string msg = 1; -} - -// Grant gives permissions to execute -// the provide method with expiration time. -message Grant { - google.protobuf.Any authorization = 1 [(cosmos_proto.accepts_interface) = "Authorization"]; - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -// GrantAuthorization extends a grant with both the addresses of the grantee and granter. -// It is used in genesis.proto and query.proto -// -// Since: cosmos-sdk 0.45.2 -message GrantAuthorization { - string granter = 1; - string grantee = 2; - - google.protobuf.Any authorization = 3 [(cosmos_proto.accepts_interface) = "Authorization"]; - google.protobuf.Timestamp expiration = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/proto-thirdparty/cosmos/authz/v1beta1/event.proto b/proto-thirdparty/cosmos/authz/v1beta1/event.proto deleted file mode 100644 index 7a3cf7c8..00000000 --- a/proto-thirdparty/cosmos/authz/v1beta1/event.proto +++ /dev/null @@ -1,25 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// EventGrant is emitted on Msg/Grant -message EventGrant { - // Msg type URL for which an autorization is granted - string msg_type_url = 2; - // Granter account address - string granter = 3; - // Grantee account address - string grantee = 4; -} - -// EventRevoke is emitted on Msg/Revoke -message EventRevoke { - // Msg type URL for which an autorization is revoked - string msg_type_url = 2; - // Granter account address - string granter = 3; - // Grantee account address - string grantee = 4; -} diff --git a/proto-thirdparty/cosmos/authz/v1beta1/genesis.proto b/proto-thirdparty/cosmos/authz/v1beta1/genesis.proto deleted file mode 100644 index 310f6265..00000000 --- a/proto-thirdparty/cosmos/authz/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// GenesisState defines the authz module's genesis state. -message GenesisState { - repeated GrantAuthorization authorization = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/authz/v1beta1/query.proto b/proto-thirdparty/cosmos/authz/v1beta1/query.proto deleted file mode 100644 index f668309b..00000000 --- a/proto-thirdparty/cosmos/authz/v1beta1/query.proto +++ /dev/null @@ -1,81 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; - -// Query defines the gRPC querier service. -service Query { - // Returns list of `Authorization`, granted to the grantee by the granter. - rpc Grants(QueryGrantsRequest) returns (QueryGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants"; - } - - // GranterGrants returns list of `GrantAuthorization`, granted by granter. - // - // Since: cosmos-sdk 0.45.2 - rpc GranterGrants(QueryGranterGrantsRequest) returns (QueryGranterGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/granter/{granter}"; - } - - // GranteeGrants returns a list of `GrantAuthorization` by grantee. - // - // Since: cosmos-sdk 0.45.2 - rpc GranteeGrants(QueryGranteeGrantsRequest) returns (QueryGranteeGrantsResponse) { - option (google.api.http).get = "/cosmos/authz/v1beta1/grants/grantee/{grantee}"; - } -} - -// QueryGrantsRequest is the request type for the Query/Grants RPC method. -message QueryGrantsRequest { - string granter = 1; - string grantee = 2; - // Optional, msg_type_url, when set, will query only grants matching given msg type. - string msg_type_url = 3; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryGrantsResponse is the response type for the Query/Authorizations RPC method. -message QueryGrantsResponse { - // authorizations is a list of grants granted for grantee by granter. - repeated Grant grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranterGrantsRequest is the request type for the Query/GranterGrants RPC method. -message QueryGranterGrantsRequest { - string granter = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranterGrantsResponse is the response type for the Query/GranterGrants RPC method. -message QueryGranterGrantsResponse { - // grants is a list of grants granted by the granter. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryGranteeGrantsRequest is the request type for the Query/IssuedGrants RPC method. -message QueryGranteeGrantsRequest { - string grantee = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryGranteeGrantsResponse is the response type for the Query/GranteeGrants RPC method. -message QueryGranteeGrantsResponse { - // grants is a list of grants granted to the grantee. - repeated GrantAuthorization grants = 1; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto-thirdparty/cosmos/authz/v1beta1/tx.proto b/proto-thirdparty/cosmos/authz/v1beta1/tx.proto deleted file mode 100644 index 457f0d66..00000000 --- a/proto-thirdparty/cosmos/authz/v1beta1/tx.proto +++ /dev/null @@ -1,70 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.authz.v1beta1; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/authz/v1beta1/authz.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/authz"; -option (gogoproto.goproto_getters_all) = false; - -// Msg defines the authz Msg service. -service Msg { - // Grant grants the provided authorization to the grantee on the granter's - // account with the provided expiration time. If there is already a grant - // for the given (granter, grantee, Authorization) triple, then the grant - // will be overwritten. - rpc Grant(MsgGrant) returns (MsgGrantResponse); - - // Exec attempts to execute the provided messages using - // authorizations granted to the grantee. Each message should have only - // one signer corresponding to the granter of the authorization. - rpc Exec(MsgExec) returns (MsgExecResponse); - - // Revoke revokes any authorization corresponding to the provided method name on the - // granter's account that has been granted to the grantee. - rpc Revoke(MsgRevoke) returns (MsgRevokeResponse); -} - -// MsgGrant is a request type for Grant method. It declares authorization to the grantee -// on behalf of the granter with the provided expiration time. -message MsgGrant { - string granter = 1; - string grantee = 2; - - cosmos.authz.v1beta1.Grant grant = 3 [(gogoproto.nullable) = false]; -} - -// MsgExecResponse defines the Msg/MsgExecResponse response type. -message MsgExecResponse { - repeated bytes results = 1; -} - -// MsgExec attempts to execute the provided messages using -// authorizations granted to the grantee. Each message should have only -// one signer corresponding to the granter of the authorization. -message MsgExec { - string grantee = 1; - // Authorization Msg requests to execute. Each msg must implement Authorization interface - // The x/authz will try to find a grant matching (msg.signers[0], grantee, MsgTypeURL(msg)) - // triple and validate it. - repeated google.protobuf.Any msgs = 2 [(cosmos_proto.accepts_interface) = "sdk.Msg, authz.Authorization"]; -} - -// MsgGrantResponse defines the Msg/MsgGrant response type. -message MsgGrantResponse {} - -// MsgRevoke revokes any authorization with the provided sdk.Msg type on the -// granter's account with that has been granted to the grantee. -message MsgRevoke { - string granter = 1; - string grantee = 2; - string msg_type_url = 3; -} - -// MsgRevokeResponse defines the Msg/MsgRevokeResponse response type. -message MsgRevokeResponse {} diff --git a/proto-thirdparty/cosmos/bank/v1beta1/authz.proto b/proto-thirdparty/cosmos/bank/v1beta1/authz.proto deleted file mode 100644 index 4f58b15e..00000000 --- a/proto-thirdparty/cosmos/bank/v1beta1/authz.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// SendAuthorization allows the grantee to spend up to spend_limit coins from -// the granter's account. -// -// Since: cosmos-sdk 0.43 -message SendAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} diff --git a/proto-thirdparty/cosmos/bank/v1beta1/bank.proto b/proto-thirdparty/cosmos/bank/v1beta1/bank.proto deleted file mode 100644 index df91008d..00000000 --- a/proto-thirdparty/cosmos/bank/v1beta1/bank.proto +++ /dev/null @@ -1,96 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Params defines the parameters for the bank module. -message Params { - option (gogoproto.goproto_stringer) = false; - repeated SendEnabled send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled,omitempty\""]; - bool default_send_enabled = 2 [(gogoproto.moretags) = "yaml:\"default_send_enabled,omitempty\""]; -} - -// SendEnabled maps coin denom to a send_enabled status (whether a denom is -// sendable). -message SendEnabled { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - string denom = 1; - bool enabled = 2; -} - -// Input models transaction input. -message Input { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Output models transaction outputs. -message Output { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string address = 1; - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Supply represents a struct that passively keeps track of the total supply -// amounts in the network. -// This message is deprecated now that supply is indexed by denom. -message Supply { - option deprecated = true; - - option (gogoproto.equal) = true; - option (gogoproto.goproto_getters) = false; - - option (cosmos_proto.implements_interface) = "*github.com/cosmos/cosmos-sdk/x/bank/legacy/v040.SupplyI"; - - repeated cosmos.base.v1beta1.Coin total = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// DenomUnit represents a struct that describes a given -// denomination unit of the basic token. -message DenomUnit { - // denom represents the string name of the given denom unit (e.g uatom). - string denom = 1; - // exponent represents power of 10 exponent that one must - // raise the base_denom to in order to equal the given DenomUnit's denom - // 1 denom = 1^exponent base_denom - // (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' with - // exponent = 6, thus: 1 atom = 10^6 uatom). - uint32 exponent = 2; - // aliases is a list of string aliases for the given denom - repeated string aliases = 3; -} - -// Metadata represents a struct that describes -// a basic token. -message Metadata { - string description = 1; - // denom_units represents the list of DenomUnit's for a given coin - repeated DenomUnit denom_units = 2; - // base represents the base denom (should be the DenomUnit with exponent = 0). - string base = 3; - // display indicates the suggested denom that should be - // displayed in clients. - string display = 4; - // name defines the name of the token (eg: Cosmos Atom) - // - // Since: cosmos-sdk 0.43 - string name = 5; - // symbol is the token symbol usually shown on exchanges (eg: ATOM). This can - // be the same as the display. - // - // Since: cosmos-sdk 0.43 - string symbol = 6; -} diff --git a/proto-thirdparty/cosmos/bank/v1beta1/genesis.proto b/proto-thirdparty/cosmos/bank/v1beta1/genesis.proto deleted file mode 100644 index 8fd7329a..00000000 --- a/proto-thirdparty/cosmos/bank/v1beta1/genesis.proto +++ /dev/null @@ -1,39 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// GenesisState defines the bank module's genesis state. -message GenesisState { - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false]; - - // balances is an array containing the balances of all the accounts. - repeated Balance balances = 2 [(gogoproto.nullable) = false]; - - // supply represents the total supply. If it is left empty, then supply will be calculated based on the provided - // balances. Otherwise, it will be used to validate that the sum of the balances equals this amount. - repeated cosmos.base.v1beta1.Coin supply = 3 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; - - // denom_metadata defines the metadata of the differents coins. - repeated Metadata denom_metadata = 4 [(gogoproto.moretags) = "yaml:\"denom_metadata\"", (gogoproto.nullable) = false]; -} - -// Balance defines an account address and balance pair used in the bank module's -// genesis state. -message Balance { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the balance holder. - string address = 1; - - // coins defines the different coins this balance holds. - repeated cosmos.base.v1beta1.Coin coins = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/bank/v1beta1/query.proto b/proto-thirdparty/cosmos/bank/v1beta1/query.proto deleted file mode 100644 index a567e073..00000000 --- a/proto-thirdparty/cosmos/bank/v1beta1/query.proto +++ /dev/null @@ -1,193 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Query defines the gRPC querier service. -service Query { - // Balance queries the balance of a single coin for a single account. - rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}/by_denom"; - } - - // AllBalances queries the balance of all coins for a single account. - rpc AllBalances(QueryAllBalancesRequest) returns (QueryAllBalancesResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/balances/{address}"; - } - - // SpendableBalances queries the spenable balance of all coins for a single - // account. - rpc SpendableBalances(QuerySpendableBalancesRequest) returns (QuerySpendableBalancesResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/spendable_balances/{address}"; - } - - // TotalSupply queries the total supply of all coins. - rpc TotalSupply(QueryTotalSupplyRequest) returns (QueryTotalSupplyResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply"; - } - - // SupplyOf queries the supply of a single coin. - rpc SupplyOf(QuerySupplyOfRequest) returns (QuerySupplyOfResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/supply/{denom}"; - } - - // Params queries the parameters of x/bank module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/params"; - } - - // DenomsMetadata queries the client metadata of a given coin denomination. - rpc DenomMetadata(QueryDenomMetadataRequest) returns (QueryDenomMetadataResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata/{denom}"; - } - - // DenomsMetadata queries the client metadata for all registered coin denominations. - rpc DenomsMetadata(QueryDenomsMetadataRequest) returns (QueryDenomsMetadataResponse) { - option (google.api.http).get = "/cosmos/bank/v1beta1/denoms_metadata"; - } -} - -// QueryBalanceRequest is the request type for the Query/Balance RPC method. -message QueryBalanceRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1; - - // denom is the coin denom to query balances for. - string denom = 2; -} - -// QueryBalanceResponse is the response type for the Query/Balance RPC method. -message QueryBalanceResponse { - // balance is the balance of the coin. - cosmos.base.v1beta1.Coin balance = 1; -} - -// QueryBalanceRequest is the request type for the Query/AllBalances RPC method. -message QueryAllBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query balances for. - string address = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllBalancesResponse is the response type for the Query/AllBalances RPC -// method. -message QueryAllBalancesResponse { - // balances is the balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySpendableBalancesRequest defines the gRPC request structure for querying -// an account's spendable balances. -message QuerySpendableBalancesRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address to query spendable balances for. - string address = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QuerySpendableBalancesResponse defines the gRPC response structure for querying -// an account's spendable balances. -message QuerySpendableBalancesResponse { - // balances is the spendable balances of all the coins. - repeated cosmos.base.v1beta1.Coin balances = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTotalSupplyRequest is the request type for the Query/TotalSupply RPC -// method. -message QueryTotalSupplyRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // pagination defines an optional pagination for the request. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryTotalSupplyResponse is the response type for the Query/TotalSupply RPC -// method -message QueryTotalSupplyResponse { - // supply is the supply of the coins - repeated cosmos.base.v1beta1.Coin supply = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // pagination defines the pagination in the response. - // - // Since: cosmos-sdk 0.43 - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QuerySupplyOfRequest is the request type for the Query/SupplyOf RPC method. -message QuerySupplyOfRequest { - // denom is the coin denom to query balances for. - string denom = 1; -} - -// QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. -message QuerySupplyOfResponse { - // amount is the supply of the coin. - cosmos.base.v1beta1.Coin amount = 1 [(gogoproto.nullable) = false]; -} - -// QueryParamsRequest defines the request type for querying x/bank parameters. -message QueryParamsRequest {} - -// QueryParamsResponse defines the response type for querying x/bank parameters. -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryDenomsMetadataRequest is the request type for the Query/DenomsMetadata RPC method. -message QueryDenomsMetadataRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryDenomsMetadataResponse is the response type for the Query/DenomsMetadata RPC -// method. -message QueryDenomsMetadataResponse { - // metadata provides the client information for all the registered tokens. - repeated Metadata metadatas = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDenomMetadataRequest is the request type for the Query/DenomMetadata RPC method. -message QueryDenomMetadataRequest { - // denom is the coin denom to query the metadata for. - string denom = 1; -} - -// QueryDenomMetadataResponse is the response type for the Query/DenomMetadata RPC -// method. -message QueryDenomMetadataResponse { - // metadata describes and provides all the client information for the requested token. - Metadata metadata = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/bank/v1beta1/tx.proto b/proto-thirdparty/cosmos/bank/v1beta1/tx.proto deleted file mode 100644 index 26b2ab41..00000000 --- a/proto-thirdparty/cosmos/bank/v1beta1/tx.proto +++ /dev/null @@ -1,42 +0,0 @@ -syntax = "proto3"; -package cosmos.bank.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/bank/v1beta1/bank.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/bank/types"; - -// Msg defines the bank Msg service. -service Msg { - // Send defines a method for sending coins from one account to another account. - rpc Send(MsgSend) returns (MsgSendResponse); - - // MultiSend defines a method for sending coins from some accounts to other accounts. - rpc MultiSend(MsgMultiSend) returns (MsgMultiSendResponse); -} - -// MsgSend represents a message to send coins from one account to another. -message MsgSend { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgSendResponse defines the Msg/Send response type. -message MsgSendResponse {} - -// MsgMultiSend represents an arbitrary multi-in, multi-out send message. -message MsgMultiSend { - option (gogoproto.equal) = false; - - repeated Input inputs = 1 [(gogoproto.nullable) = false]; - repeated Output outputs = 2 [(gogoproto.nullable) = false]; -} - -// MsgMultiSendResponse defines the Msg/MultiSend response type. -message MsgMultiSendResponse {} diff --git a/proto-thirdparty/cosmos/base/abci/v1beta1/abci.proto b/proto-thirdparty/cosmos/base/abci/v1beta1/abci.proto deleted file mode 100644 index e24ae7bd..00000000 --- a/proto-thirdparty/cosmos/base/abci/v1beta1/abci.proto +++ /dev/null @@ -1,144 +0,0 @@ -syntax = "proto3"; -package cosmos.base.abci.v1beta1; - -import "gogoproto/gogo.proto"; -import "tendermint/abci/types.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; - -// TxResponse defines a structure containing relevant tx data and metadata. The -// tags are stringified and the log is JSON decoded. -message TxResponse { - option (gogoproto.goproto_getters) = false; - // The block height - int64 height = 1; - // The transaction hash. - string txhash = 2 [(gogoproto.customname) = "TxHash"]; - // Namespace for the Code - string codespace = 3; - // Response code. - uint32 code = 4; - // Result bytes, if any. - string data = 5; - // The output of the application's logger (raw string). May be - // non-deterministic. - string raw_log = 6; - // The output of the application's logger (typed). May be non-deterministic. - repeated ABCIMessageLog logs = 7 [(gogoproto.castrepeated) = "ABCIMessageLogs", (gogoproto.nullable) = false]; - // Additional information. May be non-deterministic. - string info = 8; - // Amount of gas requested for transaction. - int64 gas_wanted = 9; - // Amount of gas consumed by transaction. - int64 gas_used = 10; - // The request transaction bytes. - google.protobuf.Any tx = 11; - // Time of the previous block. For heights > 1, it's the weighted median of - // the timestamps of the valid votes in the block.LastCommit. For height == 1, - // it's genesis time. - string timestamp = 12; - // Events defines all the events emitted by processing a transaction. Note, - // these events include those emitted by processing all the messages and those - // emitted from the ante handler. Whereas Logs contains the events, with - // additional metadata, emitted only by processing the messages. - // - // Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - repeated tendermint.abci.Event events = 13 [(gogoproto.nullable) = false]; -} - -// ABCIMessageLog defines a structure containing an indexed tx ABCI message log. -message ABCIMessageLog { - option (gogoproto.stringer) = true; - - uint32 msg_index = 1; - string log = 2; - - // Events contains a slice of Event objects that were emitted during some - // execution. - repeated StringEvent events = 3 [(gogoproto.castrepeated) = "StringEvents", (gogoproto.nullable) = false]; -} - -// StringEvent defines en Event object wrapper where all the attributes -// contain key/value pairs that are strings instead of raw bytes. -message StringEvent { - option (gogoproto.stringer) = true; - - string type = 1; - repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; -} - -// Attribute defines an attribute wrapper where the key and value are -// strings instead of raw bytes. -message Attribute { - string key = 1; - string value = 2; -} - -// GasInfo defines tx execution gas context. -message GasInfo { - // GasWanted is the maximum units of work we allow this tx to perform. - uint64 gas_wanted = 1 [(gogoproto.moretags) = "yaml:\"gas_wanted\""]; - - // GasUsed is the amount of gas actually consumed. - uint64 gas_used = 2 [(gogoproto.moretags) = "yaml:\"gas_used\""]; -} - -// Result is the union of ResponseFormat and ResponseCheckTx. -message Result { - option (gogoproto.goproto_getters) = false; - - // Data is any data returned from message or handler execution. It MUST be - // length prefixed in order to separate data from multiple message executions. - bytes data = 1; - - // Log contains the log information from message or handler execution. - string log = 2; - - // Events contains a slice of Event objects that were emitted during message - // or handler execution. - repeated tendermint.abci.Event events = 3 [(gogoproto.nullable) = false]; -} - -// SimulationResponse defines the response generated when a transaction is -// successfully simulated. -message SimulationResponse { - GasInfo gas_info = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - Result result = 2; -} - -// MsgData defines the data returned in a Result object during message -// execution. -message MsgData { - option (gogoproto.stringer) = true; - - string msg_type = 1; - bytes data = 2; -} - -// TxMsgData defines a list of MsgData. A transaction will have a MsgData object -// for each message. -message TxMsgData { - option (gogoproto.stringer) = true; - - repeated MsgData data = 1; -} - -// SearchTxsResult defines a structure for querying txs pageable -message SearchTxsResult { - option (gogoproto.stringer) = true; - - // Count of all txs - uint64 total_count = 1 [(gogoproto.moretags) = "yaml:\"total_count\"", (gogoproto.jsontag) = "total_count"]; - // Count of txs in current page - uint64 count = 2; - // Index of current page, start from 1 - uint64 page_number = 3 [(gogoproto.moretags) = "yaml:\"page_number\"", (gogoproto.jsontag) = "page_number"]; - // Count of total pages - uint64 page_total = 4 [(gogoproto.moretags) = "yaml:\"page_total\"", (gogoproto.jsontag) = "page_total"]; - // Max count txs per page - uint64 limit = 5; - // List of txs in current page - repeated TxResponse txs = 6; -} diff --git a/proto-thirdparty/cosmos/base/kv/v1beta1/kv.proto b/proto-thirdparty/cosmos/base/kv/v1beta1/kv.proto deleted file mode 100644 index 4e9b8d28..00000000 --- a/proto-thirdparty/cosmos/base/kv/v1beta1/kv.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package cosmos.base.kv.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/kv"; - -// Pairs defines a repeated slice of Pair objects. -message Pairs { - repeated Pair pairs = 1 [(gogoproto.nullable) = false]; -} - -// Pair defines a key/value bytes tuple. -message Pair { - bytes key = 1; - bytes value = 2; -} diff --git a/proto-thirdparty/cosmos/base/query/v1beta1/pagination.proto b/proto-thirdparty/cosmos/base/query/v1beta1/pagination.proto deleted file mode 100644 index cd5eb066..00000000 --- a/proto-thirdparty/cosmos/base/query/v1beta1/pagination.proto +++ /dev/null @@ -1,55 +0,0 @@ -syntax = "proto3"; -package cosmos.base.query.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/types/query"; - -// PageRequest is to be embedded in gRPC request messages for efficient -// pagination. Ex: -// -// message SomeRequest { -// Foo some_parameter = 1; -// PageRequest pagination = 2; -// } -message PageRequest { - // key is a value returned in PageResponse.next_key to begin - // querying the next page most efficiently. Only one of offset or key - // should be set. - bytes key = 1; - - // offset is a numeric offset that can be used when key is unavailable. - // It is less efficient than using key. Only one of offset or key should - // be set. - uint64 offset = 2; - - // limit is the total number of results to be returned in the result page. - // If left empty it will default to a value to be set by each app. - uint64 limit = 3; - - // count_total is set to true to indicate that the result set should include - // a count of the total number of items available for pagination in UIs. - // count_total is only respected when offset is used. It is ignored when key - // is set. - bool count_total = 4; - - // reverse is set to true if results are to be returned in the descending order. - // - // Since: cosmos-sdk 0.43 - bool reverse = 5; -} - -// PageResponse is to be embedded in gRPC response messages where the -// corresponding request message has used PageRequest. -// -// message SomeResponse { -// repeated Bar results = 1; -// PageResponse page = 2; -// } -message PageResponse { - // next_key is the key to be passed to PageRequest.key to - // query the next page most efficiently - bytes next_key = 1; - - // total is total number of results available if PageRequest.count_total - // was set, its value is undefined otherwise - uint64 total = 2; -} diff --git a/proto-thirdparty/cosmos/base/reflection/v1beta1/reflection.proto b/proto-thirdparty/cosmos/base/reflection/v1beta1/reflection.proto deleted file mode 100644 index 22670e72..00000000 --- a/proto-thirdparty/cosmos/base/reflection/v1beta1/reflection.proto +++ /dev/null @@ -1,44 +0,0 @@ -syntax = "proto3"; -package cosmos.base.reflection.v1beta1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/reflection"; - -// ReflectionService defines a service for interface reflection. -service ReflectionService { - // ListAllInterfaces lists all the interfaces registered in the interface - // registry. - rpc ListAllInterfaces(ListAllInterfacesRequest) returns (ListAllInterfacesResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces"; - }; - - // ListImplementations list all the concrete types that implement a given - // interface. - rpc ListImplementations(ListImplementationsRequest) returns (ListImplementationsResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/interfaces/" - "{interface_name}/implementations"; - }; -} - -// ListAllInterfacesRequest is the request type of the ListAllInterfaces RPC. -message ListAllInterfacesRequest {} - -// ListAllInterfacesResponse is the response type of the ListAllInterfaces RPC. -message ListAllInterfacesResponse { - // interface_names is an array of all the registered interfaces. - repeated string interface_names = 1; -} - -// ListImplementationsRequest is the request type of the ListImplementations -// RPC. -message ListImplementationsRequest { - // interface_name defines the interface to query the implementations for. - string interface_name = 1; -} - -// ListImplementationsResponse is the response type of the ListImplementations -// RPC. -message ListImplementationsResponse { - repeated string implementation_message_names = 1; -} diff --git a/proto-thirdparty/cosmos/base/reflection/v2alpha1/reflection.proto b/proto-thirdparty/cosmos/base/reflection/v2alpha1/reflection.proto deleted file mode 100644 index d5b04855..00000000 --- a/proto-thirdparty/cosmos/base/reflection/v2alpha1/reflection.proto +++ /dev/null @@ -1,218 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.base.reflection.v2alpha1; - -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/server/grpc/reflection/v2alpha1"; - -// AppDescriptor describes a cosmos-sdk based application -message AppDescriptor { - // AuthnDescriptor provides information on how to authenticate transactions on the application - // NOTE: experimental and subject to change in future releases. - AuthnDescriptor authn = 1; - // chain provides the chain descriptor - ChainDescriptor chain = 2; - // codec provides metadata information regarding codec related types - CodecDescriptor codec = 3; - // configuration provides metadata information regarding the sdk.Config type - ConfigurationDescriptor configuration = 4; - // query_services provides metadata information regarding the available queriable endpoints - QueryServicesDescriptor query_services = 5; - // tx provides metadata information regarding how to send transactions to the given application - TxDescriptor tx = 6; -} - -// TxDescriptor describes the accepted transaction type -message TxDescriptor { - // fullname is the protobuf fullname of the raw transaction type (for instance the tx.Tx type) - // it is not meant to support polymorphism of transaction types, it is supposed to be used by - // reflection clients to understand if they can handle a specific transaction type in an application. - string fullname = 1; - // msgs lists the accepted application messages (sdk.Msg) - repeated MsgDescriptor msgs = 2; -} - -// AuthnDescriptor provides information on how to sign transactions without relying -// on the online RPCs GetTxMetadata and CombineUnsignedTxAndSignatures -message AuthnDescriptor { - // sign_modes defines the supported signature algorithm - repeated SigningModeDescriptor sign_modes = 1; -} - -// SigningModeDescriptor provides information on a signing flow of the application -// NOTE(fdymylja): here we could go as far as providing an entire flow on how -// to sign a message given a SigningModeDescriptor, but it's better to think about -// this another time -message SigningModeDescriptor { - // name defines the unique name of the signing mode - string name = 1; - // number is the unique int32 identifier for the sign_mode enum - int32 number = 2; - // authn_info_provider_method_fullname defines the fullname of the method to call to get - // the metadata required to authenticate using the provided sign_modes - string authn_info_provider_method_fullname = 3; -} - -// ChainDescriptor describes chain information of the application -message ChainDescriptor { - // id is the chain id - string id = 1; -} - -// CodecDescriptor describes the registered interfaces and provides metadata information on the types -message CodecDescriptor { - // interfaces is a list of the registerted interfaces descriptors - repeated InterfaceDescriptor interfaces = 1; -} - -// InterfaceDescriptor describes the implementation of an interface -message InterfaceDescriptor { - // fullname is the name of the interface - string fullname = 1; - // interface_accepting_messages contains information regarding the proto messages which contain the interface as - // google.protobuf.Any field - repeated InterfaceAcceptingMessageDescriptor interface_accepting_messages = 2; - // interface_implementers is a list of the descriptors of the interface implementers - repeated InterfaceImplementerDescriptor interface_implementers = 3; -} - -// InterfaceImplementerDescriptor describes an interface implementer -message InterfaceImplementerDescriptor { - // fullname is the protobuf queryable name of the interface implementer - string fullname = 1; - // type_url defines the type URL used when marshalling the type as any - // this is required so we can provide type safe google.protobuf.Any marshalling and - // unmarshalling, making sure that we don't accept just 'any' type - // in our interface fields - string type_url = 2; -} - -// InterfaceAcceptingMessageDescriptor describes a protobuf message which contains -// an interface represented as a google.protobuf.Any -message InterfaceAcceptingMessageDescriptor { - // fullname is the protobuf fullname of the type containing the interface - string fullname = 1; - // field_descriptor_names is a list of the protobuf name (not fullname) of the field - // which contains the interface as google.protobuf.Any (the interface is the same, but - // it can be in multiple fields of the same proto message) - repeated string field_descriptor_names = 2; -} - -// ConfigurationDescriptor contains metadata information on the sdk.Config -message ConfigurationDescriptor { - // bech32_account_address_prefix is the account address prefix - string bech32_account_address_prefix = 1; -} - -// MsgDescriptor describes a cosmos-sdk message that can be delivered with a transaction -message MsgDescriptor { - // msg_type_url contains the TypeURL of a sdk.Msg. - string msg_type_url = 1; -} - -// ReflectionService defines a service for application reflection. -service ReflectionService { - // GetAuthnDescriptor returns information on how to authenticate transactions in the application - // NOTE: this RPC is still experimental and might be subject to breaking changes or removal in - // future releases of the cosmos-sdk. - rpc GetAuthnDescriptor(GetAuthnDescriptorRequest) returns (GetAuthnDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/authn"; - } - // GetChainDescriptor returns the description of the chain - rpc GetChainDescriptor(GetChainDescriptorRequest) returns (GetChainDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/chain"; - }; - // GetCodecDescriptor returns the descriptor of the codec of the application - rpc GetCodecDescriptor(GetCodecDescriptorRequest) returns (GetCodecDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/codec"; - } - // GetConfigurationDescriptor returns the descriptor for the sdk.Config of the application - rpc GetConfigurationDescriptor(GetConfigurationDescriptorRequest) returns (GetConfigurationDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/configuration"; - } - // GetQueryServicesDescriptor returns the available gRPC queryable services of the application - rpc GetQueryServicesDescriptor(GetQueryServicesDescriptorRequest) returns (GetQueryServicesDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/query_services"; - } - // GetTxDescriptor returns information on the used transaction object and available msgs that can be used - rpc GetTxDescriptor(GetTxDescriptorRequest) returns (GetTxDescriptorResponse) { - option (google.api.http).get = "/cosmos/base/reflection/v1beta1/app_descriptor/tx_descriptor"; - } -} - -// GetAuthnDescriptorRequest is the request used for the GetAuthnDescriptor RPC -message GetAuthnDescriptorRequest {} -// GetAuthnDescriptorResponse is the response returned by the GetAuthnDescriptor RPC -message GetAuthnDescriptorResponse { - // authn describes how to authenticate to the application when sending transactions - AuthnDescriptor authn = 1; -} - -// GetChainDescriptorRequest is the request used for the GetChainDescriptor RPC -message GetChainDescriptorRequest {} -// GetChainDescriptorResponse is the response returned by the GetChainDescriptor RPC -message GetChainDescriptorResponse { - // chain describes application chain information - ChainDescriptor chain = 1; -} - -// GetCodecDescriptorRequest is the request used for the GetCodecDescriptor RPC -message GetCodecDescriptorRequest {} -// GetCodecDescriptorResponse is the response returned by the GetCodecDescriptor RPC -message GetCodecDescriptorResponse { - // codec describes the application codec such as registered interfaces and implementations - CodecDescriptor codec = 1; -} - -// GetConfigurationDescriptorRequest is the request used for the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorRequest {} -// GetConfigurationDescriptorResponse is the response returned by the GetConfigurationDescriptor RPC -message GetConfigurationDescriptorResponse { - // config describes the application's sdk.Config - ConfigurationDescriptor config = 1; -} - -// GetQueryServicesDescriptorRequest is the request used for the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorRequest {} -// GetQueryServicesDescriptorResponse is the response returned by the GetQueryServicesDescriptor RPC -message GetQueryServicesDescriptorResponse { - // queries provides information on the available queryable services - QueryServicesDescriptor queries = 1; -} - -// GetTxDescriptorRequest is the request used for the GetTxDescriptor RPC -message GetTxDescriptorRequest {} -// GetTxDescriptorResponse is the response returned by the GetTxDescriptor RPC -message GetTxDescriptorResponse { - // tx provides information on msgs that can be forwarded to the application - // alongside the accepted transaction protobuf type - TxDescriptor tx = 1; -} - -// QueryServicesDescriptor contains the list of cosmos-sdk queriable services -message QueryServicesDescriptor { - // query_services is a list of cosmos-sdk QueryServiceDescriptor - repeated QueryServiceDescriptor query_services = 1; -} - -// QueryServiceDescriptor describes a cosmos-sdk queryable service -message QueryServiceDescriptor { - // fullname is the protobuf fullname of the service descriptor - string fullname = 1; - // is_module describes if this service is actually exposed by an application's module - bool is_module = 2; - // methods provides a list of query service methods - repeated QueryMethodDescriptor methods = 3; -} - -// QueryMethodDescriptor describes a queryable method of a query service -// no other info is provided beside method name and tendermint queryable path -// because it would be redundant with the grpc reflection service -message QueryMethodDescriptor { - // name is the protobuf name (not fullname) of the method - string name = 1; - // full_query_path is the path that can be used to query - // this method via tendermint abci.Query - string full_query_path = 2; -} diff --git a/proto-thirdparty/cosmos/base/snapshots/v1beta1/snapshot.proto b/proto-thirdparty/cosmos/base/snapshots/v1beta1/snapshot.proto deleted file mode 100644 index 6dcc4a93..00000000 --- a/proto-thirdparty/cosmos/base/snapshots/v1beta1/snapshot.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; -package cosmos.base.snapshots.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/snapshots/types"; - -// Snapshot contains Tendermint state sync snapshot info. -message Snapshot { - uint64 height = 1; - uint32 format = 2; - uint32 chunks = 3; - bytes hash = 4; - Metadata metadata = 5 [(gogoproto.nullable) = false]; -} - -// Metadata contains SDK-specific snapshot metadata. -message Metadata { - repeated bytes chunk_hashes = 1; // SHA-256 chunk hashes -} - -// SnapshotItem is an item contained in a rootmulti.Store snapshot. -message SnapshotItem { - // item is the specific type of snapshot item. - oneof item { - SnapshotStoreItem store = 1; - SnapshotIAVLItem iavl = 2 [(gogoproto.customname) = "IAVL"]; - SnapshotExtensionMeta extension = 3; - SnapshotExtensionPayload extension_payload = 4; - } -} - -// SnapshotStoreItem contains metadata about a snapshotted store. -message SnapshotStoreItem { - string name = 1; -} - -// SnapshotIAVLItem is an exported IAVL node. -message SnapshotIAVLItem { - bytes key = 1; - bytes value = 2; - // version is block height - int64 version = 3; - // height is depth of the tree. - int32 height = 4; -} - -// SnapshotExtensionMeta contains metadata about an external snapshotter. -message SnapshotExtensionMeta { - string name = 1; - uint32 format = 2; -} - -// SnapshotExtensionPayload contains payloads of an external snapshotter. -message SnapshotExtensionPayload { - bytes payload = 1; -} diff --git a/proto-thirdparty/cosmos/base/store/v1beta1/commit_info.proto b/proto-thirdparty/cosmos/base/store/v1beta1/commit_info.proto deleted file mode 100644 index 98a33d30..00000000 --- a/proto-thirdparty/cosmos/base/store/v1beta1/commit_info.proto +++ /dev/null @@ -1,29 +0,0 @@ -syntax = "proto3"; -package cosmos.base.store.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/store/types"; - -// CommitInfo defines commit information used by the multi-store when committing -// a version/height. -message CommitInfo { - int64 version = 1; - repeated StoreInfo store_infos = 2 [(gogoproto.nullable) = false]; -} - -// StoreInfo defines store-specific commit information. It contains a reference -// between a store name and the commit ID. -message StoreInfo { - string name = 1; - CommitID commit_id = 2 [(gogoproto.nullable) = false]; -} - -// CommitID defines the committment information when a specific store is -// committed. -message CommitID { - option (gogoproto.goproto_stringer) = false; - - int64 version = 1; - bytes hash = 2; -} diff --git a/proto-thirdparty/cosmos/base/store/v1beta1/listening.proto b/proto-thirdparty/cosmos/base/store/v1beta1/listening.proto deleted file mode 100644 index 35999710..00000000 --- a/proto-thirdparty/cosmos/base/store/v1beta1/listening.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.base.store.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/store/types"; - -// StoreKVPair is a KVStore KVPair used for listening to state changes (Sets and Deletes) -// It optionally includes the StoreKey for the originating KVStore and a Boolean flag to distinguish between Sets and -// Deletes -// -// Since: cosmos-sdk 0.43 -message StoreKVPair { - string store_key = 1; // the store key for the KVStore this pair originates from - bool delete = 2; // true indicates a delete operation, false indicates a set operation - bytes key = 3; - bytes value = 4; -} diff --git a/proto-thirdparty/cosmos/base/tendermint/v1beta1/query.proto b/proto-thirdparty/cosmos/base/tendermint/v1beta1/query.proto deleted file mode 100644 index 98542d23..00000000 --- a/proto-thirdparty/cosmos/base/tendermint/v1beta1/query.proto +++ /dev/null @@ -1,138 +0,0 @@ -syntax = "proto3"; -package cosmos.base.tendermint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "tendermint/p2p/types.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/client/grpc/tmservice"; - -// Service defines the gRPC querier service for tendermint queries. -service Service { - // GetNodeInfo queries the current node info. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/node_info"; - } - // GetSyncing queries node syncing. - rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/syncing"; - } - // GetLatestBlock returns the latest block. - rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/latest"; - } - // GetBlockByHeight queries block for given height. - rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/blocks/{height}"; - } - - // GetLatestValidatorSet queries latest validator-set. - rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/latest"; - } - // GetValidatorSetByHeight queries validator-set at a given height. - rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { - option (google.api.http).get = "/cosmos/base/tendermint/v1beta1/validatorsets/{height}"; - } -} - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightRequest { - int64 height = 1; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetRequest { - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// Validator is the type for the validator-set. -message Validator { - string address = 1; - google.protobuf.Any pub_key = 2; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightRequest { - int64 height = 1; -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightResponse { - .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -message GetLatestBlockRequest {} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -message GetLatestBlockResponse { - .tendermint.types.BlockID block_id = 1; - .tendermint.types.Block block = 2; -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -message GetSyncingRequest {} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -message GetSyncingResponse { - bool syncing = 1; -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoRequest {} - -// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoResponse { - .tendermint.p2p.DefaultNodeInfo default_node_info = 1; - VersionInfo application_version = 2; -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -message VersionInfo { - string name = 1; - string app_name = 2; - string version = 3; - string git_commit = 4; - string build_tags = 5; - string go_version = 6; - repeated Module build_deps = 7; - // Since: cosmos-sdk 0.43 - string cosmos_sdk_version = 8; -} - -// Module is the type for VersionInfo -message Module { - // module path - string path = 1; - // module version - string version = 2; - // checksum - string sum = 3; -} diff --git a/proto-thirdparty/cosmos/base/v1beta1/coin.proto b/proto-thirdparty/cosmos/base/v1beta1/coin.proto deleted file mode 100644 index fab75284..00000000 --- a/proto-thirdparty/cosmos/base/v1beta1/coin.proto +++ /dev/null @@ -1,40 +0,0 @@ -syntax = "proto3"; -package cosmos.base.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; - -// Coin defines a token with a denomination and an amount. -// -// NOTE: The amount field is an Int which implements the custom method -// signatures required by gogoproto. -message Coin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecCoin defines a token with a denomination and a decimal amount. -// -// NOTE: The amount field is an Dec which implements the custom method -// signatures required by gogoproto. -message DecCoin { - option (gogoproto.equal) = true; - - string denom = 1; - string amount = 2 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} - -// IntProto defines a Protobuf wrapper around an Int object. -message IntProto { - string int = 1 [(gogoproto.customtype) = "Int", (gogoproto.nullable) = false]; -} - -// DecProto defines a Protobuf wrapper around a Dec object. -message DecProto { - string dec = 1 [(gogoproto.customtype) = "Dec", (gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/capability/v1beta1/capability.proto b/proto-thirdparty/cosmos/capability/v1beta1/capability.proto deleted file mode 100644 index 1c8332f3..00000000 --- a/proto-thirdparty/cosmos/capability/v1beta1/capability.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package cosmos.capability.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; - -import "gogoproto/gogo.proto"; - -// Capability defines an implementation of an object capability. The index -// provided to a Capability must be globally unique. -message Capability { - option (gogoproto.goproto_stringer) = false; - - uint64 index = 1 [(gogoproto.moretags) = "yaml:\"index\""]; -} - -// Owner defines a single capability owner. An owner is defined by the name of -// capability and the module name. -message Owner { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - string module = 1 [(gogoproto.moretags) = "yaml:\"module\""]; - string name = 2 [(gogoproto.moretags) = "yaml:\"name\""]; -} - -// CapabilityOwners defines a set of owners of a single Capability. The set of -// owners must be unique. -message CapabilityOwners { - repeated Owner owners = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/capability/v1beta1/genesis.proto b/proto-thirdparty/cosmos/capability/v1beta1/genesis.proto deleted file mode 100644 index 05bb0afc..00000000 --- a/proto-thirdparty/cosmos/capability/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package cosmos.capability.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/capability/v1beta1/capability.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/capability/types"; - -// GenesisOwners defines the capability owners with their corresponding index. -message GenesisOwners { - // index is the index of the capability owner. - uint64 index = 1; - - // index_owners are the owners at the given index. - CapabilityOwners index_owners = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"index_owners\""]; -} - -// GenesisState defines the capability module's genesis state. -message GenesisState { - // index is the capability global index. - uint64 index = 1; - - // owners represents a map from index to owners of the capability index - // index key is string to allow amino marshalling. - repeated GenesisOwners owners = 2 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/crisis/v1beta1/genesis.proto b/proto-thirdparty/cosmos/crisis/v1beta1/genesis.proto deleted file mode 100644 index 5b0ff7ec..00000000 --- a/proto-thirdparty/cosmos/crisis/v1beta1/genesis.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// GenesisState defines the crisis module's genesis state. -message GenesisState { - // constant_fee is the fee used to verify the invariant in the crisis - // module. - cosmos.base.v1beta1.Coin constant_fee = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"constant_fee\""]; -} diff --git a/proto-thirdparty/cosmos/crisis/v1beta1/tx.proto b/proto-thirdparty/cosmos/crisis/v1beta1/tx.proto deleted file mode 100644 index 26457ad6..00000000 --- a/proto-thirdparty/cosmos/crisis/v1beta1/tx.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package cosmos.crisis.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/crisis/types"; - -import "gogoproto/gogo.proto"; - -// Msg defines the bank Msg service. -service Msg { - // VerifyInvariant defines a method to verify a particular invariance. - rpc VerifyInvariant(MsgVerifyInvariant) returns (MsgVerifyInvariantResponse); -} - -// MsgVerifyInvariant represents a message to verify a particular invariance. -message MsgVerifyInvariant { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string sender = 1; - string invariant_module_name = 2 [(gogoproto.moretags) = "yaml:\"invariant_module_name\""]; - string invariant_route = 3 [(gogoproto.moretags) = "yaml:\"invariant_route\""]; -} - -// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type. -message MsgVerifyInvariantResponse {} diff --git a/proto-thirdparty/cosmos/crypto/ed25519/keys.proto b/proto-thirdparty/cosmos/crypto/ed25519/keys.proto deleted file mode 100644 index 6ffec344..00000000 --- a/proto-thirdparty/cosmos/crypto/ed25519/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.ed25519; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"; - -// PubKey is an ed25519 public key for handling Tendermint keys in SDK. -// It's needed for Any serialization and SDK compatibility. -// It must not be used in a non Tendermint key context because it doesn't implement -// ADR-28. Nevertheless, you will like to use ed25519 in app user level -// then you must create a new proto message and follow ADR-28 for Address construction. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PublicKey"]; -} - -// Deprecated: PrivKey defines a ed25519 private key. -// NOTE: ed25519 keys must not be used in SDK apps except in a tendermint validator context. -message PrivKey { - bytes key = 1 [(gogoproto.casttype) = "crypto/ed25519.PrivateKey"]; -} diff --git a/proto-thirdparty/cosmos/crypto/multisig/keys.proto b/proto-thirdparty/cosmos/crypto/multisig/keys.proto deleted file mode 100644 index f8398e80..00000000 --- a/proto-thirdparty/cosmos/crypto/multisig/keys.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/multisig"; - -// LegacyAminoPubKey specifies a public key type -// which nests multiple public keys and a threshold, -// it uses legacy amino address rules. -message LegacyAminoPubKey { - option (gogoproto.goproto_getters) = false; - - uint32 threshold = 1 [(gogoproto.moretags) = "yaml:\"threshold\""]; - repeated google.protobuf.Any public_keys = 2 - [(gogoproto.customname) = "PubKeys", (gogoproto.moretags) = "yaml:\"pubkeys\""]; -} diff --git a/proto-thirdparty/cosmos/crypto/multisig/v1beta1/multisig.proto b/proto-thirdparty/cosmos/crypto/multisig/v1beta1/multisig.proto deleted file mode 100644 index bf671f17..00000000 --- a/proto-thirdparty/cosmos/crypto/multisig/v1beta1/multisig.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.multisig.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/types"; - -// MultiSignature wraps the signatures from a multisig.LegacyAminoPubKey. -// See cosmos.tx.v1betata1.ModeInfo.Multi for how to specify which signers -// signed and with which modes. -message MultiSignature { - option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; -} - -// CompactBitArray is an implementation of a space efficient bit array. -// This is used to ensure that the encoded data takes up a minimal amount of -// space after proto encoding. -// This is not thread safe, and is not intended for concurrent usage. -message CompactBitArray { - option (gogoproto.goproto_stringer) = false; - - uint32 extra_bits_stored = 1; - bytes elems = 2; -} diff --git a/proto-thirdparty/cosmos/crypto/secp256k1/keys.proto b/proto-thirdparty/cosmos/crypto/secp256k1/keys.proto deleted file mode 100644 index a2272571..00000000 --- a/proto-thirdparty/cosmos/crypto/secp256k1/keys.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package cosmos.crypto.secp256k1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"; - -// PubKey defines a secp256k1 public key -// Key is the compressed form of the pubkey. The first byte depends is a 0x02 byte -// if the y-coordinate is the lexicographically largest of the two associated with -// the x-coordinate. Otherwise the first byte is a 0x03. -// This prefix is followed with the x-coordinate. -message PubKey { - option (gogoproto.goproto_stringer) = false; - - bytes key = 1; -} - -// PrivKey defines a secp256k1 private key. -message PrivKey { - bytes key = 1; -} diff --git a/proto-thirdparty/cosmos/crypto/secp256r1/keys.proto b/proto-thirdparty/cosmos/crypto/secp256r1/keys.proto deleted file mode 100644 index 2e96c6e3..00000000 --- a/proto-thirdparty/cosmos/crypto/secp256r1/keys.proto +++ /dev/null @@ -1,23 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.crypto.secp256r1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/crypto/keys/secp256r1"; -option (gogoproto.messagename_all) = true; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// PubKey defines a secp256r1 ECDSA public key. -message PubKey { - // Point on secp256r1 curve in a compressed representation as specified in section - // 4.3.6 of ANSI X9.62: https://webstore.ansi.org/standards/ascx9/ansix9621998 - bytes key = 1 [(gogoproto.customtype) = "ecdsaPK"]; -} - -// PrivKey defines a secp256r1 ECDSA private key. -message PrivKey { - // secret number serialized using big-endian encoding - bytes secret = 1 [(gogoproto.customtype) = "ecdsaSK"]; -} diff --git a/proto-thirdparty/cosmos/distribution/v1beta1/distribution.proto b/proto-thirdparty/cosmos/distribution/v1beta1/distribution.proto deleted file mode 100644 index ae98ec0b..00000000 --- a/proto-thirdparty/cosmos/distribution/v1beta1/distribution.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Params defines the set of params for the distribution module. -message Params { - option (gogoproto.goproto_stringer) = false; - string community_tax = 1 [ - (gogoproto.moretags) = "yaml:\"community_tax\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string base_proposer_reward = 2 [ - (gogoproto.moretags) = "yaml:\"base_proposer_reward\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - string bonus_proposer_reward = 3 [ - (gogoproto.moretags) = "yaml:\"bonus_proposer_reward\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bool withdraw_addr_enabled = 4 [(gogoproto.moretags) = "yaml:\"withdraw_addr_enabled\""]; -} - -// ValidatorHistoricalRewards represents historical rewards for a validator. -// Height is implicit within the store key. -// Cumulative reward ratio is the sum from the zeroeth period -// until this period of rewards / tokens, per the spec. -// The reference count indicates the number of objects -// which might need to reference this historical entry at any point. -// ReferenceCount = -// number of outstanding delegations which ended the associated period (and -// might need to read that record) -// + number of slashes which ended the associated period (and might need to -// read that record) -// + one per validator for the zeroeth period, set on initialization -message ValidatorHistoricalRewards { - repeated cosmos.base.v1beta1.DecCoin cumulative_reward_ratio = 1 [ - (gogoproto.moretags) = "yaml:\"cumulative_reward_ratio\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; - uint32 reference_count = 2 [(gogoproto.moretags) = "yaml:\"reference_count\""]; -} - -// ValidatorCurrentRewards represents current rewards and current -// period for a validator kept as a running counter and incremented -// each block as long as the validator's tokens remain constant. -message ValidatorCurrentRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; - uint64 period = 2; -} - -// ValidatorAccumulatedCommission represents accumulated commission -// for a validator kept as a running counter, can be withdrawn at any time. -message ValidatorAccumulatedCommission { - repeated cosmos.base.v1beta1.DecCoin commission = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// ValidatorOutstandingRewards represents outstanding (un-withdrawn) rewards -// for a validator inexpensive to track, allows simple sanity checks. -message ValidatorOutstandingRewards { - repeated cosmos.base.v1beta1.DecCoin rewards = 1 [ - (gogoproto.moretags) = "yaml:\"rewards\"", - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false - ]; -} - -// ValidatorSlashEvent represents a validator slash event. -// Height is implicit within the store key. -// This is needed to calculate appropriate amount of staking tokens -// for delegations which are withdrawn after a slash has occurred. -message ValidatorSlashEvent { - uint64 validator_period = 1 [(gogoproto.moretags) = "yaml:\"validator_period\""]; - string fraction = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// ValidatorSlashEvents is a collection of ValidatorSlashEvent messages. -message ValidatorSlashEvents { - option (gogoproto.goproto_stringer) = false; - repeated ValidatorSlashEvent validator_slash_events = 1 - [(gogoproto.moretags) = "yaml:\"validator_slash_events\"", (gogoproto.nullable) = false]; -} - -// FeePool is the global fee pool for distribution. -message FeePool { - repeated cosmos.base.v1beta1.DecCoin community_pool = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.moretags) = "yaml:\"community_pool\"" - ]; -} - -// CommunityPoolSpendProposal details a proposal for use of community funds, -// together with how many coins are proposed to be spent, and to which -// recipient account. -message CommunityPoolSpendProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - string recipient = 3; - repeated cosmos.base.v1beta1.Coin amount = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// DelegatorStartingInfo represents the starting info for a delegator reward -// period. It tracks the previous validator period, the delegation's amount of -// staking token, and the creation height (to check later on if any slashes have -// occurred). NOTE: Even though validators are slashed to whole staking tokens, -// the delegators within the validator may be left with less than a full token, -// thus sdk.Dec is used. -message DelegatorStartingInfo { - uint64 previous_period = 1 [(gogoproto.moretags) = "yaml:\"previous_period\""]; - string stake = 2 [ - (gogoproto.moretags) = "yaml:\"stake\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - uint64 height = 3 [(gogoproto.moretags) = "yaml:\"creation_height\"", (gogoproto.jsontag) = "creation_height"]; -} - -// DelegationDelegatorReward represents the properties -// of a delegator's delegation reward. -message DelegationDelegatorReward { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - repeated cosmos.base.v1beta1.DecCoin reward = 2 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} - -// CommunityPoolSpendProposalWithDeposit defines a CommunityPoolSpendProposal -// with a deposit -message CommunityPoolSpendProposalWithDeposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string title = 1 [(gogoproto.moretags) = "yaml:\"title\""]; - string description = 2 [(gogoproto.moretags) = "yaml:\"description\""]; - string recipient = 3 [(gogoproto.moretags) = "yaml:\"recipient\""]; - string amount = 4 [(gogoproto.moretags) = "yaml:\"amount\""]; - string deposit = 5 [(gogoproto.moretags) = "yaml:\"deposit\""]; -} diff --git a/proto-thirdparty/cosmos/distribution/v1beta1/genesis.proto b/proto-thirdparty/cosmos/distribution/v1beta1/genesis.proto deleted file mode 100644 index c0b17cdf..00000000 --- a/proto-thirdparty/cosmos/distribution/v1beta1/genesis.proto +++ /dev/null @@ -1,155 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; - -// DelegatorWithdrawInfo is the address for where distributions rewards are -// withdrawn to by default this struct is only used at genesis to feed in -// default withdraw addresses. -message DelegatorWithdrawInfo { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - - // withdraw_address is the address to withdraw the delegation rewards to. - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; -} - -// ValidatorOutstandingRewardsRecord is used for import/export via genesis json. -message ValidatorOutstandingRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // outstanding_rewards represents the oustanding rewards of a validator. - repeated cosmos.base.v1beta1.DecCoin outstanding_rewards = 2 [ - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"outstanding_rewards\"" - ]; -} - -// ValidatorAccumulatedCommissionRecord is used for import / export via genesis -// json. -message ValidatorAccumulatedCommissionRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // accumulated is the accumulated commission of a validator. - ValidatorAccumulatedCommission accumulated = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"accumulated\""]; -} - -// ValidatorHistoricalRewardsRecord is used for import / export via genesis -// json. -message ValidatorHistoricalRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // period defines the period the historical rewards apply to. - uint64 period = 2; - - // rewards defines the historical rewards of a validator. - ValidatorHistoricalRewards rewards = 3 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; -} - -// ValidatorCurrentRewardsRecord is used for import / export via genesis json. -message ValidatorCurrentRewardsRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // rewards defines the current rewards of a validator. - ValidatorCurrentRewards rewards = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"rewards\""]; -} - -// DelegatorStartingInfoRecord used for import / export via genesis json. -message DelegatorStartingInfoRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address is the address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - - // validator_address is the address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - - // starting_info defines the starting info of a delegator. - DelegatorStartingInfo starting_info = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"starting_info\""]; -} - -// ValidatorSlashEventRecord is used for import / export via genesis json. -message ValidatorSlashEventRecord { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validator_address is the address of the validator. - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // height defines the block height at which the slash event occured. - uint64 height = 2; - // period is the period of the slash event. - uint64 period = 3; - // validator_slash_event describes the slash event. - ValidatorSlashEvent validator_slash_event = 4 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"event\""]; -} - -// GenesisState defines the distribution module's genesis state. -message GenesisState { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // params defines all the paramaters of the module. - Params params = 1 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"params\""]; - - // fee_pool defines the fee pool at genesis. - FeePool fee_pool = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"fee_pool\""]; - - // fee_pool defines the delegator withdraw infos at genesis. - repeated DelegatorWithdrawInfo delegator_withdraw_infos = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_withdraw_infos\""]; - - // fee_pool defines the previous proposer at genesis. - string previous_proposer = 4 [(gogoproto.moretags) = "yaml:\"previous_proposer\""]; - - // fee_pool defines the outstanding rewards of all validators at genesis. - repeated ValidatorOutstandingRewardsRecord outstanding_rewards = 5 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"outstanding_rewards\""]; - - // fee_pool defines the accumulated commisions of all validators at genesis. - repeated ValidatorAccumulatedCommissionRecord validator_accumulated_commissions = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_accumulated_commissions\""]; - - // fee_pool defines the historical rewards of all validators at genesis. - repeated ValidatorHistoricalRewardsRecord validator_historical_rewards = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_historical_rewards\""]; - - // fee_pool defines the current rewards of all validators at genesis. - repeated ValidatorCurrentRewardsRecord validator_current_rewards = 8 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_current_rewards\""]; - - // fee_pool defines the delegator starting infos at genesis. - repeated DelegatorStartingInfoRecord delegator_starting_infos = 9 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"delegator_starting_infos\""]; - - // fee_pool defines the validator slash events at genesis. - repeated ValidatorSlashEventRecord validator_slash_events = 10 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_slash_events\""]; -} diff --git a/proto-thirdparty/cosmos/distribution/v1beta1/query.proto b/proto-thirdparty/cosmos/distribution/v1beta1/query.proto deleted file mode 100644 index 2991218d..00000000 --- a/proto-thirdparty/cosmos/distribution/v1beta1/query.proto +++ /dev/null @@ -1,218 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/distribution/v1beta1/distribution.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; - -// Query defines the gRPC querier service for distribution module. -service Query { - // Params queries params of the distribution module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/params"; - } - - // ValidatorOutstandingRewards queries rewards of a validator address. - rpc ValidatorOutstandingRewards(QueryValidatorOutstandingRewardsRequest) - returns (QueryValidatorOutstandingRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/outstanding_rewards"; - } - - // ValidatorCommission queries accumulated commission for a validator. - rpc ValidatorCommission(QueryValidatorCommissionRequest) returns (QueryValidatorCommissionResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/" - "{validator_address}/commission"; - } - - // ValidatorSlashes queries slash events of a validator. - rpc ValidatorSlashes(QueryValidatorSlashesRequest) returns (QueryValidatorSlashesResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/validators/{validator_address}/slashes"; - } - - // DelegationRewards queries the total rewards accrued by a delegation. - rpc DelegationRewards(QueryDelegationRewardsRequest) returns (QueryDelegationRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/" - "{validator_address}"; - } - - // DelegationTotalRewards queries the total rewards accrued by a each - // validator. - rpc DelegationTotalRewards(QueryDelegationTotalRewardsRequest) returns (QueryDelegationTotalRewardsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards"; - } - - // DelegatorValidators queries the validators of a delegator. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/validators"; - } - - // DelegatorWithdrawAddress queries withdraw address of a delegator. - rpc DelegatorWithdrawAddress(QueryDelegatorWithdrawAddressRequest) returns (QueryDelegatorWithdrawAddressResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/delegators/" - "{delegator_address}/withdraw_address"; - } - - // CommunityPool queries the community pool coins. - rpc CommunityPool(QueryCommunityPoolRequest) returns (QueryCommunityPoolResponse) { - option (google.api.http).get = "/cosmos/distribution/v1beta1/community_pool"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorOutstandingRewardsRequest is the request type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsRequest { - // validator_address defines the validator address to query for. - string validator_address = 1; -} - -// QueryValidatorOutstandingRewardsResponse is the response type for the -// Query/ValidatorOutstandingRewards RPC method. -message QueryValidatorOutstandingRewardsResponse { - ValidatorOutstandingRewards rewards = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorCommissionRequest is the request type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionRequest { - // validator_address defines the validator address to query for. - string validator_address = 1; -} - -// QueryValidatorCommissionResponse is the response type for the -// Query/ValidatorCommission RPC method -message QueryValidatorCommissionResponse { - // commission defines the commision the validator received. - ValidatorAccumulatedCommission commission = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorSlashesRequest is the request type for the -// Query/ValidatorSlashes RPC method -message QueryValidatorSlashesRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - // validator_address defines the validator address to query for. - string validator_address = 1; - // starting_height defines the optional starting height to query the slashes. - uint64 starting_height = 2; - // starting_height defines the optional ending height to query the slashes. - uint64 ending_height = 3; - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryValidatorSlashesResponse is the response type for the -// Query/ValidatorSlashes RPC method. -message QueryValidatorSlashesResponse { - // slashes defines the slashes the validator received. - repeated ValidatorSlashEvent slashes = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRewardsRequest is the request type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1; - // validator_address defines the validator address to query for. - string validator_address = 2; -} - -// QueryDelegationRewardsResponse is the response type for the -// Query/DelegationRewards RPC method. -message QueryDelegationRewardsResponse { - // rewards defines the rewards accrued by a delegation. - repeated cosmos.base.v1beta1.DecCoin rewards = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// QueryDelegationTotalRewardsRequest is the request type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - // delegator_address defines the delegator address to query for. - string delegator_address = 1; -} - -// QueryDelegationTotalRewardsResponse is the response type for the -// Query/DelegationTotalRewards RPC method. -message QueryDelegationTotalRewardsResponse { - // rewards defines all the rewards accrued by a delegator. - repeated DelegationDelegatorReward rewards = 1 [(gogoproto.nullable) = false]; - // total defines the sum of all the rewards. - repeated cosmos.base.v1beta1.DecCoin total = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins"]; -} - -// QueryDelegatorValidatorsRequest is the request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1; -} - -// QueryDelegatorValidatorsResponse is the response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // validators defines the validators a delegator is delegating for. - repeated string validators = 1; -} - -// QueryDelegatorWithdrawAddressRequest is the request type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_address defines the delegator address to query for. - string delegator_address = 1; -} - -// QueryDelegatorWithdrawAddressResponse is the response type for the -// Query/DelegatorWithdrawAddress RPC method. -message QueryDelegatorWithdrawAddressResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // withdraw_address defines the delegator address to query for. - string withdraw_address = 1; -} - -// QueryCommunityPoolRequest is the request type for the Query/CommunityPool RPC -// method. -message QueryCommunityPoolRequest {} - -// QueryCommunityPoolResponse is the response type for the Query/CommunityPool -// RPC method. -message QueryCommunityPoolResponse { - // pool defines community pool's coins. - repeated cosmos.base.v1beta1.DecCoin pool = 1 - [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.DecCoins", (gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/distribution/v1beta1/tx.proto b/proto-thirdparty/cosmos/distribution/v1beta1/tx.proto deleted file mode 100644 index e6ce478b..00000000 --- a/proto-thirdparty/cosmos/distribution/v1beta1/tx.proto +++ /dev/null @@ -1,79 +0,0 @@ -syntax = "proto3"; -package cosmos.distribution.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/distribution/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -// Msg defines the distribution Msg service. -service Msg { - // SetWithdrawAddress defines a method to change the withdraw address - // for a delegator (or validator self-delegation). - rpc SetWithdrawAddress(MsgSetWithdrawAddress) returns (MsgSetWithdrawAddressResponse); - - // WithdrawDelegatorReward defines a method to withdraw rewards of delegator - // from a single validator. - rpc WithdrawDelegatorReward(MsgWithdrawDelegatorReward) returns (MsgWithdrawDelegatorRewardResponse); - - // WithdrawValidatorCommission defines a method to withdraw the - // full commission to the validator address. - rpc WithdrawValidatorCommission(MsgWithdrawValidatorCommission) returns (MsgWithdrawValidatorCommissionResponse); - - // FundCommunityPool defines a method to allow an account to directly - // fund the community pool. - rpc FundCommunityPool(MsgFundCommunityPool) returns (MsgFundCommunityPoolResponse); -} - -// MsgSetWithdrawAddress sets the withdraw address for -// a delegator (or validator self-delegation). -message MsgSetWithdrawAddress { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string withdraw_address = 2 [(gogoproto.moretags) = "yaml:\"withdraw_address\""]; -} - -// MsgSetWithdrawAddressResponse defines the Msg/SetWithdrawAddress response type. -message MsgSetWithdrawAddressResponse {} - -// MsgWithdrawDelegatorReward represents delegation withdrawal to a delegator -// from a single validator. -message MsgWithdrawDelegatorReward { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; -} - -// MsgWithdrawDelegatorRewardResponse defines the Msg/WithdrawDelegatorReward response type. -message MsgWithdrawDelegatorRewardResponse {} - -// MsgWithdrawValidatorCommission withdraws the full commission to the validator -// address. -message MsgWithdrawValidatorCommission { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string validator_address = 1 [(gogoproto.moretags) = "yaml:\"validator_address\""]; -} - -// MsgWithdrawValidatorCommissionResponse defines the Msg/WithdrawValidatorCommission response type. -message MsgWithdrawValidatorCommissionResponse {} - -// MsgFundCommunityPool allows an account to directly -// fund the community pool. -message MsgFundCommunityPool { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - string depositor = 2; -} - -// MsgFundCommunityPoolResponse defines the Msg/FundCommunityPool response type. -message MsgFundCommunityPoolResponse {} diff --git a/proto-thirdparty/cosmos/evidence/v1beta1/evidence.proto b/proto-thirdparty/cosmos/evidence/v1beta1/evidence.proto deleted file mode 100644 index 14612c31..00000000 --- a/proto-thirdparty/cosmos/evidence/v1beta1/evidence.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -// Equivocation implements the Evidence interface and defines evidence of double -// signing misbehavior. -message Equivocation { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - int64 height = 1; - google.protobuf.Timestamp time = 2 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - int64 power = 3; - string consensus_address = 4 [(gogoproto.moretags) = "yaml:\"consensus_address\""]; -} \ No newline at end of file diff --git a/proto-thirdparty/cosmos/evidence/v1beta1/genesis.proto b/proto-thirdparty/cosmos/evidence/v1beta1/genesis.proto deleted file mode 100644 index 199f446f..00000000 --- a/proto-thirdparty/cosmos/evidence/v1beta1/genesis.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; - -import "google/protobuf/any.proto"; - -// GenesisState defines the evidence module's genesis state. -message GenesisState { - // evidence defines all the evidence at genesis. - repeated google.protobuf.Any evidence = 1; -} diff --git a/proto-thirdparty/cosmos/evidence/v1beta1/query.proto b/proto-thirdparty/cosmos/evidence/v1beta1/query.proto deleted file mode 100644 index eda00544..00000000 --- a/proto-thirdparty/cosmos/evidence/v1beta1/query.proto +++ /dev/null @@ -1,51 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; - -// Query defines the gRPC querier service. -service Query { - // Evidence queries evidence based on evidence hash. - rpc Evidence(QueryEvidenceRequest) returns (QueryEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence/{evidence_hash}"; - } - - // AllEvidence queries all evidence. - rpc AllEvidence(QueryAllEvidenceRequest) returns (QueryAllEvidenceResponse) { - option (google.api.http).get = "/cosmos/evidence/v1beta1/evidence"; - } -} - -// QueryEvidenceRequest is the request type for the Query/Evidence RPC method. -message QueryEvidenceRequest { - // evidence_hash defines the hash of the requested evidence. - bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; -} - -// QueryEvidenceResponse is the response type for the Query/Evidence RPC method. -message QueryEvidenceResponse { - // evidence returns the requested evidence. - google.protobuf.Any evidence = 1; -} - -// QueryEvidenceRequest is the request type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryAllEvidenceResponse is the response type for the Query/AllEvidence RPC -// method. -message QueryAllEvidenceResponse { - // evidence returns all evidences. - repeated google.protobuf.Any evidence = 1; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto-thirdparty/cosmos/evidence/v1beta1/tx.proto b/proto-thirdparty/cosmos/evidence/v1beta1/tx.proto deleted file mode 100644 index 38795f25..00000000 --- a/proto-thirdparty/cosmos/evidence/v1beta1/tx.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package cosmos.evidence.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/evidence/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -// Msg defines the evidence Msg service. -service Msg { - // SubmitEvidence submits an arbitrary Evidence of misbehavior such as equivocation or - // counterfactual signing. - rpc SubmitEvidence(MsgSubmitEvidence) returns (MsgSubmitEvidenceResponse); -} - -// MsgSubmitEvidence represents a message that supports submitting arbitrary -// Evidence of misbehavior such as equivocation or counterfactual signing. -message MsgSubmitEvidence { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string submitter = 1; - google.protobuf.Any evidence = 2 [(cosmos_proto.accepts_interface) = "Evidence"]; -} - -// MsgSubmitEvidenceResponse defines the Msg/SubmitEvidence response type. -message MsgSubmitEvidenceResponse { - // hash defines the hash of the evidence. - bytes hash = 4; -} diff --git a/proto-thirdparty/cosmos/feegrant/v1beta1/feegrant.proto b/proto-thirdparty/cosmos/feegrant/v1beta1/feegrant.proto deleted file mode 100644 index a86691f9..00000000 --- a/proto-thirdparty/cosmos/feegrant/v1beta1/feegrant.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// BasicAllowance implements Allowance with a one-time grant of tokens -// that optionally expires. The grantee can use up to SpendLimit to cover fees. -message BasicAllowance { - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // spend_limit specifies the maximum amount of tokens that can be spent - // by this allowance and will be updated as tokens are spent. If it is - // empty, there is no spend limit and any amount of coins can be spent. - repeated cosmos.base.v1beta1.Coin spend_limit = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // expiration specifies an optional time when this allowance expires - google.protobuf.Timestamp expiration = 2 [(gogoproto.stdtime) = true]; -} - -// PeriodicAllowance extends Allowance to allow for both a maximum cap, -// as well as a limit per time period. -message PeriodicAllowance { - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // basic specifies a struct of `BasicAllowance` - BasicAllowance basic = 1 [(gogoproto.nullable) = false]; - - // period specifies the time duration in which period_spend_limit coins can - // be spent before that allowance is reset - google.protobuf.Duration period = 2 [(gogoproto.stdduration) = true, (gogoproto.nullable) = false]; - - // period_spend_limit specifies the maximum number of coins that can be spent - // in the period - repeated cosmos.base.v1beta1.Coin period_spend_limit = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // period_can_spend is the number of coins left to be spent before the period_reset time - repeated cosmos.base.v1beta1.Coin period_can_spend = 4 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // period_reset is the time at which this period resets and a new one begins, - // it is calculated from the start time of the first transaction after the - // last period ended - google.protobuf.Timestamp period_reset = 5 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; -} - -// AllowedMsgAllowance creates allowance only for specified message types. -message AllowedMsgAllowance { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "FeeAllowanceI"; - - // allowance can be any of basic and filtered fee allowance. - google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; - - // allowed_messages are the messages for which the grantee has the access. - repeated string allowed_messages = 2; -} - -// Grant is stored in the KVStore to record a grant with full context -message Grant { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; - - // allowance can be any of basic and filtered fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; -} diff --git a/proto-thirdparty/cosmos/feegrant/v1beta1/genesis.proto b/proto-thirdparty/cosmos/feegrant/v1beta1/genesis.proto deleted file mode 100644 index 5b1ac4ca..00000000 --- a/proto-thirdparty/cosmos/feegrant/v1beta1/genesis.proto +++ /dev/null @@ -1,13 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/feegrant/v1beta1/feegrant.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// GenesisState contains a set of fee allowances, persisted from the store -message GenesisState { - repeated Grant allowances = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/feegrant/v1beta1/query.proto b/proto-thirdparty/cosmos/feegrant/v1beta1/query.proto deleted file mode 100644 index 42d7a842..00000000 --- a/proto-thirdparty/cosmos/feegrant/v1beta1/query.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "cosmos/feegrant/v1beta1/feegrant.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// Query defines the gRPC querier service. -service Query { - - // Allowance returns fee granted to the grantee by the granter. - rpc Allowance(QueryAllowanceRequest) returns (QueryAllowanceResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}"; - } - - // Allowances returns all the grants for address. - rpc Allowances(QueryAllowancesRequest) returns (QueryAllowancesResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/allowances/{grantee}"; - } - - // AllowancesByGranter returns all the grants given by an address - // Since v0.46 - rpc AllowancesByGranter(QueryAllowancesByGranterRequest) returns (QueryAllowancesByGranterResponse) { - option (google.api.http).get = "/cosmos/feegrant/v1beta1/issued/{granter}"; - } -} - -// QueryAllowanceRequest is the request type for the Query/Allowance RPC method. -message QueryAllowanceRequest { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; -} - -// QueryAllowanceResponse is the response type for the Query/Allowance RPC method. -message QueryAllowanceResponse { - // allowance is a allowance granted for grantee by granter. - cosmos.feegrant.v1beta1.Grant allowance = 1; -} - -// QueryAllowancesRequest is the request type for the Query/Allowances RPC method. -message QueryAllowancesRequest { - string grantee = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesResponse is the response type for the Query/Allowances RPC method. -message QueryAllowancesResponse { - // allowances are allowance's granted for grantee by granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryAllowancesByGranterRequest is the request type for the Query/AllowancesByGranter RPC method. -message QueryAllowancesByGranterRequest { - string granter = 1; - - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryAllowancesByGranterResponse is the response type for the Query/AllowancesByGranter RPC method. -message QueryAllowancesByGranterResponse { - // allowances that have been issued by the granter. - repeated cosmos.feegrant.v1beta1.Grant allowances = 1; - - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto-thirdparty/cosmos/feegrant/v1beta1/tx.proto b/proto-thirdparty/cosmos/feegrant/v1beta1/tx.proto deleted file mode 100644 index 2d875e92..00000000 --- a/proto-thirdparty/cosmos/feegrant/v1beta1/tx.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Since: cosmos-sdk 0.43 -syntax = "proto3"; -package cosmos.feegrant.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/feegrant"; - -// Msg defines the feegrant msg service. -service Msg { - - // GrantAllowance grants fee allowance to the grantee on the granter's - // account with the provided expiration time. - rpc GrantAllowance(MsgGrantAllowance) returns (MsgGrantAllowanceResponse); - - // RevokeAllowance revokes any fee allowance of granter's account that - // has been granted to the grantee. - rpc RevokeAllowance(MsgRevokeAllowance) returns (MsgRevokeAllowanceResponse); -} - -// MsgGrantAllowance adds permission for Grantee to spend up to Allowance -// of fees from the account of Granter. -message MsgGrantAllowance { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; - - // allowance can be any of basic and filtered fee allowance. - google.protobuf.Any allowance = 3 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; -} - -// MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type. -message MsgGrantAllowanceResponse {} - -// MsgRevokeAllowance removes any existing Allowance from Granter to Grantee. -message MsgRevokeAllowance { - // granter is the address of the user granting an allowance of their funds. - string granter = 1; - - // grantee is the address of the user being granted an allowance of another user's funds. - string grantee = 2; -} - -// MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type. -message MsgRevokeAllowanceResponse {} diff --git a/proto-thirdparty/cosmos/genutil/v1beta1/genesis.proto b/proto-thirdparty/cosmos/genutil/v1beta1/genesis.proto deleted file mode 100644 index a0207793..00000000 --- a/proto-thirdparty/cosmos/genutil/v1beta1/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.genutil.v1beta1; - -import "gogoproto/gogo.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/genutil/types"; - -// GenesisState defines the raw genesis transaction in JSON. -message GenesisState { - // gen_txs defines the genesis transactions. - repeated bytes gen_txs = 1 [ - (gogoproto.casttype) = "encoding/json.RawMessage", - (gogoproto.jsontag) = "gentxs", - (gogoproto.moretags) = "yaml:\"gentxs\"" - ]; -} diff --git a/proto-thirdparty/cosmos/gov/v1beta1/genesis.proto b/proto-thirdparty/cosmos/gov/v1beta1/genesis.proto deleted file mode 100644 index a9995004..00000000 --- a/proto-thirdparty/cosmos/gov/v1beta1/genesis.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; - -package cosmos.gov.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/gov/v1beta1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; - -// GenesisState defines the gov module's genesis state. -message GenesisState { - // starting_proposal_id is the ID of the starting proposal. - uint64 starting_proposal_id = 1 [(gogoproto.moretags) = "yaml:\"starting_proposal_id\""]; - // deposits defines all the deposits present at genesis. - repeated Deposit deposits = 2 [(gogoproto.castrepeated) = "Deposits", (gogoproto.nullable) = false]; - // votes defines all the votes present at genesis. - repeated Vote votes = 3 [(gogoproto.castrepeated) = "Votes", (gogoproto.nullable) = false]; - // proposals defines all the proposals present at genesis. - repeated Proposal proposals = 4 [(gogoproto.castrepeated) = "Proposals", (gogoproto.nullable) = false]; - // params defines all the paramaters of related to deposit. - DepositParams deposit_params = 5 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_params\""]; - // params defines all the paramaters of related to voting. - VotingParams voting_params = 6 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_params\""]; - // params defines all the paramaters of related to tally. - TallyParams tally_params = 7 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"tally_params\""]; -} diff --git a/proto-thirdparty/cosmos/gov/v1beta1/gov.proto b/proto-thirdparty/cosmos/gov/v1beta1/gov.proto deleted file mode 100644 index 01aebf95..00000000 --- a/proto-thirdparty/cosmos/gov/v1beta1/gov.proto +++ /dev/null @@ -1,200 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "google/protobuf/timestamp.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; -option (gogoproto.goproto_stringer_all) = false; -option (gogoproto.stringer_all) = false; -option (gogoproto.goproto_getters_all) = false; - -// VoteOption enumerates the valid vote options for a given governance proposal. -enum VoteOption { - option (gogoproto.goproto_enum_prefix) = false; - - // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - VOTE_OPTION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "OptionEmpty"]; - // VOTE_OPTION_YES defines a yes vote option. - VOTE_OPTION_YES = 1 [(gogoproto.enumvalue_customname) = "OptionYes"]; - // VOTE_OPTION_ABSTAIN defines an abstain vote option. - VOTE_OPTION_ABSTAIN = 2 [(gogoproto.enumvalue_customname) = "OptionAbstain"]; - // VOTE_OPTION_NO defines a no vote option. - VOTE_OPTION_NO = 3 [(gogoproto.enumvalue_customname) = "OptionNo"]; - // VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - VOTE_OPTION_NO_WITH_VETO = 4 [(gogoproto.enumvalue_customname) = "OptionNoWithVeto"]; -} - -// WeightedVoteOption defines a unit of vote for vote split. -// -// Since: cosmos-sdk 0.43 -message WeightedVoteOption { - VoteOption option = 1; - string weight = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"weight\"" - ]; -} - -// TextProposal defines a standard text proposal whose changes need to be -// manually updated in case of approval. -message TextProposal { - option (cosmos_proto.implements_interface) = "Content"; - - option (gogoproto.equal) = true; - - string title = 1; - string description = 2; -} - -// Deposit defines an amount deposited by an account address to an active -// proposal. -message Deposit { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string depositor = 2; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// Proposal defines the core field members of a governance proposal. -message Proposal { - option (gogoproto.equal) = true; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (gogoproto.moretags) = "yaml:\"id\""]; - google.protobuf.Any content = 2 [(cosmos_proto.accepts_interface) = "Content"]; - ProposalStatus status = 3 [(gogoproto.moretags) = "yaml:\"proposal_status\""]; - TallyResult final_tally_result = 4 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"final_tally_result\""]; - google.protobuf.Timestamp submit_time = 5 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"submit_time\""]; - google.protobuf.Timestamp deposit_end_time = 6 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"deposit_end_time\""]; - repeated cosmos.base.v1beta1.Coin total_deposit = 7 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"total_deposit\"" - ]; - google.protobuf.Timestamp voting_start_time = 8 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_start_time\""]; - google.protobuf.Timestamp voting_end_time = 9 - [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"voting_end_time\""]; -} - -// ProposalStatus enumerates the valid statuses of a proposal. -enum ProposalStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - PROPOSAL_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "StatusNil"]; - // PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - // period. - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1 [(gogoproto.enumvalue_customname) = "StatusDepositPeriod"]; - // PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - // period. - PROPOSAL_STATUS_VOTING_PERIOD = 2 [(gogoproto.enumvalue_customname) = "StatusVotingPeriod"]; - // PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - // passed. - PROPOSAL_STATUS_PASSED = 3 [(gogoproto.enumvalue_customname) = "StatusPassed"]; - // PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - // been rejected. - PROPOSAL_STATUS_REJECTED = 4 [(gogoproto.enumvalue_customname) = "StatusRejected"]; - // PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - // failed. - PROPOSAL_STATUS_FAILED = 5 [(gogoproto.enumvalue_customname) = "StatusFailed"]; -} - -// TallyResult defines a standard tally for a governance proposal. -message TallyResult { - option (gogoproto.equal) = true; - - string yes = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string abstain = 2 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string no = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - string no_with_veto = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"no_with_veto\"" - ]; -} - -// Vote defines a vote on a governance proposal. -// A Vote consists of a proposal ID, the voter, and the vote option. -message Vote { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = false; - - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - // Deprecated: Prefer to use `options` instead. This field is set in queries - // if and only if `len(options) == 1` and that option has weight 1. In all - // other cases, this field will default to VOTE_OPTION_UNSPECIFIED. - VoteOption option = 3 [deprecated = true]; - // Since: cosmos-sdk 0.43 - repeated WeightedVoteOption options = 4 [(gogoproto.nullable) = false]; -} - -// DepositParams defines the params for deposits on governance proposals. -message DepositParams { - // Minimum deposit for a proposal to enter voting period. - repeated cosmos.base.v1beta1.Coin min_deposit = 1 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"min_deposit\"", - (gogoproto.jsontag) = "min_deposit,omitempty" - ]; - - // Maximum period for Atom holders to deposit on a proposal. Initial value: 2 - // months. - google.protobuf.Duration max_deposit_period = 2 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "max_deposit_period,omitempty", - (gogoproto.moretags) = "yaml:\"max_deposit_period\"" - ]; -} - -// VotingParams defines the params for voting on governance proposals. -message VotingParams { - // Length of the voting period. - google.protobuf.Duration voting_period = 1 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.jsontag) = "voting_period,omitempty", - (gogoproto.moretags) = "yaml:\"voting_period\"" - ]; -} - -// TallyParams defines the params for tallying votes on governance proposals. -message TallyParams { - // Minimum percentage of total stake needed to vote for a result to be - // considered valid. - bytes quorum = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "quorum,omitempty" - ]; - - // Minimum proportion of Yes votes for proposal to pass. Default value: 0.5. - bytes threshold = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "threshold,omitempty" - ]; - - // Minimum value of Veto votes to Total votes ratio for proposal to be - // vetoed. Default value: 1/3. - bytes veto_threshold = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "veto_threshold,omitempty", - (gogoproto.moretags) = "yaml:\"veto_threshold\"" - ]; -} diff --git a/proto-thirdparty/cosmos/gov/v1beta1/query.proto b/proto-thirdparty/cosmos/gov/v1beta1/query.proto deleted file mode 100644 index da62bdba..00000000 --- a/proto-thirdparty/cosmos/gov/v1beta1/query.proto +++ /dev/null @@ -1,190 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/gov/v1beta1/gov.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; - -// Query defines the gRPC querier service for gov module -service Query { - // Proposal queries proposal details based on ProposalID. - rpc Proposal(QueryProposalRequest) returns (QueryProposalResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}"; - } - - // Proposals queries all proposals based on given status. - rpc Proposals(QueryProposalsRequest) returns (QueryProposalsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals"; - } - - // Vote queries voted information based on proposalID, voterAddr. - rpc Vote(QueryVoteRequest) returns (QueryVoteResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}"; - } - - // Votes queries votes of a given proposal. - rpc Votes(QueryVotesRequest) returns (QueryVotesResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/votes"; - } - - // Params queries all parameters of the gov module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/params/{params_type}"; - } - - // Deposit queries single deposit information based proposalID, depositAddr. - rpc Deposit(QueryDepositRequest) returns (QueryDepositResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}"; - } - - // Deposits queries all deposits of a single proposal. - rpc Deposits(QueryDepositsRequest) returns (QueryDepositsResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits"; - } - - // TallyResult queries the tally of a proposal vote. - rpc TallyResult(QueryTallyResultRequest) returns (QueryTallyResultResponse) { - option (google.api.http).get = "/cosmos/gov/v1beta1/proposals/{proposal_id}/tally"; - } -} - -// QueryProposalRequest is the request type for the Query/Proposal RPC method. -message QueryProposalRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryProposalResponse is the response type for the Query/Proposal RPC method. -message QueryProposalResponse { - Proposal proposal = 1 [(gogoproto.nullable) = false]; -} - -// QueryProposalsRequest is the request type for the Query/Proposals RPC method. -message QueryProposalsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_status defines the status of the proposals. - ProposalStatus proposal_status = 1; - - // voter defines the voter address for the proposals. - string voter = 2; - - // depositor defines the deposit addresses from the proposals. - string depositor = 3; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryProposalsResponse is the response type for the Query/Proposals RPC -// method. -message QueryProposalsResponse { - repeated Proposal proposals = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryVoteRequest is the request type for the Query/Vote RPC method. -message QueryVoteRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // voter defines the oter address for the proposals. - string voter = 2; -} - -// QueryVoteResponse is the response type for the Query/Vote RPC method. -message QueryVoteResponse { - // vote defined the queried vote. - Vote vote = 1 [(gogoproto.nullable) = false]; -} - -// QueryVotesRequest is the request type for the Query/Votes RPC method. -message QueryVotesRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryVotesResponse is the response type for the Query/Votes RPC method. -message QueryVotesResponse { - // votes defined the queried votes. - repeated Vote votes = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest { - // params_type defines which parameters to query for, can be one of "voting", - // "tallying" or "deposit". - string params_type = 1; -} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // voting_params defines the parameters related to voting. - VotingParams voting_params = 1 [(gogoproto.nullable) = false]; - // deposit_params defines the parameters related to deposit. - DepositParams deposit_params = 2 [(gogoproto.nullable) = false]; - // tally_params defines the parameters related to tally. - TallyParams tally_params = 3 [(gogoproto.nullable) = false]; -} - -// QueryDepositRequest is the request type for the Query/Deposit RPC method. -message QueryDepositRequest { - option (gogoproto.goproto_getters) = false; - option (gogoproto.equal) = false; - - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // depositor defines the deposit addresses from the proposals. - string depositor = 2; -} - -// QueryDepositResponse is the response type for the Query/Deposit RPC method. -message QueryDepositResponse { - // deposit defines the requested deposit. - Deposit deposit = 1 [(gogoproto.nullable) = false]; -} - -// QueryDepositsRequest is the request type for the Query/Deposits RPC method. -message QueryDepositsRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDepositsResponse is the response type for the Query/Deposits RPC method. -message QueryDepositsResponse { - repeated Deposit deposits = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryTallyResultRequest is the request type for the Query/Tally RPC method. -message QueryTallyResultRequest { - // proposal_id defines the unique id of the proposal. - uint64 proposal_id = 1; -} - -// QueryTallyResultResponse is the response type for the Query/Tally RPC method. -message QueryTallyResultResponse { - // tally defines the requested tally. - TallyResult tally = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/gov/v1beta1/tx.proto b/proto-thirdparty/cosmos/gov/v1beta1/tx.proto deleted file mode 100644 index 36c0a95d..00000000 --- a/proto-thirdparty/cosmos/gov/v1beta1/tx.proto +++ /dev/null @@ -1,99 +0,0 @@ -syntax = "proto3"; -package cosmos.gov.v1beta1; - -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/gov/v1beta1/gov.proto"; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/gov/types"; - -// Msg defines the bank Msg service. -service Msg { - // SubmitProposal defines a method to create new proposal given a content. - rpc SubmitProposal(MsgSubmitProposal) returns (MsgSubmitProposalResponse); - - // Vote defines a method to add a vote on a specific proposal. - rpc Vote(MsgVote) returns (MsgVoteResponse); - - // VoteWeighted defines a method to add a weighted vote on a specific proposal. - // - // Since: cosmos-sdk 0.43 - rpc VoteWeighted(MsgVoteWeighted) returns (MsgVoteWeightedResponse); - - // Deposit defines a method to add deposit on a specific proposal. - rpc Deposit(MsgDeposit) returns (MsgDepositResponse); -} - -// MsgSubmitProposal defines an sdk.Msg type that supports submitting arbitrary -// proposal Content. -message MsgSubmitProposal { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - google.protobuf.Any content = 1 [(cosmos_proto.accepts_interface) = "Content"]; - repeated cosmos.base.v1beta1.Coin initial_deposit = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"initial_deposit\"" - ]; - string proposer = 3; -} - -// MsgSubmitProposalResponse defines the Msg/SubmitProposal response type. -message MsgSubmitProposalResponse { - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; -} - -// MsgVote defines a message to cast a vote. -message MsgVote { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - VoteOption option = 3; -} - -// MsgVoteResponse defines the Msg/Vote response type. -message MsgVoteResponse {} - -// MsgVoteWeighted defines a message to cast a vote. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeighted { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.moretags) = "yaml:\"proposal_id\""]; - string voter = 2; - repeated WeightedVoteOption options = 3 [(gogoproto.nullable) = false]; -} - -// MsgVoteWeightedResponse defines the Msg/VoteWeighted response type. -// -// Since: cosmos-sdk 0.43 -message MsgVoteWeightedResponse {} - -// MsgDeposit defines a message to submit a deposit to an existing proposal. -message MsgDeposit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = false; - option (gogoproto.goproto_getters) = false; - - uint64 proposal_id = 1 [(gogoproto.jsontag) = "proposal_id", (gogoproto.moretags) = "yaml:\"proposal_id\""]; - string depositor = 2; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// MsgDepositResponse defines the Msg/Deposit response type. -message MsgDepositResponse {} diff --git a/proto-thirdparty/cosmos/mint/v1beta1/genesis.proto b/proto-thirdparty/cosmos/mint/v1beta1/genesis.proto deleted file mode 100644 index 4e783fb5..00000000 --- a/proto-thirdparty/cosmos/mint/v1beta1/genesis.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// GenesisState defines the mint module's genesis state. -message GenesisState { - // minter is a space for holding current inflation information. - Minter minter = 1 [(gogoproto.nullable) = false]; - - // params defines all the paramaters of the module. - Params params = 2 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/mint/v1beta1/mint.proto b/proto-thirdparty/cosmos/mint/v1beta1/mint.proto deleted file mode 100644 index f94d4ae2..00000000 --- a/proto-thirdparty/cosmos/mint/v1beta1/mint.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -import "gogoproto/gogo.proto"; - -// Minter represents the minting state. -message Minter { - // current annual inflation rate - string inflation = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - // current annual expected provisions - string annual_provisions = 2 [ - (gogoproto.moretags) = "yaml:\"annual_provisions\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Params holds parameters for the mint module. -message Params { - option (gogoproto.goproto_stringer) = false; - - // type of coin to mint - string mint_denom = 1; - // maximum annual change in inflation rate - string inflation_rate_change = 2 [ - (gogoproto.moretags) = "yaml:\"inflation_rate_change\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // maximum inflation rate - string inflation_max = 3 [ - (gogoproto.moretags) = "yaml:\"inflation_max\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // minimum inflation rate - string inflation_min = 4 [ - (gogoproto.moretags) = "yaml:\"inflation_min\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // goal of percent bonded atoms - string goal_bonded = 5 [ - (gogoproto.moretags) = "yaml:\"goal_bonded\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // expected blocks per year - uint64 blocks_per_year = 6 [(gogoproto.moretags) = "yaml:\"blocks_per_year\""]; -} diff --git a/proto-thirdparty/cosmos/mint/v1beta1/query.proto b/proto-thirdparty/cosmos/mint/v1beta1/query.proto deleted file mode 100644 index acd341d7..00000000 --- a/proto-thirdparty/cosmos/mint/v1beta1/query.proto +++ /dev/null @@ -1,57 +0,0 @@ -syntax = "proto3"; -package cosmos.mint.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/mint/v1beta1/mint.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/mint/types"; - -// Query provides defines the gRPC querier service. -service Query { - // Params returns the total set of minting parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/params"; - } - - // Inflation returns the current minting inflation value. - rpc Inflation(QueryInflationRequest) returns (QueryInflationResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/inflation"; - } - - // AnnualProvisions current minting annual provisions value. - rpc AnnualProvisions(QueryAnnualProvisionsRequest) returns (QueryAnnualProvisionsResponse) { - option (google.api.http).get = "/cosmos/mint/v1beta1/annual_provisions"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QueryInflationRequest is the request type for the Query/Inflation RPC method. -message QueryInflationRequest {} - -// QueryInflationResponse is the response type for the Query/Inflation RPC -// method. -message QueryInflationResponse { - // inflation is the current minting inflation value. - bytes inflation = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// QueryAnnualProvisionsRequest is the request type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsRequest {} - -// QueryAnnualProvisionsResponse is the response type for the -// Query/AnnualProvisions RPC method. -message QueryAnnualProvisionsResponse { - // annual_provisions is the current minting annual provisions value. - bytes annual_provisions = 1 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/params/v1beta1/params.proto b/proto-thirdparty/cosmos/params/v1beta1/params.proto deleted file mode 100644 index 5382fd79..00000000 --- a/proto-thirdparty/cosmos/params/v1beta1/params.proto +++ /dev/null @@ -1,27 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; - -// ParameterChangeProposal defines a proposal to change one or more parameters. -message ParameterChangeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - repeated ParamChange changes = 3 [(gogoproto.nullable) = false]; -} - -// ParamChange defines an individual parameter change, for use in -// ParameterChangeProposal. -message ParamChange { - option (gogoproto.goproto_stringer) = false; - - string subspace = 1; - string key = 2; - string value = 3; -} diff --git a/proto-thirdparty/cosmos/params/v1beta1/query.proto b/proto-thirdparty/cosmos/params/v1beta1/query.proto deleted file mode 100644 index 1078e02a..00000000 --- a/proto-thirdparty/cosmos/params/v1beta1/query.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package cosmos.params.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/params/v1beta1/params.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/params/types/proposal"; - -// Query defines the gRPC querier service. -service Query { - // Params queries a specific parameter of a module, given its subspace and - // key. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/params/v1beta1/params"; - } -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest { - // subspace defines the module to query the parameter for. - string subspace = 1; - - // key defines the key of the parameter in the subspace. - string key = 2; -} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // param defines the queried parameter. - ParamChange param = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/slashing/v1beta1/genesis.proto b/proto-thirdparty/cosmos/slashing/v1beta1/genesis.proto deleted file mode 100644 index a7aebcfb..00000000 --- a/proto-thirdparty/cosmos/slashing/v1beta1/genesis.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; - -// GenesisState defines the slashing module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // signing_infos represents a map between validator addresses and their - // signing infos. - repeated SigningInfo signing_infos = 2 - [(gogoproto.moretags) = "yaml:\"signing_infos\"", (gogoproto.nullable) = false]; - - // missed_blocks represents a map between validator addresses and their - // missed blocks. - repeated ValidatorMissedBlocks missed_blocks = 3 - [(gogoproto.moretags) = "yaml:\"missed_blocks\"", (gogoproto.nullable) = false]; -} - -// SigningInfo stores validator signing info of corresponding address. -message SigningInfo { - // address is the validator address. - string address = 1; - // validator_signing_info represents the signing info of this validator. - ValidatorSigningInfo validator_signing_info = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"validator_signing_info\""]; -} - -// ValidatorMissedBlocks contains array of missed blocks of corresponding -// address. -message ValidatorMissedBlocks { - // address is the validator address. - string address = 1; - // missed_blocks is an array of missed blocks by the validator. - repeated MissedBlock missed_blocks = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"missed_blocks\""]; -} - -// MissedBlock contains height and missed status as boolean. -message MissedBlock { - // index is the height at which the block was missed. - int64 index = 1; - // missed is the missed status. - bool missed = 2; -} diff --git a/proto-thirdparty/cosmos/slashing/v1beta1/query.proto b/proto-thirdparty/cosmos/slashing/v1beta1/query.proto deleted file mode 100644 index 869049a0..00000000 --- a/proto-thirdparty/cosmos/slashing/v1beta1/query.proto +++ /dev/null @@ -1,63 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/slashing/v1beta1/slashing.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; - -// Query provides defines the gRPC querier service -service Query { - // Params queries the parameters of slashing module - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/params"; - } - - // SigningInfo queries the signing info of given cons address - rpc SigningInfo(QuerySigningInfoRequest) returns (QuerySigningInfoResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos/{cons_address}"; - } - - // SigningInfos queries signing info of all validators - rpc SigningInfos(QuerySigningInfosRequest) returns (QuerySigningInfosResponse) { - option (google.api.http).get = "/cosmos/slashing/v1beta1/signing_infos"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method -message QueryParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} - -// QuerySigningInfoRequest is the request type for the Query/SigningInfo RPC -// method -message QuerySigningInfoRequest { - // cons_address is the address to query signing info of - string cons_address = 1; -} - -// QuerySigningInfoResponse is the response type for the Query/SigningInfo RPC -// method -message QuerySigningInfoResponse { - // val_signing_info is the signing info of requested val cons address - ValidatorSigningInfo val_signing_info = 1 [(gogoproto.nullable) = false]; -} - -// QuerySigningInfosRequest is the request type for the Query/SigningInfos RPC -// method -message QuerySigningInfosRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QuerySigningInfosResponse is the response type for the Query/SigningInfos RPC -// method -message QuerySigningInfosResponse { - // info is the signing info of all validators - repeated cosmos.slashing.v1beta1.ValidatorSigningInfo info = 1 [(gogoproto.nullable) = false]; - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} diff --git a/proto-thirdparty/cosmos/slashing/v1beta1/slashing.proto b/proto-thirdparty/cosmos/slashing/v1beta1/slashing.proto deleted file mode 100644 index 882a0fb6..00000000 --- a/proto-thirdparty/cosmos/slashing/v1beta1/slashing.proto +++ /dev/null @@ -1,58 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// ValidatorSigningInfo defines a validator's signing info for monitoring their -// liveness activity. -message ValidatorSigningInfo { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string address = 1; - // Height at which validator was first a candidate OR was unjailed - int64 start_height = 2 [(gogoproto.moretags) = "yaml:\"start_height\""]; - // Index which is incremented each time the validator was a bonded - // in a block and may have signed a precommit or not. This in conjunction with the - // `SignedBlocksWindow` param determines the index in the `MissedBlocksBitArray`. - int64 index_offset = 3 [(gogoproto.moretags) = "yaml:\"index_offset\""]; - // Timestamp until which the validator is jailed due to liveness downtime. - google.protobuf.Timestamp jailed_until = 4 - [(gogoproto.moretags) = "yaml:\"jailed_until\"", (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - // Whether or not a validator has been tombstoned (killed out of validator set). It is set - // once the validator commits an equivocation or for any other configured misbehiavor. - bool tombstoned = 5; - // A counter kept to avoid unnecessary array reads. - // Note that `Sum(MissedBlocksBitArray)` always equals `MissedBlocksCounter`. - int64 missed_blocks_counter = 6 [(gogoproto.moretags) = "yaml:\"missed_blocks_counter\""]; -} - -// Params represents the parameters used for by the slashing module. -message Params { - int64 signed_blocks_window = 1 [(gogoproto.moretags) = "yaml:\"signed_blocks_window\""]; - bytes min_signed_per_window = 2 [ - (gogoproto.moretags) = "yaml:\"min_signed_per_window\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - google.protobuf.Duration downtime_jail_duration = 3 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"downtime_jail_duration\"" - ]; - bytes slash_fraction_double_sign = 4 [ - (gogoproto.moretags) = "yaml:\"slash_fraction_double_sign\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - bytes slash_fraction_downtime = 5 [ - (gogoproto.moretags) = "yaml:\"slash_fraction_downtime\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} diff --git a/proto-thirdparty/cosmos/slashing/v1beta1/tx.proto b/proto-thirdparty/cosmos/slashing/v1beta1/tx.proto deleted file mode 100644 index 4d63370e..00000000 --- a/proto-thirdparty/cosmos/slashing/v1beta1/tx.proto +++ /dev/null @@ -1,26 +0,0 @@ -syntax = "proto3"; -package cosmos.slashing.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/slashing/types"; -option (gogoproto.equal_all) = true; - -import "gogoproto/gogo.proto"; - -// Msg defines the slashing Msg service. -service Msg { - // Unjail defines a method for unjailing a jailed validator, thus returning - // them into the bonded validator set, so they can begin receiving provisions - // and rewards again. - rpc Unjail(MsgUnjail) returns (MsgUnjailResponse); -} - -// MsgUnjail defines the Msg/Unjail request type -message MsgUnjail { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = true; - - string validator_addr = 1 [(gogoproto.moretags) = "yaml:\"address\"", (gogoproto.jsontag) = "address"]; -} - -// MsgUnjailResponse defines the Msg/Unjail response type -message MsgUnjailResponse {} \ No newline at end of file diff --git a/proto-thirdparty/cosmos/staking/v1beta1/authz.proto b/proto-thirdparty/cosmos/staking/v1beta1/authz.proto deleted file mode 100644 index d50c329c..00000000 --- a/proto-thirdparty/cosmos/staking/v1beta1/authz.proto +++ /dev/null @@ -1,47 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// StakeAuthorization defines authorization for delegate/undelegate/redelegate. -// -// Since: cosmos-sdk 0.43 -message StakeAuthorization { - option (cosmos_proto.implements_interface) = "Authorization"; - - // max_tokens specifies the maximum amount of tokens can be delegate to a validator. If it is - // empty, there is no spend limit and any amount of coins can be delegated. - cosmos.base.v1beta1.Coin max_tokens = 1 [(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coin"]; - // validators is the oneof that represents either allow_list or deny_list - oneof validators { - // allow_list specifies list of validator addresses to whom grantee can delegate tokens on behalf of granter's - // account. - Validators allow_list = 2; - // deny_list specifies list of validator addresses to whom grantee can not delegate tokens. - Validators deny_list = 3; - } - // Validators defines list of validator addresses. - message Validators { - repeated string address = 1; - } - // authorization_type defines one of AuthorizationType. - AuthorizationType authorization_type = 4; -} - -// AuthorizationType defines the type of staking module authorization type -// -// Since: cosmos-sdk 0.43 -enum AuthorizationType { - // AUTHORIZATION_TYPE_UNSPECIFIED specifies an unknown authorization type - AUTHORIZATION_TYPE_UNSPECIFIED = 0; - // AUTHORIZATION_TYPE_DELEGATE defines an authorization type for Msg/Delegate - AUTHORIZATION_TYPE_DELEGATE = 1; - // AUTHORIZATION_TYPE_UNDELEGATE defines an authorization type for Msg/Undelegate - AUTHORIZATION_TYPE_UNDELEGATE = 2; - // AUTHORIZATION_TYPE_REDELEGATE defines an authorization type for Msg/BeginRedelegate - AUTHORIZATION_TYPE_REDELEGATE = 3; -} diff --git a/proto-thirdparty/cosmos/staking/v1beta1/genesis.proto b/proto-thirdparty/cosmos/staking/v1beta1/genesis.proto deleted file mode 100644 index d1563dbc..00000000 --- a/proto-thirdparty/cosmos/staking/v1beta1/genesis.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -// GenesisState defines the staking module's genesis state. -message GenesisState { - // params defines all the paramaters of related to deposit. - Params params = 1 [(gogoproto.nullable) = false]; - - // last_total_power tracks the total amounts of bonded tokens recorded during - // the previous end block. - bytes last_total_power = 2 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"last_total_power\"", - (gogoproto.nullable) = false - ]; - - // last_validator_powers is a special index that provides a historical list - // of the last-block's bonded validators. - repeated LastValidatorPower last_validator_powers = 3 - [(gogoproto.moretags) = "yaml:\"last_validator_powers\"", (gogoproto.nullable) = false]; - - // delegations defines the validator set at genesis. - repeated Validator validators = 4 [(gogoproto.nullable) = false]; - - // delegations defines the delegations active at genesis. - repeated Delegation delegations = 5 [(gogoproto.nullable) = false]; - - // unbonding_delegations defines the unbonding delegations active at genesis. - repeated UnbondingDelegation unbonding_delegations = 6 - [(gogoproto.moretags) = "yaml:\"unbonding_delegations\"", (gogoproto.nullable) = false]; - - // redelegations defines the redelegations active at genesis. - repeated Redelegation redelegations = 7 [(gogoproto.nullable) = false]; - - bool exported = 8; -} - -// LastValidatorPower required for validator set update logic. -message LastValidatorPower { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // address is the address of the validator. - string address = 1; - - // power defines the power of the validator. - int64 power = 2; -} diff --git a/proto-thirdparty/cosmos/staking/v1beta1/query.proto b/proto-thirdparty/cosmos/staking/v1beta1/query.proto deleted file mode 100644 index 4852c535..00000000 --- a/proto-thirdparty/cosmos/staking/v1beta1/query.proto +++ /dev/null @@ -1,348 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Query defines the gRPC querier service. -service Query { - // Validators queries all validators that match the given status. - rpc Validators(QueryValidatorsRequest) returns (QueryValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators"; - } - - // Validator queries validator info for given validator address. - rpc Validator(QueryValidatorRequest) returns (QueryValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}"; - } - - // ValidatorDelegations queries delegate info for given validator. - rpc ValidatorDelegations(QueryValidatorDelegationsRequest) returns (QueryValidatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations"; - } - - // ValidatorUnbondingDelegations queries unbonding delegations of a validator. - rpc ValidatorUnbondingDelegations(QueryValidatorUnbondingDelegationsRequest) - returns (QueryValidatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/" - "{validator_addr}/unbonding_delegations"; - } - - // Delegation queries delegate info for given validator delegator pair. - rpc Delegation(QueryDelegationRequest) returns (QueryDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}"; - } - - // UnbondingDelegation queries unbonding info for given validator delegator - // pair. - rpc UnbondingDelegation(QueryUnbondingDelegationRequest) returns (QueryUnbondingDelegationResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/" - "{delegator_addr}/unbonding_delegation"; - } - - // DelegatorDelegations queries all delegations of a given delegator address. - rpc DelegatorDelegations(QueryDelegatorDelegationsRequest) returns (QueryDelegatorDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegations/{delegator_addr}"; - } - - // DelegatorUnbondingDelegations queries all unbonding delegations of a given - // delegator address. - rpc DelegatorUnbondingDelegations(QueryDelegatorUnbondingDelegationsRequest) - returns (QueryDelegatorUnbondingDelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/" - "{delegator_addr}/unbonding_delegations"; - } - - // Redelegations queries redelegations of given address. - rpc Redelegations(QueryRedelegationsRequest) returns (QueryRedelegationsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations"; - } - - // DelegatorValidators queries all validators info for given delegator - // address. - rpc DelegatorValidators(QueryDelegatorValidatorsRequest) returns (QueryDelegatorValidatorsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators"; - } - - // DelegatorValidator queries validator info for given delegator validator - // pair. - rpc DelegatorValidator(QueryDelegatorValidatorRequest) returns (QueryDelegatorValidatorResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/" - "{validator_addr}"; - } - - // HistoricalInfo queries the historical info for given height. - rpc HistoricalInfo(QueryHistoricalInfoRequest) returns (QueryHistoricalInfoResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/historical_info/{height}"; - } - - // Pool queries the pool info. - rpc Pool(QueryPoolRequest) returns (QueryPoolResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/pool"; - } - - // Parameters queries the staking parameters. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/cosmos/staking/v1beta1/params"; - } -} - -// QueryValidatorsRequest is request type for Query/Validators RPC method. -message QueryValidatorsRequest { - // status enables to query for validators matching a given status. - string status = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorsResponse is response type for the Query/Validators RPC method -message QueryValidatorsResponse { - // validators contains all the queried validators. - repeated Validator validators = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorRequest is response type for the Query/Validator RPC method -message QueryValidatorRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1; -} - -// QueryValidatorResponse is response type for the Query/Validator RPC method -message QueryValidatorResponse { - // validator defines the the validator info. - Validator validator = 1 [(gogoproto.nullable) = false]; -} - -// QueryValidatorDelegationsRequest is request type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorDelegationsResponse is response type for the -// Query/ValidatorDelegations RPC method -message QueryValidatorDelegationsResponse { - repeated DelegationResponse delegation_responses = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "DelegationResponses"]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryValidatorUnbondingDelegationsRequest is required type for the -// Query/ValidatorUnbondingDelegations RPC method -message QueryValidatorUnbondingDelegationsRequest { - // validator_addr defines the validator address to query for. - string validator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryValidatorUnbondingDelegationsResponse is response type for the -// Query/ValidatorUnbondingDelegations RPC method. -message QueryValidatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegationRequest is request type for the Query/Delegation RPC method. -message QueryDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // validator_addr defines the validator address to query for. - string validator_addr = 2; -} - -// QueryDelegationResponse is response type for the Query/Delegation RPC method. -message QueryDelegationResponse { - // delegation_responses defines the delegation info of a delegation. - DelegationResponse delegation_response = 1; -} - -// QueryUnbondingDelegationRequest is request type for the -// Query/UnbondingDelegation RPC method. -message QueryUnbondingDelegationRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // validator_addr defines the validator address to query for. - string validator_addr = 2; -} - -// QueryDelegationResponse is response type for the Query/UnbondingDelegation -// RPC method. -message QueryUnbondingDelegationResponse { - // unbond defines the unbonding information of a delegation. - UnbondingDelegation unbond = 1 [(gogoproto.nullable) = false]; -} - -// QueryDelegatorDelegationsRequest is request type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorDelegationsResponse is response type for the -// Query/DelegatorDelegations RPC method. -message QueryDelegatorDelegationsResponse { - // delegation_responses defines all the delegations' info of a delegator. - repeated DelegationResponse delegation_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorUnbondingDelegationsRequest is request type for the -// Query/DelegatorUnbondingDelegations RPC method. -message QueryDelegatorUnbondingDelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryUnbondingDelegatorDelegationsResponse is response type for the -// Query/UnbondingDelegatorDelegations RPC method. -message QueryDelegatorUnbondingDelegationsResponse { - repeated UnbondingDelegation unbonding_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryRedelegationsRequest is request type for the Query/Redelegations RPC -// method. -message QueryRedelegationsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // src_validator_addr defines the validator address to redelegate from. - string src_validator_addr = 2; - - // dst_validator_addr defines the validator address to redelegate to. - string dst_validator_addr = 3; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 4; -} - -// QueryRedelegationsResponse is response type for the Query/Redelegations RPC -// method. -message QueryRedelegationsResponse { - repeated RedelegationResponse redelegation_responses = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorsRequest is request type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryDelegatorValidatorsResponse is response type for the -// Query/DelegatorValidators RPC method. -message QueryDelegatorValidatorsResponse { - // validators defines the the validators' info of a delegator. - repeated Validator validators = 1 [(gogoproto.nullable) = false]; - - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryDelegatorValidatorRequest is request type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorRequest { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // delegator_addr defines the delegator address to query for. - string delegator_addr = 1; - - // validator_addr defines the validator address to query for. - string validator_addr = 2; -} - -// QueryDelegatorValidatorResponse response type for the -// Query/DelegatorValidator RPC method. -message QueryDelegatorValidatorResponse { - // validator defines the the validator info. - Validator validator = 1 [(gogoproto.nullable) = false]; -} - -// QueryHistoricalInfoRequest is request type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoRequest { - // height defines at which height to query the historical info. - int64 height = 1; -} - -// QueryHistoricalInfoResponse is response type for the Query/HistoricalInfo RPC -// method. -message QueryHistoricalInfoResponse { - // hist defines the historical info at the given height. - HistoricalInfo hist = 1; -} - -// QueryPoolRequest is request type for the Query/Pool RPC method. -message QueryPoolRequest {} - -// QueryPoolResponse is response type for the Query/Pool RPC method. -message QueryPoolResponse { - // pool defines the pool info. - Pool pool = 1 [(gogoproto.nullable) = false]; -} - -// QueryParamsRequest is request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is response type for the Query/Params RPC method. -message QueryParamsResponse { - // params holds all the parameters of this module. - Params params = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/cosmos/staking/v1beta1/staking.proto b/proto-thirdparty/cosmos/staking/v1beta1/staking.proto deleted file mode 100644 index 76e9599e..00000000 --- a/proto-thirdparty/cosmos/staking/v1beta1/staking.proto +++ /dev/null @@ -1,334 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "tendermint/types/types.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// HistoricalInfo contains header and validator information for a given block. -// It is stored as part of staking module's state, which persists the `n` most -// recent HistoricalInfo -// (`n` is set by the staking module's `historical_entries` parameter). -message HistoricalInfo { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - repeated Validator valset = 2 [(gogoproto.nullable) = false]; -} - -// CommissionRates defines the initial commission rates to be used for creating -// a validator. -message CommissionRates { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // rate is the commission rate charged to delegators, as a fraction. - string rate = 1 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; - // max_rate defines the maximum commission rate which validator can ever charge, as a fraction. - string max_rate = 2 [ - (gogoproto.moretags) = "yaml:\"max_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // max_change_rate defines the maximum daily increase of the validator commission, as a fraction. - string max_change_rate = 3 [ - (gogoproto.moretags) = "yaml:\"max_change_rate\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; -} - -// Commission defines commission parameters for a given validator. -message Commission { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // commission_rates defines the initial commission rates to be used for creating a validator. - CommissionRates commission_rates = 1 [(gogoproto.embed) = true, (gogoproto.nullable) = false]; - // update_time is the last time the commission rate was changed. - google.protobuf.Timestamp update_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"update_time\""]; -} - -// Description defines a validator description. -message Description { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // moniker defines a human-readable name for the validator. - string moniker = 1; - // identity defines an optional identity signature (ex. UPort or Keybase). - string identity = 2; - // website defines an optional website link. - string website = 3; - // security_contact defines an optional email for security contact. - string security_contact = 4 [(gogoproto.moretags) = "yaml:\"security_contact\""]; - // details define other optional details. - string details = 5; -} - -// Validator defines a validator, together with the total amount of the -// Validator's bond shares and their exchange rate to coins. Slashing results in -// a decrease in the exchange rate, allowing correct calculation of future -// undelegations without iterating over delegators. When coins are delegated to -// this validator, the validator is credited with a delegation whose number of -// bond shares is based on the amount of coins delegated divided by the current -// exchange rate. Voting power can be calculated as total bonded shares -// multiplied by exchange rate. -message Validator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.goproto_getters) = false; - - // operator_address defines the address of the validator's operator; bech encoded in JSON. - string operator_address = 1 [(gogoproto.moretags) = "yaml:\"operator_address\""]; - // consensus_pubkey is the consensus public key of the validator, as a Protobuf Any. - google.protobuf.Any consensus_pubkey = 2 - [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey", (gogoproto.moretags) = "yaml:\"consensus_pubkey\""]; - // jailed defined whether the validator has been jailed from bonded status or not. - bool jailed = 3; - // status is the validator status (bonded/unbonding/unbonded). - BondStatus status = 4; - // tokens define the delegated tokens (incl. self-delegation). - string tokens = 5 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; - // delegator_shares defines total shares issued to a validator's delegators. - string delegator_shares = 6 [ - (gogoproto.moretags) = "yaml:\"delegator_shares\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.nullable) = false - ]; - // description defines the description terms for the validator. - Description description = 7 [(gogoproto.nullable) = false]; - // unbonding_height defines, if unbonding, the height at which this validator has begun unbonding. - int64 unbonding_height = 8 [(gogoproto.moretags) = "yaml:\"unbonding_height\""]; - // unbonding_time defines, if unbonding, the min time for the validator to complete unbonding. - google.protobuf.Timestamp unbonding_time = 9 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; - // commission defines the commission parameters. - Commission commission = 10 [(gogoproto.nullable) = false]; - // min_self_delegation is the validator's self declared minimum self delegation. - string min_self_delegation = 11 [ - (gogoproto.moretags) = "yaml:\"min_self_delegation\"", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false - ]; -} - -// BondStatus is the status of a validator. -enum BondStatus { - option (gogoproto.goproto_enum_prefix) = false; - - // UNSPECIFIED defines an invalid validator status. - BOND_STATUS_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "Unspecified"]; - // UNBONDED defines a validator that is not bonded. - BOND_STATUS_UNBONDED = 1 [(gogoproto.enumvalue_customname) = "Unbonded"]; - // UNBONDING defines a validator that is unbonding. - BOND_STATUS_UNBONDING = 2 [(gogoproto.enumvalue_customname) = "Unbonding"]; - // BONDED defines a validator that is bonded. - BOND_STATUS_BONDED = 3 [(gogoproto.enumvalue_customname) = "Bonded"]; -} - -// ValAddresses defines a repeated set of validator addresses. -message ValAddresses { - option (gogoproto.goproto_stringer) = false; - option (gogoproto.stringer) = true; - - repeated string addresses = 1; -} - -// DVPair is struct that just has a delegator-validator pair with no other data. -// It is intended to be used as a marshalable pointer. For example, a DVPair can -// be used to construct the key to getting an UnbondingDelegation from state. -message DVPair { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; -} - -// DVPairs defines an array of DVPair objects. -message DVPairs { - repeated DVPair pairs = 1 [(gogoproto.nullable) = false]; -} - -// DVVTriplet is struct that just has a delegator-validator-validator triplet -// with no other data. It is intended to be used as a marshalable pointer. For -// example, a DVVTriplet can be used to construct the key to getting a -// Redelegation from state. -message DVVTriplet { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; -} - -// DVVTriplets defines an array of DVVTriplet objects. -message DVVTriplets { - repeated DVVTriplet triplets = 1 [(gogoproto.nullable) = false]; -} - -// Delegation represents the bond with tokens held by an account. It is -// owned by one delegator, and is associated with the voting power of one -// validator. -message Delegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // shares define the delegation shares received. - string shares = 3 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// UnbondingDelegation stores all of a single delegator's unbonding bonds -// for a single validator in an time-ordered list. -message UnbondingDelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - // validator_address is the bech32-encoded address of the validator. - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - // entries are the unbonding delegation entries. - repeated UnbondingDelegationEntry entries = 3 [(gogoproto.nullable) = false]; // unbonding delegation entries -} - -// UnbondingDelegationEntry defines an unbonding object with relevant metadata. -message UnbondingDelegationEntry { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // creation_height is the height which the unbonding took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; - // completion_time is the unix time for unbonding completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; - // initial_balance defines the tokens initially scheduled to receive at completion. - string initial_balance = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_balance\"" - ]; - // balance defines the tokens to receive at completion. - string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; -} - -// RedelegationEntry defines a redelegation object with relevant metadata. -message RedelegationEntry { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // creation_height defines the height which the redelegation took place. - int64 creation_height = 1 [(gogoproto.moretags) = "yaml:\"creation_height\""]; - // completion_time defines the unix time for redelegation completion. - google.protobuf.Timestamp completion_time = 2 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true, (gogoproto.moretags) = "yaml:\"completion_time\""]; - // initial_balance defines the initial balance when redelegation started. - string initial_balance = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"initial_balance\"" - ]; - // shares_dst is the amount of destination-validator shares created by redelegation. - string shares_dst = 4 - [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", (gogoproto.nullable) = false]; -} - -// Redelegation contains the list of a particular delegator's redelegating bonds -// from a particular source validator to a particular destination validator. -message Redelegation { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // delegator_address is the bech32-encoded address of the delegator. - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - // validator_src_address is the validator redelegation source operator address. - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - // validator_dst_address is the validator redelegation destination operator address. - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; - // entries are the redelegation entries. - repeated RedelegationEntry entries = 4 [(gogoproto.nullable) = false]; // redelegation entries -} - -// Params defines the parameters for the staking module. -message Params { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // unbonding_time is the time duration of unbonding. - google.protobuf.Duration unbonding_time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"unbonding_time\""]; - // max_validators is the maximum number of validators. - uint32 max_validators = 2 [(gogoproto.moretags) = "yaml:\"max_validators\""]; - // max_entries is the max entries for either unbonding delegation or redelegation (per pair/trio). - uint32 max_entries = 3 [(gogoproto.moretags) = "yaml:\"max_entries\""]; - // historical_entries is the number of historical entries to persist. - uint32 historical_entries = 4 [(gogoproto.moretags) = "yaml:\"historical_entries\""]; - // bond_denom defines the bondable coin denomination. - string bond_denom = 5 [(gogoproto.moretags) = "yaml:\"bond_denom\""]; -} - -// DelegationResponse is equivalent to Delegation except that it contains a -// balance in addition to shares which is more suitable for client responses. -message DelegationResponse { - option (gogoproto.equal) = false; - option (gogoproto.goproto_stringer) = false; - - Delegation delegation = 1 [(gogoproto.nullable) = false]; - - cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false]; -} - -// RedelegationEntryResponse is equivalent to a RedelegationEntry except that it -// contains a balance in addition to shares which is more suitable for client -// responses. -message RedelegationEntryResponse { - option (gogoproto.equal) = true; - - RedelegationEntry redelegation_entry = 1 [(gogoproto.nullable) = false]; - string balance = 4 [(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", (gogoproto.nullable) = false]; -} - -// RedelegationResponse is equivalent to a Redelegation except that its entries -// contain a balance in addition to shares which is more suitable for client -// responses. -message RedelegationResponse { - option (gogoproto.equal) = false; - - Redelegation redelegation = 1 [(gogoproto.nullable) = false]; - repeated RedelegationEntryResponse entries = 2 [(gogoproto.nullable) = false]; -} - -// Pool is used for tracking bonded and not-bonded token supply of the bond -// denomination. -message Pool { - option (gogoproto.description) = true; - option (gogoproto.equal) = true; - string not_bonded_tokens = 1 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.jsontag) = "not_bonded_tokens", - (gogoproto.nullable) = false - ]; - string bonded_tokens = 2 [ - (gogoproto.jsontag) = "bonded_tokens", - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"bonded_tokens\"" - ]; -} diff --git a/proto-thirdparty/cosmos/staking/v1beta1/tx.proto b/proto-thirdparty/cosmos/staking/v1beta1/tx.proto deleted file mode 100644 index 7b05d89e..00000000 --- a/proto-thirdparty/cosmos/staking/v1beta1/tx.proto +++ /dev/null @@ -1,126 +0,0 @@ -syntax = "proto3"; -package cosmos.staking.v1beta1; - -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -import "cosmos_proto/cosmos.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/staking/v1beta1/staking.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/staking/types"; - -// Msg defines the staking Msg service. -service Msg { - // CreateValidator defines a method for creating a new validator. - rpc CreateValidator(MsgCreateValidator) returns (MsgCreateValidatorResponse); - - // EditValidator defines a method for editing an existing validator. - rpc EditValidator(MsgEditValidator) returns (MsgEditValidatorResponse); - - // Delegate defines a method for performing a delegation of coins - // from a delegator to a validator. - rpc Delegate(MsgDelegate) returns (MsgDelegateResponse); - - // BeginRedelegate defines a method for performing a redelegation - // of coins from a delegator and source validator to a destination validator. - rpc BeginRedelegate(MsgBeginRedelegate) returns (MsgBeginRedelegateResponse); - - // Undelegate defines a method for performing an undelegation from a - // delegate and a validator. - rpc Undelegate(MsgUndelegate) returns (MsgUndelegateResponse); -} - -// MsgCreateValidator defines a SDK message for creating a new validator. -message MsgCreateValidator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false]; - CommissionRates commission = 2 [(gogoproto.nullable) = false]; - string min_self_delegation = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"", - (gogoproto.nullable) = false - ]; - string delegator_address = 4 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 5 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - google.protobuf.Any pubkey = 6 [(cosmos_proto.accepts_interface) = "cosmos.crypto.PubKey"]; - cosmos.base.v1beta1.Coin value = 7 [(gogoproto.nullable) = false]; -} - -// MsgCreateValidatorResponse defines the Msg/CreateValidator response type. -message MsgCreateValidatorResponse {} - -// MsgEditValidator defines a SDK message for editing an existing validator. -message MsgEditValidator { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Description description = 1 [(gogoproto.nullable) = false]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"address\""]; - - // We pass a reference to the new commission rate and min self delegation as - // it's not mandatory to update. If not updated, the deserialized rate will be - // zero with no way to distinguish if an update was intended. - // REF: #2373 - string commission_rate = 3 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec", - (gogoproto.moretags) = "yaml:\"commission_rate\"" - ]; - string min_self_delegation = 4 [ - (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int", - (gogoproto.moretags) = "yaml:\"min_self_delegation\"" - ]; -} - -// MsgEditValidatorResponse defines the Msg/EditValidator response type. -message MsgEditValidatorResponse {} - -// MsgDelegate defines a SDK message for performing a delegation of coins -// from a delegator to a validator. -message MsgDelegate { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgDelegateResponse defines the Msg/Delegate response type. -message MsgDelegateResponse {} - -// MsgBeginRedelegate defines a SDK message for performing a redelegation -// of coins from a delegator and source validator to a destination validator. -message MsgBeginRedelegate { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_src_address = 2 [(gogoproto.moretags) = "yaml:\"validator_src_address\""]; - string validator_dst_address = 3 [(gogoproto.moretags) = "yaml:\"validator_dst_address\""]; - cosmos.base.v1beta1.Coin amount = 4 [(gogoproto.nullable) = false]; -} - -// MsgBeginRedelegateResponse defines the Msg/BeginRedelegate response type. -message MsgBeginRedelegateResponse { - google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// MsgUndelegate defines a SDK message for performing an undelegation from a -// delegate and a validator. -message MsgUndelegate { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string delegator_address = 1 [(gogoproto.moretags) = "yaml:\"delegator_address\""]; - string validator_address = 2 [(gogoproto.moretags) = "yaml:\"validator_address\""]; - cosmos.base.v1beta1.Coin amount = 3 [(gogoproto.nullable) = false]; -} - -// MsgUndelegateResponse defines the Msg/Undelegate response type. -message MsgUndelegateResponse { - google.protobuf.Timestamp completion_time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} diff --git a/proto-thirdparty/cosmos/tx/signing/v1beta1/signing.proto b/proto-thirdparty/cosmos/tx/signing/v1beta1/signing.proto deleted file mode 100644 index 50de89c8..00000000 --- a/proto-thirdparty/cosmos/tx/signing/v1beta1/signing.proto +++ /dev/null @@ -1,91 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.signing.v1beta1; - -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx/signing"; - -// SignMode represents a signing mode with its own security guarantees. -enum SignMode { - // SIGN_MODE_UNSPECIFIED specifies an unknown signing mode and will be - // rejected - SIGN_MODE_UNSPECIFIED = 0; - - // SIGN_MODE_DIRECT specifies a signing mode which uses SignDoc and is - // verified with raw bytes from Tx - SIGN_MODE_DIRECT = 1; - - // SIGN_MODE_TEXTUAL is a future signing mode that will verify some - // human-readable textual representation on top of the binary representation - // from SIGN_MODE_DIRECT - SIGN_MODE_TEXTUAL = 2; - - // SIGN_MODE_LEGACY_AMINO_JSON is a backwards compatibility mode which uses - // Amino JSON and will be removed in the future - SIGN_MODE_LEGACY_AMINO_JSON = 127; - - // SIGN_MODE_EIP_191 specifies the sign mode for EIP 191 signing on the Cosmos - // SDK. Ref: https://eips.ethereum.org/EIPS/eip-191 - // - // Currently, SIGN_MODE_EIP_191 is registered as a SignMode enum variant, - // but is not implemented on the SDK by default. To enable EIP-191, you need - // to pass a custom `TxConfig` that has an implementation of - // `SignModeHandler` for EIP-191. The SDK may decide to fully support - // EIP-191 in the future. - // - // Since: cosmos-sdk 0.45.2 - SIGN_MODE_EIP_191 = 191; -} - -// SignatureDescriptors wraps multiple SignatureDescriptor's. -message SignatureDescriptors { - // signatures are the signature descriptors - repeated SignatureDescriptor signatures = 1; -} - -// SignatureDescriptor is a convenience type which represents the full data for -// a signature including the public key of the signer, signing modes and the -// signature itself. It is primarily used for coordinating signatures between -// clients. -message SignatureDescriptor { - // public_key is the public key of the signer - google.protobuf.Any public_key = 1; - - Data data = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to prevent - // replay attacks. - uint64 sequence = 3; - - // Data represents signature data - message Data { - // sum is the oneof that specifies whether this represents single or multi-signature data - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a multisig signer - Multi multi = 2; - } - - // Single is the signature data for a single signer - message Single { - // mode is the signing mode of the single signer - SignMode mode = 1; - - // signature is the raw signature bytes - bytes signature = 2; - } - - // Multi is the signature data for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // signatures is the signatures of the multi-signature - repeated Data signatures = 2; - } - } -} diff --git a/proto-thirdparty/cosmos/tx/v1beta1/service.proto b/proto-thirdparty/cosmos/tx/v1beta1/service.proto deleted file mode 100644 index d9f828f7..00000000 --- a/proto-thirdparty/cosmos/tx/v1beta1/service.proto +++ /dev/null @@ -1,165 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "google/api/annotations.proto"; -import "cosmos/base/abci/v1beta1/abci.proto"; -import "cosmos/tx/v1beta1/tx.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "tendermint/types/block.proto"; -import "tendermint/types/types.proto"; - -option (gogoproto.goproto_registration) = true; -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Service defines a gRPC service for interacting with transactions. -service Service { - // Simulate simulates executing a transaction for estimating gas usage. - rpc Simulate(SimulateRequest) returns (SimulateResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/simulate" - body: "*" - }; - } - // GetTx fetches a tx by hash. - rpc GetTx(GetTxRequest) returns (GetTxResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/{hash}"; - } - // BroadcastTx broadcast transaction. - rpc BroadcastTx(BroadcastTxRequest) returns (BroadcastTxResponse) { - option (google.api.http) = { - post: "/cosmos/tx/v1beta1/txs" - body: "*" - }; - } - // GetTxsEvent fetches txs by event. - rpc GetTxsEvent(GetTxsEventRequest) returns (GetTxsEventResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs"; - } - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: cosmos-sdk 0.45.2 - rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) { - option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}"; - } -} - -// GetTxsEventRequest is the request type for the Service.TxsByEvents -// RPC method. -message GetTxsEventRequest { - // events is the list of transaction event type. - repeated string events = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; - OrderBy order_by = 3; -} - -// OrderBy defines the sorting order -enum OrderBy { - // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - ORDER_BY_UNSPECIFIED = 0; - // ORDER_BY_ASC defines ascending order - ORDER_BY_ASC = 1; - // ORDER_BY_DESC defines descending order - ORDER_BY_DESC = 2; -} - -// GetTxsEventResponse is the response type for the Service.TxsByEvents -// RPC method. -message GetTxsEventResponse { - // txs is the list of queried transactions. - repeated cosmos.tx.v1beta1.Tx txs = 1; - // tx_responses is the list of queried TxResponses. - repeated cosmos.base.abci.v1beta1.TxResponse tx_responses = 2; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// BroadcastTxRequest is the request type for the Service.BroadcastTxRequest -// RPC method. -message BroadcastTxRequest { - // tx_bytes is the raw transaction. - bytes tx_bytes = 1; - BroadcastMode mode = 2; -} - -// BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. -enum BroadcastMode { - // zero-value for mode ordering - BROADCAST_MODE_UNSPECIFIED = 0; - // BROADCAST_MODE_BLOCK defines a tx broadcasting mode where the client waits for - // the tx to be committed in a block. - BROADCAST_MODE_BLOCK = 1; - // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - // a CheckTx execution response only. - BROADCAST_MODE_SYNC = 2; - // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - // immediately. - BROADCAST_MODE_ASYNC = 3; -} - -// BroadcastTxResponse is the response type for the -// Service.BroadcastTx method. -message BroadcastTxResponse { - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 1; -} - -// SimulateRequest is the request type for the Service.Simulate -// RPC method. -message SimulateRequest { - // tx is the transaction to simulate. - // Deprecated. Send raw tx bytes instead. - cosmos.tx.v1beta1.Tx tx = 1 [deprecated = true]; - // tx_bytes is the raw transaction. - // - // Since: cosmos-sdk 0.43 - bytes tx_bytes = 2; -} - -// SimulateResponse is the response type for the -// Service.SimulateRPC method. -message SimulateResponse { - // gas_info is the information about gas used in the simulation. - cosmos.base.abci.v1beta1.GasInfo gas_info = 1; - // result is the result of the simulation. - cosmos.base.abci.v1beta1.Result result = 2; -} - -// GetTxRequest is the request type for the Service.GetTx -// RPC method. -message GetTxRequest { - // hash is the tx hash to query, encoded as a hex string. - string hash = 1; -} - -// GetTxResponse is the response type for the Service.GetTx method. -message GetTxResponse { - // tx is the queried transaction. - cosmos.tx.v1beta1.Tx tx = 1; - // tx_response is the queried TxResponses. - cosmos.base.abci.v1beta1.TxResponse tx_response = 2; -} - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsRequest { - // height is the height of the block to query. - int64 height = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -// -// Since: cosmos-sdk 0.45.2 -message GetBlockWithTxsResponse { - // txs are the transactions in the block. - repeated cosmos.tx.v1beta1.Tx txs = 1; - .tendermint.types.BlockID block_id = 2; - .tendermint.types.Block block = 3; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 4; -} \ No newline at end of file diff --git a/proto-thirdparty/cosmos/tx/v1beta1/tx.proto b/proto-thirdparty/cosmos/tx/v1beta1/tx.proto deleted file mode 100644 index 6d5caf12..00000000 --- a/proto-thirdparty/cosmos/tx/v1beta1/tx.proto +++ /dev/null @@ -1,183 +0,0 @@ -syntax = "proto3"; -package cosmos.tx.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/crypto/multisig/v1beta1/multisig.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/tx/signing/v1beta1/signing.proto"; -import "google/protobuf/any.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/types/tx"; - -// Tx is the standard type used for broadcasting transactions. -message Tx { - // body is the processable content of the transaction - TxBody body = 1; - - // auth_info is the authorization related content of the transaction, - // specifically signers, signer modes and fee - AuthInfo auth_info = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// TxRaw is a variant of Tx that pins the signer's exact binary representation -// of body and auth_info. This is used for signing, broadcasting and -// verification. The binary `serialize(tx: TxRaw)` is stored in Tendermint and -// the hash `sha256(serialize(tx: TxRaw))` becomes the "txhash", commonly used -// as the transaction ID. -message TxRaw { - // body_bytes is a protobuf serialization of a TxBody that matches the - // representation in SignDoc. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in SignDoc. - bytes auth_info_bytes = 2; - - // signatures is a list of signatures that matches the length and order of - // AuthInfo's signer_infos to allow connecting signature meta information like - // public key and signing mode by position. - repeated bytes signatures = 3; -} - -// SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. -message SignDoc { - // body_bytes is protobuf serialization of a TxBody that matches the - // representation in TxRaw. - bytes body_bytes = 1; - - // auth_info_bytes is a protobuf serialization of an AuthInfo that matches the - // representation in TxRaw. - bytes auth_info_bytes = 2; - - // chain_id is the unique identifier of the chain this transaction targets. - // It prevents signed transactions from being used on another chain by an - // attacker - string chain_id = 3; - - // account_number is the account number of the account in state - uint64 account_number = 4; -} - -// TxBody is the body of a transaction that all signers sign over. -message TxBody { - // messages is a list of messages to be executed. The required signers of - // those messages define the number and order of elements in AuthInfo's - // signer_infos and Tx's signatures. Each required signer address is added to - // the list only the first time it occurs. - // By convention, the first required signer (usually from the first message) - // is referred to as the primary signer and pays the fee for the whole - // transaction. - repeated google.protobuf.Any messages = 1; - - // memo is any arbitrary note/comment to be added to the transaction. - // WARNING: in clients, any publicly exposed text should not be called memo, - // but should be called `note` instead (see https://github.com/cosmos/cosmos-sdk/issues/9122). - string memo = 2; - - // timeout is the block height after which this transaction will not - // be processed by the chain - uint64 timeout_height = 3; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, the transaction will be rejected - repeated google.protobuf.Any extension_options = 1023; - - // extension_options are arbitrary options that can be added by chains - // when the default options are not sufficient. If any of these are present - // and can't be handled, they will be ignored - repeated google.protobuf.Any non_critical_extension_options = 2047; -} - -// AuthInfo describes the fee and signer modes that are used to sign a -// transaction. -message AuthInfo { - // signer_infos defines the signing modes for the required signers. The number - // and order of elements must match the required signers from TxBody's - // messages. The first element is the primary signer and the one which pays - // the fee. - repeated SignerInfo signer_infos = 1; - - // Fee is the fee and gas limit for the transaction. The first signer is the - // primary signer and the one which pays the fee. The fee can be calculated - // based on the cost of evaluating the body and doing signature verification - // of the signers. This can be estimated via simulation. - Fee fee = 2; -} - -// SignerInfo describes the public key and signing mode of a single top-level -// signer. -message SignerInfo { - // public_key is the public key of the signer. It is optional for accounts - // that already exist in state. If unset, the verifier can use the required \ - // signer address for this position and lookup the public key. - google.protobuf.Any public_key = 1; - - // mode_info describes the signing mode of the signer and is a nested - // structure to support nested multisig pubkey's - ModeInfo mode_info = 2; - - // sequence is the sequence of the account, which describes the - // number of committed transactions signed by a given address. It is used to - // prevent replay attacks. - uint64 sequence = 3; -} - -// ModeInfo describes the signing mode of a single or nested multisig signer. -message ModeInfo { - // sum is the oneof that specifies whether this represents a single or nested - // multisig signer - oneof sum { - // single represents a single signer - Single single = 1; - - // multi represents a nested multisig signer - Multi multi = 2; - } - - // Single is the mode info for a single signer. It is structured as a message - // to allow for additional fields such as locale for SIGN_MODE_TEXTUAL in the - // future - message Single { - // mode is the signing mode of the single signer - cosmos.tx.signing.v1beta1.SignMode mode = 1; - } - - // Multi is the mode info for a multisig public key - message Multi { - // bitarray specifies which keys within the multisig are signing - cosmos.crypto.multisig.v1beta1.CompactBitArray bitarray = 1; - - // mode_infos is the corresponding modes of the signers of the multisig - // which could include nested multisig public keys - repeated ModeInfo mode_infos = 2; - } -} - -// Fee includes the amount of coins paid in fees and the maximum -// gas to be used by the transaction. The ratio yields an effective "gasprice", -// which must be above some miminum to be accepted into the mempool. -message Fee { - // amount is the amount of coins to be paid as a fee - repeated cosmos.base.v1beta1.Coin amount = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - // gas_limit is the maximum gas that can be used in transaction processing - // before an out of gas error occurs - uint64 gas_limit = 2; - - // if unset, the first signer is responsible for paying the fees. If set, the specified account must pay the fees. - // the payer must be a tx signer (and thus have signed this field in AuthInfo). - // setting this field does *not* change the ordering of required signers for the transaction. - string payer = 3; - - // if set, the fee payer (either the first signer or the value of the payer field) requests that a fee grant be used - // to pay fees instead of the fee payer's own balance. If an appropriate fee grant does not exist or the chain does - // not support fee grants, this will fail - string granter = 4; -} diff --git a/proto-thirdparty/cosmos/upgrade/v1beta1/query.proto b/proto-thirdparty/cosmos/upgrade/v1beta1/query.proto deleted file mode 100644 index dd14ba64..00000000 --- a/proto-thirdparty/cosmos/upgrade/v1beta1/query.proto +++ /dev/null @@ -1,104 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; - -// Query defines the gRPC upgrade querier service. -service Query { - // CurrentPlan queries the current upgrade plan. - rpc CurrentPlan(QueryCurrentPlanRequest) returns (QueryCurrentPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/current_plan"; - } - - // AppliedPlan queries a previously applied upgrade plan by its name. - rpc AppliedPlan(QueryAppliedPlanRequest) returns (QueryAppliedPlanResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/applied_plan/{name}"; - } - - // UpgradedConsensusState queries the consensus state that will serve - // as a trusted kernel for the next version of this chain. It will only be - // stored at the last height of this chain. - // UpgradedConsensusState RPC not supported with legacy querier - // This rpc is deprecated now that IBC has its own replacement - // (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option deprecated = true; - option (google.api.http).get = "/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}"; - } - - // ModuleVersions queries the list of module versions from state. - // - // Since: cosmos-sdk 0.43 - rpc ModuleVersions(QueryModuleVersionsRequest) returns (QueryModuleVersionsResponse) { - option (google.api.http).get = "/cosmos/upgrade/v1beta1/module_versions"; - } -} - -// QueryCurrentPlanRequest is the request type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanRequest {} - -// QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC -// method. -message QueryCurrentPlanResponse { - // plan is the current upgrade plan. - Plan plan = 1; -} - -// QueryCurrentPlanRequest is the request type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanRequest { - // name is the name of the applied plan to query for. - string name = 1; -} - -// QueryAppliedPlanResponse is the response type for the Query/AppliedPlan RPC -// method. -message QueryAppliedPlanResponse { - // height is the block height at which the plan was applied. - int64 height = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateRequest { - option deprecated = true; - - // last height of the current chain must be sent in request - // as this is the height under which next consensus state is stored - int64 last_height = 1; -} - -// QueryUpgradedConsensusStateResponse is the response type for the Query/UpgradedConsensusState -// RPC method. -message QueryUpgradedConsensusStateResponse { - option deprecated = true; - reserved 1; - - // Since: cosmos-sdk 0.43 - bytes upgraded_consensus_state = 2; -} - -// QueryModuleVersionsRequest is the request type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsRequest { - // module_name is a field to query a specific module - // consensus version from state. Leaving this empty will - // fetch the full list of module versions from state - string module_name = 1; -} - -// QueryModuleVersionsResponse is the response type for the Query/ModuleVersions -// RPC method. -// -// Since: cosmos-sdk 0.43 -message QueryModuleVersionsResponse { - // module_versions is a list of module names with their consensus versions. - repeated ModuleVersion module_versions = 1; -} diff --git a/proto-thirdparty/cosmos/upgrade/v1beta1/upgrade.proto b/proto-thirdparty/cosmos/upgrade/v1beta1/upgrade.proto deleted file mode 100644 index e888b393..00000000 --- a/proto-thirdparty/cosmos/upgrade/v1beta1/upgrade.proto +++ /dev/null @@ -1,78 +0,0 @@ -syntax = "proto3"; -package cosmos.upgrade.v1beta1; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/upgrade/types"; -option (gogoproto.goproto_getters_all) = false; - -// Plan specifies information about a planned upgrade and when it should occur. -message Plan { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // Sets the name for the upgrade. This name will be used by the upgraded - // version of the software to apply any special "on-upgrade" commands during - // the first BeginBlock method after the upgrade is applied. It is also used - // to detect whether a software version can handle a given upgrade. If no - // upgrade handler with this name has been set in the software, it will be - // assumed that the software is out-of-date when the upgrade Time or Height is - // reached and the software will exit. - string name = 1; - - // Deprecated: Time based upgrades have been deprecated. Time based upgrade logic - // has been removed from the SDK. - // If this field is not empty, an error will be thrown. - google.protobuf.Timestamp time = 2 [deprecated = true, (gogoproto.stdtime) = true, (gogoproto.nullable) = false]; - - // The height at which the upgrade must be performed. - // Only used if Time is not set. - int64 height = 3; - - // Any application specific upgrade info to be included on-chain - // such as a git commit that validators could automatically upgrade to - string info = 4; - - // Deprecated: UpgradedClientState field has been deprecated. IBC upgrade logic has been - // moved to the IBC module in the sub module 02-client. - // If this field is not empty, an error will be thrown. - google.protobuf.Any upgraded_client_state = 5 - [deprecated = true, (gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; -} - -// SoftwareUpgradeProposal is a gov Content type for initiating a software -// upgrade. -message SoftwareUpgradeProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; - Plan plan = 3 [(gogoproto.nullable) = false]; -} - -// CancelSoftwareUpgradeProposal is a gov Content type for cancelling a software -// upgrade. -message CancelSoftwareUpgradeProposal { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - string title = 1; - string description = 2; -} - -// ModuleVersion specifies a module and its consensus version. -// -// Since: cosmos-sdk 0.43 -message ModuleVersion { - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = true; - - // name of the app module - string name = 1; - - // consensus version of the app module - uint64 version = 2; -} diff --git a/proto-thirdparty/cosmos/vesting/v1beta1/tx.proto b/proto-thirdparty/cosmos/vesting/v1beta1/tx.proto deleted file mode 100644 index c49be802..00000000 --- a/proto-thirdparty/cosmos/vesting/v1beta1/tx.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// Msg defines the bank Msg service. -service Msg { - // CreateVestingAccount defines a method that enables creating a vesting - // account. - rpc CreateVestingAccount(MsgCreateVestingAccount) returns (MsgCreateVestingAccountResponse); -} - -// MsgCreateVestingAccount defines a message that enables creating a vesting -// account. -message MsgCreateVestingAccount { - option (gogoproto.equal) = true; - - string from_address = 1 [(gogoproto.moretags) = "yaml:\"from_address\""]; - string to_address = 2 [(gogoproto.moretags) = "yaml:\"to_address\""]; - repeated cosmos.base.v1beta1.Coin amount = 3 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; - - int64 end_time = 4 [(gogoproto.moretags) = "yaml:\"end_time\""]; - bool delayed = 5; -} - -// MsgCreateVestingAccountResponse defines the Msg/CreateVestingAccount response type. -message MsgCreateVestingAccountResponse {} \ No newline at end of file diff --git a/proto-thirdparty/cosmos/vesting/v1beta1/vesting.proto b/proto-thirdparty/cosmos/vesting/v1beta1/vesting.proto deleted file mode 100644 index e9f661f9..00000000 --- a/proto-thirdparty/cosmos/vesting/v1beta1/vesting.proto +++ /dev/null @@ -1,85 +0,0 @@ -syntax = "proto3"; -package cosmos.vesting.v1beta1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -option go_package = "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"; - -// BaseVestingAccount implements the VestingAccount interface. It contains all -// the necessary fields needed for any vesting account implementation. -message BaseVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - cosmos.auth.v1beta1.BaseAccount base_account = 1 [(gogoproto.embed) = true]; - repeated cosmos.base.v1beta1.Coin original_vesting = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"original_vesting\"" - ]; - repeated cosmos.base.v1beta1.Coin delegated_free = 3 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"delegated_free\"" - ]; - repeated cosmos.base.v1beta1.Coin delegated_vesting = 4 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", - (gogoproto.moretags) = "yaml:\"delegated_vesting\"" - ]; - int64 end_time = 5 [(gogoproto.moretags) = "yaml:\"end_time\""]; -} - -// ContinuousVestingAccount implements the VestingAccount interface. It -// continuously vests by unlocking coins linearly with respect to time. -message ContinuousVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; -} - -// DelayedVestingAccount implements the VestingAccount interface. It vests all -// coins after a specific time, but non prior. In other words, it keeps them -// locked until a specified time. -message DelayedVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} - -// Period defines a length of time and amount of coins that will vest. -message Period { - option (gogoproto.goproto_stringer) = false; - - int64 length = 1; - repeated cosmos.base.v1beta1.Coin amount = 2 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"]; -} - -// PeriodicVestingAccount implements the VestingAccount interface. It -// periodically vests by unlocking coins during each specified period. -message PeriodicVestingAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; - int64 start_time = 2 [(gogoproto.moretags) = "yaml:\"start_time\""]; - repeated Period vesting_periods = 3 [(gogoproto.moretags) = "yaml:\"vesting_periods\"", (gogoproto.nullable) = false]; -} - -// PermanentLockedAccount implements the VestingAccount interface. It does -// not ever release coins, locking them indefinitely. Coins in this account can -// still be used for delegating and for governance votes even while locked. -// -// Since: cosmos-sdk 0.43 -message PermanentLockedAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - BaseVestingAccount base_vesting_account = 1 [(gogoproto.embed) = true]; -} diff --git a/proto-thirdparty/cosmos_proto/cosmos.proto b/proto-thirdparty/cosmos_proto/cosmos.proto deleted file mode 100644 index 0a073fc3..00000000 --- a/proto-thirdparty/cosmos_proto/cosmos.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; -package cosmos_proto; - -import "google/protobuf/descriptor.proto"; - -option go_package = "github.com/cosmos/cosmos-proto;cosmos_proto"; - -extend google.protobuf.MessageOptions { - - // implements_interface is used to indicate the type name of the interface - // that a message implements so that it can be used in google.protobuf.Any - // fields that accept that interface. A message can implement multiple - // interfaces. Interfaces should be declared using a declare_interface - // file option. - repeated string implements_interface = 93001; -} - -extend google.protobuf.FieldOptions { - - // accepts_interface is used to annotate that a google.protobuf.Any - // field accepts messages that implement the specified interface. - // Interfaces should be declared using a declare_interface file option. - string accepts_interface = 93001; - - // scalar is used to indicate that this field follows the formatting defined - // by the named scalar which should be declared with declare_scalar. Code - // generators may choose to use this information to map this field to a - // language-specific type representing the scalar. - string scalar = 93002; -} - -extend google.protobuf.FileOptions { - - // declare_interface declares an interface type to be used with - // accepts_interface and implements_interface. Interface names are - // expected to follow the following convention such that their declaration - // can be discovered by tools: for a given interface type a.b.C, it is - // expected that the declaration will be found in a protobuf file named - // a/b/interfaces.proto in the file descriptor set. - repeated InterfaceDescriptor declare_interface = 793021; - - // declare_scalar declares a scalar type to be used with - // the scalar field option. Scalar names are - // expected to follow the following convention such that their declaration - // can be discovered by tools: for a given scalar type a.b.C, it is - // expected that the declaration will be found in a protobuf file named - // a/b/scalars.proto in the file descriptor set. - repeated ScalarDescriptor declare_scalar = 793022; -} - -// InterfaceDescriptor describes an interface type to be used with -// accepts_interface and implements_interface and declared by declare_interface. -message InterfaceDescriptor { - - // name is the name of the interface. It should be a short-name (without - // a period) such that the fully qualified name of the interface will be - // package.name, ex. for the package a.b and interface named C, the - // fully-qualified name will be a.b.C. - string name = 1; - - // description is a human-readable description of the interface and its - // purpose. - string description = 2; -} - -// ScalarDescriptor describes an scalar type to be used with -// the scalar field option and declared by declare_scalar. -// Scalars extend simple protobuf built-in types with additional -// syntax and semantics, for instance to represent big integers. -// Scalars should ideally define an encoding such that there is only one -// valid syntactical representation for a given semantic meaning, -// i.e. the encoding should be deterministic. -message ScalarDescriptor { - - // name is the name of the scalar. It should be a short-name (without - // a period) such that the fully qualified name of the scalar will be - // package.name, ex. for the package a.b and scalar named C, the - // fully-qualified name will be a.b.C. - string name = 1; - - // description is a human-readable description of the scalar and its - // encoding format. For instance a big integer or decimal scalar should - // specify precisely the expected encoding format. - string description = 2; - - // field_type is the type of field with which this scalar can be used. - // Scalars can be used with one and only one type of field so that - // encoding standards and simple and clear. Currently only string and - // bytes fields are supported for scalars. - repeated ScalarType field_type = 3; - - // legacy_amino_encoding is an optional string to describe the encoding - // format used by Amino. The field type is chosen to be a string so that - // the value can either be: - // - a machine-readable string, such as "base64", "bech32" or "utf8", - // - or a human-readable string, for instance a short specification of how - // a big integer would be encoded using Amino. - // - // If left empty, then the Amino encoding is expected to be the same as the - // Protobuf one. - string legacy_amino_encoding = 4; -} - -enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0; - SCALAR_TYPE_STRING = 1; - SCALAR_TYPE_BYTES = 2; -} diff --git a/proto-thirdparty/gogoproto/Makefile b/proto-thirdparty/gogoproto/Makefile deleted file mode 100644 index 0b4659b7..00000000 --- a/proto-thirdparty/gogoproto/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -# Protocol Buffers for Go with Gadgets -# -# Copyright (c) 2013, The GoGo Authors. All rights reserved. -# http://github.com/gogo/protobuf -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -regenerate: - go install github.com/gogo/protobuf/protoc-gen-gogo - protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:../../../../ --proto_path=../../../../:../protobuf/:. *.proto - -restore: - cp gogo.pb.golden gogo.pb.go - -preserve: - cp gogo.pb.go gogo.pb.golden diff --git a/proto-thirdparty/gogoproto/doc.go b/proto-thirdparty/gogoproto/doc.go deleted file mode 100644 index 081c86fa..00000000 --- a/proto-thirdparty/gogoproto/doc.go +++ /dev/null @@ -1,169 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -/* -Package gogoproto provides extensions for protocol buffers to achieve: - - - fast marshalling and unmarshalling. - - peace of mind by optionally generating test and benchmark code. - - more canonical Go structures. - - less typing by optionally generating extra helper code. - - goprotobuf compatibility - -More Canonical Go Structures - -A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. -You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. -Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. - - - nullable, if false, a field is generated without a pointer (see warning below). - - embed, if true, the field is generated as an embedded field. - - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 - - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. - - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. - - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. - - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. - -Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. - -Let us look at: - - github.com/gogo/protobuf/test/example/example.proto - -for a quicker overview. - -The following message: - - package test; - - import "github.com/gogo/protobuf/gogoproto/gogo.proto"; - - message A { - optional string Description = 1 [(gogoproto.nullable) = false]; - optional int64 Number = 2 [(gogoproto.nullable) = false]; - optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; - } - -Will generate a go struct which looks a lot like this: - - type A struct { - Description string - Number int64 - Id github_com_gogo_protobuf_test_custom.Uuid - } - -You will see there are no pointers, since all fields are non-nullable. -You will also see a custom type which marshals to a string. -Be warned it is your responsibility to test your custom types thoroughly. -You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. - -Next we will embed the message A in message B. - - message B { - optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; - repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; - } - -See below that A is embedded in B. - - type B struct { - A - G []github_com_gogo_protobuf_test_custom.Uint128 - } - -Also see the repeated custom type. - - type Uint128 [2]uint64 - -Next we will create a custom name for one of our fields. - - message C { - optional int64 size = 1 [(gogoproto.customname) = "MySize"]; - } - -See below that the field's name is MySize and not Size. - - type C struct { - MySize *int64 - } - -The is useful when having a protocol buffer message with a field name which conflicts with a generated method. -As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. -Using customname you can fix this error without changing the field name. -This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. - -Gogoprotobuf also has some more subtle changes, these could be changed back: - - - the generated package name for imports do not have the extra /filename.pb, - but are actually the imports specified in the .proto file. - -Gogoprotobuf also has lost some features which should be brought back with time: - - - Marshalling and unmarshalling with reflect and without the unsafe package, - this requires work in pointer_reflect.go - -Why does nullable break protocol buffer specifications: - -The protocol buffer specification states, somewhere, that you should be able to tell whether a -field is set or unset. With the option nullable=false this feature is lost, -since your non-nullable fields will always be set. It can be seen as a layer on top of -protocol buffers, where before and after marshalling all non-nullable fields are set -and they cannot be unset. - -Goprotobuf Compatibility: - -Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. -Gogoprotobuf generates the same code as goprotobuf if no extensions are used. -The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: - - - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. - - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix - - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. - - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face - - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. - - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension - - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. - - goproto_registration (beta), if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). - -Less Typing and Peace of Mind is explained in their specific plugin folders godoc: - - - github.com/gogo/protobuf/plugin/ - -If you do not use any of these extension the code that is generated -will be the same as if goprotobuf has generated it. - -The most complete way to see examples is to look at - - github.com/gogo/protobuf/test/thetest.proto - -Gogoprototest is a seperate project, -because we want to keep gogoprotobuf independent of goprotobuf, -but we still want to test it thoroughly. - -*/ -package gogoproto diff --git a/proto-thirdparty/gogoproto/gogo.pb.go b/proto-thirdparty/gogoproto/gogo.pb.go deleted file mode 100644 index af4a8df7..00000000 --- a/proto-thirdparty/gogoproto/gogo.pb.go +++ /dev/null @@ -1,886 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: gogo.proto - -package gogoproto - -import ( - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - descriptor "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62001, - Name: "gogoproto.goproto_enum_prefix", - Tag: "varint,62001,opt,name=goproto_enum_prefix", - Filename: "gogo.proto", -} - -var E_GoprotoEnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62021, - Name: "gogoproto.goproto_enum_stringer", - Tag: "varint,62021,opt,name=goproto_enum_stringer", - Filename: "gogo.proto", -} - -var E_EnumStringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62022, - Name: "gogoproto.enum_stringer", - Tag: "varint,62022,opt,name=enum_stringer", - Filename: "gogo.proto", -} - -var E_EnumCustomname = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*string)(nil), - Field: 62023, - Name: "gogoproto.enum_customname", - Tag: "bytes,62023,opt,name=enum_customname", - Filename: "gogo.proto", -} - -var E_Enumdecl = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 62024, - Name: "gogoproto.enumdecl", - Tag: "varint,62024,opt,name=enumdecl", - Filename: "gogo.proto", -} - -var E_EnumvalueCustomname = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.EnumValueOptions)(nil), - ExtensionType: (*string)(nil), - Field: 66001, - Name: "gogoproto.enumvalue_customname", - Tag: "bytes,66001,opt,name=enumvalue_customname", - Filename: "gogo.proto", -} - -var E_GoprotoGettersAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63001, - Name: "gogoproto.goproto_getters_all", - Tag: "varint,63001,opt,name=goproto_getters_all", - Filename: "gogo.proto", -} - -var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63002, - Name: "gogoproto.goproto_enum_prefix_all", - Tag: "varint,63002,opt,name=goproto_enum_prefix_all", - Filename: "gogo.proto", -} - -var E_GoprotoStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63003, - Name: "gogoproto.goproto_stringer_all", - Tag: "varint,63003,opt,name=goproto_stringer_all", - Filename: "gogo.proto", -} - -var E_VerboseEqualAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63004, - Name: "gogoproto.verbose_equal_all", - Tag: "varint,63004,opt,name=verbose_equal_all", - Filename: "gogo.proto", -} - -var E_FaceAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63005, - Name: "gogoproto.face_all", - Tag: "varint,63005,opt,name=face_all", - Filename: "gogo.proto", -} - -var E_GostringAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63006, - Name: "gogoproto.gostring_all", - Tag: "varint,63006,opt,name=gostring_all", - Filename: "gogo.proto", -} - -var E_PopulateAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63007, - Name: "gogoproto.populate_all", - Tag: "varint,63007,opt,name=populate_all", - Filename: "gogo.proto", -} - -var E_StringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63008, - Name: "gogoproto.stringer_all", - Tag: "varint,63008,opt,name=stringer_all", - Filename: "gogo.proto", -} - -var E_OnlyoneAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63009, - Name: "gogoproto.onlyone_all", - Tag: "varint,63009,opt,name=onlyone_all", - Filename: "gogo.proto", -} - -var E_EqualAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63013, - Name: "gogoproto.equal_all", - Tag: "varint,63013,opt,name=equal_all", - Filename: "gogo.proto", -} - -var E_DescriptionAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63014, - Name: "gogoproto.description_all", - Tag: "varint,63014,opt,name=description_all", - Filename: "gogo.proto", -} - -var E_TestgenAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63015, - Name: "gogoproto.testgen_all", - Tag: "varint,63015,opt,name=testgen_all", - Filename: "gogo.proto", -} - -var E_BenchgenAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63016, - Name: "gogoproto.benchgen_all", - Tag: "varint,63016,opt,name=benchgen_all", - Filename: "gogo.proto", -} - -var E_MarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63017, - Name: "gogoproto.marshaler_all", - Tag: "varint,63017,opt,name=marshaler_all", - Filename: "gogo.proto", -} - -var E_UnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63018, - Name: "gogoproto.unmarshaler_all", - Tag: "varint,63018,opt,name=unmarshaler_all", - Filename: "gogo.proto", -} - -var E_StableMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63019, - Name: "gogoproto.stable_marshaler_all", - Tag: "varint,63019,opt,name=stable_marshaler_all", - Filename: "gogo.proto", -} - -var E_SizerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63020, - Name: "gogoproto.sizer_all", - Tag: "varint,63020,opt,name=sizer_all", - Filename: "gogo.proto", -} - -var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63021, - Name: "gogoproto.goproto_enum_stringer_all", - Tag: "varint,63021,opt,name=goproto_enum_stringer_all", - Filename: "gogo.proto", -} - -var E_EnumStringerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63022, - Name: "gogoproto.enum_stringer_all", - Tag: "varint,63022,opt,name=enum_stringer_all", - Filename: "gogo.proto", -} - -var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63023, - Name: "gogoproto.unsafe_marshaler_all", - Tag: "varint,63023,opt,name=unsafe_marshaler_all", - Filename: "gogo.proto", -} - -var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63024, - Name: "gogoproto.unsafe_unmarshaler_all", - Tag: "varint,63024,opt,name=unsafe_unmarshaler_all", - Filename: "gogo.proto", -} - -var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63025, - Name: "gogoproto.goproto_extensions_map_all", - Tag: "varint,63025,opt,name=goproto_extensions_map_all", - Filename: "gogo.proto", -} - -var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63026, - Name: "gogoproto.goproto_unrecognized_all", - Tag: "varint,63026,opt,name=goproto_unrecognized_all", - Filename: "gogo.proto", -} - -var E_GogoprotoImport = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63027, - Name: "gogoproto.gogoproto_import", - Tag: "varint,63027,opt,name=gogoproto_import", - Filename: "gogo.proto", -} - -var E_ProtosizerAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63028, - Name: "gogoproto.protosizer_all", - Tag: "varint,63028,opt,name=protosizer_all", - Filename: "gogo.proto", -} - -var E_CompareAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63029, - Name: "gogoproto.compare_all", - Tag: "varint,63029,opt,name=compare_all", - Filename: "gogo.proto", -} - -var E_TypedeclAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63030, - Name: "gogoproto.typedecl_all", - Tag: "varint,63030,opt,name=typedecl_all", - Filename: "gogo.proto", -} - -var E_EnumdeclAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63031, - Name: "gogoproto.enumdecl_all", - Tag: "varint,63031,opt,name=enumdecl_all", - Filename: "gogo.proto", -} - -var E_GoprotoRegistration = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63032, - Name: "gogoproto.goproto_registration", - Tag: "varint,63032,opt,name=goproto_registration", - Filename: "gogo.proto", -} - -var E_MessagenameAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63033, - Name: "gogoproto.messagename_all", - Tag: "varint,63033,opt,name=messagename_all", - Filename: "gogo.proto", -} - -var E_GoprotoSizecacheAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63034, - Name: "gogoproto.goproto_sizecache_all", - Tag: "varint,63034,opt,name=goproto_sizecache_all", - Filename: "gogo.proto", -} - -var E_GoprotoUnkeyedAll = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FileOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 63035, - Name: "gogoproto.goproto_unkeyed_all", - Tag: "varint,63035,opt,name=goproto_unkeyed_all", - Filename: "gogo.proto", -} - -var E_GoprotoGetters = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64001, - Name: "gogoproto.goproto_getters", - Tag: "varint,64001,opt,name=goproto_getters", - Filename: "gogo.proto", -} - -var E_GoprotoStringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64003, - Name: "gogoproto.goproto_stringer", - Tag: "varint,64003,opt,name=goproto_stringer", - Filename: "gogo.proto", -} - -var E_VerboseEqual = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64004, - Name: "gogoproto.verbose_equal", - Tag: "varint,64004,opt,name=verbose_equal", - Filename: "gogo.proto", -} - -var E_Face = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64005, - Name: "gogoproto.face", - Tag: "varint,64005,opt,name=face", - Filename: "gogo.proto", -} - -var E_Gostring = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64006, - Name: "gogoproto.gostring", - Tag: "varint,64006,opt,name=gostring", - Filename: "gogo.proto", -} - -var E_Populate = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64007, - Name: "gogoproto.populate", - Tag: "varint,64007,opt,name=populate", - Filename: "gogo.proto", -} - -var E_Stringer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 67008, - Name: "gogoproto.stringer", - Tag: "varint,67008,opt,name=stringer", - Filename: "gogo.proto", -} - -var E_Onlyone = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64009, - Name: "gogoproto.onlyone", - Tag: "varint,64009,opt,name=onlyone", - Filename: "gogo.proto", -} - -var E_Equal = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64013, - Name: "gogoproto.equal", - Tag: "varint,64013,opt,name=equal", - Filename: "gogo.proto", -} - -var E_Description = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64014, - Name: "gogoproto.description", - Tag: "varint,64014,opt,name=description", - Filename: "gogo.proto", -} - -var E_Testgen = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64015, - Name: "gogoproto.testgen", - Tag: "varint,64015,opt,name=testgen", - Filename: "gogo.proto", -} - -var E_Benchgen = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64016, - Name: "gogoproto.benchgen", - Tag: "varint,64016,opt,name=benchgen", - Filename: "gogo.proto", -} - -var E_Marshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64017, - Name: "gogoproto.marshaler", - Tag: "varint,64017,opt,name=marshaler", - Filename: "gogo.proto", -} - -var E_Unmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64018, - Name: "gogoproto.unmarshaler", - Tag: "varint,64018,opt,name=unmarshaler", - Filename: "gogo.proto", -} - -var E_StableMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64019, - Name: "gogoproto.stable_marshaler", - Tag: "varint,64019,opt,name=stable_marshaler", - Filename: "gogo.proto", -} - -var E_Sizer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64020, - Name: "gogoproto.sizer", - Tag: "varint,64020,opt,name=sizer", - Filename: "gogo.proto", -} - -var E_UnsafeMarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64023, - Name: "gogoproto.unsafe_marshaler", - Tag: "varint,64023,opt,name=unsafe_marshaler", - Filename: "gogo.proto", -} - -var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64024, - Name: "gogoproto.unsafe_unmarshaler", - Tag: "varint,64024,opt,name=unsafe_unmarshaler", - Filename: "gogo.proto", -} - -var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64025, - Name: "gogoproto.goproto_extensions_map", - Tag: "varint,64025,opt,name=goproto_extensions_map", - Filename: "gogo.proto", -} - -var E_GoprotoUnrecognized = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64026, - Name: "gogoproto.goproto_unrecognized", - Tag: "varint,64026,opt,name=goproto_unrecognized", - Filename: "gogo.proto", -} - -var E_Protosizer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64028, - Name: "gogoproto.protosizer", - Tag: "varint,64028,opt,name=protosizer", - Filename: "gogo.proto", -} - -var E_Compare = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64029, - Name: "gogoproto.compare", - Tag: "varint,64029,opt,name=compare", - Filename: "gogo.proto", -} - -var E_Typedecl = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64030, - Name: "gogoproto.typedecl", - Tag: "varint,64030,opt,name=typedecl", - Filename: "gogo.proto", -} - -var E_Messagename = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64033, - Name: "gogoproto.messagename", - Tag: "varint,64033,opt,name=messagename", - Filename: "gogo.proto", -} - -var E_GoprotoSizecache = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64034, - Name: "gogoproto.goproto_sizecache", - Tag: "varint,64034,opt,name=goproto_sizecache", - Filename: "gogo.proto", -} - -var E_GoprotoUnkeyed = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 64035, - Name: "gogoproto.goproto_unkeyed", - Tag: "varint,64035,opt,name=goproto_unkeyed", - Filename: "gogo.proto", -} - -var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65001, - Name: "gogoproto.nullable", - Tag: "varint,65001,opt,name=nullable", - Filename: "gogo.proto", -} - -var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65002, - Name: "gogoproto.embed", - Tag: "varint,65002,opt,name=embed", - Filename: "gogo.proto", -} - -var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65003, - Name: "gogoproto.customtype", - Tag: "bytes,65003,opt,name=customtype", - Filename: "gogo.proto", -} - -var E_Customname = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65004, - Name: "gogoproto.customname", - Tag: "bytes,65004,opt,name=customname", - Filename: "gogo.proto", -} - -var E_Jsontag = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65005, - Name: "gogoproto.jsontag", - Tag: "bytes,65005,opt,name=jsontag", - Filename: "gogo.proto", -} - -var E_Moretags = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65006, - Name: "gogoproto.moretags", - Tag: "bytes,65006,opt,name=moretags", - Filename: "gogo.proto", -} - -var E_Casttype = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65007, - Name: "gogoproto.casttype", - Tag: "bytes,65007,opt,name=casttype", - Filename: "gogo.proto", -} - -var E_Castkey = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65008, - Name: "gogoproto.castkey", - Tag: "bytes,65008,opt,name=castkey", - Filename: "gogo.proto", -} - -var E_Castvalue = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65009, - Name: "gogoproto.castvalue", - Tag: "bytes,65009,opt,name=castvalue", - Filename: "gogo.proto", -} - -var E_Stdtime = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65010, - Name: "gogoproto.stdtime", - Tag: "varint,65010,opt,name=stdtime", - Filename: "gogo.proto", -} - -var E_Stdduration = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65011, - Name: "gogoproto.stdduration", - Tag: "varint,65011,opt,name=stdduration", - Filename: "gogo.proto", -} - -var E_Wktpointer = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 65012, - Name: "gogoproto.wktpointer", - Tag: "varint,65012,opt,name=wktpointer", - Filename: "gogo.proto", -} - -var E_Castrepeated = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 65013, - Name: "gogoproto.castrepeated", - Tag: "bytes,65013,opt,name=castrepeated", - Filename: "gogo.proto", -} - -func init() { - proto.RegisterExtension(E_GoprotoEnumPrefix) - proto.RegisterExtension(E_GoprotoEnumStringer) - proto.RegisterExtension(E_EnumStringer) - proto.RegisterExtension(E_EnumCustomname) - proto.RegisterExtension(E_Enumdecl) - proto.RegisterExtension(E_EnumvalueCustomname) - proto.RegisterExtension(E_GoprotoGettersAll) - proto.RegisterExtension(E_GoprotoEnumPrefixAll) - proto.RegisterExtension(E_GoprotoStringerAll) - proto.RegisterExtension(E_VerboseEqualAll) - proto.RegisterExtension(E_FaceAll) - proto.RegisterExtension(E_GostringAll) - proto.RegisterExtension(E_PopulateAll) - proto.RegisterExtension(E_StringerAll) - proto.RegisterExtension(E_OnlyoneAll) - proto.RegisterExtension(E_EqualAll) - proto.RegisterExtension(E_DescriptionAll) - proto.RegisterExtension(E_TestgenAll) - proto.RegisterExtension(E_BenchgenAll) - proto.RegisterExtension(E_MarshalerAll) - proto.RegisterExtension(E_UnmarshalerAll) - proto.RegisterExtension(E_StableMarshalerAll) - proto.RegisterExtension(E_SizerAll) - proto.RegisterExtension(E_GoprotoEnumStringerAll) - proto.RegisterExtension(E_EnumStringerAll) - proto.RegisterExtension(E_UnsafeMarshalerAll) - proto.RegisterExtension(E_UnsafeUnmarshalerAll) - proto.RegisterExtension(E_GoprotoExtensionsMapAll) - proto.RegisterExtension(E_GoprotoUnrecognizedAll) - proto.RegisterExtension(E_GogoprotoImport) - proto.RegisterExtension(E_ProtosizerAll) - proto.RegisterExtension(E_CompareAll) - proto.RegisterExtension(E_TypedeclAll) - proto.RegisterExtension(E_EnumdeclAll) - proto.RegisterExtension(E_GoprotoRegistration) - proto.RegisterExtension(E_MessagenameAll) - proto.RegisterExtension(E_GoprotoSizecacheAll) - proto.RegisterExtension(E_GoprotoUnkeyedAll) - proto.RegisterExtension(E_GoprotoGetters) - proto.RegisterExtension(E_GoprotoStringer) - proto.RegisterExtension(E_VerboseEqual) - proto.RegisterExtension(E_Face) - proto.RegisterExtension(E_Gostring) - proto.RegisterExtension(E_Populate) - proto.RegisterExtension(E_Stringer) - proto.RegisterExtension(E_Onlyone) - proto.RegisterExtension(E_Equal) - proto.RegisterExtension(E_Description) - proto.RegisterExtension(E_Testgen) - proto.RegisterExtension(E_Benchgen) - proto.RegisterExtension(E_Marshaler) - proto.RegisterExtension(E_Unmarshaler) - proto.RegisterExtension(E_StableMarshaler) - proto.RegisterExtension(E_Sizer) - proto.RegisterExtension(E_UnsafeMarshaler) - proto.RegisterExtension(E_UnsafeUnmarshaler) - proto.RegisterExtension(E_GoprotoExtensionsMap) - proto.RegisterExtension(E_GoprotoUnrecognized) - proto.RegisterExtension(E_Protosizer) - proto.RegisterExtension(E_Compare) - proto.RegisterExtension(E_Typedecl) - proto.RegisterExtension(E_Messagename) - proto.RegisterExtension(E_GoprotoSizecache) - proto.RegisterExtension(E_GoprotoUnkeyed) - proto.RegisterExtension(E_Nullable) - proto.RegisterExtension(E_Embed) - proto.RegisterExtension(E_Customtype) - proto.RegisterExtension(E_Customname) - proto.RegisterExtension(E_Jsontag) - proto.RegisterExtension(E_Moretags) - proto.RegisterExtension(E_Casttype) - proto.RegisterExtension(E_Castkey) - proto.RegisterExtension(E_Castvalue) - proto.RegisterExtension(E_Stdtime) - proto.RegisterExtension(E_Stdduration) - proto.RegisterExtension(E_Wktpointer) - proto.RegisterExtension(E_Castrepeated) -} - -func init() { proto.RegisterFile("gogo.proto", fileDescriptor_592445b5231bc2b9) } - -var fileDescriptor_592445b5231bc2b9 = []byte{ - // 1347 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0xc9, 0x6f, 0x1c, 0x45, - 0x17, 0xc0, 0xf5, 0xe9, 0x4b, 0x14, 0xfb, 0xd9, 0x8e, 0x63, 0x3b, 0x84, 0x10, 0x81, 0x08, 0x9c, - 0x38, 0x39, 0xa7, 0x08, 0xa5, 0xac, 0x28, 0x72, 0x2c, 0xc7, 0x0a, 0x22, 0xc1, 0x38, 0x71, 0xd8, - 0x0e, 0xa3, 0x9e, 0x99, 0x72, 0xbb, 0x49, 0x77, 0x57, 0xd3, 0x5d, 0x1d, 0xe2, 0xdc, 0x50, 0x58, - 0x84, 0x10, 0x3b, 0x12, 0x24, 0x24, 0x81, 0x80, 0xd8, 0xd7, 0xb0, 0x2f, 0x17, 0x2e, 0x2c, 0x57, - 0xfe, 0x07, 0x2e, 0x80, 0xd9, 0xcd, 0xc9, 0x17, 0xf4, 0xba, 0xdf, 0xeb, 0xa9, 0x69, 0x8f, 0x54, - 0x35, 0xb7, 0xb1, 0x5d, 0xbf, 0x9f, 0xab, 0xdf, 0xab, 0x7a, 0xef, 0x4d, 0x03, 0xf8, 0xca, 0x57, - 0x93, 0x49, 0xaa, 0xb4, 0x1a, 0x1f, 0xc4, 0xcf, 0xc5, 0xc7, 0x5d, 0xbb, 0x7d, 0xa5, 0xfc, 0x50, - 0xee, 0x29, 0x7e, 0x6a, 0xe6, 0x4b, 0x7b, 0xda, 0x32, 0x6b, 0xa5, 0x41, 0xa2, 0x55, 0x5a, 0x2e, - 0x16, 0x47, 0x61, 0x82, 0x16, 0x37, 0x64, 0x9c, 0x47, 0x8d, 0x24, 0x95, 0x4b, 0xc1, 0xe9, 0xf1, - 0x6b, 0x27, 0x4b, 0x72, 0x92, 0xc9, 0xc9, 0xd9, 0x38, 0x8f, 0x6e, 0x4b, 0x74, 0xa0, 0xe2, 0x6c, - 0xe7, 0x95, 0x9f, 0xfe, 0xbf, 0xfb, 0x7f, 0x37, 0x0d, 0x2c, 0x8c, 0x11, 0x8a, 0x7f, 0x9b, 0x2f, - 0x40, 0xb1, 0x00, 0x57, 0x75, 0xf9, 0x32, 0x9d, 0x06, 0xb1, 0x2f, 0x53, 0x8b, 0xf1, 0x5b, 0x32, - 0x4e, 0x18, 0xc6, 0x63, 0x84, 0x8a, 0x19, 0x18, 0xe9, 0xc7, 0xf5, 0x1d, 0xb9, 0x86, 0xa5, 0x29, - 0x99, 0x83, 0xd1, 0x42, 0xd2, 0xca, 0x33, 0xad, 0xa2, 0xd8, 0x8b, 0xa4, 0x45, 0xf3, 0x7d, 0xa1, - 0x19, 0x5c, 0xd8, 0x8a, 0xd8, 0x4c, 0x45, 0x09, 0x01, 0x03, 0xf8, 0x9b, 0xb6, 0x6c, 0x85, 0x16, - 0xc3, 0x0f, 0xb4, 0x91, 0x6a, 0xbd, 0x38, 0x01, 0xdb, 0xf1, 0xf3, 0x29, 0x2f, 0xcc, 0xa5, 0xb9, - 0x93, 0x1b, 0x7a, 0x7a, 0x4e, 0xe0, 0x32, 0x96, 0xfd, 0x78, 0x76, 0x53, 0xb1, 0x9d, 0x89, 0x4a, - 0x60, 0xec, 0xc9, 0xc8, 0xa2, 0x2f, 0xb5, 0x96, 0x69, 0xd6, 0xf0, 0xc2, 0x5e, 0xdb, 0x3b, 0x14, - 0x84, 0x95, 0xf1, 0xdc, 0x6a, 0x77, 0x16, 0xe7, 0x4a, 0x72, 0x3a, 0x0c, 0xc5, 0x22, 0x5c, 0xdd, - 0xe3, 0x54, 0x38, 0x38, 0xcf, 0x93, 0x73, 0xfb, 0x86, 0x93, 0x81, 0xda, 0x79, 0xe0, 0xdf, 0x57, - 0xb9, 0x74, 0x70, 0xbe, 0x48, 0xce, 0x71, 0x62, 0x39, 0xa5, 0x68, 0xbc, 0x05, 0xc6, 0x4e, 0xc9, - 0xb4, 0xa9, 0x32, 0xd9, 0x90, 0xf7, 0xe5, 0x5e, 0xe8, 0xa0, 0xbb, 0x40, 0xba, 0x51, 0x02, 0x67, - 0x91, 0x43, 0xd7, 0x3e, 0x18, 0x58, 0xf2, 0x5a, 0xd2, 0x41, 0x71, 0x91, 0x14, 0x5b, 0x70, 0x3d, - 0xa2, 0xd3, 0x30, 0xec, 0xab, 0xf2, 0x91, 0x1c, 0xf0, 0x4b, 0x84, 0x0f, 0x31, 0x43, 0x8a, 0x44, - 0x25, 0x79, 0xe8, 0x69, 0x97, 0x1d, 0xbc, 0xc4, 0x0a, 0x66, 0x48, 0xd1, 0x47, 0x58, 0x5f, 0x66, - 0x45, 0x66, 0xc4, 0xf3, 0x00, 0x0c, 0xa9, 0x38, 0x5c, 0x51, 0xb1, 0xcb, 0x26, 0x2e, 0x93, 0x01, - 0x08, 0x41, 0xc1, 0x14, 0x0c, 0xba, 0x26, 0xe2, 0xb5, 0x55, 0xbe, 0x1e, 0x9c, 0x81, 0x39, 0x18, - 0xe5, 0x02, 0x15, 0xa8, 0xd8, 0x41, 0xf1, 0x3a, 0x29, 0xb6, 0x1a, 0x18, 0x3d, 0x86, 0x96, 0x99, - 0xf6, 0xa5, 0x8b, 0xe4, 0x0d, 0x7e, 0x0c, 0x42, 0x28, 0x94, 0x4d, 0x19, 0xb7, 0x96, 0xdd, 0x0c, - 0x6f, 0x72, 0x28, 0x99, 0x41, 0xc5, 0x0c, 0x8c, 0x44, 0x5e, 0x9a, 0x2d, 0x7b, 0xa1, 0x53, 0x3a, - 0xde, 0x22, 0xc7, 0x70, 0x05, 0x51, 0x44, 0xf2, 0xb8, 0x1f, 0xcd, 0xdb, 0x1c, 0x11, 0x03, 0xa3, - 0xab, 0x97, 0x69, 0xaf, 0x19, 0xca, 0x46, 0x3f, 0xb6, 0x77, 0xf8, 0xea, 0x95, 0xec, 0x11, 0xd3, - 0x38, 0x05, 0x83, 0x59, 0x70, 0xc6, 0x49, 0xf3, 0x2e, 0x67, 0xba, 0x00, 0x10, 0xbe, 0x0b, 0xae, - 0xe9, 0xd9, 0x26, 0x1c, 0x64, 0xef, 0x91, 0x6c, 0x47, 0x8f, 0x56, 0x41, 0x25, 0xa1, 0x5f, 0xe5, - 0xfb, 0x5c, 0x12, 0x64, 0xcd, 0x35, 0x0f, 0xdb, 0xf3, 0x38, 0xf3, 0x96, 0xfa, 0x8b, 0xda, 0x07, - 0x1c, 0xb5, 0x92, 0xed, 0x8a, 0xda, 0x71, 0xd8, 0x41, 0xc6, 0xfe, 0xf2, 0xfa, 0x21, 0x17, 0xd6, - 0x92, 0x5e, 0xec, 0xce, 0xee, 0x3d, 0xb0, 0xab, 0x0a, 0xe7, 0x69, 0x2d, 0xe3, 0x0c, 0x99, 0x46, - 0xe4, 0x25, 0x0e, 0xe6, 0x2b, 0x64, 0xe6, 0x8a, 0x3f, 0x5b, 0x09, 0x8e, 0x78, 0x09, 0xca, 0xef, - 0x84, 0x9d, 0x2c, 0xcf, 0xe3, 0x54, 0xb6, 0x94, 0x1f, 0x07, 0x67, 0x64, 0xdb, 0x41, 0xfd, 0x51, - 0x2d, 0x55, 0x8b, 0x06, 0x8e, 0xe6, 0xc3, 0xb0, 0xad, 0x9a, 0x55, 0x1a, 0x41, 0x94, 0xa8, 0x54, - 0x5b, 0x8c, 0x1f, 0x73, 0xa6, 0x2a, 0xee, 0x70, 0x81, 0x89, 0x59, 0xd8, 0x5a, 0xfc, 0xe8, 0x7a, - 0x24, 0x3f, 0x21, 0xd1, 0x48, 0x87, 0xa2, 0xc2, 0xd1, 0x52, 0x51, 0xe2, 0xa5, 0x2e, 0xf5, 0xef, - 0x53, 0x2e, 0x1c, 0x84, 0x50, 0xe1, 0xd0, 0x2b, 0x89, 0xc4, 0x6e, 0xef, 0x60, 0xf8, 0x8c, 0x0b, - 0x07, 0x33, 0xa4, 0xe0, 0x81, 0xc1, 0x41, 0xf1, 0x39, 0x2b, 0x98, 0x41, 0xc5, 0xed, 0x9d, 0x46, - 0x9b, 0x4a, 0x3f, 0xc8, 0x74, 0xea, 0xe1, 0x6a, 0x8b, 0xea, 0x8b, 0xd5, 0xee, 0x21, 0x6c, 0xc1, - 0x40, 0xb1, 0x12, 0x45, 0x32, 0xcb, 0x3c, 0x5f, 0xe2, 0xc4, 0xe1, 0xb0, 0xb1, 0x2f, 0xb9, 0x12, - 0x19, 0x18, 0xee, 0xcd, 0x98, 0x10, 0x31, 0xec, 0x2d, 0xaf, 0xb5, 0xec, 0xa2, 0xfb, 0xaa, 0xb6, - 0xb9, 0x63, 0xcc, 0xa2, 0xd3, 0x98, 0x7f, 0xf2, 0xf8, 0xa4, 0x5c, 0x71, 0x3a, 0x9d, 0x5f, 0xd7, - 0xe6, 0x9f, 0xc5, 0x92, 0x2c, 0x6b, 0xc8, 0x68, 0x6d, 0x9e, 0x1a, 0xbf, 0x7e, 0x83, 0xeb, 0x48, - 0xf9, 0x5c, 0xac, 0x7b, 0x60, 0x8d, 0x9e, 0xb7, 0x7b, 0x9c, 0x12, 0xb7, 0xe2, 0x21, 0xef, 0x1e, - 0x7a, 0xec, 0xb2, 0xb3, 0x6b, 0xd5, 0x39, 0xef, 0x9a, 0x79, 0xc4, 0x21, 0x18, 0xe9, 0x1a, 0x78, - 0xec, 0xaa, 0x07, 0x49, 0x35, 0x6c, 0xce, 0x3b, 0x62, 0x2f, 0x6c, 0xc2, 0xe1, 0xc5, 0x8e, 0x3f, - 0x44, 0x78, 0xb1, 0x5c, 0xec, 0x87, 0x01, 0x1e, 0x5a, 0xec, 0xe8, 0xc3, 0x84, 0x56, 0x08, 0xe2, - 0x3c, 0xb0, 0xd8, 0xf1, 0x47, 0x18, 0x67, 0x04, 0x71, 0xf7, 0x10, 0x7e, 0xf3, 0xd8, 0x26, 0x6a, - 0x3a, 0x1c, 0xbb, 0x29, 0xd8, 0x42, 0x93, 0x8a, 0x9d, 0x7e, 0x94, 0xfe, 0x39, 0x13, 0xe2, 0x66, - 0xd8, 0xec, 0x18, 0xf0, 0xc7, 0x09, 0x2d, 0xd7, 0x8b, 0x19, 0x18, 0x32, 0xa6, 0x13, 0x3b, 0xfe, - 0x04, 0xe1, 0x26, 0x85, 0x5b, 0xa7, 0xe9, 0xc4, 0x2e, 0x78, 0x92, 0xb7, 0x4e, 0x04, 0x86, 0x8d, - 0x07, 0x13, 0x3b, 0xfd, 0x14, 0x47, 0x9d, 0x11, 0x71, 0x00, 0x06, 0xab, 0x66, 0x63, 0xe7, 0x9f, - 0x26, 0xbe, 0xc3, 0x60, 0x04, 0x8c, 0x66, 0x67, 0x57, 0x3c, 0xc3, 0x11, 0x30, 0x28, 0xbc, 0x46, - 0xf5, 0x01, 0xc6, 0x6e, 0x7a, 0x96, 0xaf, 0x51, 0x6d, 0x7e, 0xc1, 0x6c, 0x16, 0x35, 0xdf, 0xae, - 0x78, 0x8e, 0xb3, 0x59, 0xac, 0xc7, 0x6d, 0xd4, 0x27, 0x02, 0xbb, 0xe3, 0x79, 0xde, 0x46, 0x6d, - 0x20, 0x10, 0xf3, 0x30, 0xbe, 0x71, 0x1a, 0xb0, 0xfb, 0x5e, 0x20, 0xdf, 0xd8, 0x86, 0x61, 0x40, - 0xdc, 0x01, 0x3b, 0x7a, 0x4f, 0x02, 0x76, 0xeb, 0xb9, 0xb5, 0xda, 0x77, 0x37, 0x73, 0x10, 0x10, - 0xc7, 0x3b, 0x2d, 0xc5, 0x9c, 0x02, 0xec, 0xda, 0xf3, 0x6b, 0xdd, 0x85, 0xdb, 0x1c, 0x02, 0xc4, - 0x34, 0x40, 0xa7, 0x01, 0xdb, 0x5d, 0x17, 0xc8, 0x65, 0x40, 0x78, 0x35, 0xa8, 0xff, 0xda, 0xf9, - 0x8b, 0x7c, 0x35, 0x88, 0xc0, 0xab, 0xc1, 0xad, 0xd7, 0x4e, 0x5f, 0xe2, 0xab, 0xc1, 0x08, 0x9e, - 0x6c, 0xa3, 0xbb, 0xd9, 0x0d, 0x97, 0xf9, 0x64, 0x1b, 0x94, 0x38, 0x0a, 0x63, 0x1b, 0x1a, 0xa2, - 0x5d, 0xf5, 0x0a, 0xa9, 0xb6, 0xd5, 0xfb, 0xa1, 0xd9, 0xbc, 0xa8, 0x19, 0xda, 0x6d, 0xaf, 0xd6, - 0x9a, 0x17, 0xf5, 0x42, 0x31, 0x05, 0x03, 0x71, 0x1e, 0x86, 0x78, 0x79, 0xc6, 0xaf, 0xeb, 0xd1, - 0x4d, 0x65, 0xd8, 0x66, 0xc5, 0xcf, 0xeb, 0x14, 0x1d, 0x06, 0xc4, 0x5e, 0xd8, 0x2c, 0xa3, 0xa6, - 0x6c, 0xdb, 0xc8, 0x5f, 0xd6, 0xb9, 0x60, 0xe2, 0x6a, 0x71, 0x00, 0xa0, 0x7c, 0x35, 0x82, 0x61, - 0xb6, 0xb1, 0xbf, 0xae, 0x97, 0x6f, 0x69, 0x0c, 0xa4, 0x23, 0x28, 0x92, 0x62, 0x11, 0xac, 0x76, - 0x0b, 0x8a, 0x8c, 0xec, 0x83, 0x2d, 0xf7, 0x66, 0x2a, 0xd6, 0x9e, 0x6f, 0xa3, 0x7f, 0x23, 0x9a, - 0xd7, 0x63, 0xc0, 0x22, 0x95, 0x4a, 0xed, 0xf9, 0x99, 0x8d, 0xfd, 0x9d, 0xd8, 0x0a, 0x40, 0xb8, - 0xe5, 0x65, 0xda, 0xe5, 0xb9, 0xff, 0x60, 0x98, 0x01, 0xdc, 0x34, 0x7e, 0x3e, 0x29, 0x57, 0x6c, - 0xec, 0x9f, 0xbc, 0x69, 0x5a, 0x2f, 0xf6, 0xc3, 0x20, 0x7e, 0x2c, 0xde, 0x2a, 0xd9, 0xe0, 0xbf, - 0x08, 0xee, 0x10, 0xf8, 0x9f, 0x33, 0xdd, 0xd6, 0x81, 0x3d, 0xd8, 0x7f, 0x53, 0xa6, 0x79, 0xbd, - 0x98, 0x86, 0xa1, 0x4c, 0xb7, 0xdb, 0x39, 0xcd, 0xa7, 0x16, 0xfc, 0x9f, 0xf5, 0xea, 0x95, 0x45, - 0xc5, 0x60, 0xb6, 0xef, 0x3f, 0xa9, 0x13, 0x15, 0xc4, 0x5a, 0xa6, 0x36, 0xc3, 0x1a, 0x19, 0x0c, - 0x44, 0xcc, 0xc0, 0x30, 0x3e, 0x4b, 0x2a, 0x13, 0xe9, 0x69, 0xfb, 0x69, 0xfd, 0x97, 0x02, 0xd0, - 0x05, 0x1d, 0x9c, 0x85, 0x89, 0x96, 0x8a, 0xea, 0xe4, 0x41, 0x98, 0x53, 0x73, 0x6a, 0xbe, 0x28, - 0x56, 0x77, 0xdf, 0xe8, 0x07, 0x7a, 0x39, 0x6f, 0x4e, 0xb6, 0x54, 0xb4, 0x07, 0xbf, 0xbe, 0x74, - 0xde, 0xca, 0x56, 0x5f, 0x66, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x11, 0x89, 0x8c, 0xc7, 0xc8, - 0x15, 0x00, 0x00, -} diff --git a/proto-thirdparty/gogoproto/gogo.pb.golden b/proto-thirdparty/gogoproto/gogo.pb.golden deleted file mode 100644 index f6502e4b..00000000 --- a/proto-thirdparty/gogoproto/gogo.pb.golden +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by protoc-gen-go. -// source: gogo.proto -// DO NOT EDIT! - -package gogoproto - -import proto "github.com/gogo/protobuf/proto" -import json "encoding/json" -import math "math" -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" - -// Reference proto, json, and math imports to suppress error if they are not otherwise used. -var _ = proto.Marshal -var _ = &json.SyntaxError{} -var _ = math.Inf - -var E_Nullable = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51235, - Name: "gogoproto.nullable", - Tag: "varint,51235,opt,name=nullable", -} - -var E_Embed = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 51236, - Name: "gogoproto.embed", - Tag: "varint,51236,opt,name=embed", -} - -var E_Customtype = &proto.ExtensionDesc{ - ExtendedType: (*google_protobuf.FieldOptions)(nil), - ExtensionType: (*string)(nil), - Field: 51237, - Name: "gogoproto.customtype", - Tag: "bytes,51237,opt,name=customtype", -} - -func init() { - proto.RegisterExtension(E_Nullable) - proto.RegisterExtension(E_Embed) - proto.RegisterExtension(E_Customtype) -} diff --git a/proto-thirdparty/gogoproto/gogo.proto b/proto-thirdparty/gogoproto/gogo.proto deleted file mode 100644 index 49e78f99..00000000 --- a/proto-thirdparty/gogoproto/gogo.proto +++ /dev/null @@ -1,145 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto2"; -package gogoproto; - -import "google/protobuf/descriptor.proto"; - -option java_package = "com.google.protobuf"; -option java_outer_classname = "GoGoProtos"; -option go_package = "github.com/gogo/protobuf/gogoproto"; - -extend google.protobuf.EnumOptions { - optional bool goproto_enum_prefix = 62001; - optional bool goproto_enum_stringer = 62021; - optional bool enum_stringer = 62022; - optional string enum_customname = 62023; - optional bool enumdecl = 62024; -} - -extend google.protobuf.EnumValueOptions { - optional string enumvalue_customname = 66001; -} - -extend google.protobuf.FileOptions { - optional bool goproto_getters_all = 63001; - optional bool goproto_enum_prefix_all = 63002; - optional bool goproto_stringer_all = 63003; - optional bool verbose_equal_all = 63004; - optional bool face_all = 63005; - optional bool gostring_all = 63006; - optional bool populate_all = 63007; - optional bool stringer_all = 63008; - optional bool onlyone_all = 63009; - - optional bool equal_all = 63013; - optional bool description_all = 63014; - optional bool testgen_all = 63015; - optional bool benchgen_all = 63016; - optional bool marshaler_all = 63017; - optional bool unmarshaler_all = 63018; - optional bool stable_marshaler_all = 63019; - - optional bool sizer_all = 63020; - - optional bool goproto_enum_stringer_all = 63021; - optional bool enum_stringer_all = 63022; - - optional bool unsafe_marshaler_all = 63023; - optional bool unsafe_unmarshaler_all = 63024; - - optional bool goproto_extensions_map_all = 63025; - optional bool goproto_unrecognized_all = 63026; - optional bool gogoproto_import = 63027; - optional bool protosizer_all = 63028; - optional bool compare_all = 63029; - optional bool typedecl_all = 63030; - optional bool enumdecl_all = 63031; - - optional bool goproto_registration = 63032; - optional bool messagename_all = 63033; - - optional bool goproto_sizecache_all = 63034; - optional bool goproto_unkeyed_all = 63035; -} - -extend google.protobuf.MessageOptions { - optional bool goproto_getters = 64001; - optional bool goproto_stringer = 64003; - optional bool verbose_equal = 64004; - optional bool face = 64005; - optional bool gostring = 64006; - optional bool populate = 64007; - optional bool stringer = 67008; - optional bool onlyone = 64009; - - optional bool equal = 64013; - optional bool description = 64014; - optional bool testgen = 64015; - optional bool benchgen = 64016; - optional bool marshaler = 64017; - optional bool unmarshaler = 64018; - optional bool stable_marshaler = 64019; - - optional bool sizer = 64020; - - optional bool unsafe_marshaler = 64023; - optional bool unsafe_unmarshaler = 64024; - - optional bool goproto_extensions_map = 64025; - optional bool goproto_unrecognized = 64026; - - optional bool protosizer = 64028; - optional bool compare = 64029; - - optional bool typedecl = 64030; - - optional bool messagename = 64033; - - optional bool goproto_sizecache = 64034; - optional bool goproto_unkeyed = 64035; -} - -extend google.protobuf.FieldOptions { - optional bool nullable = 65001; - optional bool embed = 65002; - optional string customtype = 65003; - optional string customname = 65004; - optional string jsontag = 65005; - optional string moretags = 65006; - optional string casttype = 65007; - optional string castkey = 65008; - optional string castvalue = 65009; - - optional bool stdtime = 65010; - optional bool stdduration = 65011; - optional bool wktpointer = 65012; - - optional string castrepeated = 65013; -} diff --git a/proto-thirdparty/gogoproto/helper.go b/proto-thirdparty/gogoproto/helper.go deleted file mode 100644 index faa783c1..00000000 --- a/proto-thirdparty/gogoproto/helper.go +++ /dev/null @@ -1,436 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2013, The GoGo Authors. All rights reserved. -// http://github.com/gogo/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -package gogoproto - -import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" -import proto "github.com/gogo/protobuf/proto" - -func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Embed, false) -} - -func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Nullable, true) -} - -func IsStdTime(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Stdtime, false) -} - -func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Stdduration, false) -} - -func IsStdDouble(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.DoubleValue" -} - -func IsStdFloat(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.FloatValue" -} - -func IsStdInt64(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int64Value" -} - -func IsStdUInt64(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt64Value" -} - -func IsStdInt32(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.Int32Value" -} - -func IsStdUInt32(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.UInt32Value" -} - -func IsStdBool(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BoolValue" -} - -func IsStdString(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.StringValue" -} - -func IsStdBytes(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) && *field.TypeName == ".google.protobuf.BytesValue" -} - -func IsStdType(field *google_protobuf.FieldDescriptorProto) bool { - return (IsStdTime(field) || IsStdDuration(field) || - IsStdDouble(field) || IsStdFloat(field) || - IsStdInt64(field) || IsStdUInt64(field) || - IsStdInt32(field) || IsStdUInt32(field) || - IsStdBool(field) || - IsStdString(field) || IsStdBytes(field)) -} - -func IsWktPtr(field *google_protobuf.FieldDescriptorProto) bool { - return proto.GetBoolExtension(field.Options, E_Wktpointer, false) -} - -func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { - nullable := IsNullable(field) - if field.IsMessage() || IsCustomType(field) { - return nullable - } - if proto3 { - return false - } - return nullable || *field.Type == google_protobuf.FieldDescriptorProto_TYPE_BYTES -} - -func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCustomType(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastType(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastKey(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastValue(field) - if len(typ) > 0 { - return true - } - return false -} - -func IsCastRepeated(field *google_protobuf.FieldDescriptorProto) bool { - typ := GetCastRepeated(field) - if len(typ) > 0 { - return true - } - return false -} - -func HasEnumDecl(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_Enumdecl, proto.GetBoolExtension(file.Options, E_EnumdeclAll, true)) -} - -func HasTypeDecl(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Typedecl, proto.GetBoolExtension(file.Options, E_TypedeclAll, true)) -} - -func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Customtype) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastType(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Casttype) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castkey) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castvalue) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetCastRepeated(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Castrepeated) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { - name := GetCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func IsEnumCustomName(field *google_protobuf.EnumDescriptorProto) bool { - name := GetEnumCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func IsEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) bool { - name := GetEnumValueCustomName(field) - if len(name) > 0 { - return true - } - return false -} - -func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Customname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetEnumCustomName(field *google_protobuf.EnumDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_EnumCustomname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) string { - if field == nil { - return "" - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_EnumvalueCustomname) - if err == nil && v.(*string) != nil { - return *(v.(*string)) - } - } - return "" -} - -func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { - if field == nil { - return nil - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Jsontag) - if err == nil && v.(*string) != nil { - return (v.(*string)) - } - } - return nil -} - -func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { - if field == nil { - return nil - } - if field.Options != nil { - v, err := proto.GetExtension(field.Options, E_Moretags) - if err == nil && v.(*string) != nil { - return (v.(*string)) - } - } - return nil -} - -type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool - -func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) -} - -func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) -} - -func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) -} - -func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) -} - -func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) -} - -func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) -} - -func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) -} - -func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) -} - -func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) -} - -func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) -} - -func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) -} - -func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) -} - -func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) -} - -func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) -} - -func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) -} - -func IsStableMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_StableMarshaler, proto.GetBoolExtension(file.Options, E_StableMarshalerAll, false)) -} - -func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) -} - -func IsProtoSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Protosizer, proto.GetBoolExtension(file.Options, E_ProtosizerAll, false)) -} - -func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) -} - -func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { - return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) -} - -func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) -} - -func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) -} - -func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) -} - -func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) -} - -func IsProto3(file *google_protobuf.FileDescriptorProto) bool { - return file.GetSyntax() == "proto3" -} - -func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { - return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) -} - -func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false)) -} - -func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { - return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) -} - -func HasMessageName(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_Messagename, proto.GetBoolExtension(file.Options, E_MessagenameAll, false)) -} - -func HasSizecache(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoSizecache, proto.GetBoolExtension(file.Options, E_GoprotoSizecacheAll, true)) -} - -func HasUnkeyed(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { - return proto.GetBoolExtension(message.Options, E_GoprotoUnkeyed, proto.GetBoolExtension(file.Options, E_GoprotoUnkeyedAll, true)) -} diff --git a/proto-thirdparty/google/api/annotations.proto b/proto-thirdparty/google/api/annotations.proto deleted file mode 100644 index 85c361b4..00000000 --- a/proto-thirdparty/google/api/annotations.proto +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2015, Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -import "google/api/http.proto"; -import "google/protobuf/descriptor.proto"; - -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "AnnotationsProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -extend google.protobuf.MethodOptions { - // See `HttpRule`. - HttpRule http = 72295728; -} diff --git a/proto-thirdparty/google/api/http.proto b/proto-thirdparty/google/api/http.proto deleted file mode 100644 index 2bd3a19b..00000000 --- a/proto-thirdparty/google/api/http.proto +++ /dev/null @@ -1,318 +0,0 @@ -// Copyright 2018 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.api; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; -option java_multiple_files = true; -option java_outer_classname = "HttpProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - - -// Defines the HTTP configuration for an API service. It contains a list of -// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method -// to one or more HTTP REST API methods. -message Http { - // A list of HTTP configuration rules that apply to individual API methods. - // - // **NOTE:** All service configuration rules follow "last one wins" order. - repeated HttpRule rules = 1; - - // When set to true, URL path parmeters will be fully URI-decoded except in - // cases of single segment matches in reserved expansion, where "%2F" will be - // left encoded. - // - // The default behavior is to not decode RFC 6570 reserved characters in multi - // segment matches. - bool fully_decode_reserved_expansion = 2; -} - -// `HttpRule` defines the mapping of an RPC method to one or more HTTP -// REST API methods. The mapping specifies how different portions of the RPC -// request message are mapped to URL path, URL query parameters, and -// HTTP request body. The mapping is typically specified as an -// `google.api.http` annotation on the RPC method, -// see "google/api/annotations.proto" for details. -// -// The mapping consists of a field specifying the path template and -// method kind. The path template can refer to fields in the request -// message, as in the example below which describes a REST GET -// operation on a resource collection of messages: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}/{sub.subfield}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// SubMessage sub = 2; // `sub.subfield` is url-mapped -// } -// message Message { -// string text = 1; // content of the resource -// } -// -// The same http annotation can alternatively be expressed inside the -// `GRPC API Configuration` YAML file. -// -// http: -// rules: -// - selector: .Messaging.GetMessage -// get: /v1/messages/{message_id}/{sub.subfield} -// -// This definition enables an automatic, bidrectional mapping of HTTP -// JSON to RPC. Example: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456/foo` | `GetMessage(message_id: "123456" sub: SubMessage(subfield: "foo"))` -// -// In general, not only fields but also field paths can be referenced -// from a path pattern. Fields mapped to the path pattern cannot be -// repeated and must have a primitive (non-message) type. -// -// Any fields in the request message which are not bound by the path -// pattern automatically become (optional) HTTP query -// parameters. Assume the following definition of the request message: -// -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http).get = "/v1/messages/{message_id}"; -// } -// } -// message GetMessageRequest { -// message SubMessage { -// string subfield = 1; -// } -// string message_id = 1; // mapped to the URL -// int64 revision = 2; // becomes a parameter -// SubMessage sub = 3; // `sub.subfield` becomes a parameter -// } -// -// -// This enables a HTTP JSON to RPC mapping as below: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: "foo"))` -// -// Note that fields which are mapped to HTTP parameters must have a -// primitive type or a repeated primitive type. Message types are not -// allowed. In the case of a repeated type, the parameter can be -// repeated in the URL, as in `...?param=A¶m=B`. -// -// For HTTP method kinds which allow a request body, the `body` field -// specifies the mapping. Consider a REST update method on the -// message resource collection: -// -// -// service Messaging { -// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "message" -// }; -// } -// } -// message UpdateMessageRequest { -// string message_id = 1; // mapped to the URL -// Message message = 2; // mapped to the body -// } -// -// -// The following HTTP JSON to RPC mapping is enabled, where the -// representation of the JSON in the request body is determined by -// protos JSON encoding: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" message { text: "Hi!" })` -// -// The special name `*` can be used in the body mapping to define that -// every field not bound by the path template should be mapped to the -// request body. This enables the following alternative definition of -// the update method: -// -// service Messaging { -// rpc UpdateMessage(Message) returns (Message) { -// option (google.api.http) = { -// put: "/v1/messages/{message_id}" -// body: "*" -// }; -// } -// } -// message Message { -// string message_id = 1; -// string text = 2; -// } -// -// -// The following HTTP JSON to RPC mapping is enabled: -// -// HTTP | RPC -// -----|----- -// `PUT /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: "123456" text: "Hi!")` -// -// Note that when using `*` in the body mapping, it is not possible to -// have HTTP parameters, as all fields not bound by the path end in -// the body. This makes this option more rarely used in practice of -// defining REST APIs. The common usage of `*` is in custom methods -// which don't use the URL at all for transferring data. -// -// It is possible to define multiple HTTP methods for one RPC by using -// the `additional_bindings` option. Example: -// -// service Messaging { -// rpc GetMessage(GetMessageRequest) returns (Message) { -// option (google.api.http) = { -// get: "/v1/messages/{message_id}" -// additional_bindings { -// get: "/v1/users/{user_id}/messages/{message_id}" -// } -// }; -// } -// } -// message GetMessageRequest { -// string message_id = 1; -// string user_id = 2; -// } -// -// -// This enables the following two alternative HTTP JSON to RPC -// mappings: -// -// HTTP | RPC -// -----|----- -// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` -// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: "123456")` -// -// # Rules for HTTP mapping -// -// The rules for mapping HTTP path, query parameters, and body fields -// to the request message are as follows: -// -// 1. The `body` field specifies either `*` or a field path, or is -// omitted. If omitted, it indicates there is no HTTP request body. -// 2. Leaf fields (recursive expansion of nested messages in the -// request) can be classified into three types: -// (a) Matched in the URL template. -// (b) Covered by body (if body is `*`, everything except (a) fields; -// else everything under the body field) -// (c) All other fields. -// 3. URL query parameters found in the HTTP request are mapped to (c) fields. -// 4. Any body sent with an HTTP request can contain only (b) fields. -// -// The syntax of the path template is as follows: -// -// Template = "/" Segments [ Verb ] ; -// Segments = Segment { "/" Segment } ; -// Segment = "*" | "**" | LITERAL | Variable ; -// Variable = "{" FieldPath [ "=" Segments ] "}" ; -// FieldPath = IDENT { "." IDENT } ; -// Verb = ":" LITERAL ; -// -// The syntax `*` matches a single path segment. The syntax `**` matches zero -// or more path segments, which must be the last part of the path except the -// `Verb`. The syntax `LITERAL` matches literal text in the path. -// -// The syntax `Variable` matches part of the URL path as specified by its -// template. A variable template must not contain other variables. If a variable -// matches a single path segment, its template may be omitted, e.g. `{var}` -// is equivalent to `{var=*}`. -// -// If a variable contains exactly one path segment, such as `"{var}"` or -// `"{var=*}"`, when such a variable is expanded into a URL path, all characters -// except `[-_.~0-9a-zA-Z]` are percent-encoded. Such variables show up in the -// Discovery Document as `{var}`. -// -// If a variable contains one or more path segments, such as `"{var=foo/*}"` -// or `"{var=**}"`, when such a variable is expanded into a URL path, all -// characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. Such variables -// show up in the Discovery Document as `{+var}`. -// -// NOTE: While the single segment variable matches the semantics of -// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 -// Simple String Expansion, the multi segment variable **does not** match -// RFC 6570 Reserved Expansion. The reason is that the Reserved Expansion -// does not expand special characters like `?` and `#`, which would lead -// to invalid URLs. -// -// NOTE: the field paths in variables and in the `body` must not refer to -// repeated fields or map fields. -message HttpRule { - // Selects methods to which this rule applies. - // - // Refer to [selector][google.api.DocumentationRule.selector] for syntax details. - string selector = 1; - - // Determines the URL pattern is matched by this rules. This pattern can be - // used with any of the {get|put|post|delete|patch} methods. A custom method - // can be defined using the 'custom' field. - oneof pattern { - // Used for listing and getting information about resources. - string get = 2; - - // Used for updating a resource. - string put = 3; - - // Used for creating a resource. - string post = 4; - - // Used for deleting a resource. - string delete = 5; - - // Used for updating a resource. - string patch = 6; - - // The custom pattern is used for specifying an HTTP method that is not - // included in the `pattern` field, such as HEAD, or "*" to leave the - // HTTP method unspecified for this rule. The wild-card rule is useful - // for services that provide content to Web (HTML) clients. - CustomHttpPattern custom = 8; - } - - // The name of the request field whose value is mapped to the HTTP body, or - // `*` for mapping all fields not captured by the path pattern to the HTTP - // body. NOTE: the referred field must not be a repeated field and must be - // present at the top-level of request message type. - string body = 7; - - // Optional. The name of the response field whose value is mapped to the HTTP - // body of response. Other response fields are ignored. When - // not set, the response message will be used as HTTP body of response. - string response_body = 12; - - // Additional HTTP bindings for the selector. Nested bindings must - // not contain an `additional_bindings` field themselves (that is, - // the nesting may only be one level deep). - repeated HttpRule additional_bindings = 11; -} - -// A custom pattern is used for defining custom HTTP verb. -message CustomHttpPattern { - // The name of this custom HTTP verb. - string kind = 1; - - // The path matched by this custom verb. - string path = 2; -} diff --git a/proto-thirdparty/google/api/httpbody.proto b/proto-thirdparty/google/api/httpbody.proto deleted file mode 100644 index 4428515c..00000000 --- a/proto-thirdparty/google/api/httpbody.proto +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2018 Google LLC. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -syntax = "proto3"; - -package google.api; - -import "google/protobuf/any.proto"; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; -option java_multiple_files = true; -option java_outer_classname = "HttpBodyProto"; -option java_package = "com.google.api"; -option objc_class_prefix = "GAPI"; - -// Message that represents an arbitrary HTTP body. It should only be used for -// payload formats that can't be represented as JSON, such as raw binary or -// an HTML page. -// -// -// This message can be used both in streaming and non-streaming API methods in -// the request as well as the response. -// -// It can be used as a top-level request field, which is convenient if one -// wants to extract parameters from either the URL or HTTP template into the -// request fields and also want access to the raw HTTP body. -// -// Example: -// -// message GetResourceRequest { -// // A unique request id. -// string request_id = 1; -// -// // The raw HTTP body is bound to this field. -// google.api.HttpBody http_body = 2; -// } -// -// service ResourceService { -// rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); -// rpc UpdateResource(google.api.HttpBody) returns -// (google.protobuf.Empty); -// } -// -// Example with streaming methods: -// -// service CaldavService { -// rpc GetCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// rpc UpdateCalendar(stream google.api.HttpBody) -// returns (stream google.api.HttpBody); -// } -// -// Use of this type only changes how the request and response bodies are -// handled, all other features will continue to work unchanged. -message HttpBody { - // The HTTP Content-Type header value specifying the content type of the body. - string content_type = 1; - - // The HTTP request/response body as raw binary. - bytes data = 2; - - // Application specific response metadata. Must be set in the first response - // for streaming APIs. - repeated google.protobuf.Any extensions = 3; -} \ No newline at end of file diff --git a/proto-thirdparty/google/protobuf/any.proto b/proto-thirdparty/google/protobuf/any.proto deleted file mode 100644 index 58b51158..00000000 --- a/proto-thirdparty/google/protobuf/any.proto +++ /dev/null @@ -1,164 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -import "gogoproto/gogo.proto"; - -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; -option go_package = "types"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "AnyProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -message Any { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; - - option (gogoproto.typedecl) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.gostring) = false; - option (gogoproto.stringer) = false; -} - -option (gogoproto.goproto_registration) = false; diff --git a/proto-thirdparty/ibc/applications/fee/v1/ack.proto b/proto-thirdparty/ibc/applications/fee/v1/ack.proto deleted file mode 100644 index be0d74a4..00000000 --- a/proto-thirdparty/ibc/applications/fee/v1/ack.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.fee.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; - -import "gogoproto/gogo.proto"; - -// IncentivizedAcknowledgement is the acknowledgement format to be used by applications wrapped in the fee middleware -message IncentivizedAcknowledgement { - // the underlying app acknowledgement bytes - bytes app_acknowledgement = 1 [(gogoproto.moretags) = "yaml:\"app_acknowledgement\""]; - // the relayer address which submits the recv packet message - string forward_relayer_address = 2 [(gogoproto.moretags) = "yaml:\"forward_relayer_address\""]; - // success flag of the base application callback - bool underlying_app_success = 3 [(gogoproto.moretags) = "yaml:\"underlying_app_successl\""]; -} diff --git a/proto-thirdparty/ibc/applications/fee/v1/fee.proto b/proto-thirdparty/ibc/applications/fee/v1/fee.proto deleted file mode 100644 index b38ae9d6..00000000 --- a/proto-thirdparty/ibc/applications/fee/v1/fee.proto +++ /dev/null @@ -1,56 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.fee.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; - -import "cosmos/base/v1beta1/coin.proto"; -import "gogoproto/gogo.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// Fee defines the ICS29 receive, acknowledgement and timeout fees -message Fee { - // the packet receive fee - repeated cosmos.base.v1beta1.Coin recv_fee = 1 [ - (gogoproto.moretags) = "yaml:\"recv_fee\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // the packet acknowledgement fee - repeated cosmos.base.v1beta1.Coin ack_fee = 2 [ - (gogoproto.moretags) = "yaml:\"ack_fee\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; - // the packet timeout fee - repeated cosmos.base.v1beta1.Coin timeout_fee = 3 [ - (gogoproto.moretags) = "yaml:\"timeout_fee\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// PacketFee contains ICS29 relayer fees, refund address and optional list of permitted relayers -message PacketFee { - // fee encapsulates the recv, ack and timeout fees associated with an IBC packet - Fee fee = 1 [(gogoproto.nullable) = false]; - // the refund address for unspent fees - string refund_address = 2 [(gogoproto.moretags) = "yaml:\"refund_address\""]; - // optional list of relayers permitted to receive fees - repeated string relayers = 3; -} - -// PacketFees contains a list of type PacketFee -message PacketFees { - // list of packet fees - repeated PacketFee packet_fees = 1 [(gogoproto.moretags) = "yaml:\"packet_fees\"", (gogoproto.nullable) = false]; -} - -// IdentifiedPacketFees contains a list of type PacketFee and associated PacketId -message IdentifiedPacketFees { - // unique packet identifier comprised of the channel ID, port ID and sequence - ibc.core.channel.v1.PacketId packet_id = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"packet_id\""]; - // list of packet fees - repeated PacketFee packet_fees = 2 [(gogoproto.moretags) = "yaml:\"packet_fees\"", (gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/ibc/applications/fee/v1/genesis.proto b/proto-thirdparty/ibc/applications/fee/v1/genesis.proto deleted file mode 100644 index 8f52be19..00000000 --- a/proto-thirdparty/ibc/applications/fee/v1/genesis.proto +++ /dev/null @@ -1,66 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.fee.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; - -import "gogoproto/gogo.proto"; -import "ibc/applications/fee/v1/fee.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// GenesisState defines the ICS29 fee middleware genesis state -message GenesisState { - // list of identified packet fees - repeated IdentifiedPacketFees identified_fees = 1 - [(gogoproto.moretags) = "yaml:\"identified_fees\"", (gogoproto.nullable) = false]; - // list of fee enabled channels - repeated FeeEnabledChannel fee_enabled_channels = 2 - [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; - // list of registered payees - repeated RegisteredPayee registered_payees = 3 - [(gogoproto.moretags) = "yaml:\"registered_payees\"", (gogoproto.nullable) = false]; - // list of registered counterparty payees - repeated RegisteredCounterpartyPayee registered_counterparty_payees = 4 - [(gogoproto.moretags) = "yaml:\"registered_counterparty_payees\"", (gogoproto.nullable) = false]; - // list of forward relayer addresses - repeated ForwardRelayerAddress forward_relayers = 5 - [(gogoproto.moretags) = "yaml:\"forward_relayers\"", (gogoproto.nullable) = false]; -} - -// FeeEnabledChannel contains the PortID & ChannelID for a fee enabled channel -message FeeEnabledChannel { - // unique port identifier - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // unique channel identifier - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; -} - -// RegisteredPayee contains the relayer address and payee address for a specific channel -message RegisteredPayee { - // unique channel identifier - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // the relayer address - string relayer = 2; - // the payee address - string payee = 3; -} - -// RegisteredCounterpartyPayee contains the relayer address and counterparty payee address for a specific channel (used -// for recv fee distribution) -message RegisteredCounterpartyPayee { - // unique channel identifier - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // the relayer address - string relayer = 2; - // the counterparty payee address - string counterparty_payee = 3 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; -} - -// ForwardRelayerAddress contains the forward relayer address and PacketId used for async acknowledgements -message ForwardRelayerAddress { - // the forward relayer address - string address = 1; - // unique packet identifer comprised of the channel ID, port ID and sequence - ibc.core.channel.v1.PacketId packet_id = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"packet_id\""]; -} diff --git a/proto-thirdparty/ibc/applications/fee/v1/metadata.proto b/proto-thirdparty/ibc/applications/fee/v1/metadata.proto deleted file mode 100644 index 3afdba16..00000000 --- a/proto-thirdparty/ibc/applications/fee/v1/metadata.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.fee.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; - -import "gogoproto/gogo.proto"; - -// Metadata defines the ICS29 channel specific metadata encoded into the channel version bytestring -// See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning -message Metadata { - // fee_version defines the ICS29 fee version - string fee_version = 1 [(gogoproto.moretags) = "yaml:\"fee_version\""]; - // app_version defines the underlying application version, which may or may not be a JSON encoded bytestring - string app_version = 2 [(gogoproto.moretags) = "yaml:\"app_version\""]; -} diff --git a/proto-thirdparty/ibc/applications/fee/v1/query.proto b/proto-thirdparty/ibc/applications/fee/v1/query.proto deleted file mode 100644 index 3153051c..00000000 --- a/proto-thirdparty/ibc/applications/fee/v1/query.proto +++ /dev/null @@ -1,222 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.fee.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; - -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/applications/fee/v1/fee.proto"; -import "ibc/applications/fee/v1/genesis.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// Query defines the ICS29 gRPC querier service. -service Query { - // IncentivizedPackets returns all incentivized packets and their associated fees - rpc IncentivizedPackets(QueryIncentivizedPacketsRequest) returns (QueryIncentivizedPacketsResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/incentivized_packets"; - } - - // IncentivizedPacket returns all packet fees for a packet given its identifier - rpc IncentivizedPacket(QueryIncentivizedPacketRequest) returns (QueryIncentivizedPacketResponse) { - option (google.api.http).get = - "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/sequences/" - "{packet_id.sequence}/incentivized_packet"; - } - - // Gets all incentivized packets for a specific channel - rpc IncentivizedPacketsForChannel(QueryIncentivizedPacketsForChannelRequest) - returns (QueryIncentivizedPacketsForChannelResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/incentivized_packets"; - } - - // TotalRecvFees returns the total receive fees for a packet given its identifier - rpc TotalRecvFees(QueryTotalRecvFeesRequest) returns (QueryTotalRecvFeesResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" - "sequences/{packet_id.sequence}/total_recv_fees"; - } - - // TotalAckFees returns the total acknowledgement fees for a packet given its identifier - rpc TotalAckFees(QueryTotalAckFeesRequest) returns (QueryTotalAckFeesResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" - "sequences/{packet_id.sequence}/total_ack_fees"; - } - - // TotalTimeoutFees returns the total timeout fees for a packet given its identifier - rpc TotalTimeoutFees(QueryTotalTimeoutFeesRequest) returns (QueryTotalTimeoutFeesResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{packet_id.channel_id}/ports/{packet_id.port_id}/" - "sequences/{packet_id.sequence}/total_timeout_fees"; - } - - // Payee returns the registered payee address for a specific channel given the relayer address - rpc Payee(QueryPayeeRequest) returns (QueryPayeeResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/payee"; - } - - // CounterpartyPayee returns the registered counterparty payee for forward relaying - rpc CounterpartyPayee(QueryCounterpartyPayeeRequest) returns (QueryCounterpartyPayeeResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/relayers/{relayer}/counterparty_payee"; - } - - // FeeEnabledChannels returns a list of all fee enabled channels - rpc FeeEnabledChannels(QueryFeeEnabledChannelsRequest) returns (QueryFeeEnabledChannelsResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/fee_enabled"; - } - - // FeeEnabledChannel returns true if the provided port and channel identifiers belong to a fee enabled channel - rpc FeeEnabledChannel(QueryFeeEnabledChannelRequest) returns (QueryFeeEnabledChannelResponse) { - option (google.api.http).get = "/ibc/apps/fee/v1/channels/{channel_id}/ports/{port_id}/fee_enabled"; - } -} - -// QueryIncentivizedPacketsRequest defines the request type for the IncentivizedPackets rpc -message QueryIncentivizedPacketsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; - // block height at which to query - uint64 query_height = 2; -} - -// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPackets rpc -message QueryIncentivizedPacketsResponse { - // list of identified fees for incentivized packets - repeated ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packets = 1 [(gogoproto.nullable) = false]; -} - -// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc -message QueryIncentivizedPacketRequest { - // unique packet identifier comprised of channel ID, port ID and sequence - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; - // block height at which to query - uint64 query_height = 2; -} - -// QueryIncentivizedPacketsResponse defines the response type for the IncentivizedPacket rpc -message QueryIncentivizedPacketResponse { - // the identified fees for the incentivized packet - ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packet = 1 [(gogoproto.nullable) = false]; -} - -// QueryIncentivizedPacketsForChannelRequest defines the request type for querying for all incentivized packets -// for a specific channel -message QueryIncentivizedPacketsForChannelRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; - string port_id = 2; - string channel_id = 3; - // Height to query at - uint64 query_height = 4; -} - -// QueryIncentivizedPacketsResponse defines the response type for the incentivized packets RPC -message QueryIncentivizedPacketsForChannelResponse { - // Map of all incentivized_packets - repeated ibc.applications.fee.v1.IdentifiedPacketFees incentivized_packets = 1; -} - -// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc -message QueryTotalRecvFeesRequest { - // the packet identifier for the associated fees - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; -} - -// QueryTotalRecvFeesResponse defines the response type for the TotalRecvFees rpc -message QueryTotalRecvFeesResponse { - // the total packet receive fees - repeated cosmos.base.v1beta1.Coin recv_fees = 1 [ - (gogoproto.moretags) = "yaml:\"recv_fees\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// QueryTotalAckFeesRequest defines the request type for the TotalAckFees rpc -message QueryTotalAckFeesRequest { - // the packet identifier for the associated fees - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; -} - -// QueryTotalAckFeesResponse defines the response type for the TotalAckFees rpc -message QueryTotalAckFeesResponse { - // the total packet acknowledgement fees - repeated cosmos.base.v1beta1.Coin ack_fees = 1 [ - (gogoproto.moretags) = "yaml:\"ack_fees\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// QueryTotalTimeoutFeesRequest defines the request type for the TotalTimeoutFees rpc -message QueryTotalTimeoutFeesRequest { - // the packet identifier for the associated fees - ibc.core.channel.v1.PacketId packet_id = 1 [(gogoproto.nullable) = false]; -} - -// QueryTotalTimeoutFeesResponse defines the response type for the TotalTimeoutFees rpc -message QueryTotalTimeoutFeesResponse { - // the total packet timeout fees - repeated cosmos.base.v1beta1.Coin timeout_fees = 1 [ - (gogoproto.moretags) = "yaml:\"timeout_fees\"", - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" - ]; -} - -// QueryPayeeRequest defines the request type for the Payee rpc -message QueryPayeeRequest { - // unique channel identifier - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // the relayer address to which the distribution address is registered - string relayer = 2; -} - -// QueryPayeeResponse defines the response type for the Payee rpc -message QueryPayeeResponse { - // the payee address to which packet fees are paid out - string payee_address = 1 [(gogoproto.moretags) = "yaml:\"payee_address\""]; -} - -// QueryCounterpartyPayeeRequest defines the request type for the CounterpartyPayee rpc -message QueryCounterpartyPayeeRequest { - // unique channel identifier - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // the relayer address to which the counterparty is registered - string relayer = 2; -} - -// QueryCounterpartyPayeeResponse defines the response type for the CounterpartyPayee rpc -message QueryCounterpartyPayeeResponse { - // the counterparty payee address used to compensate forward relaying - string counterparty_payee = 1 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; -} - -// QueryFeeEnabledChannelsRequest defines the request type for the FeeEnabledChannels rpc -message QueryFeeEnabledChannelsRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; - // block height at which to query - uint64 query_height = 2; -} - -// QueryFeeEnabledChannelsResponse defines the response type for the FeeEnabledChannels rpc -message QueryFeeEnabledChannelsResponse { - // list of fee enabled channels - repeated ibc.applications.fee.v1.FeeEnabledChannel fee_enabled_channels = 1 - [(gogoproto.moretags) = "yaml:\"fee_enabled_channels\"", (gogoproto.nullable) = false]; -} - -// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc -message QueryFeeEnabledChannelRequest { - // unique port identifier - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // unique channel identifier - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; -} - -// QueryFeeEnabledChannelResponse defines the response type for the FeeEnabledChannel rpc -message QueryFeeEnabledChannelResponse { - // boolean flag representing the fee enabled channel status - bool fee_enabled = 1 [(gogoproto.moretags) = "yaml:\"fee_enabled\""]; -} diff --git a/proto-thirdparty/ibc/applications/fee/v1/tx.proto b/proto-thirdparty/ibc/applications/fee/v1/tx.proto deleted file mode 100644 index b099b5ee..00000000 --- a/proto-thirdparty/ibc/applications/fee/v1/tx.proto +++ /dev/null @@ -1,112 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.fee.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/29-fee/types"; - -import "gogoproto/gogo.proto"; -import "ibc/applications/fee/v1/fee.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// Msg defines the ICS29 Msg service. -service Msg { - // RegisterPayee defines a rpc handler method for MsgRegisterPayee - // RegisterPayee is called by the relayer on each channelEnd and allows them to set an optional - // payee to which reverse and timeout relayer packet fees will be paid out. The payee should be registered on - // the source chain from which packets originate as this is where fee distribution takes place. This function may be - // called more than once by a relayer, in which case, the latest payee is always used. - rpc RegisterPayee(MsgRegisterPayee) returns (MsgRegisterPayeeResponse); - - // RegisterCounterpartyPayee defines a rpc handler method for MsgRegisterCounterpartyPayee - // RegisterCounterpartyPayee is called by the relayer on each channelEnd and allows them to specify the counterparty - // payee address before relaying. This ensures they will be properly compensated for forward relaying since - // the destination chain must include the registered counterparty payee address in the acknowledgement. This function - // may be called more than once by a relayer, in which case, the latest counterparty payee address is always used. - rpc RegisterCounterpartyPayee(MsgRegisterCounterpartyPayee) returns (MsgRegisterCounterpartyPayeeResponse); - - // PayPacketFee defines a rpc handler method for MsgPayPacketFee - // PayPacketFee is an open callback that may be called by any module/user that wishes to escrow funds in order to - // incentivize the relaying of the packet at the next sequence - // NOTE: This method is intended to be used within a multi msg transaction, where the subsequent msg that follows - // initiates the lifecycle of the incentivized packet - rpc PayPacketFee(MsgPayPacketFee) returns (MsgPayPacketFeeResponse); - - // PayPacketFeeAsync defines a rpc handler method for MsgPayPacketFeeAsync - // PayPacketFeeAsync is an open callback that may be called by any module/user that wishes to escrow funds in order to - // incentivize the relaying of a known packet (i.e. at a particular sequence) - rpc PayPacketFeeAsync(MsgPayPacketFeeAsync) returns (MsgPayPacketFeeAsyncResponse); -} - -// MsgRegisterPayee defines the request type for the RegisterPayee rpc -message MsgRegisterPayee { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // unique port identifier - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // unique channel identifier - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // the relayer address - string relayer = 3; - // the payee address - string payee = 4; -} - -// MsgRegisterPayeeResponse defines the response type for the RegisterPayee rpc -message MsgRegisterPayeeResponse {} - -// MsgRegisterCounterpartyPayee defines the request type for the RegisterCounterpartyPayee rpc -message MsgRegisterCounterpartyPayee { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // unique port identifier - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // unique channel identifier - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // the relayer address - string relayer = 3; - // the counterparty payee address - string counterparty_payee = 4 [(gogoproto.moretags) = "yaml:\"counterparty_payee\""]; -} - -// MsgRegisterCounterpartyPayeeResponse defines the response type for the RegisterCounterpartyPayee rpc -message MsgRegisterCounterpartyPayeeResponse {} - -// MsgPayPacketFee defines the request type for the PayPacketFee rpc -// This Msg can be used to pay for a packet at the next sequence send & should be combined with the Msg that will be -// paid for -message MsgPayPacketFee { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // fee encapsulates the recv, ack and timeout fees associated with an IBC packet - ibc.applications.fee.v1.Fee fee = 1 [(gogoproto.nullable) = false]; - // the source port unique identifier - string source_port_id = 2 [(gogoproto.moretags) = "yaml:\"source_port_id\""]; - // the source channel unique identifer - string source_channel_id = 3 [(gogoproto.moretags) = "yaml:\"source_channel_id\""]; - // account address to refund fee if necessary - string signer = 4; - // optional list of relayers permitted to the receive packet fees - repeated string relayers = 5; -} - -// MsgPayPacketFeeResponse defines the response type for the PayPacketFee rpc -message MsgPayPacketFeeResponse {} - -// MsgPayPacketFeeAsync defines the request type for the PayPacketFeeAsync rpc -// This Msg can be used to pay for a packet at a specified sequence (instead of the next sequence send) -message MsgPayPacketFeeAsync { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // unique packet identifier comprised of the channel ID, port ID and sequence - ibc.core.channel.v1.PacketId packet_id = 1 - [(gogoproto.moretags) = "yaml:\"packet_id\"", (gogoproto.nullable) = false]; - // the packet fee associated with a particular IBC packet - PacketFee packet_fee = 2 [(gogoproto.moretags) = "yaml:\"packet_fee\"", (gogoproto.nullable) = false]; -} - -// MsgPayPacketFeeAsyncResponse defines the response type for the PayPacketFeeAsync rpc -message MsgPayPacketFeeAsyncResponse {} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/controller.proto b/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/controller.proto deleted file mode 100644 index 072d2617..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/controller.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.controller.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; - -import "gogoproto/gogo.proto"; - -// Params defines the set of on-chain interchain accounts parameters. -// The following parameters may be used to disable the controller submodule. -message Params { - // controller_enabled enables or disables the controller submodule. - bool controller_enabled = 1 [(gogoproto.moretags) = "yaml:\"controller_enabled\""]; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/query.proto b/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/query.proto deleted file mode 100644 index db7e888b..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/query.proto +++ /dev/null @@ -1,43 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.controller.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; - -import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; -import "gogoproto/gogo.proto"; -import "google/api/annotations.proto"; - -// Query provides defines the gRPC querier service. -service Query { - // InterchainAccount returns the interchain account address for a given owner address on a given connection - rpc InterchainAccount(QueryInterchainAccountRequest) returns (QueryInterchainAccountResponse) { - option (google.api.http).get = - "/ibc/apps/interchain_accounts/controller/v1/owners/{owner}/connections/{connection_id}"; - } - - // Params queries all parameters of the ICA controller submodule. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/apps/interchain_accounts/controller/v1/params"; - } -} - -// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. -message QueryInterchainAccountRequest { - string owner = 1; - string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; -} - -// QueryInterchainAccountResponse the response type for the Query/InterchainAccount RPC method. -message QueryInterchainAccountResponse { - string address = 1; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/tx.proto b/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/tx.proto deleted file mode 100644 index c4cd4ba3..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/controller/v1/tx.proto +++ /dev/null @@ -1,50 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.controller.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/controller/types"; - -import "gogoproto/gogo.proto"; -import "ibc/applications/interchain_accounts/v1/packet.proto"; - -// Msg defines the 27-interchain-accounts/controller Msg service. -service Msg { - // RegisterInterchainAccount defines a rpc handler for MsgRegisterInterchainAccount. - rpc RegisterInterchainAccount(MsgRegisterInterchainAccount) returns (MsgRegisterInterchainAccountResponse); - // SendTx defines a rpc handler for MsgSendTx. - rpc SendTx(MsgSendTx) returns (MsgSendTxResponse); -} - -// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount -message MsgRegisterInterchainAccount { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string owner = 1; - string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string version = 3; -} - -// MsgRegisterInterchainAccountResponse defines the response for Msg/RegisterAccount -message MsgRegisterInterchainAccountResponse { - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; -} - -// MsgSendTx defines the payload for Msg/SendTx -message MsgSendTx { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string owner = 1; - string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - ibc.applications.interchain_accounts.v1.InterchainAccountPacketData packet_data = 3 - [(gogoproto.moretags) = "yaml:\"packet_data\"", (gogoproto.nullable) = false]; - // Relative timeout timestamp provided will be added to the current block time during transaction execution. - // The timeout timestamp must be non-zero. - uint64 relative_timeout = 4 [(gogoproto.moretags) = "yaml:\"relative_timeout\""]; -} - -// MsgSendTxResponse defines the response for MsgSendTx -message MsgSendTxResponse { - uint64 sequence = 1; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/genesis/v1/genesis.proto b/proto-thirdparty/ibc/applications/interchain_accounts/genesis/v1/genesis.proto deleted file mode 100644 index c52bab73..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/genesis/v1/genesis.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.genesis.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/genesis/types"; - -import "gogoproto/gogo.proto"; -import "ibc/applications/interchain_accounts/controller/v1/controller.proto"; -import "ibc/applications/interchain_accounts/host/v1/host.proto"; - -// GenesisState defines the interchain accounts genesis state -message GenesisState { - ControllerGenesisState controller_genesis_state = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"controller_genesis_state\""]; - HostGenesisState host_genesis_state = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"host_genesis_state\""]; -} - -// ControllerGenesisState defines the interchain accounts controller genesis state -message ControllerGenesisState { - repeated ActiveChannel active_channels = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"active_channels\""]; - repeated RegisteredInterchainAccount interchain_accounts = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"interchain_accounts\""]; - repeated string ports = 3; - ibc.applications.interchain_accounts.controller.v1.Params params = 4 [(gogoproto.nullable) = false]; -} - -// HostGenesisState defines the interchain accounts host genesis state -message HostGenesisState { - repeated ActiveChannel active_channels = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"active_channels\""]; - repeated RegisteredInterchainAccount interchain_accounts = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"interchain_accounts\""]; - string port = 3; - ibc.applications.interchain_accounts.host.v1.Params params = 4 [(gogoproto.nullable) = false]; -} - -// ActiveChannel contains a connection ID, port ID and associated active channel ID, as well as a boolean flag to -// indicate if the channel is middleware enabled -message ActiveChannel { - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 3 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bool is_middleware_enabled = 4 [(gogoproto.moretags) = "yaml:\"is_middleware_enabled\""]; -} - -// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address -message RegisteredInterchainAccount { - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string port_id = 2 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string account_address = 3 [(gogoproto.moretags) = "yaml:\"account_address\""]; -} \ No newline at end of file diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/host/v1/host.proto b/proto-thirdparty/ibc/applications/interchain_accounts/host/v1/host.proto deleted file mode 100644 index e5baae5d..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/host/v1/host.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.host.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"; - -import "gogoproto/gogo.proto"; - -// Params defines the set of on-chain interchain accounts parameters. -// The following parameters may be used to disable the host submodule. -message Params { - // host_enabled enables or disables the host submodule. - bool host_enabled = 1 [(gogoproto.moretags) = "yaml:\"host_enabled\""]; - // allow_messages defines a list of sdk message typeURLs allowed to be executed on a host chain. - repeated string allow_messages = 2 [(gogoproto.moretags) = "yaml:\"allow_messages\""]; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/host/v1/query.proto b/proto-thirdparty/ibc/applications/interchain_accounts/host/v1/query.proto deleted file mode 100644 index 4b773917..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/host/v1/query.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.host.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/host/types"; - -import "google/api/annotations.proto"; -import "ibc/applications/interchain_accounts/host/v1/host.proto"; - -// Query provides defines the gRPC querier service. -service Query { - // Params queries all parameters of the ICA host submodule. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/apps/interchain_accounts/host/v1/params"; - } -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/v1/account.proto b/proto-thirdparty/ibc/applications/interchain_accounts/v1/account.proto deleted file mode 100644 index 56ea941e..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/v1/account.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; - -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/auth/v1beta1/auth.proto"; - -// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain -message InterchainAccount { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (cosmos_proto.implements_interface) = "InterchainAccountI"; - - cosmos.auth.v1beta1.BaseAccount base_account = 1 - [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"base_account\""]; - string account_owner = 2 [(gogoproto.moretags) = "yaml:\"account_owner\""]; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/v1/metadata.proto b/proto-thirdparty/ibc/applications/interchain_accounts/v1/metadata.proto deleted file mode 100644 index eba844f9..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/v1/metadata.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; - -import "gogoproto/gogo.proto"; - -// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring -// See ICS004: https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning -message Metadata { - // version defines the ICS27 protocol version - string version = 1; - // controller_connection_id is the connection identifier associated with the controller chain - string controller_connection_id = 2 [(gogoproto.moretags) = "yaml:\"controller_connection_id\""]; - // host_connection_id is the connection identifier associated with the host chain - string host_connection_id = 3 [(gogoproto.moretags) = "yaml:\"host_connection_id\""]; - // address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step - // NOTE: the address field is empty on the OnChanOpenInit handshake step - string address = 4; - // encoding defines the supported codec format - string encoding = 5; - // tx_type defines the type of transactions the interchain account can execute - string tx_type = 6; -} diff --git a/proto-thirdparty/ibc/applications/interchain_accounts/v1/packet.proto b/proto-thirdparty/ibc/applications/interchain_accounts/v1/packet.proto deleted file mode 100644 index ac337fd5..00000000 --- a/proto-thirdparty/ibc/applications/interchain_accounts/v1/packet.proto +++ /dev/null @@ -1,31 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.interchain_accounts.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/27-interchain-accounts/types"; - -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; - -// Type defines a classification of message issued from a controller chain to its associated interchain accounts -// host -enum Type { - option (gogoproto.goproto_enum_prefix) = false; - - // Default zero value enumeration - TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Execute a transaction on an interchain accounts host chain - TYPE_EXECUTE_TX = 1 [(gogoproto.enumvalue_customname) = "EXECUTE_TX"]; -} - -// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field. -message InterchainAccountPacketData { - Type type = 1; - bytes data = 2; - string memo = 3; -} - -// CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain. -message CosmosTx { - repeated google.protobuf.Any messages = 1; -} diff --git a/proto-thirdparty/ibc/applications/transfer/v1/genesis.proto b/proto-thirdparty/ibc/applications/transfer/v1/genesis.proto deleted file mode 100644 index 71d3f383..00000000 --- a/proto-thirdparty/ibc/applications/transfer/v1/genesis.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; - -import "ibc/applications/transfer/v1/transfer.proto"; -import "gogoproto/gogo.proto"; - -// GenesisState defines the ibc-transfer genesis state -message GenesisState { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - repeated DenomTrace denom_traces = 2 [ - (gogoproto.castrepeated) = "Traces", - (gogoproto.nullable) = false, - (gogoproto.moretags) = "yaml:\"denom_traces\"" - ]; - Params params = 3 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/ibc/applications/transfer/v1/query.proto b/proto-thirdparty/ibc/applications/transfer/v1/query.proto deleted file mode 100644 index cf8896fe..00000000 --- a/proto-thirdparty/ibc/applications/transfer/v1/query.proto +++ /dev/null @@ -1,105 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/applications/transfer/v1/transfer.proto"; -import "google/api/annotations.proto"; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; - -// Query provides defines the gRPC querier service. -service Query { - // DenomTrace queries a denomination trace information. - rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; - } - - // DenomTraces queries all denomination traces. - rpc DenomTraces(QueryDenomTracesRequest) returns (QueryDenomTracesResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces"; - } - - // Params queries all parameters of the ibc-transfer module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/params"; - } - - // DenomHash queries a denomination hash information. - rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace}"; - } - - // EscrowAddress returns the escrow address for a particular port and channel id. - rpc EscrowAddress(QueryEscrowAddressRequest) returns (QueryEscrowAddressResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/channels/{channel_id}/ports/{port_id}/escrow_address"; - } -} - -// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC -// method -message QueryDenomTraceRequest { - // hash (in hex format) or denom (full denom with ibc prefix) of the denomination trace information. - string hash = 1; -} - -// QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC -// method. -message QueryDenomTraceResponse { - // denom_trace returns the requested denomination trace information. - DenomTrace denom_trace = 1; -} - -// QueryConnectionsRequest is the request type for the Query/DenomTraces RPC -// method -message QueryDenomTracesRequest { - // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryConnectionsResponse is the response type for the Query/DenomTraces RPC -// method. -message QueryDenomTracesResponse { - // denom_traces returns all denominations trace information. - repeated DenomTrace denom_traces = 1 [(gogoproto.castrepeated) = "Traces", (gogoproto.nullable) = false]; - // pagination defines the pagination in the response. - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} - -// QueryParamsResponse is the response type for the Query/Params RPC method. -message QueryParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} - -// QueryDenomHashRequest is the request type for the Query/DenomHash RPC -// method -message QueryDenomHashRequest { - // The denomination trace ([port_id]/[channel_id])+/[denom] - string trace = 1; -} - -// QueryDenomHashResponse is the response type for the Query/DenomHash RPC -// method. -message QueryDenomHashResponse { - // hash (in hex format) of the denomination trace information. - string hash = 1; -} - -// QueryEscrowAddressRequest is the request type for the EscrowAddress RPC method. -message QueryEscrowAddressRequest { - // unique port identifier - string port_id = 1; - // unique channel identifier - string channel_id = 2; -} - -// QueryEscrowAddressResponse is the response type of the EscrowAddress RPC method. -message QueryEscrowAddressResponse { - // the escrow account address - string escrow_address = 1; -} \ No newline at end of file diff --git a/proto-thirdparty/ibc/applications/transfer/v1/transfer.proto b/proto-thirdparty/ibc/applications/transfer/v1/transfer.proto deleted file mode 100644 index 9c60ad65..00000000 --- a/proto-thirdparty/ibc/applications/transfer/v1/transfer.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; - -import "gogoproto/gogo.proto"; - -// DenomTrace contains the base denomination for ICS20 fungible tokens and the -// source tracing information path. -message DenomTrace { - // path defines the chain of port/channel identifiers used for tracing the - // source of the fungible token. - string path = 1; - // base denomination of the relayed fungible token. - string base_denom = 2; -} - -// Params defines the set of IBC transfer parameters. -// NOTE: To prevent a single token from being transferred, set the -// TransfersEnabled parameter to true and then set the bank module's SendEnabled -// parameter for the denomination to false. -message Params { - // send_enabled enables or disables all cross-chain token transfers from this - // chain. - bool send_enabled = 1 [(gogoproto.moretags) = "yaml:\"send_enabled\""]; - // receive_enabled enables or disables all cross-chain token transfers to this - // chain. - bool receive_enabled = 2 [(gogoproto.moretags) = "yaml:\"receive_enabled\""]; -} diff --git a/proto-thirdparty/ibc/applications/transfer/v1/tx.proto b/proto-thirdparty/ibc/applications/transfer/v1/tx.proto deleted file mode 100644 index 7504a905..00000000 --- a/proto-thirdparty/ibc/applications/transfer/v1/tx.proto +++ /dev/null @@ -1,49 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "ibc/core/client/v1/client.proto"; - -// Msg defines the ibc/transfer Msg service. -service Msg { - // Transfer defines a rpc handler method for MsgTransfer. - rpc Transfer(MsgTransfer) returns (MsgTransferResponse); -} - -// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between -// ICS20 enabled chains. See ICS Spec here: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -message MsgTransfer { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // the port on which the packet will be sent - string source_port = 1 [(gogoproto.moretags) = "yaml:\"source_port\""]; - // the channel by which the packet will be sent - string source_channel = 2 [(gogoproto.moretags) = "yaml:\"source_channel\""]; - // the tokens to be transferred - cosmos.base.v1beta1.Coin token = 3 [(gogoproto.nullable) = false]; - // the sender address - string sender = 4; - // the recipient address on the destination chain - string receiver = 5; - // Timeout height relative to the current block height. - // The timeout is disabled when set to 0. - ibc.core.client.v1.Height timeout_height = 6 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - // Timeout timestamp in absolute nanoseconds since unix epoch. - // The timeout is disabled when set to 0. - uint64 timeout_timestamp = 7 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; - // optional memo - string memo = 8; -} - -// MsgTransferResponse defines the Msg/Transfer response type. -message MsgTransferResponse { - // sequence number of the transfer packet sent - uint64 sequence = 1; -} diff --git a/proto-thirdparty/ibc/applications/transfer/v2/packet.proto b/proto-thirdparty/ibc/applications/transfer/v2/packet.proto deleted file mode 100644 index 5b3b004c..00000000 --- a/proto-thirdparty/ibc/applications/transfer/v2/packet.proto +++ /dev/null @@ -1,21 +0,0 @@ -syntax = "proto3"; - -package ibc.applications.transfer.v2; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/apps/transfer/types"; - -// FungibleTokenPacketData defines a struct for the packet payload -// See FungibleTokenPacketData spec: -// https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer#data-structures -message FungibleTokenPacketData { - // the token denomination to be transferred - string denom = 1; - // the token amount to be transferred - string amount = 2; - // the sender address - string sender = 3; - // the recipient address on the destination chain - string receiver = 4; - // optional memo - string memo = 5; -} diff --git a/proto-thirdparty/ibc/core/channel/v1/channel.proto b/proto-thirdparty/ibc/core/channel/v1/channel.proto deleted file mode 100644 index 2d301af2..00000000 --- a/proto-thirdparty/ibc/core/channel/v1/channel.proto +++ /dev/null @@ -1,162 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; - -// Channel defines pipeline for exactly-once packet delivery between specific -// modules on separate blockchains, which has at least one end capable of -// sending packets and one end capable of receiving packets. -message Channel { - option (gogoproto.goproto_getters) = false; - - // current state of the channel end - State state = 1; - // whether the channel is ordered or unordered - Order ordering = 2; - // counterparty channel end - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - // list of connection identifiers, in order, along which packets sent on - // this channel will travel - repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; - // opaque channel version, which is agreed upon during the handshake - string version = 5; -} - -// IdentifiedChannel defines a channel with additional port and channel -// identifier fields. -message IdentifiedChannel { - option (gogoproto.goproto_getters) = false; - - // current state of the channel end - State state = 1; - // whether the channel is ordered or unordered - Order ordering = 2; - // counterparty channel end - Counterparty counterparty = 3 [(gogoproto.nullable) = false]; - // list of connection identifiers, in order, along which packets sent on - // this channel will travel - repeated string connection_hops = 4 [(gogoproto.moretags) = "yaml:\"connection_hops\""]; - // opaque channel version, which is agreed upon during the handshake - string version = 5; - // port identifier - string port_id = 6; - // channel identifier - string channel_id = 7; -} - -// State defines if a channel is in one of the following states: -// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. -enum State { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; - // A channel has just started the opening handshake. - STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; - // A channel has acknowledged the handshake step on the counterparty chain. - STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; - // A channel has completed the handshake. Open channels are - // ready to send and receive packets. - STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; - // A channel has been closed and can no longer be used to send or receive - // packets. - STATE_CLOSED = 4 [(gogoproto.enumvalue_customname) = "CLOSED"]; -} - -// Order defines if a channel is ORDERED or UNORDERED -enum Order { - option (gogoproto.goproto_enum_prefix) = false; - - // zero-value for channel ordering - ORDER_NONE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "NONE"]; - // packets can be delivered in any order, which may differ from the order in - // which they were sent. - ORDER_UNORDERED = 1 [(gogoproto.enumvalue_customname) = "UNORDERED"]; - // packets are delivered exactly in the order which they were sent - ORDER_ORDERED = 2 [(gogoproto.enumvalue_customname) = "ORDERED"]; -} - -// Counterparty defines a channel end counterparty -message Counterparty { - option (gogoproto.goproto_getters) = false; - - // port on the counterparty chain which owns the other end of the channel. - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel end on the counterparty chain - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; -} - -// Packet defines a type that carries data across different chains through IBC -message Packet { - option (gogoproto.goproto_getters) = false; - - // number corresponds to the order of sends and receives, where a Packet - // with an earlier sequence number must be sent and received before a Packet - // with a later sequence number. - uint64 sequence = 1; - // identifies the port on the sending chain. - string source_port = 2 [(gogoproto.moretags) = "yaml:\"source_port\""]; - // identifies the channel end on the sending chain. - string source_channel = 3 [(gogoproto.moretags) = "yaml:\"source_channel\""]; - // identifies the port on the receiving chain. - string destination_port = 4 [(gogoproto.moretags) = "yaml:\"destination_port\""]; - // identifies the channel end on the receiving chain. - string destination_channel = 5 [(gogoproto.moretags) = "yaml:\"destination_channel\""]; - // actual opaque bytes transferred directly to the application module - bytes data = 6; - // block height after which the packet times out - ibc.core.client.v1.Height timeout_height = 7 - [(gogoproto.moretags) = "yaml:\"timeout_height\"", (gogoproto.nullable) = false]; - // block timestamp (in nanoseconds) after which the packet times out - uint64 timeout_timestamp = 8 [(gogoproto.moretags) = "yaml:\"timeout_timestamp\""]; -} - -// PacketState defines the generic type necessary to retrieve and store -// packet commitments, acknowledgements, and receipts. -// Caller is responsible for knowing the context necessary to interpret this -// state as a commitment, acknowledgement, or a receipt. -message PacketState { - option (gogoproto.goproto_getters) = false; - - // channel port identifier. - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel unique identifier. - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // packet sequence. - uint64 sequence = 3; - // embedded data that represents packet state. - bytes data = 4; -} - -// PacketId is an identifer for a unique Packet -// Source chains refer to packets by source port/channel -// Destination chains refer to packets by destination port/channel -message PacketId { - option (gogoproto.goproto_getters) = false; - - // channel port identifier - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // channel unique identifier - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - // packet sequence - uint64 sequence = 3; -} - -// Acknowledgement is the recommended acknowledgement format to be used by -// app-specific protocols. -// NOTE: The field numbers 21 and 22 were explicitly chosen to avoid accidental -// conflicts with other protobuf message formats used for acknowledgements. -// The first byte of any message with this format will be the non-ASCII values -// `0xaa` (result) or `0xb2` (error). Implemented as defined by ICS: -// https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#acknowledgement-envelope -message Acknowledgement { - // response contains either a result or an error and must be non-empty - oneof response { - bytes result = 21; - string error = 22; - } -} diff --git a/proto-thirdparty/ibc/core/channel/v1/genesis.proto b/proto-thirdparty/ibc/core/channel/v1/genesis.proto deleted file mode 100644 index ef0e5148..00000000 --- a/proto-thirdparty/ibc/core/channel/v1/genesis.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// GenesisState defines the ibc channel submodule's genesis state. -message GenesisState { - repeated IdentifiedChannel channels = 1 [(gogoproto.casttype) = "IdentifiedChannel", (gogoproto.nullable) = false]; - repeated PacketState acknowledgements = 2 [(gogoproto.nullable) = false]; - repeated PacketState commitments = 3 [(gogoproto.nullable) = false]; - repeated PacketState receipts = 4 [(gogoproto.nullable) = false]; - repeated PacketSequence send_sequences = 5 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"send_sequences\""]; - repeated PacketSequence recv_sequences = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"recv_sequences\""]; - repeated PacketSequence ack_sequences = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"ack_sequences\""]; - // the sequence for the next generated channel identifier - uint64 next_channel_sequence = 8 [(gogoproto.moretags) = "yaml:\"next_channel_sequence\""]; -} - -// PacketSequence defines the genesis type necessary to retrieve and store -// next send and receive sequences. -message PacketSequence { - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - uint64 sequence = 3; -} diff --git a/proto-thirdparty/ibc/core/channel/v1/query.proto b/proto-thirdparty/ibc/core/channel/v1/query.proto deleted file mode 100644 index f22a3753..00000000 --- a/proto-thirdparty/ibc/core/channel/v1/query.proto +++ /dev/null @@ -1,376 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; - -import "ibc/core/client/v1/client.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; -import "gogoproto/gogo.proto"; - -// Query provides defines the gRPC querier service -service Query { - // Channel queries an IBC Channel. - rpc Channel(QueryChannelRequest) returns (QueryChannelResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}"; - } - - // Channels queries all the IBC channels of a chain. - rpc Channels(QueryChannelsRequest) returns (QueryChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels"; - } - - // ConnectionChannels queries all the channels associated with a connection - // end. - rpc ConnectionChannels(QueryConnectionChannelsRequest) returns (QueryConnectionChannelsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/connections/{connection}/channels"; - } - - // ChannelClientState queries for the client state for the channel associated - // with the provided channel identifiers. - rpc ChannelClientState(QueryChannelClientStateRequest) returns (QueryChannelClientStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/client_state"; - } - - // ChannelConsensusState queries for the consensus state for the channel - // associated with the provided channel identifiers. - rpc ChannelConsensusState(QueryChannelConsensusStateRequest) returns (QueryChannelConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/consensus_state/revision/" - "{revision_number}/height/{revision_height}"; - } - - // PacketCommitment queries a stored packet commitment hash. - rpc PacketCommitment(QueryPacketCommitmentRequest) returns (QueryPacketCommitmentResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" - "packet_commitments/{sequence}"; - } - - // PacketCommitments returns all the packet commitments hashes associated - // with a channel. - rpc PacketCommitments(QueryPacketCommitmentsRequest) returns (QueryPacketCommitmentsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_commitments"; - } - - // PacketReceipt queries if a given packet sequence has been received on the - // queried chain - rpc PacketReceipt(QueryPacketReceiptRequest) returns (QueryPacketReceiptResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_receipts/{sequence}"; - } - - // PacketAcknowledgement queries a stored packet acknowledgement hash. - rpc PacketAcknowledgement(QueryPacketAcknowledgementRequest) returns (QueryPacketAcknowledgementResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_acks/{sequence}"; - } - - // PacketAcknowledgements returns all the packet acknowledgements associated - // with a channel. - rpc PacketAcknowledgements(QueryPacketAcknowledgementsRequest) returns (QueryPacketAcknowledgementsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_acknowledgements"; - } - - // UnreceivedPackets returns all the unreceived IBC packets associated with a - // channel and sequences. - rpc UnreceivedPackets(QueryUnreceivedPacketsRequest) returns (QueryUnreceivedPacketsResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/" - "packet_commitments/" - "{packet_commitment_sequences}/unreceived_packets"; - } - - // UnreceivedAcks returns all the unreceived IBC acknowledgements associated - // with a channel and sequences. - rpc UnreceivedAcks(QueryUnreceivedAcksRequest) returns (QueryUnreceivedAcksResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/packet_commitments/" - "{packet_ack_sequences}/unreceived_acks"; - } - - // NextSequenceReceive returns the next receive sequence for a given channel. - rpc NextSequenceReceive(QueryNextSequenceReceiveRequest) returns (QueryNextSequenceReceiveResponse) { - option (google.api.http).get = "/ibc/core/channel/v1/channels/{channel_id}/" - "ports/{port_id}/next_sequence"; - } -} - -// QueryChannelRequest is the request type for the Query/Channel RPC method -message QueryChannelRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QueryChannelResponse is the response type for the Query/Channel RPC method. -// Besides the Channel end, it includes a proof and the height from which the -// proof was retrieved. -message QueryChannelResponse { - // channel associated with the request identifiers - ibc.core.channel.v1.Channel channel = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelsRequest is the request type for the Query/Channels RPC method -message QueryChannelsRequest { - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryChannelsResponse is the response type for the Query/Channels RPC method. -message QueryChannelsResponse { - // list of stored channels of the chain. - repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionChannelsRequest is the request type for the -// Query/QueryConnectionChannels RPC method -message QueryConnectionChannelsRequest { - // connection unique identifier - string connection = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConnectionChannelsResponse is the Response type for the -// Query/QueryConnectionChannels RPC method -message QueryConnectionChannelsResponse { - // list of channels associated with a connection. - repeated ibc.core.channel.v1.IdentifiedChannel channels = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelClientStateRequest is the request type for the Query/ClientState -// RPC method -message QueryChannelClientStateRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QueryChannelClientStateResponse is the Response type for the -// Query/QueryChannelClientState RPC method -message QueryChannelClientStateResponse { - // client state associated with the channel - ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryChannelConsensusStateRequest is the request type for the -// Query/ConsensusState RPC method -message QueryChannelConsensusStateRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // revision number of the consensus state - uint64 revision_number = 3; - // revision height of the consensus state - uint64 revision_height = 4; -} - -// QueryChannelClientStateResponse is the Response type for the -// Query/QueryChannelClientState RPC method -message QueryChannelConsensusStateResponse { - // consensus state associated with the channel - google.protobuf.Any consensus_state = 1; - // client ID associated with the consensus state - string client_id = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryPacketCommitmentRequest is the request type for the -// Query/PacketCommitment RPC method -message QueryPacketCommitmentRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketCommitmentResponse defines the client query response for a packet -// which also includes a proof and the height from which the proof was -// retrieved -message QueryPacketCommitmentResponse { - // packet associated with the request fields - bytes commitment = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketCommitmentsRequest is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketCommitmentsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 3; -} - -// QueryPacketCommitmentsResponse is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketCommitmentsResponse { - repeated ibc.core.channel.v1.PacketState commitments = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketReceiptRequest is the request type for the -// Query/PacketReceipt RPC method -message QueryPacketReceiptRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketReceiptResponse defines the client query response for a packet -// receipt which also includes a proof, and the height from which the proof was -// retrieved -message QueryPacketReceiptResponse { - // success flag for if receipt exists - bool received = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryPacketAcknowledgementRequest is the request type for the -// Query/PacketAcknowledgement RPC method -message QueryPacketAcknowledgementRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // packet sequence - uint64 sequence = 3; -} - -// QueryPacketAcknowledgementResponse defines the client query response for a -// packet which also includes a proof and the height from which the -// proof was retrieved -message QueryPacketAcknowledgementResponse { - // packet associated with the request fields - bytes acknowledgement = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryPacketAcknowledgementsRequest is the request type for the -// Query/QueryPacketCommitments RPC method -message QueryPacketAcknowledgementsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 3; - // list of packet sequences - repeated uint64 packet_commitment_sequences = 4; -} - -// QueryPacketAcknowledgemetsResponse is the request type for the -// Query/QueryPacketAcknowledgements RPC method -message QueryPacketAcknowledgementsResponse { - repeated ibc.core.channel.v1.PacketState acknowledgements = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryUnreceivedPacketsRequest is the request type for the -// Query/UnreceivedPackets RPC method -message QueryUnreceivedPacketsRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // list of packet sequences - repeated uint64 packet_commitment_sequences = 3; -} - -// QueryUnreceivedPacketsResponse is the response type for the -// Query/UnreceivedPacketCommitments RPC method -message QueryUnreceivedPacketsResponse { - // list of unreceived packet sequences - repeated uint64 sequences = 1; - // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} - -// QueryUnreceivedAcks is the request type for the -// Query/UnreceivedAcks RPC method -message QueryUnreceivedAcksRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; - // list of acknowledgement sequences - repeated uint64 packet_ack_sequences = 3; -} - -// QueryUnreceivedAcksResponse is the response type for the -// Query/UnreceivedAcks RPC method -message QueryUnreceivedAcksResponse { - // list of unreceived acknowledgement sequences - repeated uint64 sequences = 1; - // query block height - ibc.core.client.v1.Height height = 2 [(gogoproto.nullable) = false]; -} - -// QueryNextSequenceReceiveRequest is the request type for the -// Query/QueryNextSequenceReceiveRequest RPC method -message QueryNextSequenceReceiveRequest { - // port unique identifier - string port_id = 1; - // channel unique identifier - string channel_id = 2; -} - -// QuerySequenceResponse is the request type for the -// Query/QueryNextSequenceReceiveResponse RPC method -message QueryNextSequenceReceiveResponse { - // next sequence receive number - uint64 next_sequence_receive = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/ibc/core/channel/v1/tx.proto b/proto-thirdparty/ibc/core/channel/v1/tx.proto deleted file mode 100644 index eba65f1e..00000000 --- a/proto-thirdparty/ibc/core/channel/v1/tx.proto +++ /dev/null @@ -1,245 +0,0 @@ -syntax = "proto3"; - -package ibc.core.channel.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/04-channel/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/channel/v1/channel.proto"; - -// Msg defines the ibc/channel Msg service. -service Msg { - // ChannelOpenInit defines a rpc handler method for MsgChannelOpenInit. - rpc ChannelOpenInit(MsgChannelOpenInit) returns (MsgChannelOpenInitResponse); - - // ChannelOpenTry defines a rpc handler method for MsgChannelOpenTry. - rpc ChannelOpenTry(MsgChannelOpenTry) returns (MsgChannelOpenTryResponse); - - // ChannelOpenAck defines a rpc handler method for MsgChannelOpenAck. - rpc ChannelOpenAck(MsgChannelOpenAck) returns (MsgChannelOpenAckResponse); - - // ChannelOpenConfirm defines a rpc handler method for MsgChannelOpenConfirm. - rpc ChannelOpenConfirm(MsgChannelOpenConfirm) returns (MsgChannelOpenConfirmResponse); - - // ChannelCloseInit defines a rpc handler method for MsgChannelCloseInit. - rpc ChannelCloseInit(MsgChannelCloseInit) returns (MsgChannelCloseInitResponse); - - // ChannelCloseConfirm defines a rpc handler method for - // MsgChannelCloseConfirm. - rpc ChannelCloseConfirm(MsgChannelCloseConfirm) returns (MsgChannelCloseConfirmResponse); - - // RecvPacket defines a rpc handler method for MsgRecvPacket. - rpc RecvPacket(MsgRecvPacket) returns (MsgRecvPacketResponse); - - // Timeout defines a rpc handler method for MsgTimeout. - rpc Timeout(MsgTimeout) returns (MsgTimeoutResponse); - - // TimeoutOnClose defines a rpc handler method for MsgTimeoutOnClose. - rpc TimeoutOnClose(MsgTimeoutOnClose) returns (MsgTimeoutOnCloseResponse); - - // Acknowledgement defines a rpc handler method for MsgAcknowledgement. - rpc Acknowledgement(MsgAcknowledgement) returns (MsgAcknowledgementResponse); -} - -// ResponseResultType defines the possible outcomes of the execution of a message -enum ResponseResultType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default zero value enumeration - RESPONSE_RESULT_TYPE_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // The message did not call the IBC application callbacks (because, for example, the packet had already been relayed) - RESPONSE_RESULT_TYPE_NOOP = 1 [(gogoproto.enumvalue_customname) = "NOOP"]; - // The message was executed successfully - RESPONSE_RESULT_TYPE_SUCCESS = 2 [(gogoproto.enumvalue_customname) = "SUCCESS"]; -} - -// MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It -// is called by a relayer on Chain A. -message MsgChannelOpenInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - Channel channel = 2 [(gogoproto.nullable) = false]; - string signer = 3; -} - -// MsgChannelOpenInitResponse defines the Msg/ChannelOpenInit response type. -message MsgChannelOpenInitResponse { - string channel_id = 1 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string version = 2; -} - -// MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel -// on Chain B. The version field within the Channel field has been deprecated. Its -// value will be ignored by core IBC. -message MsgChannelOpenTry { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - // Deprecated: this field is unused. Crossing hello's are no longer supported in core IBC. - string previous_channel_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_channel_id\""]; - // NOTE: the version field within the channel has been deprecated. Its value will be ignored by core IBC. - Channel channel = 3 [(gogoproto.nullable) = false]; - string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_init = 5 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 7; -} - -// MsgChannelOpenTryResponse defines the Msg/ChannelOpenTry response type. -message MsgChannelOpenTryResponse { - string version = 1; -} - -// MsgChannelOpenAck defines a msg sent by a Relayer to Chain A to acknowledge -// the change of channel state to TRYOPEN on Chain B. -message MsgChannelOpenAck { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string counterparty_channel_id = 3 [(gogoproto.moretags) = "yaml:\"counterparty_channel_id\""]; - string counterparty_version = 4 [(gogoproto.moretags) = "yaml:\"counterparty_version\""]; - bytes proof_try = 5 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - ibc.core.client.v1.Height proof_height = 6 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 7; -} - -// MsgChannelOpenAckResponse defines the Msg/ChannelOpenAck response type. -message MsgChannelOpenAckResponse {} - -// MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain B to -// acknowledge the change of channel state to OPEN on Chain A. -message MsgChannelOpenConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_ack = 3 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgChannelOpenConfirmResponse defines the Msg/ChannelOpenConfirm response -// type. -message MsgChannelOpenConfirmResponse {} - -// MsgChannelCloseInit defines a msg sent by a Relayer to Chain A -// to close a channel with Chain B. -message MsgChannelCloseInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - string signer = 3; -} - -// MsgChannelCloseInitResponse defines the Msg/ChannelCloseInit response type. -message MsgChannelCloseInitResponse {} - -// MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B -// to acknowledge the change of channel state to CLOSED on Chain A. -message MsgChannelCloseConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string port_id = 1 [(gogoproto.moretags) = "yaml:\"port_id\""]; - string channel_id = 2 [(gogoproto.moretags) = "yaml:\"channel_id\""]; - bytes proof_init = 3 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgChannelCloseConfirmResponse defines the Msg/ChannelCloseConfirm response -// type. -message MsgChannelCloseConfirmResponse {} - -// MsgRecvPacket receives incoming IBC packet -message MsgRecvPacket { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_commitment = 2 [(gogoproto.moretags) = "yaml:\"proof_commitment\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 4; -} - -// MsgRecvPacketResponse defines the Msg/RecvPacket response type. -message MsgRecvPacketResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} - -// MsgTimeout receives timed-out packet -message MsgTimeout { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - uint64 next_sequence_recv = 4 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - string signer = 5; -} - -// MsgTimeoutResponse defines the Msg/Timeout response type. -message MsgTimeoutResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} - -// MsgTimeoutOnClose timed-out packet upon counterparty channel closure. -message MsgTimeoutOnClose { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes proof_unreceived = 2 [(gogoproto.moretags) = "yaml:\"proof_unreceived\""]; - bytes proof_close = 3 [(gogoproto.moretags) = "yaml:\"proof_close\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - uint64 next_sequence_recv = 5 [(gogoproto.moretags) = "yaml:\"next_sequence_recv\""]; - string signer = 6; -} - -// MsgTimeoutOnCloseResponse defines the Msg/TimeoutOnClose response type. -message MsgTimeoutOnCloseResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} - -// MsgAcknowledgement receives incoming IBC acknowledgement -message MsgAcknowledgement { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - Packet packet = 1 [(gogoproto.nullable) = false]; - bytes acknowledgement = 2; - bytes proof_acked = 3 [(gogoproto.moretags) = "yaml:\"proof_acked\""]; - ibc.core.client.v1.Height proof_height = 4 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 5; -} - -// MsgAcknowledgementResponse defines the Msg/Acknowledgement response type. -message MsgAcknowledgementResponse { - option (gogoproto.goproto_getters) = false; - - ResponseResultType result = 1; -} diff --git a/proto-thirdparty/ibc/core/client/v1/client.proto b/proto-thirdparty/ibc/core/client/v1/client.proto deleted file mode 100644 index 0f1e6ab2..00000000 --- a/proto-thirdparty/ibc/core/client/v1/client.proto +++ /dev/null @@ -1,103 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "cosmos/upgrade/v1beta1/upgrade.proto"; -import "cosmos_proto/cosmos.proto"; - -// IdentifiedClientState defines a client state with an additional client -// identifier field. -message IdentifiedClientState { - // client identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateWithHeight defines a consensus state with an additional height -// field. -message ConsensusStateWithHeight { - // consensus state height - Height height = 1 [(gogoproto.nullable) = false]; - // consensus state - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ClientConsensusStates defines all the stored consensus states for a given -// client. -message ClientConsensusStates { - // client identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // consensus states and their heights associated with the client - repeated ConsensusStateWithHeight consensus_states = 2 - [(gogoproto.moretags) = "yaml:\"consensus_states\"", (gogoproto.nullable) = false]; -} - -// ClientUpdateProposal is a governance proposal. If it passes, the substitute -// client's latest consensus state is copied over to the subject client. The proposal -// handler may fail if the subject and the substitute do not match in client and -// chain parameters (with exception to latest height, frozen height, and chain-id). -message ClientUpdateProposal { - option (gogoproto.goproto_getters) = false; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - // the title of the update proposal - string title = 1; - // the description of the proposal - string description = 2; - // the client identifier for the client to be updated if the proposal passes - string subject_client_id = 3 [(gogoproto.moretags) = "yaml:\"subject_client_id\""]; - // the substitute client identifier for the client standing in for the subject - // client - string substitute_client_id = 4 [(gogoproto.moretags) = "yaml:\"substitute_client_id\""]; -} - -// UpgradeProposal is a gov Content type for initiating an IBC breaking -// upgrade. -message UpgradeProposal { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - option (gogoproto.equal) = true; - option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; - - string title = 1; - string description = 2; - cosmos.upgrade.v1beta1.Plan plan = 3 [(gogoproto.nullable) = false]; - - // An UpgradedClientState must be provided to perform an IBC breaking upgrade. - // This will make the chain commit to the correct upgraded (self) client state - // before the upgrade occurs, so that connecting chains can verify that the - // new upgraded client is valid by verifying a proof on the previous version - // of the chain. This will allow IBC connections to persist smoothly across - // planned chain upgrades - google.protobuf.Any upgraded_client_state = 4 [(gogoproto.moretags) = "yaml:\"upgraded_client_state\""]; -} - -// Height is a monotonically increasing data type -// that can be compared against another Height for the purposes of updating and -// freezing clients -// -// Normally the RevisionHeight is incremented at each height while keeping -// RevisionNumber the same. However some consensus algorithms may choose to -// reset the height in certain conditions e.g. hard forks, state-machine -// breaking changes In these cases, the RevisionNumber is incremented so that -// height continues to be monitonically increasing even as the RevisionHeight -// gets reset -message Height { - option (gogoproto.goproto_getters) = false; - option (gogoproto.goproto_stringer) = false; - - // the revision that the client is currently on - uint64 revision_number = 1 [(gogoproto.moretags) = "yaml:\"revision_number\""]; - // the height within the given revision - uint64 revision_height = 2 [(gogoproto.moretags) = "yaml:\"revision_height\""]; -} - -// Params defines the set of IBC light client parameters. -message Params { - // allowed_clients defines the list of allowed client state types. - repeated string allowed_clients = 1 [(gogoproto.moretags) = "yaml:\"allowed_clients\""]; -} diff --git a/proto-thirdparty/ibc/core/client/v1/genesis.proto b/proto-thirdparty/ibc/core/client/v1/genesis.proto deleted file mode 100644 index 02bafd81..00000000 --- a/proto-thirdparty/ibc/core/client/v1/genesis.proto +++ /dev/null @@ -1,48 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; - -import "ibc/core/client/v1/client.proto"; -import "gogoproto/gogo.proto"; - -// GenesisState defines the ibc client submodule's genesis state. -message GenesisState { - // client states with their corresponding identifiers - repeated IdentifiedClientState clients = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; - // consensus states from each client - repeated ClientConsensusStates clients_consensus = 2 [ - (gogoproto.nullable) = false, - (gogoproto.castrepeated) = "ClientsConsensusStates", - (gogoproto.moretags) = "yaml:\"clients_consensus\"" - ]; - // metadata from each client - repeated IdentifiedGenesisMetadata clients_metadata = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"clients_metadata\""]; - Params params = 4 [(gogoproto.nullable) = false]; - // create localhost on initialization - bool create_localhost = 5 [(gogoproto.moretags) = "yaml:\"create_localhost\""]; - // the sequence for the next generated client identifier - uint64 next_client_sequence = 6 [(gogoproto.moretags) = "yaml:\"next_client_sequence\""]; -} - -// GenesisMetadata defines the genesis type for metadata that clients may return -// with ExportMetadata -message GenesisMetadata { - option (gogoproto.goproto_getters) = false; - - // store key of metadata without clientID-prefix - bytes key = 1; - // metadata value - bytes value = 2; -} - -// IdentifiedGenesisMetadata has the client metadata with the corresponding -// client id. -message IdentifiedGenesisMetadata { - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - repeated GenesisMetadata client_metadata = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_metadata\""]; -} diff --git a/proto-thirdparty/ibc/core/client/v1/query.proto b/proto-thirdparty/ibc/core/client/v1/query.proto deleted file mode 100644 index de16d917..00000000 --- a/proto-thirdparty/ibc/core/client/v1/query.proto +++ /dev/null @@ -1,207 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; - -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/client/v1/client.proto"; -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; - -// Query provides defines the gRPC querier service -service Query { - // ClientState queries an IBC light client. - rpc ClientState(QueryClientStateRequest) returns (QueryClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_states/{client_id}"; - } - - // ClientStates queries all the IBC light clients of a chain. - rpc ClientStates(QueryClientStatesRequest) returns (QueryClientStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_states"; - } - - // ConsensusState queries a consensus state associated with a client state at - // a given height. - rpc ConsensusState(QueryConsensusStateRequest) returns (QueryConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/" - "{client_id}/revision/{revision_number}/" - "height/{revision_height}"; - } - - // ConsensusStates queries all the consensus state associated with a given - // client. - rpc ConsensusStates(QueryConsensusStatesRequest) returns (QueryConsensusStatesResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}"; - } - - // ConsensusStateHeights queries the height of every consensus states associated with a given client. - rpc ConsensusStateHeights(QueryConsensusStateHeightsRequest) returns (QueryConsensusStateHeightsResponse) { - option (google.api.http).get = "/ibc/core/client/v1/consensus_states/{client_id}/heights"; - } - - // Status queries the status of an IBC client. - rpc ClientStatus(QueryClientStatusRequest) returns (QueryClientStatusResponse) { - option (google.api.http).get = "/ibc/core/client/v1/client_status/{client_id}"; - } - - // ClientParams queries all parameters of the ibc client submodule. - rpc ClientParams(QueryClientParamsRequest) returns (QueryClientParamsResponse) { - option (google.api.http).get = "/ibc/core/client/v1/params"; - } - - // UpgradedClientState queries an Upgraded IBC light client. - rpc UpgradedClientState(QueryUpgradedClientStateRequest) returns (QueryUpgradedClientStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/upgraded_client_states"; - } - - // UpgradedConsensusState queries an Upgraded IBC consensus state. - rpc UpgradedConsensusState(QueryUpgradedConsensusStateRequest) returns (QueryUpgradedConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/client/v1/upgraded_consensus_states"; - } -} - -// QueryClientStateRequest is the request type for the Query/ClientState RPC -// method -message QueryClientStateRequest { - // client state unique identifier - string client_id = 1; -} - -// QueryClientStateResponse is the response type for the Query/ClientState RPC -// method. Besides the client state, it includes a proof and the height from -// which the proof was retrieved. -message QueryClientStateResponse { - // client state associated with the request identifier - google.protobuf.Any client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryClientStatesRequest is the request type for the Query/ClientStates RPC -// method -message QueryClientStatesRequest { - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryClientStatesResponse is the response type for the Query/ClientStates RPC -// method. -message QueryClientStatesResponse { - // list of stored ClientStates of the chain. - repeated IdentifiedClientState client_states = 1 - [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "IdentifiedClientStates"]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryConsensusStateRequest is the request type for the Query/ConsensusState -// RPC method. Besides the consensus state, it includes a proof and the height -// from which the proof was retrieved. -message QueryConsensusStateRequest { - // client identifier - string client_id = 1; - // consensus state revision number - uint64 revision_number = 2; - // consensus state revision height - uint64 revision_height = 3; - // latest_height overrrides the height field and queries the latest stored - // ConsensusState - bool latest_height = 4; -} - -// QueryConsensusStateResponse is the response type for the Query/ConsensusState -// RPC method -message QueryConsensusStateResponse { - // consensus state associated with the client identifier at the given height - google.protobuf.Any consensus_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates -// RPC method. -message QueryConsensusStatesRequest { - // client identifier - string client_id = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConsensusStatesResponse is the response type for the -// Query/ConsensusStates RPC method -message QueryConsensusStatesResponse { - // consensus states associated with the identifier - repeated ConsensusStateWithHeight consensus_states = 1 [(gogoproto.nullable) = false]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights -// RPC method. -message QueryConsensusStateHeightsRequest { - // client identifier - string client_id = 1; - // pagination request - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// QueryConsensusStateHeightsResponse is the response type for the -// Query/ConsensusStateHeights RPC method -message QueryConsensusStateHeightsResponse { - // consensus state heights - repeated Height consensus_state_heights = 1 [(gogoproto.nullable) = false]; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; -} - -// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC -// method -message QueryClientStatusRequest { - // client unique identifier - string client_id = 1; -} - -// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC -// method. It returns the current status of the IBC client. -message QueryClientStatusResponse { - string status = 1; -} - -// QueryClientParamsRequest is the request type for the Query/ClientParams RPC -// method. -message QueryClientParamsRequest {} - -// QueryClientParamsResponse is the response type for the Query/ClientParams RPC -// method. -message QueryClientParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} - -// QueryUpgradedClientStateRequest is the request type for the -// Query/UpgradedClientState RPC method -message QueryUpgradedClientStateRequest {} - -// QueryUpgradedClientStateResponse is the response type for the -// Query/UpgradedClientState RPC method. -message QueryUpgradedClientStateResponse { - // client state associated with the request identifier - google.protobuf.Any upgraded_client_state = 1; -} - -// QueryUpgradedConsensusStateRequest is the request type for the -// Query/UpgradedConsensusState RPC method -message QueryUpgradedConsensusStateRequest {} - -// QueryUpgradedConsensusStateResponse is the response type for the -// Query/UpgradedConsensusState RPC method. -message QueryUpgradedConsensusStateResponse { - // Consensus state associated with the request identifier - google.protobuf.Any upgraded_consensus_state = 1; -} diff --git a/proto-thirdparty/ibc/core/client/v1/tx.proto b/proto-thirdparty/ibc/core/client/v1/tx.proto deleted file mode 100644 index f6ad3e8e..00000000 --- a/proto-thirdparty/ibc/core/client/v1/tx.proto +++ /dev/null @@ -1,100 +0,0 @@ -syntax = "proto3"; - -package ibc.core.client.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// Msg defines the ibc/client Msg service. -service Msg { - // CreateClient defines a rpc handler method for MsgCreateClient. - rpc CreateClient(MsgCreateClient) returns (MsgCreateClientResponse); - - // UpdateClient defines a rpc handler method for MsgUpdateClient. - rpc UpdateClient(MsgUpdateClient) returns (MsgUpdateClientResponse); - - // UpgradeClient defines a rpc handler method for MsgUpgradeClient. - rpc UpgradeClient(MsgUpgradeClient) returns (MsgUpgradeClientResponse); - - // SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour. - rpc SubmitMisbehaviour(MsgSubmitMisbehaviour) returns (MsgSubmitMisbehaviourResponse); -} - -// MsgCreateClient defines a message to create an IBC client -message MsgCreateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // light client state - google.protobuf.Any client_state = 1 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // consensus state associated with the client that corresponds to a given - // height. - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // signer address - string signer = 3; -} - -// MsgCreateClientResponse defines the Msg/CreateClient response type. -message MsgCreateClientResponse {} - -// MsgUpdateClient defines an sdk.Msg to update a IBC client state using -// the given client message. -message MsgUpdateClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // client message to update the light client - google.protobuf.Any client_message = 2; - // signer address - string signer = 3; -} - -// MsgUpdateClientResponse defines the Msg/UpdateClient response type. -message MsgUpdateClientResponse {} - -// MsgUpgradeClient defines an sdk.Msg to upgrade an IBC client to a new client -// state -message MsgUpgradeClient { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // upgraded client state - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; - // upgraded consensus state, only contains enough information to serve as a - // basis of trust in update logic - google.protobuf.Any consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // proof that old chain committed to new client - bytes proof_upgrade_client = 4 [(gogoproto.moretags) = "yaml:\"proof_upgrade_client\""]; - // proof that old chain committed to new consensus state - bytes proof_upgrade_consensus_state = 5 [(gogoproto.moretags) = "yaml:\"proof_upgrade_consensus_state\""]; - // signer address - string signer = 6; -} - -// MsgUpgradeClientResponse defines the Msg/UpgradeClient response type. -message MsgUpgradeClientResponse {} - -// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for -// light client misbehaviour. -// Warning: DEPRECATED -message MsgSubmitMisbehaviour { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - // client unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\"", deprecated = true]; - // misbehaviour used for freezing the light client - google.protobuf.Any misbehaviour = 2 [deprecated = true]; - // signer address - string signer = 3 [deprecated = true]; -} - -// MsgSubmitMisbehaviourResponse defines the Msg/SubmitMisbehaviour response -// type. -message MsgSubmitMisbehaviourResponse {} diff --git a/proto-thirdparty/ibc/core/commitment/v1/commitment.proto b/proto-thirdparty/ibc/core/commitment/v1/commitment.proto deleted file mode 100644 index 38526624..00000000 --- a/proto-thirdparty/ibc/core/commitment/v1/commitment.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; - -package ibc.core.commitment.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/23-commitment/types"; - -import "gogoproto/gogo.proto"; -import "proofs.proto"; - -// MerkleRoot defines a merkle root hash. -// In the Cosmos SDK, the AppHash of a block header becomes the root. -message MerkleRoot { - option (gogoproto.goproto_getters) = false; - - bytes hash = 1; -} - -// MerklePrefix is merkle path prefixed to the key. -// The constructed key from the Path and the key will be append(Path.KeyPath, -// append(Path.KeyPrefix, key...)) -message MerklePrefix { - bytes key_prefix = 1 [(gogoproto.moretags) = "yaml:\"key_prefix\""]; -} - -// MerklePath is the path used to verify commitment proofs, which can be an -// arbitrary structured object (defined by a commitment type). -// MerklePath is represented from root-to-leaf -message MerklePath { - option (gogoproto.goproto_stringer) = false; - - repeated string key_path = 1 [(gogoproto.moretags) = "yaml:\"key_path\""]; -} - -// MerkleProof is a wrapper type over a chain of CommitmentProofs. -// It demonstrates membership or non-membership for an element or set of -// elements, verifiable in conjunction with a known commitment root. Proofs -// should be succinct. -// MerkleProofs are ordered from leaf-to-root -message MerkleProof { - repeated ics23.CommitmentProof proofs = 1; -} diff --git a/proto-thirdparty/ibc/core/connection/v1/connection.proto b/proto-thirdparty/ibc/core/connection/v1/connection.proto deleted file mode 100644 index 8ec7a00a..00000000 --- a/proto-thirdparty/ibc/core/connection/v1/connection.proto +++ /dev/null @@ -1,114 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/commitment/v1/commitment.proto"; - -// ICS03 - Connection Data Structures as defined in -// https://github.com/cosmos/ibc/blob/master/spec/core/ics-003-connection-semantics#data-structures - -// ConnectionEnd defines a stateful object on a chain connected to another -// separate one. -// NOTE: there must only be 2 defined ConnectionEnds to establish -// a connection between two chains. -message ConnectionEnd { - option (gogoproto.goproto_getters) = false; - // client associated with this connection. - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // IBC version which can be utilised to determine encodings or protocols for - // channels or packets utilising this connection. - repeated Version versions = 2; - // current state of the connection end. - State state = 3; - // counterparty chain associated with this connection. - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - // delay period that must pass before a consensus state can be used for - // packet-verification NOTE: delay period logic is only implemented by some - // clients. - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; -} - -// IdentifiedConnection defines a connection with additional connection -// identifier field. -message IdentifiedConnection { - option (gogoproto.goproto_getters) = false; - // connection identifier. - string id = 1 [(gogoproto.moretags) = "yaml:\"id\""]; - // client associated with this connection. - string client_id = 2 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // IBC version which can be utilised to determine encodings or protocols for - // channels or packets utilising this connection - repeated Version versions = 3; - // current state of the connection end. - State state = 4; - // counterparty chain associated with this connection. - Counterparty counterparty = 5 [(gogoproto.nullable) = false]; - // delay period associated with this connection. - uint64 delay_period = 6 [(gogoproto.moretags) = "yaml:\"delay_period\""]; -} - -// State defines if a connection is in one of the following states: -// INIT, TRYOPEN, OPEN or UNINITIALIZED. -enum State { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - STATE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNINITIALIZED"]; - // A connection end has just started the opening handshake. - STATE_INIT = 1 [(gogoproto.enumvalue_customname) = "INIT"]; - // A connection end has acknowledged the handshake step on the counterparty - // chain. - STATE_TRYOPEN = 2 [(gogoproto.enumvalue_customname) = "TRYOPEN"]; - // A connection end has completed the handshake. - STATE_OPEN = 3 [(gogoproto.enumvalue_customname) = "OPEN"]; -} - -// Counterparty defines the counterparty chain associated with a connection end. -message Counterparty { - option (gogoproto.goproto_getters) = false; - - // identifies the client on the counterparty chain associated with a given - // connection. - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // identifies the connection end on the counterparty chain associated with a - // given connection. - string connection_id = 2 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - // commitment merkle prefix of the counterparty chain. - ibc.core.commitment.v1.MerklePrefix prefix = 3 [(gogoproto.nullable) = false]; -} - -// ClientPaths define all the connection paths for a client state. -message ClientPaths { - // list of connection paths - repeated string paths = 1; -} - -// ConnectionPaths define all the connection paths for a given client state. -message ConnectionPaths { - // client state unique identifier - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // list of connection paths - repeated string paths = 2; -} - -// Version defines the versioning scheme used to negotiate the IBC verison in -// the connection handshake. -message Version { - option (gogoproto.goproto_getters) = false; - - // unique version identifier - string identifier = 1; - // list of features compatible with the specified identifier - repeated string features = 2; -} - -// Params defines the set of Connection parameters. -message Params { - // maximum expected time per block (in nanoseconds), used to enforce block delay. This parameter should reflect the - // largest amount of time that the chain might reasonably take to produce the next block under normal operating - // conditions. A safe choice is 3-5x the expected time per block. - uint64 max_expected_time_per_block = 1 [(gogoproto.moretags) = "yaml:\"max_expected_time_per_block\""]; -} diff --git a/proto-thirdparty/ibc/core/connection/v1/genesis.proto b/proto-thirdparty/ibc/core/connection/v1/genesis.proto deleted file mode 100644 index c9d46081..00000000 --- a/proto-thirdparty/ibc/core/connection/v1/genesis.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/connection/v1/connection.proto"; - -// GenesisState defines the ibc connection submodule's genesis state. -message GenesisState { - repeated IdentifiedConnection connections = 1 [(gogoproto.nullable) = false]; - repeated ConnectionPaths client_connection_paths = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_connection_paths\""]; - // the sequence for the next generated connection identifier - uint64 next_connection_sequence = 3 [(gogoproto.moretags) = "yaml:\"next_connection_sequence\""]; - Params params = 4 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/ibc/core/connection/v1/query.proto b/proto-thirdparty/ibc/core/connection/v1/query.proto deleted file mode 100644 index 04d7c3ea..00000000 --- a/proto-thirdparty/ibc/core/connection/v1/query.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/connection/v1/connection.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/any.proto"; - -// Query provides defines the gRPC querier service -service Query { - // Connection queries an IBC connection end. - rpc Connection(QueryConnectionRequest) returns (QueryConnectionResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}"; - } - - // Connections queries all the IBC connections of a chain. - rpc Connections(QueryConnectionsRequest) returns (QueryConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections"; - } - - // ClientConnections queries the connection paths associated with a client - // state. - rpc ClientConnections(QueryClientConnectionsRequest) returns (QueryClientConnectionsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/client_connections/{client_id}"; - } - - // ConnectionClientState queries the client state associated with the - // connection. - rpc ConnectionClientState(QueryConnectionClientStateRequest) returns (QueryConnectionClientStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/client_state"; - } - - // ConnectionConsensusState queries the consensus state associated with the - // connection. - rpc ConnectionConsensusState(QueryConnectionConsensusStateRequest) returns (QueryConnectionConsensusStateResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/connections/{connection_id}/consensus_state/" - "revision/{revision_number}/height/{revision_height}"; - } - - // ConnectionParams queries all parameters of the ibc connection submodule. - rpc ConnectionParams(QueryConnectionParamsRequest) returns (QueryConnectionParamsResponse) { - option (google.api.http).get = "/ibc/core/connection/v1/params"; - } -} - -// QueryConnectionRequest is the request type for the Query/Connection RPC -// method -message QueryConnectionRequest { - // connection unique identifier - string connection_id = 1; -} - -// QueryConnectionResponse is the response type for the Query/Connection RPC -// method. Besides the connection end, it includes a proof and the height from -// which the proof was retrieved. -message QueryConnectionResponse { - // connection associated with the request identifier - ibc.core.connection.v1.ConnectionEnd connection = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionsRequest is the request type for the Query/Connections RPC -// method -message QueryConnectionsRequest { - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// QueryConnectionsResponse is the response type for the Query/Connections RPC -// method. -message QueryConnectionsResponse { - // list of stored connections of the chain. - repeated ibc.core.connection.v1.IdentifiedConnection connections = 1; - // pagination response - cosmos.base.query.v1beta1.PageResponse pagination = 2; - // query block height - ibc.core.client.v1.Height height = 3 [(gogoproto.nullable) = false]; -} - -// QueryClientConnectionsRequest is the request type for the -// Query/ClientConnections RPC method -message QueryClientConnectionsRequest { - // client identifier associated with a connection - string client_id = 1; -} - -// QueryClientConnectionsResponse is the response type for the -// Query/ClientConnections RPC method -message QueryClientConnectionsResponse { - // slice of all the connection paths associated with a client. - repeated string connection_paths = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was generated - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionClientStateRequest is the request type for the -// Query/ConnectionClientState RPC method -message QueryConnectionClientStateRequest { - // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; -} - -// QueryConnectionClientStateResponse is the response type for the -// Query/ConnectionClientState RPC method -message QueryConnectionClientStateResponse { - // client state associated with the channel - ibc.core.client.v1.IdentifiedClientState identified_client_state = 1; - // merkle proof of existence - bytes proof = 2; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 3 [(gogoproto.nullable) = false]; -} - -// QueryConnectionConsensusStateRequest is the request type for the -// Query/ConnectionConsensusState RPC method -message QueryConnectionConsensusStateRequest { - // connection identifier - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - uint64 revision_number = 2; - uint64 revision_height = 3; -} - -// QueryConnectionConsensusStateResponse is the response type for the -// Query/ConnectionConsensusState RPC method -message QueryConnectionConsensusStateResponse { - // consensus state associated with the channel - google.protobuf.Any consensus_state = 1; - // client ID associated with the consensus state - string client_id = 2; - // merkle proof of existence - bytes proof = 3; - // height at which the proof was retrieved - ibc.core.client.v1.Height proof_height = 4 [(gogoproto.nullable) = false]; -} - -// QueryConnectionParamsRequest is the request type for the Query/ConnectionParams RPC method. -message QueryConnectionParamsRequest {} - -// QueryConnectionParamsResponse is the response type for the Query/ConnectionParams RPC method. -message QueryConnectionParamsResponse { - // params defines the parameters of the module. - Params params = 1; -} \ No newline at end of file diff --git a/proto-thirdparty/ibc/core/connection/v1/tx.proto b/proto-thirdparty/ibc/core/connection/v1/tx.proto deleted file mode 100644 index 94d676bb..00000000 --- a/proto-thirdparty/ibc/core/connection/v1/tx.proto +++ /dev/null @@ -1,118 +0,0 @@ -syntax = "proto3"; - -package ibc.core.connection.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/03-connection/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/connection/v1/connection.proto"; - -// Msg defines the ibc/connection Msg service. -service Msg { - // ConnectionOpenInit defines a rpc handler method for MsgConnectionOpenInit. - rpc ConnectionOpenInit(MsgConnectionOpenInit) returns (MsgConnectionOpenInitResponse); - - // ConnectionOpenTry defines a rpc handler method for MsgConnectionOpenTry. - rpc ConnectionOpenTry(MsgConnectionOpenTry) returns (MsgConnectionOpenTryResponse); - - // ConnectionOpenAck defines a rpc handler method for MsgConnectionOpenAck. - rpc ConnectionOpenAck(MsgConnectionOpenAck) returns (MsgConnectionOpenAckResponse); - - // ConnectionOpenConfirm defines a rpc handler method for - // MsgConnectionOpenConfirm. - rpc ConnectionOpenConfirm(MsgConnectionOpenConfirm) returns (MsgConnectionOpenConfirmResponse); -} - -// MsgConnectionOpenInit defines the msg sent by an account on Chain A to -// initialize a connection with Chain B. -message MsgConnectionOpenInit { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - Counterparty counterparty = 2 [(gogoproto.nullable) = false]; - Version version = 3; - uint64 delay_period = 4 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - string signer = 5; -} - -// MsgConnectionOpenInitResponse defines the Msg/ConnectionOpenInit response -// type. -message MsgConnectionOpenInitResponse {} - -// MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a -// connection on Chain B. -message MsgConnectionOpenTry { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - // Deprecated: this field is unused. Crossing hellos are no longer supported in core IBC. - string previous_connection_id = 2 [deprecated = true, (gogoproto.moretags) = "yaml:\"previous_connection_id\""]; - google.protobuf.Any client_state = 3 [(gogoproto.moretags) = "yaml:\"client_state\""]; - Counterparty counterparty = 4 [(gogoproto.nullable) = false]; - uint64 delay_period = 5 [(gogoproto.moretags) = "yaml:\"delay_period\""]; - repeated Version counterparty_versions = 6 [(gogoproto.moretags) = "yaml:\"counterparty_versions\""]; - ibc.core.client.v1.Height proof_height = 7 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - // proof of the initialization the connection on Chain A: `UNITIALIZED -> - // INIT` - bytes proof_init = 8 [(gogoproto.moretags) = "yaml:\"proof_init\""]; - // proof of client state included in message - bytes proof_client = 9 [(gogoproto.moretags) = "yaml:\"proof_client\""]; - // proof of client consensus state - bytes proof_consensus = 10 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.core.client.v1.Height consensus_height = 11 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - string signer = 12; -} - -// MsgConnectionOpenTryResponse defines the Msg/ConnectionOpenTry response type. -message MsgConnectionOpenTryResponse {} - -// MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to -// acknowledge the change of connection state to TRYOPEN on Chain B. -message MsgConnectionOpenAck { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - string counterparty_connection_id = 2 [(gogoproto.moretags) = "yaml:\"counterparty_connection_id\""]; - Version version = 3; - google.protobuf.Any client_state = 4 [(gogoproto.moretags) = "yaml:\"client_state\""]; - ibc.core.client.v1.Height proof_height = 5 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - // proof of the initialization the connection on Chain B: `UNITIALIZED -> - // TRYOPEN` - bytes proof_try = 6 [(gogoproto.moretags) = "yaml:\"proof_try\""]; - // proof of client state included in message - bytes proof_client = 7 [(gogoproto.moretags) = "yaml:\"proof_client\""]; - // proof of client consensus state - bytes proof_consensus = 8 [(gogoproto.moretags) = "yaml:\"proof_consensus\""]; - ibc.core.client.v1.Height consensus_height = 9 - [(gogoproto.moretags) = "yaml:\"consensus_height\"", (gogoproto.nullable) = false]; - string signer = 10; -} - -// MsgConnectionOpenAckResponse defines the Msg/ConnectionOpenAck response type. -message MsgConnectionOpenAckResponse {} - -// MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to -// acknowledge the change of connection state to OPEN on Chain A. -message MsgConnectionOpenConfirm { - option (gogoproto.equal) = false; - option (gogoproto.goproto_getters) = false; - - string connection_id = 1 [(gogoproto.moretags) = "yaml:\"connection_id\""]; - // proof for the change of the connection state on Chain A: `INIT -> OPEN` - bytes proof_ack = 2 [(gogoproto.moretags) = "yaml:\"proof_ack\""]; - ibc.core.client.v1.Height proof_height = 3 - [(gogoproto.moretags) = "yaml:\"proof_height\"", (gogoproto.nullable) = false]; - string signer = 4; -} - -// MsgConnectionOpenConfirmResponse defines the Msg/ConnectionOpenConfirm -// response type. -message MsgConnectionOpenConfirmResponse {} diff --git a/proto-thirdparty/ibc/core/types/v1/genesis.proto b/proto-thirdparty/ibc/core/types/v1/genesis.proto deleted file mode 100644 index dd389d41..00000000 --- a/proto-thirdparty/ibc/core/types/v1/genesis.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package ibc.core.types.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/types"; - -import "gogoproto/gogo.proto"; -import "ibc/core/client/v1/genesis.proto"; -import "ibc/core/connection/v1/genesis.proto"; -import "ibc/core/channel/v1/genesis.proto"; - -// GenesisState defines the ibc module's genesis state. -message GenesisState { - // ICS002 - Clients genesis state - ibc.core.client.v1.GenesisState client_genesis = 1 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"client_genesis\""]; - // ICS003 - Connections genesis state - ibc.core.connection.v1.GenesisState connection_genesis = 2 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"connection_genesis\""]; - // ICS004 - Channel genesis state - ibc.core.channel.v1.GenesisState channel_genesis = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"channel_genesis\""]; -} diff --git a/proto-thirdparty/ibc/lightclients/solomachine/v1/solomachine.proto b/proto-thirdparty/ibc/lightclients/solomachine/v1/solomachine.proto deleted file mode 100644 index 46d102bb..00000000 --- a/proto-thirdparty/ibc/lightclients/solomachine/v1/solomachine.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/legacy/v100"; - -import "ibc/core/connection/v1/connection.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - uint64 frozen_sequence = 2 [(gogoproto.moretags) = "yaml:\"frozen_sequence\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // when set to true, will allow governance to update a solo machine client. - // The client will be unfrozen if it is frozen. - bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - uint64 sequence = 2; - SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - uint64 timestamp = 2; - string diversifier = 3; - // type of the data used - DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; - // marshaled data - bytes data = 5; -} - -// DataType defines the type of solo machine proof being created. This is done -// to preserve uniqueness of different data sign byte encodings. -enum DataType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Data type for client state verification - DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; - // Data type for consensus state verification - DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; - // Data type for connection state verification - DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; - // Data type for channel state verification - DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; - // Data type for packet commitment verification - DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; - // Data type for packet acknowledgement verification - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; - // Data type for packet receipt absence verification - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; - // Data type for next sequence recv verification - DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; - // Data type for header verification - DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// ClientStateData returns the SignBytes data for client state verification. -message ClientStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateData returns the SignBytes data for consensus state -// verification. -message ConsensusStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConnectionStateData returns the SignBytes data for connection state -// verification. -message ConnectionStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.connection.v1.ConnectionEnd connection = 2; -} - -// ChannelStateData returns the SignBytes data for channel state -// verification. -message ChannelStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.channel.v1.Channel channel = 2; -} - -// PacketCommitmentData returns the SignBytes data for packet commitment -// verification. -message PacketCommitmentData { - bytes path = 1; - bytes commitment = 2; -} - -// PacketAcknowledgementData returns the SignBytes data for acknowledgement -// verification. -message PacketAcknowledgementData { - bytes path = 1; - bytes acknowledgement = 2; -} - -// PacketReceiptAbsenceData returns the SignBytes data for -// packet receipt absence verification. -message PacketReceiptAbsenceData { - bytes path = 1; -} - -// NextSequenceRecvData returns the SignBytes data for verification of the next -// sequence to be received. -message NextSequenceRecvData { - bytes path = 1; - uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} diff --git a/proto-thirdparty/ibc/lightclients/solomachine/v2/solomachine.proto b/proto-thirdparty/ibc/lightclients/solomachine/v2/solomachine.proto deleted file mode 100644 index faf71334..00000000 --- a/proto-thirdparty/ibc/lightclients/solomachine/v2/solomachine.proto +++ /dev/null @@ -1,189 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v2; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/core/02-client/migrations/v6"; - -import "ibc/core/connection/v1/connection.proto"; -import "ibc/core/channel/v1/channel.proto"; -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - bool is_frozen = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; - // when set to true, will allow governance to update a solo machine client. - // The client will be unfrozen if it is frozen. - bool allow_update_after_proposal = 4 [(gogoproto.moretags) = "yaml:\"allow_update_after_proposal\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - string client_id = 1 [(gogoproto.moretags) = "yaml:\"client_id\""]; - uint64 sequence = 2; - SignatureAndData signature_one = 3 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 4 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - DataType data_type = 2 [(gogoproto.moretags) = "yaml:\"data_type\""]; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - uint64 timestamp = 2; - string diversifier = 3; - // type of the data used - DataType data_type = 4 [(gogoproto.moretags) = "yaml:\"data_type\""]; - // marshaled data - bytes data = 5; -} - -// DataType defines the type of solo machine proof being created. This is done -// to preserve uniqueness of different data sign byte encodings. -enum DataType { - option (gogoproto.goproto_enum_prefix) = false; - - // Default State - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "UNSPECIFIED"]; - // Data type for client state verification - DATA_TYPE_CLIENT_STATE = 1 [(gogoproto.enumvalue_customname) = "CLIENT"]; - // Data type for consensus state verification - DATA_TYPE_CONSENSUS_STATE = 2 [(gogoproto.enumvalue_customname) = "CONSENSUS"]; - // Data type for connection state verification - DATA_TYPE_CONNECTION_STATE = 3 [(gogoproto.enumvalue_customname) = "CONNECTION"]; - // Data type for channel state verification - DATA_TYPE_CHANNEL_STATE = 4 [(gogoproto.enumvalue_customname) = "CHANNEL"]; - // Data type for packet commitment verification - DATA_TYPE_PACKET_COMMITMENT = 5 [(gogoproto.enumvalue_customname) = "PACKETCOMMITMENT"]; - // Data type for packet acknowledgement verification - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6 [(gogoproto.enumvalue_customname) = "PACKETACKNOWLEDGEMENT"]; - // Data type for packet receipt absence verification - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7 [(gogoproto.enumvalue_customname) = "PACKETRECEIPTABSENCE"]; - // Data type for next sequence recv verification - DATA_TYPE_NEXT_SEQUENCE_RECV = 8 [(gogoproto.enumvalue_customname) = "NEXTSEQUENCERECV"]; - // Data type for header verification - DATA_TYPE_HEADER = 9 [(gogoproto.enumvalue_customname) = "HEADER"]; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// ClientStateData returns the SignBytes data for client state verification. -message ClientStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any client_state = 2 [(gogoproto.moretags) = "yaml:\"client_state\""]; -} - -// ConsensusStateData returns the SignBytes data for consensus state -// verification. -message ConsensusStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - google.protobuf.Any consensus_state = 2 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConnectionStateData returns the SignBytes data for connection state -// verification. -message ConnectionStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.connection.v1.ConnectionEnd connection = 2; -} - -// ChannelStateData returns the SignBytes data for channel state -// verification. -message ChannelStateData { - option (gogoproto.goproto_getters) = false; - - bytes path = 1; - ibc.core.channel.v1.Channel channel = 2; -} - -// PacketCommitmentData returns the SignBytes data for packet commitment -// verification. -message PacketCommitmentData { - bytes path = 1; - bytes commitment = 2; -} - -// PacketAcknowledgementData returns the SignBytes data for acknowledgement -// verification. -message PacketAcknowledgementData { - bytes path = 1; - bytes acknowledgement = 2; -} - -// PacketReceiptAbsenceData returns the SignBytes data for -// packet receipt absence verification. -message PacketReceiptAbsenceData { - bytes path = 1; -} - -// NextSequenceRecvData returns the SignBytes data for verification of the next -// sequence to be received. -message NextSequenceRecvData { - bytes path = 1; - uint64 next_seq_recv = 2 [(gogoproto.moretags) = "yaml:\"next_seq_recv\""]; -} diff --git a/proto-thirdparty/ibc/lightclients/solomachine/v3/solomachine.proto b/proto-thirdparty/ibc/lightclients/solomachine/v3/solomachine.proto deleted file mode 100644 index 8203c177..00000000 --- a/proto-thirdparty/ibc/lightclients/solomachine/v3/solomachine.proto +++ /dev/null @@ -1,98 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.solomachine.v3; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/06-solomachine;solomachine"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/any.proto"; - -// ClientState defines a solo machine client that tracks the current consensus -// state and if the client is frozen. -message ClientState { - option (gogoproto.goproto_getters) = false; - // latest sequence of the client state - uint64 sequence = 1; - // frozen sequence of the solo machine - bool is_frozen = 2 [(gogoproto.moretags) = "yaml:\"is_frozen\""]; - ConsensusState consensus_state = 3 [(gogoproto.moretags) = "yaml:\"consensus_state\""]; -} - -// ConsensusState defines a solo machine consensus state. The sequence of a -// consensus state is contained in the "height" key used in storing the -// consensus state. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - // public key of the solo machine - google.protobuf.Any public_key = 1 [(gogoproto.moretags) = "yaml:\"public_key\""]; - // diversifier allows the same public key to be re-used across different solo - // machine clients (potentially on different chains) without being considered - // misbehaviour. - string diversifier = 2; - uint64 timestamp = 3; -} - -// Header defines a solo machine consensus header -message Header { - option (gogoproto.goproto_getters) = false; - // sequence to update solo machine public key at - uint64 sequence = 1; - uint64 timestamp = 2; - bytes signature = 3; - google.protobuf.Any new_public_key = 4 [(gogoproto.moretags) = "yaml:\"new_public_key\""]; - string new_diversifier = 5 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} - -// Misbehaviour defines misbehaviour for a solo machine which consists -// of a sequence and two signatures over different messages at that sequence. -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - - uint64 sequence = 1; - SignatureAndData signature_one = 2 [(gogoproto.moretags) = "yaml:\"signature_one\""]; - SignatureAndData signature_two = 3 [(gogoproto.moretags) = "yaml:\"signature_two\""]; -} - -// SignatureAndData contains a signature and the data signed over to create that -// signature. -message SignatureAndData { - option (gogoproto.goproto_getters) = false; - bytes signature = 1; - bytes path = 2; - bytes data = 3; - uint64 timestamp = 4; -} - -// TimestampedSignatureData contains the signature data and the timestamp of the -// signature. -message TimestampedSignatureData { - option (gogoproto.goproto_getters) = false; - bytes signature_data = 1 [(gogoproto.moretags) = "yaml:\"signature_data\""]; - uint64 timestamp = 2; -} - -// SignBytes defines the signed bytes used for signature verification. -message SignBytes { - option (gogoproto.goproto_getters) = false; - - // the sequence number - uint64 sequence = 1; - // the proof timestamp - uint64 timestamp = 2; - // the public key diversifier - string diversifier = 3; - // the standardised path bytes - bytes path = 4; - // the marshaled data bytes - bytes data = 5; -} - -// HeaderData returns the SignBytes data for update verification. -message HeaderData { - option (gogoproto.goproto_getters) = false; - - // header public key - google.protobuf.Any new_pub_key = 1 [(gogoproto.moretags) = "yaml:\"new_pub_key\""]; - // header diversifier - string new_diversifier = 2 [(gogoproto.moretags) = "yaml:\"new_diversifier\""]; -} diff --git a/proto-thirdparty/ibc/lightclients/tendermint/v1/tendermint.proto b/proto-thirdparty/ibc/lightclients/tendermint/v1/tendermint.proto deleted file mode 100644 index 0017fa00..00000000 --- a/proto-thirdparty/ibc/lightclients/tendermint/v1/tendermint.proto +++ /dev/null @@ -1,115 +0,0 @@ -syntax = "proto3"; - -package ibc.lightclients.tendermint.v1; - -option go_package = "github.com/cosmos/ibc-go/v6/modules/light-clients/07-tendermint;tendermint"; - -import "tendermint/types/validator.proto"; -import "tendermint/types/types.proto"; -import "proofs.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; -import "ibc/core/client/v1/client.proto"; -import "ibc/core/commitment/v1/commitment.proto"; -import "gogoproto/gogo.proto"; - -// ClientState from Tendermint tracks the current validator set, latest height, -// and a possible frozen height. -message ClientState { - option (gogoproto.goproto_getters) = false; - - string chain_id = 1; - Fraction trust_level = 2 [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trust_level\""]; - // duration of the period since the LastestTimestamp during which the - // submitted headers are valid for upgrade - google.protobuf.Duration trusting_period = 3 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"trusting_period\""]; - // duration of the staking unbonding period - google.protobuf.Duration unbonding_period = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdduration) = true, - (gogoproto.moretags) = "yaml:\"unbonding_period\"" - ]; - // defines how much new (untrusted) header's Time can drift into the future. - google.protobuf.Duration max_clock_drift = 5 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true, (gogoproto.moretags) = "yaml:\"max_clock_drift\""]; - // Block height when the client was frozen due to a misbehaviour - ibc.core.client.v1.Height frozen_height = 6 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"frozen_height\""]; - // Latest height the client was updated to - ibc.core.client.v1.Height latest_height = 7 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"latest_height\""]; - - // Proof specifications used in verifying counterparty state - repeated ics23.ProofSpec proof_specs = 8 [(gogoproto.moretags) = "yaml:\"proof_specs\""]; - - // Path at which next upgraded client will be committed. - // Each element corresponds to the key for a single CommitmentProof in the - // chained proof. NOTE: ClientState must stored under - // `{upgradePath}/{upgradeHeight}/clientState` ConsensusState must be stored - // under `{upgradepath}/{upgradeHeight}/consensusState` For SDK chains using - // the default upgrade module, upgrade_path should be []string{"upgrade", - // "upgradedIBCState"}` - repeated string upgrade_path = 9 [(gogoproto.moretags) = "yaml:\"upgrade_path\""]; - - // allow_update_after_expiry is deprecated - bool allow_update_after_expiry = 10 [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_expiry\""]; - // allow_update_after_misbehaviour is deprecated - bool allow_update_after_misbehaviour = 11 - [deprecated = true, (gogoproto.moretags) = "yaml:\"allow_update_after_misbehaviour\""]; -} - -// ConsensusState defines the consensus state from Tendermint. -message ConsensusState { - option (gogoproto.goproto_getters) = false; - - // timestamp that corresponds to the block height in which the ConsensusState - // was stored. - google.protobuf.Timestamp timestamp = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - // commitment root (i.e app hash) - ibc.core.commitment.v1.MerkleRoot root = 2 [(gogoproto.nullable) = false]; - bytes next_validators_hash = 3 [ - (gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes", - (gogoproto.moretags) = "yaml:\"next_validators_hash\"" - ]; -} - -// Misbehaviour is a wrapper over two conflicting Headers -// that implements Misbehaviour interface expected by ICS-02 -message Misbehaviour { - option (gogoproto.goproto_getters) = false; - - // ClientID is deprecated - string client_id = 1 [deprecated = true, (gogoproto.moretags) = "yaml:\"client_id\""]; - Header header_1 = 2 [(gogoproto.customname) = "Header1", (gogoproto.moretags) = "yaml:\"header_1\""]; - Header header_2 = 3 [(gogoproto.customname) = "Header2", (gogoproto.moretags) = "yaml:\"header_2\""]; -} - -// Header defines the Tendermint client consensus Header. -// It encapsulates all the information necessary to update from a trusted -// Tendermint ConsensusState. The inclusion of TrustedHeight and -// TrustedValidators allows this update to process correctly, so long as the -// ConsensusState for the TrustedHeight exists, this removes race conditions -// among relayers The SignedHeader and ValidatorSet are the new untrusted update -// fields for the client. The TrustedHeight is the height of a stored -// ConsensusState on the client that will be used to verify the new untrusted -// header. The Trusted ConsensusState must be within the unbonding period of -// current time in order to correctly verify, and the TrustedValidators must -// hash to TrustedConsensusState.NextValidatorsHash since that is the last -// trusted validator set at the TrustedHeight. -message Header { - .tendermint.types.SignedHeader signed_header = 1 - [(gogoproto.embed) = true, (gogoproto.moretags) = "yaml:\"signed_header\""]; - - .tendermint.types.ValidatorSet validator_set = 2 [(gogoproto.moretags) = "yaml:\"validator_set\""]; - ibc.core.client.v1.Height trusted_height = 3 - [(gogoproto.nullable) = false, (gogoproto.moretags) = "yaml:\"trusted_height\""]; - .tendermint.types.ValidatorSet trusted_validators = 4 [(gogoproto.moretags) = "yaml:\"trusted_validators\""]; -} - -// Fraction defines the protobuf message type for tmmath.Fraction that only -// supports positive values. -message Fraction { - uint64 numerator = 1; - uint64 denominator = 2; -} diff --git a/proto-thirdparty/tendermint/abci/types.proto b/proto-thirdparty/tendermint/abci/types.proto deleted file mode 100644 index 8e3a9093..00000000 --- a/proto-thirdparty/tendermint/abci/types.proto +++ /dev/null @@ -1,407 +0,0 @@ -syntax = "proto3"; -package tendermint.abci; - -option go_package = "github.com/tendermint/tendermint/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "tendermint/crypto/proof.proto"; -import "tendermint/types/types.proto"; -import "tendermint/crypto/keys.proto"; -import "tendermint/types/params.proto"; -import "google/protobuf/timestamp.proto"; -import "gogoproto/gogo.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -//---------------------------------------- -// Request types - -message Request { - oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestSetOption set_option = 4; - RequestInitChain init_chain = 5; - RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - RequestCheckTx check_tx = 8; - RequestDeliverTx deliver_tx = 9; - RequestEndBlock end_block = 10; - RequestCommit commit = 11; - RequestListSnapshots list_snapshots = 12; - RequestOfferSnapshot offer_snapshot = 13; - RequestLoadSnapshotChunk load_snapshot_chunk = 14; - RequestApplySnapshotChunk apply_snapshot_chunk = 15; - } -} - -message RequestEcho { - string message = 1; -} - -message RequestFlush {} - -message RequestInfo { - string version = 1; - uint64 block_version = 2; - uint64 p2p_version = 3; -} - -// nondeterministic -message RequestSetOption { - string key = 1; - string value = 2; -} - -message RequestInitChain { - google.protobuf.Timestamp time = 1 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 2; - ConsensusParams consensus_params = 3; - repeated ValidatorUpdate validators = 4 [(gogoproto.nullable) = false]; - bytes app_state_bytes = 5; - int64 initial_height = 6; -} - -message RequestQuery { - bytes data = 1; - string path = 2; - int64 height = 3; - bool prove = 4; -} - -message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; -} - -enum CheckTxType { - NEW = 0 [(gogoproto.enumvalue_customname) = "New"]; - RECHECK = 1 [(gogoproto.enumvalue_customname) = "Recheck"]; -} - -message RequestCheckTx { - bytes tx = 1; - CheckTxType type = 2; -} - -message RequestDeliverTx { - bytes tx = 1; -} - -message RequestEndBlock { - int64 height = 1; -} - -message RequestCommit {} - -// lists available snapshots -message RequestListSnapshots { -} - -// offers a snapshot to the application -message RequestOfferSnapshot { - Snapshot snapshot = 1; // snapshot offered by peers - bytes app_hash = 2; // light client-verified app hash for snapshot height -} - -// loads a snapshot chunk -message RequestLoadSnapshotChunk { - uint64 height = 1; - uint32 format = 2; - uint32 chunk = 3; -} - -// Applies a snapshot chunk -message RequestApplySnapshotChunk { - uint32 index = 1; - bytes chunk = 2; - string sender = 3; -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseSetOption set_option = 5; - ResponseInitChain init_chain = 6; - ResponseQuery query = 7; - ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - ResponseDeliverTx deliver_tx = 10; - ResponseEndBlock end_block = 11; - ResponseCommit commit = 12; - ResponseListSnapshots list_snapshots = 13; - ResponseOfferSnapshot offer_snapshot = 14; - ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - } -} - -// nondeterministic -message ResponseException { - string error = 1; -} - -message ResponseEcho { - string message = 1; -} - -message ResponseFlush {} - -message ResponseInfo { - string data = 1; - - string version = 2; - uint64 app_version = 3; - - int64 last_block_height = 4; - bytes last_block_app_hash = 5; -} - -// nondeterministic -message ResponseSetOption { - uint32 code = 1; - // bytes data = 2; - string log = 3; - string info = 4; -} - -message ResponseInitChain { - ConsensusParams consensus_params = 1; - repeated ValidatorUpdate validators = 2 [(gogoproto.nullable) = false]; - bytes app_hash = 3; -} - -message ResponseQuery { - uint32 code = 1; - // bytes data = 2; // use "value" instead. - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 index = 5; - bytes key = 6; - bytes value = 7; - tendermint.crypto.ProofOps proof_ops = 8; - int64 height = 9; - string codespace = 10; -} - -message ResponseBeginBlock { - repeated Event events = 1 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; -} - -message ResponseDeliverTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic - string codespace = 8; -} - -message ResponseEndBlock { - repeated ValidatorUpdate validator_updates = 1 - [(gogoproto.nullable) = false]; - ConsensusParams consensus_param_updates = 2; - repeated Event events = 3 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; -} - -message ResponseCommit { - // reserve 1 - bytes data = 2; - int64 retain_height = 3; -} - -message ResponseListSnapshots { - repeated Snapshot snapshots = 1; -} - -message ResponseOfferSnapshot { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Snapshot accepted, apply chunks - ABORT = 2; // Abort all snapshot restoration - REJECT = 3; // Reject this specific snapshot, try others - REJECT_FORMAT = 4; // Reject all snapshots of this format, try others - REJECT_SENDER = 5; // Reject all snapshots from the sender(s), try others - } -} - -message ResponseLoadSnapshotChunk { - bytes chunk = 1; -} - -message ResponseApplySnapshotChunk { - Result result = 1; - repeated uint32 refetch_chunks = 2; // Chunks to refetch and reapply - repeated string reject_senders = 3; // Chunk senders to reject and ban - - enum Result { - UNKNOWN = 0; // Unknown result, abort all snapshot restoration - ACCEPT = 1; // Chunk successfully accepted - ABORT = 2; // Abort all snapshot restoration - RETRY = 3; // Retry chunk (combine with refetch and reject) - RETRY_SNAPSHOT = 4; // Retry snapshot (combine with refetch and reject) - REJECT_SNAPSHOT = 5; // Reject this snapshot, try others - } -} - -//---------------------------------------- -// Misc. - -// ConsensusParams contains all consensus-relevant parameters -// that can be adjusted by the abci app -message ConsensusParams { - BlockParams block = 1; - tendermint.types.EvidenceParams evidence = 2; - tendermint.types.ValidatorParams validator = 3; - tendermint.types.VersionParams version = 4; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Note: must be greater than 0 - int64 max_bytes = 1; - // Note: must be greater or equal to -1 - int64 max_gas = 2; -} - -message LastCommitInfo { - int32 round = 1; - repeated VoteInfo votes = 2 [(gogoproto.nullable) = false]; -} - -// Event allows application developers to attach additional information to -// ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and ResponseDeliverTx. -// Later, transactions may be queried using these events. -message Event { - string type = 1; - repeated EventAttribute attributes = 2 [ - (gogoproto.nullable) = false, - (gogoproto.jsontag) = "attributes,omitempty" - ]; -} - -// EventAttribute is a single key-value pair, associated with an event. -message EventAttribute { - bytes key = 1; - bytes value = 2; - bool index = 3; // nondeterministic -} - -// TxResult contains results of executing the transaction. -// -// One usage is indexing transaction results. -message TxResult { - int64 height = 1; - uint32 index = 2; - bytes tx = 3; - ResponseDeliverTx result = 4 [(gogoproto.nullable) = false]; -} - -//---------------------------------------- -// Blockchain Types - -// Validator -message Validator { - bytes address = 1; // The first 20 bytes of SHA256(public key) - // PubKey pub_key = 2 [(gogoproto.nullable)=false]; - int64 power = 3; // The voting power -} - -// ValidatorUpdate -message ValidatorUpdate { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - int64 power = 2; -} - -// VoteInfo -message VoteInfo { - Validator validator = 1 [(gogoproto.nullable) = false]; - bool signed_last_block = 2; -} - -enum EvidenceType { - UNKNOWN = 0; - DUPLICATE_VOTE = 1; - LIGHT_CLIENT_ATTACK = 2; -} - -message Evidence { - EvidenceType type = 1; - // The offending validator - Validator validator = 2 [(gogoproto.nullable) = false]; - // The height when the offense occurred - int64 height = 3; - // The corresponding time where the offense occurred - google.protobuf.Timestamp time = 4 [ - (gogoproto.nullable) = false, - (gogoproto.stdtime) = true - ]; - // Total voting power of the validator set in case the ABCI application does - // not store historical validators. - // https://github.com/tendermint/tendermint/issues/4581 - int64 total_voting_power = 5; -} - -//---------------------------------------- -// State Sync Types - -message Snapshot { - uint64 height = 1; // The height at which the snapshot was taken - uint32 format = 2; // The application-specific snapshot format - uint32 chunks = 3; // Number of chunks in the snapshot - bytes hash = 4; // Arbitrary snapshot hash, equal only if identical - bytes metadata = 5; // Arbitrary application metadata -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(RequestEcho) returns (ResponseEcho); - rpc Flush(RequestFlush) returns (ResponseFlush); - rpc Info(RequestInfo) returns (ResponseInfo); - rpc SetOption(RequestSetOption) returns (ResponseSetOption); - rpc DeliverTx(RequestDeliverTx) returns (ResponseDeliverTx); - rpc CheckTx(RequestCheckTx) returns (ResponseCheckTx); - rpc Query(RequestQuery) returns (ResponseQuery); - rpc Commit(RequestCommit) returns (ResponseCommit); - rpc InitChain(RequestInitChain) returns (ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (ResponseBeginBlock); - rpc EndBlock(RequestEndBlock) returns (ResponseEndBlock); - rpc ListSnapshots(RequestListSnapshots) returns (ResponseListSnapshots); - rpc OfferSnapshot(RequestOfferSnapshot) returns (ResponseOfferSnapshot); - rpc LoadSnapshotChunk(RequestLoadSnapshotChunk) returns (ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(RequestApplySnapshotChunk) returns (ResponseApplySnapshotChunk); -} diff --git a/proto-thirdparty/tendermint/blockchain/types.proto b/proto-thirdparty/tendermint/blockchain/types.proto deleted file mode 100644 index f5c143cf..00000000 --- a/proto-thirdparty/tendermint/blockchain/types.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.blockchain; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/blockchain"; - -import "tendermint/types/block.proto"; - -// BlockRequest requests a block for a specific height -message BlockRequest { - int64 height = 1; -} - -// NoBlockResponse informs the node that the peer does not have block at the requested height -message NoBlockResponse { - int64 height = 1; -} - -// BlockResponse returns block to the requested -message BlockResponse { - tendermint.types.Block block = 1; -} - -// StatusRequest requests the status of a peer. -message StatusRequest { -} - -// StatusResponse is a peer response to inform their status. -message StatusResponse { - int64 height = 1; - int64 base = 2; -} - -message Message { - oneof sum { - BlockRequest block_request = 1; - NoBlockResponse no_block_response = 2; - BlockResponse block_response = 3; - StatusRequest status_request = 4; - StatusResponse status_response = 5; - } -} diff --git a/proto-thirdparty/tendermint/consensus/types.proto b/proto-thirdparty/tendermint/consensus/types.proto deleted file mode 100644 index 6e1f4137..00000000 --- a/proto-thirdparty/tendermint/consensus/types.proto +++ /dev/null @@ -1,92 +0,0 @@ -syntax = "proto3"; -package tendermint.consensus; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/consensus"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/libs/bits/types.proto"; - -// NewRoundStep is sent for every step taken in the ConsensusState. -// For every height/round/step transition -message NewRoundStep { - int64 height = 1; - int32 round = 2; - uint32 step = 3; - int64 seconds_since_start_time = 4; - int32 last_commit_round = 5; -} - -// NewValidBlock is sent when a validator observes a valid block B in some round r, -//i.e., there is a Proposal for block B and 2/3+ prevotes for the block B in the round r. -// In case the block is also committed, then IsCommit flag is set to true. -message NewValidBlock { - int64 height = 1; - int32 round = 2; - tendermint.types.PartSetHeader block_part_set_header = 3 [(gogoproto.nullable) = false]; - tendermint.libs.bits.BitArray block_parts = 4; - bool is_commit = 5; -} - -// Proposal is sent when a new block is proposed. -message Proposal { - tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; -} - -// ProposalPOL is sent when a previous proposal is re-proposed. -message ProposalPOL { - int64 height = 1; - int32 proposal_pol_round = 2; - tendermint.libs.bits.BitArray proposal_pol = 3 [(gogoproto.nullable) = false]; -} - -// BlockPart is sent when gossipping a piece of the proposed block. -message BlockPart { - int64 height = 1; - int32 round = 2; - tendermint.types.Part part = 3 [(gogoproto.nullable) = false]; -} - -// Vote is sent when voting for a proposal (or lack thereof). -message Vote { - tendermint.types.Vote vote = 1; -} - -// HasVote is sent to indicate that a particular vote has been received. -message HasVote { - int64 height = 1; - int32 round = 2; - tendermint.types.SignedMsgType type = 3; - int32 index = 4; -} - -// VoteSetMaj23 is sent to indicate that a given BlockID has seen +2/3 votes. -message VoteSetMaj23 { - int64 height = 1; - int32 round = 2; - tendermint.types.SignedMsgType type = 3; - tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; -} - -// VoteSetBits is sent to communicate the bit-array of votes seen for the BlockID. -message VoteSetBits { - int64 height = 1; - int32 round = 2; - tendermint.types.SignedMsgType type = 3; - tendermint.types.BlockID block_id = 4 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - tendermint.libs.bits.BitArray votes = 5 [(gogoproto.nullable) = false]; -} - -message Message { - oneof sum { - NewRoundStep new_round_step = 1; - NewValidBlock new_valid_block = 2; - Proposal proposal = 3; - ProposalPOL proposal_pol = 4; - BlockPart block_part = 5; - Vote vote = 6; - HasVote has_vote = 7; - VoteSetMaj23 vote_set_maj23 = 8; - VoteSetBits vote_set_bits = 9; - } -} diff --git a/proto-thirdparty/tendermint/consensus/wal.proto b/proto-thirdparty/tendermint/consensus/wal.proto deleted file mode 100644 index 44afa2c0..00000000 --- a/proto-thirdparty/tendermint/consensus/wal.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package tendermint.consensus; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/consensus"; - -import "gogoproto/gogo.proto"; -import "tendermint/consensus/types.proto"; -import "tendermint/types/events.proto"; -import "google/protobuf/duration.proto"; -import "google/protobuf/timestamp.proto"; - -// MsgInfo are msgs from the reactor which may update the state -message MsgInfo { - Message msg = 1 [(gogoproto.nullable) = false]; - string peer_id = 2 [(gogoproto.customname) = "PeerID"]; -} - -// TimeoutInfo internally generated messages which may update the state -message TimeoutInfo { - google.protobuf.Duration duration = 1 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - int64 height = 2; - int32 round = 3; - uint32 step = 4; -} - -// EndHeight marks the end of the given height inside WAL. -// @internal used by scripts/wal2json util. -message EndHeight { - int64 height = 1; -} - -message WALMessage { - oneof sum { - tendermint.types.EventDataRoundState event_data_round_state = 1; - MsgInfo msg_info = 2; - TimeoutInfo timeout_info = 3; - EndHeight end_height = 4; - } -} - -// TimedWALMessage wraps WALMessage and adds Time for debugging purposes. -message TimedWALMessage { - google.protobuf.Timestamp time = 1 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - WALMessage msg = 2; -} diff --git a/proto-thirdparty/tendermint/crypto/keys.proto b/proto-thirdparty/tendermint/crypto/keys.proto deleted file mode 100644 index 16fd7adf..00000000 --- a/proto-thirdparty/tendermint/crypto/keys.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -// PublicKey defines the keys available for use with Tendermint Validators -message PublicKey { - option (gogoproto.compare) = true; - option (gogoproto.equal) = true; - - oneof sum { - bytes ed25519 = 1; - bytes secp256k1 = 2; - } -} diff --git a/proto-thirdparty/tendermint/crypto/proof.proto b/proto-thirdparty/tendermint/crypto/proof.proto deleted file mode 100644 index 975df768..00000000 --- a/proto-thirdparty/tendermint/crypto/proof.proto +++ /dev/null @@ -1,41 +0,0 @@ -syntax = "proto3"; -package tendermint.crypto; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/crypto"; - -import "gogoproto/gogo.proto"; - -message Proof { - int64 total = 1; - int64 index = 2; - bytes leaf_hash = 3; - repeated bytes aunts = 4; -} - -message ValueOp { - // Encoded in ProofOp.Key. - bytes key = 1; - - // To encode in ProofOp.Data - Proof proof = 2; -} - -message DominoOp { - string key = 1; - string input = 2; - string output = 3; -} - -// ProofOp defines an operation used for calculating Merkle root -// The data could be arbitrary format, providing nessecary data -// for example neighbouring node hash -message ProofOp { - string type = 1; - bytes key = 2; - bytes data = 3; -} - -// ProofOps is Merkle proof defined by the list of ProofOps -message ProofOps { - repeated ProofOp ops = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/tendermint/libs/bits/types.proto b/proto-thirdparty/tendermint/libs/bits/types.proto deleted file mode 100644 index 3111d113..00000000 --- a/proto-thirdparty/tendermint/libs/bits/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.libs.bits; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/libs/bits"; - -message BitArray { - int64 bits = 1; - repeated uint64 elems = 2; -} diff --git a/proto-thirdparty/tendermint/mempool/types.proto b/proto-thirdparty/tendermint/mempool/types.proto deleted file mode 100644 index b55d9717..00000000 --- a/proto-thirdparty/tendermint/mempool/types.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package tendermint.mempool; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/mempool"; - -message Txs { - repeated bytes txs = 1; -} - -message Message { - oneof sum { - Txs txs = 1; - } -} diff --git a/proto-thirdparty/tendermint/p2p/conn.proto b/proto-thirdparty/tendermint/p2p/conn.proto deleted file mode 100644 index b12de6c8..00000000 --- a/proto-thirdparty/tendermint/p2p/conn.proto +++ /dev/null @@ -1,30 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -message PacketPing {} - -message PacketPong {} - -message PacketMsg { - int32 channel_id = 1 [(gogoproto.customname) = "ChannelID"]; - bool eof = 2 [(gogoproto.customname) = "EOF"]; - bytes data = 3; -} - -message Packet { - oneof sum { - PacketPing packet_ping = 1; - PacketPong packet_pong = 2; - PacketMsg packet_msg = 3; - } -} - -message AuthSigMessage { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - bytes sig = 2; -} diff --git a/proto-thirdparty/tendermint/p2p/pex.proto b/proto-thirdparty/tendermint/p2p/pex.proto deleted file mode 100644 index dfe238db..00000000 --- a/proto-thirdparty/tendermint/p2p/pex.proto +++ /dev/null @@ -1,20 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "tendermint/p2p/types.proto"; -import "gogoproto/gogo.proto"; - -message PexRequest {} - -message PexAddrs { - repeated NetAddress addrs = 1 [(gogoproto.nullable) = false]; -} - -message Message { - oneof sum { - PexRequest pex_request = 1; - PexAddrs pex_addrs = 2; - } -} diff --git a/proto-thirdparty/tendermint/p2p/types.proto b/proto-thirdparty/tendermint/p2p/types.proto deleted file mode 100644 index 0d42ea40..00000000 --- a/proto-thirdparty/tendermint/p2p/types.proto +++ /dev/null @@ -1,34 +0,0 @@ -syntax = "proto3"; -package tendermint.p2p; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/p2p"; - -import "gogoproto/gogo.proto"; - -message NetAddress { - string id = 1 [(gogoproto.customname) = "ID"]; - string ip = 2 [(gogoproto.customname) = "IP"]; - uint32 port = 3; -} - -message ProtocolVersion { - uint64 p2p = 1 [(gogoproto.customname) = "P2P"]; - uint64 block = 2; - uint64 app = 3; -} - -message DefaultNodeInfo { - ProtocolVersion protocol_version = 1 [(gogoproto.nullable) = false]; - string default_node_id = 2 [(gogoproto.customname) = "DefaultNodeID"]; - string listen_addr = 3; - string network = 4; - string version = 5; - bytes channels = 6; - string moniker = 7; - DefaultNodeInfoOther other = 8 [(gogoproto.nullable) = false]; -} - -message DefaultNodeInfoOther { - string tx_index = 1; - string rpc_address = 2 [(gogoproto.customname) = "RPCAddress"]; -} diff --git a/proto-thirdparty/tendermint/privval/types.proto b/proto-thirdparty/tendermint/privval/types.proto deleted file mode 100644 index 0fc8b61d..00000000 --- a/proto-thirdparty/tendermint/privval/types.proto +++ /dev/null @@ -1,76 +0,0 @@ -syntax = "proto3"; -package tendermint.privval; - -import "tendermint/crypto/keys.proto"; -import "tendermint/types/types.proto"; -import "gogoproto/gogo.proto"; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/privval"; - -enum Errors { - ERRORS_UNKNOWN = 0; - ERRORS_UNEXPECTED_RESPONSE = 1; - ERRORS_NO_CONNECTION = 2; - ERRORS_CONNECTION_TIMEOUT = 3; - ERRORS_READ_TIMEOUT = 4; - ERRORS_WRITE_TIMEOUT = 5; -} - -message RemoteSignerError { - int32 code = 1; - string description = 2; -} - -// PubKeyRequest requests the consensus public key from the remote signer. -message PubKeyRequest { - string chain_id = 1; -} - -// PubKeyResponse is a response message containing the public key. -message PubKeyResponse { - tendermint.crypto.PublicKey pub_key = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; -} - -// SignVoteRequest is a request to sign a vote -message SignVoteRequest { - tendermint.types.Vote vote = 1; - string chain_id = 2; -} - -// SignedVoteResponse is a response containing a signed vote or an error -message SignedVoteResponse { - tendermint.types.Vote vote = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; -} - -// SignProposalRequest is a request to sign a proposal -message SignProposalRequest { - tendermint.types.Proposal proposal = 1; - string chain_id = 2; -} - -// SignedProposalResponse is response containing a signed proposal or an error -message SignedProposalResponse { - tendermint.types.Proposal proposal = 1 [(gogoproto.nullable) = false]; - RemoteSignerError error = 2; -} - -// PingRequest is a request to confirm that the connection is alive. -message PingRequest {} - -// PingResponse is a response to confirm that the connection is alive. -message PingResponse {} - -message Message { - oneof sum { - PubKeyRequest pub_key_request = 1; - PubKeyResponse pub_key_response = 2; - SignVoteRequest sign_vote_request = 3; - SignedVoteResponse signed_vote_response = 4; - SignProposalRequest sign_proposal_request = 5; - SignedProposalResponse signed_proposal_response = 6; - PingRequest ping_request = 7; - PingResponse ping_response = 8; - } -} diff --git a/proto-thirdparty/tendermint/rpc/grpc/types.proto b/proto-thirdparty/tendermint/rpc/grpc/types.proto deleted file mode 100644 index ee948a40..00000000 --- a/proto-thirdparty/tendermint/rpc/grpc/types.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package tendermint.rpc.grpc; -option go_package = "github.com/tendermint/tendermint/rpc/grpc;coregrpc"; - -import "tendermint/abci/types.proto"; - -//---------------------------------------- -// Request types - -message RequestPing {} - -message RequestBroadcastTx { - bytes tx = 1; -} - -//---------------------------------------- -// Response types - -message ResponsePing {} - -message ResponseBroadcastTx { - tendermint.abci.ResponseCheckTx check_tx = 1; - tendermint.abci.ResponseDeliverTx deliver_tx = 2; -} - -//---------------------------------------- -// Service Definition - -service BroadcastAPI { - rpc Ping(RequestPing) returns (ResponsePing); - rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx); -} diff --git a/proto-thirdparty/tendermint/state/types.proto b/proto-thirdparty/tendermint/state/types.proto deleted file mode 100644 index 919da91e..00000000 --- a/proto-thirdparty/tendermint/state/types.proto +++ /dev/null @@ -1,75 +0,0 @@ -syntax = "proto3"; -package tendermint.state; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/state"; - -import "gogoproto/gogo.proto"; -import "tendermint/abci/types.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; -import "tendermint/types/params.proto"; -import "tendermint/version/types.proto"; -import "google/protobuf/timestamp.proto"; - -// ABCIResponses retains the responses -// of the various ABCI calls during block processing. -// It is persisted to disk for each height before calling Commit. -message ABCIResponses { - repeated tendermint.abci.ResponseDeliverTx deliver_txs = 1; - tendermint.abci.ResponseEndBlock end_block = 2; - tendermint.abci.ResponseBeginBlock begin_block = 3; -} - -// ValidatorsInfo represents the latest validator set, or the last height it changed -message ValidatorsInfo { - tendermint.types.ValidatorSet validator_set = 1; - int64 last_height_changed = 2; -} - -// ConsensusParamsInfo represents the latest consensus params, or the last height it changed -message ConsensusParamsInfo { - tendermint.types.ConsensusParams consensus_params = 1 [(gogoproto.nullable) = false]; - int64 last_height_changed = 2; -} - -message Version { - tendermint.version.Consensus consensus = 1 [(gogoproto.nullable) = false]; - string software = 2; -} - -message State { - Version version = 1 [(gogoproto.nullable) = false]; - - // immutable - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 initial_height = 14; - - // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - int64 last_block_height = 3; - tendermint.types.BlockID last_block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; - google.protobuf.Timestamp last_block_time = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // LastValidators is used to validate block.LastCommit. - // Validators are persisted to the database separately every time they change, - // so we can query for historical validator sets. - // Note that if s.LastBlockHeight causes a valset change, - // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 - // Extra +1 due to nextValSet delay. - tendermint.types.ValidatorSet next_validators = 6; - tendermint.types.ValidatorSet validators = 7; - tendermint.types.ValidatorSet last_validators = 8; - int64 last_height_validators_changed = 9; - - // Consensus parameters used for validating blocks. - // Changes returned by EndBlock and updated after Commit. - tendermint.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; - int64 last_height_consensus_params_changed = 11; - - // Merkle root of the results from executing prev block - bytes last_results_hash = 12; - - // the latest AppHash we've received from calling abci.Commit() - bytes app_hash = 13; -} diff --git a/proto-thirdparty/tendermint/statesync/types.proto b/proto-thirdparty/tendermint/statesync/types.proto deleted file mode 100644 index 8d4a714c..00000000 --- a/proto-thirdparty/tendermint/statesync/types.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; -package tendermint.statesync; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/statesync"; - -message Message { - oneof sum { - SnapshotsRequest snapshots_request = 1; - SnapshotsResponse snapshots_response = 2; - ChunkRequest chunk_request = 3; - ChunkResponse chunk_response = 4; - } -} - -message SnapshotsRequest {} - -message SnapshotsResponse { - uint64 height = 1; - uint32 format = 2; - uint32 chunks = 3; - bytes hash = 4; - bytes metadata = 5; -} - -message ChunkRequest { - uint64 height = 1; - uint32 format = 2; - uint32 index = 3; -} - -message ChunkResponse { - uint64 height = 1; - uint32 format = 2; - uint32 index = 3; - bytes chunk = 4; - bool missing = 5; -} diff --git a/proto-thirdparty/tendermint/store/types.proto b/proto-thirdparty/tendermint/store/types.proto deleted file mode 100644 index af2f97ad..00000000 --- a/proto-thirdparty/tendermint/store/types.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; -package tendermint.store; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/store"; - -message BlockStoreState { - int64 base = 1; - int64 height = 2; -} diff --git a/proto-thirdparty/tendermint/types/block.proto b/proto-thirdparty/tendermint/types/block.proto deleted file mode 100644 index 84e9bb15..00000000 --- a/proto-thirdparty/tendermint/types/block.proto +++ /dev/null @@ -1,15 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/evidence.proto"; - -message Block { - Header header = 1 [(gogoproto.nullable) = false]; - Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - Commit last_commit = 4; -} diff --git a/proto-thirdparty/tendermint/types/canonical.proto b/proto-thirdparty/tendermint/types/canonical.proto deleted file mode 100644 index e88fd6ff..00000000 --- a/proto-thirdparty/tendermint/types/canonical.proto +++ /dev/null @@ -1,37 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/types.proto"; -import "google/protobuf/timestamp.proto"; - -message CanonicalBlockID { - bytes hash = 1; - CanonicalPartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -message CanonicalPartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message CanonicalProposal { - SignedMsgType type = 1; // type alias for byte - sfixed64 height = 2; // canonicalization requires fixed size encoding here - sfixed64 round = 3; // canonicalization requires fixed size encoding here - int64 pol_round = 4 [(gogoproto.customname) = "POLRound"]; - CanonicalBlockID block_id = 5 [(gogoproto.customname) = "BlockID"]; - google.protobuf.Timestamp timestamp = 6 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 7 [(gogoproto.customname) = "ChainID"]; -} - -message CanonicalVote { - SignedMsgType type = 1; // type alias for byte - sfixed64 height = 2; // canonicalization requires fixed size encoding here - sfixed64 round = 3; // canonicalization requires fixed size encoding here - CanonicalBlockID block_id = 4 [(gogoproto.customname) = "BlockID"]; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - string chain_id = 6 [(gogoproto.customname) = "ChainID"]; -} diff --git a/proto-thirdparty/tendermint/types/events.proto b/proto-thirdparty/tendermint/types/events.proto deleted file mode 100644 index a1e5cc49..00000000 --- a/proto-thirdparty/tendermint/types/events.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -message EventDataRoundState { - int64 height = 1; - int32 round = 2; - string step = 3; -} diff --git a/proto-thirdparty/tendermint/types/evidence.proto b/proto-thirdparty/tendermint/types/evidence.proto deleted file mode 100644 index 3b234571..00000000 --- a/proto-thirdparty/tendermint/types/evidence.proto +++ /dev/null @@ -1,38 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/types/types.proto"; -import "tendermint/types/validator.proto"; - -message Evidence { - oneof sum { - DuplicateVoteEvidence duplicate_vote_evidence = 1; - LightClientAttackEvidence light_client_attack_evidence = 2; - } -} - -// DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. -message DuplicateVoteEvidence { - tendermint.types.Vote vote_a = 1; - tendermint.types.Vote vote_b = 2; - int64 total_voting_power = 3; - int64 validator_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -// LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. -message LightClientAttackEvidence { - tendermint.types.LightBlock conflicting_block = 1; - int64 common_height = 2; - repeated tendermint.types.Validator byzantine_validators = 3; - int64 total_voting_power = 4; - google.protobuf.Timestamp timestamp = 5 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; -} - -message EvidenceList { - repeated Evidence evidence = 1 [(gogoproto.nullable) = false]; -} diff --git a/proto-thirdparty/tendermint/types/params.proto b/proto-thirdparty/tendermint/types/params.proto deleted file mode 100644 index 0de7d846..00000000 --- a/proto-thirdparty/tendermint/types/params.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/duration.proto"; - -option (gogoproto.equal_all) = true; - -// ConsensusParams contains consensus critical parameters that determine the -// validity of blocks. -message ConsensusParams { - BlockParams block = 1 [(gogoproto.nullable) = false]; - EvidenceParams evidence = 2 [(gogoproto.nullable) = false]; - ValidatorParams validator = 3 [(gogoproto.nullable) = false]; - VersionParams version = 4 [(gogoproto.nullable) = false]; -} - -// BlockParams contains limits on the block size. -message BlockParams { - // Max block size, in bytes. - // Note: must be greater than 0 - int64 max_bytes = 1; - // Max gas per block. - // Note: must be greater or equal to -1 - int64 max_gas = 2; - // Minimum time increment between consecutive blocks (in milliseconds) If the - // block header timestamp is ahead of the system clock, decrease this value. - // - // Not exposed to the application. - int64 time_iota_ms = 3; -} - -// EvidenceParams determine how we handle evidence of malfeasance. -message EvidenceParams { - // Max age of evidence, in blocks. - // - // The basic formula for calculating this is: MaxAgeDuration / {average block - // time}. - int64 max_age_num_blocks = 1; - - // Max age of evidence, in time. - // - // It should correspond with an app's "unbonding period" or other similar - // mechanism for handling [Nothing-At-Stake - // attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - google.protobuf.Duration max_age_duration = 2 - [(gogoproto.nullable) = false, (gogoproto.stdduration) = true]; - - // This sets the maximum size of total evidence in bytes that can be committed in a single block. - // and should fall comfortably under the max block bytes. - // Default is 1048576 or 1MB - int64 max_bytes = 3; -} - -// ValidatorParams restrict the public key types validators can use. -// NOTE: uses ABCI pubkey naming, not Amino names. -message ValidatorParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - repeated string pub_key_types = 1; -} - -// VersionParams contains the ABCI application version. -message VersionParams { - option (gogoproto.populate) = true; - option (gogoproto.equal) = true; - - uint64 app_version = 1; -} - -// HashedParams is a subset of ConsensusParams. -// -// It is hashed into the Header.ConsensusHash. -message HashedParams { - int64 block_max_bytes = 1; - int64 block_max_gas = 2; -} diff --git a/proto-thirdparty/tendermint/types/types.proto b/proto-thirdparty/tendermint/types/types.proto deleted file mode 100644 index 7f7ea74c..00000000 --- a/proto-thirdparty/tendermint/types/types.proto +++ /dev/null @@ -1,157 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/crypto/proof.proto"; -import "tendermint/version/types.proto"; -import "tendermint/types/validator.proto"; - -// BlockIdFlag indicates which BlcokID the signature is for -enum BlockIDFlag { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - BLOCK_ID_FLAG_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "BlockIDFlagUnknown"]; - BLOCK_ID_FLAG_ABSENT = 1 [(gogoproto.enumvalue_customname) = "BlockIDFlagAbsent"]; - BLOCK_ID_FLAG_COMMIT = 2 [(gogoproto.enumvalue_customname) = "BlockIDFlagCommit"]; - BLOCK_ID_FLAG_NIL = 3 [(gogoproto.enumvalue_customname) = "BlockIDFlagNil"]; -} - -// SignedMsgType is a type of signed message in the consensus. -enum SignedMsgType { - option (gogoproto.goproto_enum_stringer) = true; - option (gogoproto.goproto_enum_prefix) = false; - - SIGNED_MSG_TYPE_UNKNOWN = 0 [(gogoproto.enumvalue_customname) = "UnknownType"]; - // Votes - SIGNED_MSG_TYPE_PREVOTE = 1 [(gogoproto.enumvalue_customname) = "PrevoteType"]; - SIGNED_MSG_TYPE_PRECOMMIT = 2 [(gogoproto.enumvalue_customname) = "PrecommitType"]; - - // Proposals - SIGNED_MSG_TYPE_PROPOSAL = 32 [(gogoproto.enumvalue_customname) = "ProposalType"]; -} - -// PartsetHeader -message PartSetHeader { - uint32 total = 1; - bytes hash = 2; -} - -message Part { - uint32 index = 1; - bytes bytes = 2; - tendermint.crypto.Proof proof = 3 [(gogoproto.nullable) = false]; -} - -// BlockID -message BlockID { - bytes hash = 1; - PartSetHeader part_set_header = 2 [(gogoproto.nullable) = false]; -} - -// -------------------------------- - -// Header defines the structure of a Tendermint block header. -message Header { - // basic block info - tendermint.version.Consensus version = 1 [(gogoproto.nullable) = false]; - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 height = 3; - google.protobuf.Timestamp time = 4 [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // prev block info - BlockID last_block_id = 5 [(gogoproto.nullable) = false]; - - // hashes of block data - bytes last_commit_hash = 6; // commit from validators from the last block - bytes data_hash = 7; // transactions - - // hashes from the app output from the prev block - bytes validators_hash = 8; // validators for the current block - bytes next_validators_hash = 9; // validators for the next block - bytes consensus_hash = 10; // consensus params for current block - bytes app_hash = 11; // state after txs from the previous block - bytes last_results_hash = 12; // root hash of all results from the txs from the previous block - - // consensus info - bytes evidence_hash = 13; // evidence included in the block - bytes proposer_address = 14; // original proposer of the block -} - -// Data contains the set of transactions included in the block -message Data { - // Txs that will be applied by state @ block.Height+1. - // NOTE: not all txs here are valid. We're just agreeing on the order first. - // This means that block.AppHash does not include these txs. - repeated bytes txs = 1; -} - -// Vote represents a prevote, precommit, or commit vote from validators for -// consensus. -message Vote { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - BlockID block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; // zero if vote is nil. - google.protobuf.Timestamp timestamp = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes validator_address = 6; - int32 validator_index = 7; - bytes signature = 8; -} - -// Commit contains the evidence that a block was committed by a set of validators. -message Commit { - int64 height = 1; - int32 round = 2; - BlockID block_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "BlockID"]; - repeated CommitSig signatures = 4 [(gogoproto.nullable) = false]; -} - -// CommitSig is a part of the Vote included in a Commit. -message CommitSig { - BlockIDFlag block_id_flag = 1; - bytes validator_address = 2; - google.protobuf.Timestamp timestamp = 3 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 4; -} - -message Proposal { - SignedMsgType type = 1; - int64 height = 2; - int32 round = 3; - int32 pol_round = 4; - BlockID block_id = 5 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - google.protobuf.Timestamp timestamp = 6 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - bytes signature = 7; -} - -message SignedHeader { - Header header = 1; - Commit commit = 2; -} - -message LightBlock { - SignedHeader signed_header = 1; - tendermint.types.ValidatorSet validator_set = 2; -} - -message BlockMeta { - BlockID block_id = 1 [(gogoproto.customname) = "BlockID", (gogoproto.nullable) = false]; - int64 block_size = 2; - Header header = 3 [(gogoproto.nullable) = false]; - int64 num_txs = 4; -} - -// TxProof represents a Merkle proof of the presence of a transaction in the Merkle tree. -message TxProof { - bytes root_hash = 1; - bytes data = 2; - tendermint.crypto.Proof proof = 3; -} diff --git a/proto-thirdparty/tendermint/types/validator.proto b/proto-thirdparty/tendermint/types/validator.proto deleted file mode 100644 index 49860b96..00000000 --- a/proto-thirdparty/tendermint/types/validator.proto +++ /dev/null @@ -1,25 +0,0 @@ -syntax = "proto3"; -package tendermint.types; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/types"; - -import "gogoproto/gogo.proto"; -import "tendermint/crypto/keys.proto"; - -message ValidatorSet { - repeated Validator validators = 1; - Validator proposer = 2; - int64 total_voting_power = 3; -} - -message Validator { - bytes address = 1; - tendermint.crypto.PublicKey pub_key = 2 [(gogoproto.nullable) = false]; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -message SimpleValidator { - tendermint.crypto.PublicKey pub_key = 1; - int64 voting_power = 2; -} diff --git a/proto-thirdparty/tendermint/version/types.proto b/proto-thirdparty/tendermint/version/types.proto deleted file mode 100644 index 6061868b..00000000 --- a/proto-thirdparty/tendermint/version/types.proto +++ /dev/null @@ -1,24 +0,0 @@ -syntax = "proto3"; -package tendermint.version; - -option go_package = "github.com/tendermint/tendermint/proto/tendermint/version"; - -import "gogoproto/gogo.proto"; - -// App includes the protocol and software version for the application. -// This information is included in ResponseInfo. The App.Protocol can be -// updated in ResponseEndBlock. -message App { - uint64 protocol = 1; - string software = 2; -} - -// Consensus captures the consensus rules for processing a block in the blockchain, -// including all blockchain data structures and the rules of the application's -// state transition machine. -message Consensus { - option (gogoproto.equal) = true; - - uint64 block = 1; - uint64 app = 2; -} diff --git a/setup/docker-compose.yml b/setup/docker-compose.yml index 4df9c980..8dcb1572 100644 --- a/setup/docker-compose.yml +++ b/setup/docker-compose.yml @@ -5,15 +5,12 @@ services: container_name: neutron-node volumes: - data:/opt/neutron/data - - ../contracts/:/opt/neutron/contracts ports: - 1317:1317 - 26657:26657 - 26656:26656 - 8090:9090 environment: - - CONTRACTS_BINARIES_DIR=/opt/neutron/contracts - - THIRD_PARTY_CONTRACTS_DIR=/opt/neutron/contracts_thirdparty - RUN_BACKGROUND=0 networks: - neutron-testing diff --git a/setup/dockerbuilds/Dockerfile.gaia b/setup/dockerbuilds/Dockerfile.gaia index 27564a45..0ba48060 100644 --- a/setup/dockerbuilds/Dockerfile.gaia +++ b/setup/dockerbuilds/Dockerfile.gaia @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -FROM golang:1.18-alpine AS builder +FROM golang:1.20-alpine AS builder RUN apk upgrade -U -a WORKDIR /src/app/ COPY --from=app go.mod go.sum* ./ diff --git a/src/generated/admin/proto.cjs b/src/generated/admin/proto.cjs deleted file mode 100644 index 52fa63d9..00000000 --- a/src/generated/admin/proto.cjs +++ /dev/null @@ -1,16686 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots["@cosmos-client/ibc"] || ($protobuf.roots["@cosmos-client/ibc"] = {}); - - $root.cosmos = (function() { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - var cosmos = {}; - - cosmos.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos - * @namespace - */ - var adminmodule = {}; - - adminmodule.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos.adminmodule - * @namespace - */ - var adminmodule = {}; - - adminmodule.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#deleteAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef DeleteAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} [response] MsgDeleteAdminResponse - */ - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.DeleteAdminCallback} callback Node-style callback called with the error, if any, and MsgDeleteAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.deleteAdmin = function deleteAdmin(request, callback) { - return this.rpcCall(deleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse, request, callback); - }, "name", { value: "DeleteAdmin" }); - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#addAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef AddAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} [response] MsgAddAdminResponse - */ - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.AddAdminCallback} callback Node-style callback called with the error, if any, and MsgAddAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.addAdmin = function addAdmin(request, callback) { - return this.rpcCall(addAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse, request, callback); - }, "name", { value: "AddAdmin" }); - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposal}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef SubmitProposalCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} [response] MsgSubmitProposalResponse - */ - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { - return this.rpcCall(submitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse, request, callback); - }, "name", { value: "SubmitProposal" }); - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - adminmodule.MsgDeleteAdmin = (function() { - - /** - * Properties of a MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdmin - * @property {string|null} [creator] MsgDeleteAdmin creator - * @property {string|null} [admin] MsgDeleteAdmin admin - */ - - /** - * Constructs a new MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdmin. - * @implements IMsgDeleteAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin=} [properties] Properties to set - */ - function MsgDeleteAdmin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgDeleteAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.creator = ""; - - /** - * MsgDeleteAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgDeleteAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - */ - MsgDeleteAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgDeleteAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} message MsgDeleteAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgDeleteAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdmin; - })(); - - adminmodule.MsgDeleteAdminResponse = (function() { - - /** - * Properties of a MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdminResponse - */ - - /** - * Constructs a new MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdminResponse. - * @implements IMsgDeleteAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse=} [properties] Properties to set - */ - function MsgDeleteAdminResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgDeleteAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - */ - MsgDeleteAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - }; - - /** - * Creates a plain object from a MsgDeleteAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} message MsgDeleteAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgDeleteAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdminResponse; - })(); - - adminmodule.MsgAddAdmin = (function() { - - /** - * Properties of a MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdmin - * @property {string|null} [creator] MsgAddAdmin creator - * @property {string|null} [admin] MsgAddAdmin admin - */ - - /** - * Constructs a new MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdmin. - * @implements IMsgAddAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin=} [properties] Properties to set - */ - function MsgAddAdmin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAddAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.creator = ""; - - /** - * MsgAddAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgAddAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgAddAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgAddAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - */ - MsgAddAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdmin) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgAddAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdmin} message MsgAddAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgAddAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdmin; - })(); - - adminmodule.MsgAddAdminResponse = (function() { - - /** - * Properties of a MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdminResponse - */ - - /** - * Constructs a new MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdminResponse. - * @implements IMsgAddAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse=} [properties] Properties to set - */ - function MsgAddAdminResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgAddAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgAddAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgAddAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - */ - MsgAddAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - }; - - /** - * Creates a plain object from a MsgAddAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} message MsgAddAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgAddAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdminResponse; - })(); - - adminmodule.MsgSubmitProposal = (function() { - - /** - * Properties of a MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposal - * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content - * @property {string|null} [proposer] MsgSubmitProposal proposer - */ - - /** - * Constructs a new MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposal. - * @implements IMsgSubmitProposal - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal=} [properties] Properties to set - */ - function MsgSubmitProposal(properties) { - if (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.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.content = null; - - /** - * MsgSubmitProposal proposer. - * @member {string} proposer - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.proposer = ""; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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: - message.proposer = reader.string(); - 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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposal} MsgSubmitProposal - */ - MsgSubmitProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal(); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposal.content: object expected"); - message.content = $root.google.protobuf.Any.fromObject(object.content); - } - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.defaults) { - object.content = null; - object.proposer = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.protobuf.Any.toObject(message.content, options); - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposal; - })(); - - adminmodule.MsgSubmitProposalResponse = (function() { - - /** - * Properties of a MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalResponse - * @property {Long|null} [proposal_id] MsgSubmitProposalResponse proposal_id - */ - - /** - * Constructs a new MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalResponse. - * @implements IMsgSubmitProposalResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse=} [properties] Properties to set - */ - function MsgSubmitProposalResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalResponse proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - */ - MsgSubmitProposalResponse.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - */ - MsgSubmitProposalResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} message MsgSubmitProposalResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalResponse.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.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - return object; - }; - - /** - * Converts this MsgSubmitProposalResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalResponse; - })(); - - adminmodule.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof cosmos.adminmodule.adminmodule - * @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; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#admins}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef AdminsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} [response] QueryAdminsResponse - */ - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.AdminsCallback} callback Node-style callback called with the error, if any, and QueryAdminsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.admins = function admins(request, callback) { - return this.rpcCall(admins, $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest, $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse, request, callback); - }, "name", { value: "Admins" }); - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposals}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef ArchivedProposalsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} [response] QueryArchivedProposalsResponse - */ - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.ArchivedProposalsCallback} callback Node-style callback called with the error, if any, and QueryArchivedProposalsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.archivedProposals = function archivedProposals(request, callback) { - return this.rpcCall(archivedProposals, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse, request, callback); - }, "name", { value: "ArchivedProposals" }); - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - adminmodule.QueryAdminsRequest = (function() { - - /** - * Properties of a QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsRequest - */ - - /** - * Constructs a new QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsRequest. - * @implements IQueryAdminsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest=} [properties] Properties to set - */ - function QueryAdminsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryAdminsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryAdminsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryAdminsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - */ - QueryAdminsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - }; - - /** - * Creates a plain object from a QueryAdminsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsRequest} message QueryAdminsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryAdminsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsRequest; - })(); - - adminmodule.QueryAdminsResponse = (function() { - - /** - * Properties of a QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsResponse - * @property {Array.|null} [admins] QueryAdminsResponse admins - */ - - /** - * Constructs a new QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsResponse. - * @implements IQueryAdminsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse=} [properties] Properties to set - */ - function QueryAdminsResponse(properties) { - this.admins = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAdminsResponse admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - */ - QueryAdminsResponse.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified QueryAdminsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (var i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified QueryAdminsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (var i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a QueryAdminsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - */ - QueryAdminsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryAdminsResponse.admins: array expected"); - message.admins = []; - for (var i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a QueryAdminsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} message QueryAdminsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (var j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this QueryAdminsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsResponse; - })(); - - adminmodule.QueryArchivedProposalsRequest = (function() { - - /** - * Properties of a QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsRequest - */ - - /** - * Constructs a new QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsRequest. - * @implements IQueryArchivedProposalsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest=} [properties] Properties to set - */ - function QueryArchivedProposalsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryArchivedProposalsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryArchivedProposalsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - */ - QueryArchivedProposalsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - }; - - /** - * Creates a plain object from a QueryArchivedProposalsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} message QueryArchivedProposalsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryArchivedProposalsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsRequest; - })(); - - adminmodule.QueryArchivedProposalsResponse = (function() { - - /** - * Properties of a QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsResponse - * @property {Array.|null} [proposals] QueryArchivedProposalsResponse proposals - */ - - /** - * Constructs a new QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsResponse. - * @implements IQueryArchivedProposalsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse=} [properties] Properties to set - */ - function QueryArchivedProposalsResponse(properties) { - this.proposals = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryArchivedProposalsResponse proposals. - * @member {Array.} proposals - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - */ - QueryArchivedProposalsResponse.prototype.proposals = $util.emptyArray; - - /** - * Encodes the specified QueryArchivedProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposals != null && message.proposals.length) - for (var i = 0; i < message.proposals.length; ++i) - $root.cosmos.gov.v1beta1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposals && message.proposals.length)) - message.proposals = []; - message.proposals.push($root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposals != null && message.hasOwnProperty("proposals")) { - if (!Array.isArray(message.proposals)) - return "proposals: array expected"; - for (var i = 0; i < message.proposals.length; ++i) { - var error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposals[i]); - if (error) - return "proposals." + error; - } - } - return null; - }; - - /** - * Creates a QueryArchivedProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - */ - QueryArchivedProposalsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - if (object.proposals) { - if (!Array.isArray(object.proposals)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: array expected"); - message.proposals = []; - for (var i = 0; i < object.proposals.length; ++i) { - if (typeof object.proposals[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: object expected"); - message.proposals[i] = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposals[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryArchivedProposalsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} message QueryArchivedProposalsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.proposals = []; - if (message.proposals && message.proposals.length) { - object.proposals = []; - for (var j = 0; j < message.proposals.length; ++j) - object.proposals[j] = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposals[j], options); - } - return object; - }; - - /** - * Converts this QueryArchivedProposalsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsResponse; - })(); - - adminmodule.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @interface IGenesisState - * @property {Array.|null} [admins] GenesisState admins - */ - - /** - * Constructs a new GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {cosmos.adminmodule.adminmodule.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.admins = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - */ - GenesisState.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (var i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (var i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.GenesisState) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.GenesisState.admins: array expected"); - message.admins = []; - for (var i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (var j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return adminmodule; - })(); - - return adminmodule; - })(); - - cosmos.gov = (function() { - - /** - * Namespace gov. - * @memberof cosmos - * @namespace - */ - var gov = {}; - - gov.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.gov - * @namespace - */ - var v1beta1 = {}; - - /** - * VoteOption enum. - * @name cosmos.gov.v1beta1.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 - */ - v1beta1.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; - })(); - - v1beta1.WeightedVoteOption = (function() { - - /** - * Properties of a WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @interface IWeightedVoteOption - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] WeightedVoteOption option - * @property {string|null} [weight] WeightedVoteOption weight - */ - - /** - * Constructs a new WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a WeightedVoteOption. - * @implements IWeightedVoteOption - * @constructor - * @param {cosmos.gov.v1beta1.IWeightedVoteOption=} [properties] Properties to set - */ - function WeightedVoteOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeightedVoteOption option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.option = 0; - - /** - * WeightedVoteOption weight. - * @member {string} weight - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.weight = ""; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.option); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.weight); - return writer; - }; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeightedVoteOption message. - * @function verify - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeightedVoteOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isString(message.weight)) - return "weight: string expected"; - return null; - }; - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - */ - WeightedVoteOption.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.WeightedVoteOption) - return object; - var message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - 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; - } - if (object.weight != null) - message.weight = String(object.weight); - return message; - }; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.WeightedVoteOption} message WeightedVoteOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeightedVoteOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - object.weight = ""; - } - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - return object; - }; - - /** - * Converts this WeightedVoteOption to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - * @returns {Object.} JSON object - */ - WeightedVoteOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeightedVoteOption; - })(); - - v1beta1.TextProposal = (function() { - - /** - * Properties of a TextProposal. - * @memberof cosmos.gov.v1beta1 - * @interface ITextProposal - * @property {string|null} [title] TextProposal title - * @property {string|null} [description] TextProposal description - */ - - /** - * Constructs a new TextProposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TextProposal. - * @implements ITextProposal - * @constructor - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.title = ""; - - /** - * TextProposal description. - * @member {string} description - * @memberof cosmos.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.description = ""; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal - */ - TextProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) - return object; - var message = new $root.cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @instance - * @returns {Object.} JSON object - */ - TextProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextProposal; - })(); - - v1beta1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos.gov.v1beta1 - * @interface IDeposit - * @property {Long|null} [proposal_id] Deposit proposal_id - * @property {string|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos.gov.v1beta1.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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {string} depositor - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.depositor = ""; - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.Deposit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!$util.isString(message.depositor)) - return "depositor: 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.base.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Deposit) - return object; - var message = new $root.cosmos.gov.v1beta1.Deposit(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.depositor != null) - message.depositor = String(object.depositor); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.depositor = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.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.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - * @returns {Object.} JSON object - */ - Deposit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Deposit; - })(); - - v1beta1.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof cosmos.gov.v1beta1 - * @interface IProposal - * @property {Long|null} [proposal_id] Proposal proposal_id - * @property {google.protobuf.IAny|null} [content] Proposal content - * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status - * @property {cosmos.gov.v1beta1.ITallyResult|null} [final_tally_result] Proposal final_tally_result - * @property {google.protobuf.ITimestamp|null} [submit_time] Proposal submit_time - * @property {google.protobuf.ITimestamp|null} [deposit_end_time] Proposal deposit_end_time - * @property {Array.|null} [total_deposit] Proposal total_deposit - * @property {google.protobuf.ITimestamp|null} [voting_start_time] Proposal voting_start_time - * @property {google.protobuf.ITimestamp|null} [voting_end_time] Proposal voting_end_time - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - this.total_deposit = []; - if (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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.content = null; - - /** - * Proposal status. - * @member {cosmos.gov.v1beta1.ProposalStatus} status - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal final_tally_result. - * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} final_tally_result - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.final_tally_result = null; - - /** - * Proposal submit_time. - * @member {google.protobuf.ITimestamp|null|undefined} submit_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.submit_time = null; - - /** - * Proposal deposit_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} deposit_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.deposit_end_time = null; - - /** - * Proposal total_deposit. - * @member {Array.} total_deposit - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.total_deposit = $util.emptyArray; - - /** - * Proposal voting_start_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_start_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_start_time = null; - - /** - * Proposal voting_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_end_time = null; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - 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.final_tally_result != null && Object.hasOwnProperty.call(message, "final_tally_result")) - $root.cosmos.gov.v1beta1.TallyResult.encode(message.final_tally_result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submit_time != null && Object.hasOwnProperty.call(message, "submit_time")) - $root.google.protobuf.Timestamp.encode(message.submit_time, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deposit_end_time != null && Object.hasOwnProperty.call(message, "deposit_end_time")) - $root.google.protobuf.Timestamp.encode(message.deposit_end_time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.total_deposit != null && message.total_deposit.length) - for (var i = 0; i < message.total_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_deposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.voting_start_time != null && Object.hasOwnProperty.call(message, "voting_start_time")) - $root.google.protobuf.Timestamp.encode(message.voting_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voting_end_time != null && Object.hasOwnProperty.call(message, "voting_end_time")) - $root.google.protobuf.Timestamp.encode(message.voting_end_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.Proposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = 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.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submit_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.deposit_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.total_deposit && message.total_deposit.length)) - message.total_deposit = []; - message.total_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.voting_end_time = $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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: 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.final_tally_result != null && message.hasOwnProperty("final_tally_result")) { - var error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.final_tally_result); - if (error) - return "final_tally_result." + error; - } - if (message.submit_time != null && message.hasOwnProperty("submit_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.submit_time); - if (error) - return "submit_time." + error; - } - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.deposit_end_time); - if (error) - return "deposit_end_time." + error; - } - if (message.total_deposit != null && message.hasOwnProperty("total_deposit")) { - if (!Array.isArray(message.total_deposit)) - return "total_deposit: array expected"; - for (var i = 0; i < message.total_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.total_deposit[i]); - if (error) - return "total_deposit." + error; - } - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.voting_start_time); - if (error) - return "voting_start_time." + error; - } - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.voting_end_time); - if (error) - return "voting_end_time." + error; - } - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Proposal) - return object; - var message = new $root.cosmos.gov.v1beta1.Proposal(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.gov.v1beta1.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.final_tally_result != null) { - if (typeof object.final_tally_result !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.final_tally_result: object expected"); - message.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.final_tally_result); - } - if (object.submit_time != null) { - if (typeof object.submit_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.submit_time: object expected"); - message.submit_time = $root.google.protobuf.Timestamp.fromObject(object.submit_time); - } - if (object.deposit_end_time != null) { - if (typeof object.deposit_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.deposit_end_time: object expected"); - message.deposit_end_time = $root.google.protobuf.Timestamp.fromObject(object.deposit_end_time); - } - if (object.total_deposit) { - if (!Array.isArray(object.total_deposit)) - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: array expected"); - message.total_deposit = []; - for (var i = 0; i < object.total_deposit.length; ++i) { - if (typeof object.total_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: object expected"); - message.total_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_deposit[i]); - } - } - if (object.voting_start_time != null) { - if (typeof object.voting_start_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_start_time: object expected"); - message.voting_start_time = $root.google.protobuf.Timestamp.fromObject(object.voting_start_time); - } - if (object.voting_end_time != null) { - if (typeof object.voting_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_end_time: object expected"); - message.voting_end_time = $root.google.protobuf.Timestamp.fromObject(object.voting_end_time); - } - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.total_deposit = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.content = null; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.final_tally_result = null; - object.submit_time = null; - object.deposit_end_time = null; - object.voting_start_time = null; - object.voting_end_time = null; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - 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.gov.v1beta1.ProposalStatus[message.status] : message.status; - if (message.final_tally_result != null && message.hasOwnProperty("final_tally_result")) - object.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.final_tally_result, options); - if (message.submit_time != null && message.hasOwnProperty("submit_time")) - object.submit_time = $root.google.protobuf.Timestamp.toObject(message.submit_time, options); - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) - object.deposit_end_time = $root.google.protobuf.Timestamp.toObject(message.deposit_end_time, options); - if (message.total_deposit && message.total_deposit.length) { - object.total_deposit = []; - for (var j = 0; j < message.total_deposit.length; ++j) - object.total_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_deposit[j], options); - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) - object.voting_start_time = $root.google.protobuf.Timestamp.toObject(message.voting_start_time, options); - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) - object.voting_end_time = $root.google.protobuf.Timestamp.toObject(message.voting_end_time, options); - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.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.gov.v1beta1.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 - */ - v1beta1.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; - })(); - - v1beta1.TallyResult = (function() { - - /** - * Properties of a TallyResult. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyResult - * @property {string|null} [yes] TallyResult yes - * @property {string|null} [abstain] TallyResult abstain - * @property {string|null} [no] TallyResult no - * @property {string|null} [no_with_veto] TallyResult no_with_veto - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.yes = ""; - - /** - * TallyResult abstain. - * @member {string} abstain - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.abstain = ""; - - /** - * TallyResult no. - * @member {string} no - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no = ""; - - /** - * TallyResult no_with_veto. - * @member {string} no_with_veto - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no_with_veto = ""; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.no_with_veto != null && Object.hasOwnProperty.call(message, "no_with_veto")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.no_with_veto); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.no_with_veto = 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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - if (!$util.isString(message.no_with_veto)) - return "no_with_veto: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) - return object; - var message = new $root.cosmos.gov.v1beta1.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.no_with_veto != null) - message.no_with_veto = String(object.no_with_veto); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.no_with_veto = ""; - } - 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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - object.no_with_veto = message.no_with_veto; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - * @returns {Object.} JSON object - */ - TallyResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyResult; - })(); - - v1beta1.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof cosmos.gov.v1beta1 - * @interface IVote - * @property {Long|null} [proposal_id] Vote proposal_id - * @property {string|null} [voter] Vote voter - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option - * @property {Array.|null} [options] Vote options - */ - - /** - * Constructs a new Vote. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set - */ - function Vote(properties) { - this.options = []; - if (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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {string} voter - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.voter = ""; - - /** - * Vote option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.option = 0; - - /** - * Vote options. - * @member {Array.} options - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.options = $util.emptyArray; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); - if (message.options != null && message.options.length) - for (var i = 0; i < message.options.length; ++i) - $root.cosmos.gov.v1beta1.WeightedVoteOption.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.Vote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.cosmos.gov.v1beta1.WeightedVoteOption.decode(reader, reader.uint32())); - 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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!$util.isString(message.voter)) - return "voter: string 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; - } - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (var i = 0; i < message.options.length; ++i) { - var error = $root.cosmos.gov.v1beta1.WeightedVoteOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Vote) - return object; - var message = new $root.cosmos.gov.v1beta1.Vote(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.voter != null) - message.voter = String(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; - } - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".cosmos.gov.v1beta1.Vote.options: array expected"); - message.options = []; - for (var i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Vote.options: object expected"); - message.options[i] = $root.cosmos.gov.v1beta1.WeightedVoteOption.fromObject(object.options[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.voter = ""; - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = message.voter; - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.options && message.options.length) { - object.options = []; - for (var j = 0; j < message.options.length; ++j) - object.options[j] = $root.cosmos.gov.v1beta1.WeightedVoteOption.toObject(message.options[j], options); - } - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - v1beta1.DepositParams = (function() { - - /** - * Properties of a DepositParams. - * @memberof cosmos.gov.v1beta1 - * @interface IDepositParams - * @property {Array.|null} [min_deposit] DepositParams min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] DepositParams max_deposit_period - */ - - /** - * Constructs a new DepositParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a DepositParams. - * @implements IDepositParams - * @constructor - * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set - */ - function DepositParams(properties) { - this.min_deposit = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DepositParams min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.min_deposit = $util.emptyArray; - - /** - * DepositParams max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.max_deposit_period = null; - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min_deposit != null && message.min_deposit.length) - for (var i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DepositParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DepositParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (var i = 0; i < message.min_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - var error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - return null; - }; - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - */ - DepositParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) - return object; - var message = new $root.cosmos.gov.v1beta1.DepositParams(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: array expected"); - message.min_deposit = []; - for (var i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - return message; - }; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DepositParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) - object.max_deposit_period = null; - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (var j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - return object; - }; - - /** - * Converts this DepositParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - * @returns {Object.} JSON object - */ - DepositParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DepositParams; - })(); - - v1beta1.VotingParams = (function() { - - /** - * Properties of a VotingParams. - * @memberof cosmos.gov.v1beta1 - * @interface IVotingParams - * @property {google.protobuf.IDuration|null} [voting_period] VotingParams voting_period - */ - - /** - * Constructs a new VotingParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a VotingParams. - * @implements IVotingParams - * @constructor - * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set - */ - function VotingParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VotingParams voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - */ - VotingParams.prototype.voting_period = null; - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VotingParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VotingParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - var error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - return null; - }; - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - */ - VotingParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) - return object; - var message = new $root.cosmos.gov.v1beta1.VotingParams(); - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.VotingParams.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - return message; - }; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VotingParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.voting_period = null; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - return object; - }; - - /** - * Converts this VotingParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - * @returns {Object.} JSON object - */ - VotingParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VotingParams; - })(); - - v1beta1.TallyParams = (function() { - - /** - * Properties of a TallyParams. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyParams - * @property {Uint8Array|null} [quorum] TallyParams quorum - * @property {Uint8Array|null} [threshold] TallyParams threshold - * @property {Uint8Array|null} [veto_threshold] TallyParams veto_threshold - */ - - /** - * Constructs a new TallyParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyParams. - * @implements ITallyParams - * @constructor - * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set - */ - function TallyParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyParams quorum. - * @member {Uint8Array} quorum - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.quorum = $util.newBuffer([]); - - /** - * TallyParams threshold. - * @member {Uint8Array} threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.threshold = $util.newBuffer([]); - - /** - * TallyParams veto_threshold. - * @member {Uint8Array} veto_threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.veto_threshold = $util.newBuffer([]); - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.veto_threshold); - return writer; - }; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.veto_threshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) - return "quorum: buffer expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) - return "threshold: buffer expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!(message.veto_threshold && typeof message.veto_threshold.length === "number" || $util.isString(message.veto_threshold))) - return "veto_threshold: buffer expected"; - return null; - }; - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - */ - TallyParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) - return object; - var message = new $root.cosmos.gov.v1beta1.TallyParams(); - if (object.quorum != null) - if (typeof object.quorum === "string") - $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); - else if (object.quorum.length) - message.quorum = object.quorum; - if (object.threshold != null) - if (typeof object.threshold === "string") - $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); - else if (object.threshold.length) - message.threshold = object.threshold; - if (object.veto_threshold != null) - if (typeof object.veto_threshold === "string") - $util.base64.decode(object.veto_threshold, message.veto_threshold = $util.newBuffer($util.base64.length(object.veto_threshold)), 0); - else if (object.veto_threshold.length) - message.veto_threshold = object.veto_threshold; - return message; - }; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.quorum = ""; - else { - object.quorum = []; - if (options.bytes !== Array) - object.quorum = $util.newBuffer(object.quorum); - } - if (options.bytes === String) - object.threshold = ""; - else { - object.threshold = []; - if (options.bytes !== Array) - object.threshold = $util.newBuffer(object.threshold); - } - if (options.bytes === String) - object.veto_threshold = ""; - else { - object.veto_threshold = []; - if (options.bytes !== Array) - object.veto_threshold = $util.newBuffer(object.veto_threshold); - } - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = options.bytes === String ? $util.base64.encode(message.veto_threshold, 0, message.veto_threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.veto_threshold) : message.veto_threshold; - return object; - }; - - /** - * Converts this TallyParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - * @returns {Object.} JSON object - */ - TallyParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyParams; - })(); - - return v1beta1; - })(); - - return gov; - })(); - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - var base = {}; - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - return base; - })(); - - return cosmos; - })(); - - $root.gogoproto = (function() { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - var gogoproto = {}; - - return gogoproto; - })(); - - $root.cosmos_proto = (function() { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - var cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - var message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - * @property {string|null} [legacy_amino_encoding] ScalarDescriptor legacy_amino_encoding - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * ScalarDescriptor legacy_amino_encoding. - * @member {string} legacy_amino_encoding - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.legacy_amino_encoding = ""; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - if (message.legacy_amino_encoding != null && Object.hasOwnProperty.call(message, "legacy_amino_encoding")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.legacy_amino_encoding); - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - case 4: - message.legacy_amino_encoding = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (var i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - if (!$util.isString(message.legacy_amino_encoding)) - return "legacy_amino_encoding: string expected"; - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - var message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (var i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - if (object.legacy_amino_encoding != null) - message.legacy_amino_encoding = String(object.legacy_amino_encoding); - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.legacy_amino_encoding = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (var j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - object.legacy_amino_encoding = message.legacy_amino_encoding; - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; - })(); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - 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; - - /** - * 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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.message_type != null && message.message_type.length) - for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (var i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (var i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (var i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (var i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + 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.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (var i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (var i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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.message_type && message.message_type.length) { - object.message_type = []; - for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (var j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (var j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_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]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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.nested_type != null && message.nested_type.length) - for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[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.oneof_decl != null && message.oneof_decl.length) - for (var i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (var i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (var i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (var i = 0; i < message.oneof_decl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (var i = 0; i < message.reserved_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (var i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (var i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (var i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (var i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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.nested_type && message.nested_type.length) { - object.nested_type = []; - for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (var j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (var j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (var j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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; - - /** - * 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; - - /** - * 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: 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.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (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 java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - var error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - var error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (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 message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - 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.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] 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.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - 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.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - 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.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (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 allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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.identifier_value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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; - - /** - * 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (var i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (var i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (var i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - 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.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (var j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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; - - /** - * 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} [source_file] Annotation source_file - * @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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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.source_file = 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.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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.source_file != null) - message.source_file = String(object.source_file); - 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.source_file = ""; - 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.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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.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([]); - - /** - * 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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {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 {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; - - /** - * 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 {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 {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; - - /** - * 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; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = 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.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (var i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = 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.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (var i = 0; i < message.additional_bindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (var i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (var j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = 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.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; - })(); - - return $root; -}); diff --git a/src/generated/admin/proto.d.ts b/src/generated/admin/proto.d.ts deleted file mode 100644 index abe34f2e..00000000 --- a/src/generated/admin/proto.d.ts +++ /dev/null @@ -1,6015 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Namespace cosmos. */ -export namespace cosmos { - - /** Namespace adminmodule. */ - namespace adminmodule { - - /** Namespace adminmodule. */ - namespace adminmodule { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls DeleteAdmin. - * @param request MsgDeleteAdmin message or plain object - * @param callback Node-style callback called with the error, if any, and MsgDeleteAdminResponse - */ - public deleteAdmin(request: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin, callback: cosmos.adminmodule.adminmodule.Msg.DeleteAdminCallback): void; - - /** - * Calls DeleteAdmin. - * @param request MsgDeleteAdmin message or plain object - * @returns Promise - */ - public deleteAdmin(request: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin): Promise; - - /** - * Calls AddAdmin. - * @param request MsgAddAdmin message or plain object - * @param callback Node-style callback called with the error, if any, and MsgAddAdminResponse - */ - public addAdmin(request: cosmos.adminmodule.adminmodule.IMsgAddAdmin, callback: cosmos.adminmodule.adminmodule.Msg.AddAdminCallback): void; - - /** - * Calls AddAdmin. - * @param request MsgAddAdmin message or plain object - * @returns Promise - */ - public addAdmin(request: cosmos.adminmodule.adminmodule.IMsgAddAdmin): Promise; - - /** - * Calls SubmitProposal. - * @param request MsgSubmitProposal message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse - */ - public submitProposal(request: cosmos.adminmodule.adminmodule.IMsgSubmitProposal, callback: cosmos.adminmodule.adminmodule.Msg.SubmitProposalCallback): void; - - /** - * Calls SubmitProposal. - * @param request MsgSubmitProposal message or plain object - * @returns Promise - */ - public submitProposal(request: cosmos.adminmodule.adminmodule.IMsgSubmitProposal): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#deleteAdmin}. - * @param error Error, if any - * @param [response] MsgDeleteAdminResponse - */ - type DeleteAdminCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#addAdmin}. - * @param error Error, if any - * @param [response] MsgAddAdminResponse - */ - type AddAdminCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgAddAdminResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposal}. - * @param error Error, if any - * @param [response] MsgSubmitProposalResponse - */ - type SubmitProposalCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse) => void; - } - - /** Properties of a MsgDeleteAdmin. */ - interface IMsgDeleteAdmin { - - /** MsgDeleteAdmin creator */ - creator?: (string|null); - - /** MsgDeleteAdmin admin */ - admin?: (string|null); - } - - /** Represents a MsgDeleteAdmin. */ - class MsgDeleteAdmin implements IMsgDeleteAdmin { - - /** - * Constructs a new MsgDeleteAdmin. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin); - - /** MsgDeleteAdmin creator. */ - public creator: string; - - /** MsgDeleteAdmin admin. */ - public admin: string; - - /** - * Encodes the specified MsgDeleteAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @param message MsgDeleteAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgDeleteAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @param message MsgDeleteAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgDeleteAdmin; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgDeleteAdmin; - - /** - * Verifies a MsgDeleteAdmin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgDeleteAdmin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDeleteAdmin - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgDeleteAdmin; - - /** - * Creates a plain object from a MsgDeleteAdmin message. Also converts values to other types if specified. - * @param message MsgDeleteAdmin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgDeleteAdmin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgDeleteAdmin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgDeleteAdminResponse. */ - interface IMsgDeleteAdminResponse { - } - - /** Represents a MsgDeleteAdminResponse. */ - class MsgDeleteAdminResponse implements IMsgDeleteAdminResponse { - - /** - * Constructs a new MsgDeleteAdminResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse); - - /** - * Encodes the specified MsgDeleteAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @param message MsgDeleteAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgDeleteAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @param message MsgDeleteAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse; - - /** - * Verifies a MsgDeleteAdminResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgDeleteAdminResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDeleteAdminResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse; - - /** - * Creates a plain object from a MsgDeleteAdminResponse message. Also converts values to other types if specified. - * @param message MsgDeleteAdminResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgDeleteAdminResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAddAdmin. */ - interface IMsgAddAdmin { - - /** MsgAddAdmin creator */ - creator?: (string|null); - - /** MsgAddAdmin admin */ - admin?: (string|null); - } - - /** Represents a MsgAddAdmin. */ - class MsgAddAdmin implements IMsgAddAdmin { - - /** - * Constructs a new MsgAddAdmin. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgAddAdmin); - - /** MsgAddAdmin creator. */ - public creator: string; - - /** MsgAddAdmin admin. */ - public admin: string; - - /** - * Encodes the specified MsgAddAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @param message MsgAddAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgAddAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAddAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @param message MsgAddAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgAddAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgAddAdmin; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgAddAdmin; - - /** - * Verifies a MsgAddAdmin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAddAdmin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAddAdmin - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgAddAdmin; - - /** - * Creates a plain object from a MsgAddAdmin message. Also converts values to other types if specified. - * @param message MsgAddAdmin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgAddAdmin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAddAdmin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAddAdminResponse. */ - interface IMsgAddAdminResponse { - } - - /** Represents a MsgAddAdminResponse. */ - class MsgAddAdminResponse implements IMsgAddAdminResponse { - - /** - * Constructs a new MsgAddAdminResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgAddAdminResponse); - - /** - * Encodes the specified MsgAddAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @param message MsgAddAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgAddAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAddAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @param message MsgAddAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgAddAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgAddAdminResponse; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgAddAdminResponse; - - /** - * Verifies a MsgAddAdminResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAddAdminResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAddAdminResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgAddAdminResponse; - - /** - * Creates a plain object from a MsgAddAdminResponse message. Also converts values to other types if specified. - * @param message MsgAddAdminResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgAddAdminResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAddAdminResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitProposal. */ - interface IMsgSubmitProposal { - - /** MsgSubmitProposal content */ - content?: (google.protobuf.IAny|null); - - /** MsgSubmitProposal proposer */ - proposer?: (string|null); - } - - /** Represents a MsgSubmitProposal. */ - class MsgSubmitProposal implements IMsgSubmitProposal { - - /** - * Constructs a new MsgSubmitProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgSubmitProposal); - - /** MsgSubmitProposal content. */ - public content?: (google.protobuf.IAny|null); - - /** MsgSubmitProposal proposer. */ - public proposer: string; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitProposalResponse. */ - interface IMsgSubmitProposalResponse { - - /** MsgSubmitProposalResponse proposal_id */ - proposal_id?: (Long|null); - } - - /** Represents a MsgSubmitProposalResponse. */ - class MsgSubmitProposalResponse implements IMsgSubmitProposalResponse { - - /** - * Constructs a new MsgSubmitProposalResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse); - - /** MsgSubmitProposalResponse proposal_id. */ - public proposal_id: Long; - - /** - * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @param message MsgSubmitProposalResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @param message MsgSubmitProposalResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse; - - /** - * Verifies a MsgSubmitProposalResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitProposalResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse; - - /** - * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. - * @param message MsgSubmitProposalResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposalResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Admins. - * @param request QueryAdminsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryAdminsResponse - */ - public admins(request: cosmos.adminmodule.adminmodule.IQueryAdminsRequest, callback: cosmos.adminmodule.adminmodule.Query.AdminsCallback): void; - - /** - * Calls Admins. - * @param request QueryAdminsRequest message or plain object - * @returns Promise - */ - public admins(request: cosmos.adminmodule.adminmodule.IQueryAdminsRequest): Promise; - - /** - * Calls ArchivedProposals. - * @param request QueryArchivedProposalsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryArchivedProposalsResponse - */ - public archivedProposals(request: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest, callback: cosmos.adminmodule.adminmodule.Query.ArchivedProposalsCallback): void; - - /** - * Calls ArchivedProposals. - * @param request QueryArchivedProposalsRequest message or plain object - * @returns Promise - */ - public archivedProposals(request: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#admins}. - * @param error Error, if any - * @param [response] QueryAdminsResponse - */ - type AdminsCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.QueryAdminsResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposals}. - * @param error Error, if any - * @param [response] QueryArchivedProposalsResponse - */ - type ArchivedProposalsCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse) => void; - } - - /** Properties of a QueryAdminsRequest. */ - interface IQueryAdminsRequest { - } - - /** Represents a QueryAdminsRequest. */ - class QueryAdminsRequest implements IQueryAdminsRequest { - - /** - * Constructs a new QueryAdminsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryAdminsRequest); - - /** - * Encodes the specified QueryAdminsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @param message QueryAdminsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryAdminsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAdminsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @param message QueryAdminsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryAdminsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryAdminsRequest; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryAdminsRequest; - - /** - * Verifies a QueryAdminsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAdminsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAdminsRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryAdminsRequest; - - /** - * Creates a plain object from a QueryAdminsRequest message. Also converts values to other types if specified. - * @param message QueryAdminsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryAdminsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAdminsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryAdminsResponse. */ - interface IQueryAdminsResponse { - - /** QueryAdminsResponse admins */ - admins?: (string[]|null); - } - - /** Represents a QueryAdminsResponse. */ - class QueryAdminsResponse implements IQueryAdminsResponse { - - /** - * Constructs a new QueryAdminsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryAdminsResponse); - - /** QueryAdminsResponse admins. */ - public admins: string[]; - - /** - * Encodes the specified QueryAdminsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @param message QueryAdminsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryAdminsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAdminsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @param message QueryAdminsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryAdminsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryAdminsResponse; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryAdminsResponse; - - /** - * Verifies a QueryAdminsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAdminsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAdminsResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryAdminsResponse; - - /** - * Creates a plain object from a QueryAdminsResponse message. Also converts values to other types if specified. - * @param message QueryAdminsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryAdminsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAdminsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryArchivedProposalsRequest. */ - interface IQueryArchivedProposalsRequest { - } - - /** Represents a QueryArchivedProposalsRequest. */ - class QueryArchivedProposalsRequest implements IQueryArchivedProposalsRequest { - - /** - * Constructs a new QueryArchivedProposalsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest); - - /** - * Encodes the specified QueryArchivedProposalsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @param message QueryArchivedProposalsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryArchivedProposalsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @param message QueryArchivedProposalsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest; - - /** - * Verifies a QueryArchivedProposalsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryArchivedProposalsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryArchivedProposalsRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest; - - /** - * Creates a plain object from a QueryArchivedProposalsRequest message. Also converts values to other types if specified. - * @param message QueryArchivedProposalsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryArchivedProposalsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryArchivedProposalsResponse. */ - interface IQueryArchivedProposalsResponse { - - /** QueryArchivedProposalsResponse proposals */ - proposals?: (cosmos.gov.v1beta1.IProposal[]|null); - } - - /** Represents a QueryArchivedProposalsResponse. */ - class QueryArchivedProposalsResponse implements IQueryArchivedProposalsResponse { - - /** - * Constructs a new QueryArchivedProposalsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse); - - /** QueryArchivedProposalsResponse proposals. */ - public proposals: cosmos.gov.v1beta1.IProposal[]; - - /** - * Encodes the specified QueryArchivedProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @param message QueryArchivedProposalsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryArchivedProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @param message QueryArchivedProposalsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse; - - /** - * Verifies a QueryArchivedProposalsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryArchivedProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryArchivedProposalsResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse; - - /** - * Creates a plain object from a QueryArchivedProposalsResponse message. Also converts values to other types if specified. - * @param message QueryArchivedProposalsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryArchivedProposalsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState admins */ - admins?: (string[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IGenesisState); - - /** GenesisState admins. */ - public admins: string[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace gov. */ - namespace gov { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** 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 WeightedVoteOption. */ - interface IWeightedVoteOption { - - /** WeightedVoteOption option */ - option?: (cosmos.gov.v1beta1.VoteOption|null); - - /** WeightedVoteOption weight */ - weight?: (string|null); - } - - /** Represents a WeightedVoteOption. */ - class WeightedVoteOption implements IWeightedVoteOption { - - /** - * Constructs a new WeightedVoteOption. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IWeightedVoteOption); - - /** WeightedVoteOption option. */ - public option: cosmos.gov.v1beta1.VoteOption; - - /** WeightedVoteOption weight. */ - public weight: string; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @param message WeightedVoteOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.IWeightedVoteOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @param message WeightedVoteOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.IWeightedVoteOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.WeightedVoteOption; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.WeightedVoteOption; - - /** - * Verifies a WeightedVoteOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeightedVoteOption - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.WeightedVoteOption; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @param message WeightedVoteOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.WeightedVoteOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeightedVoteOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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.gov.v1beta1.ITextProposal); - - /** TextProposal title. */ - public title: string; - - /** TextProposal description. */ - public description: string; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.ITextProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 proposal_id */ - proposal_id?: (Long|null); - - /** Deposit depositor */ - depositor?: (string|null); - - /** Deposit amount */ - amount?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a Deposit. */ - class Deposit implements IDeposit { - - /** - * Constructs a new Deposit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IDeposit); - - /** Deposit proposal_id. */ - public proposal_id: Long; - - /** Deposit depositor. */ - public depositor: string; - - /** Deposit amount. */ - public amount: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 proposal_id */ - proposal_id?: (Long|null); - - /** Proposal content */ - content?: (google.protobuf.IAny|null); - - /** Proposal status */ - status?: (cosmos.gov.v1beta1.ProposalStatus|null); - - /** Proposal final_tally_result */ - final_tally_result?: (cosmos.gov.v1beta1.ITallyResult|null); - - /** Proposal submit_time */ - submit_time?: (google.protobuf.ITimestamp|null); - - /** Proposal deposit_end_time */ - deposit_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal total_deposit */ - total_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Proposal voting_start_time */ - voting_start_time?: (google.protobuf.ITimestamp|null); - - /** Proposal voting_end_time */ - voting_end_time?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - - /** - * Constructs a new Proposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IProposal); - - /** Proposal proposal_id. */ - public proposal_id: Long; - - /** Proposal content. */ - public content?: (google.protobuf.IAny|null); - - /** Proposal status. */ - public status: cosmos.gov.v1beta1.ProposalStatus; - - /** Proposal final_tally_result. */ - public final_tally_result?: (cosmos.gov.v1beta1.ITallyResult|null); - - /** Proposal submit_time. */ - public submit_time?: (google.protobuf.ITimestamp|null); - - /** Proposal deposit_end_time. */ - public deposit_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal total_deposit. */ - public total_deposit: cosmos.base.v1beta1.ICoin[]; - - /** Proposal voting_start_time. */ - public voting_start_time?: (google.protobuf.ITimestamp|null); - - /** Proposal voting_end_time. */ - public voting_end_time?: (google.protobuf.ITimestamp|null); - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 no_with_veto */ - no_with_veto?: (string|null); - } - - /** Represents a TallyResult. */ - class TallyResult implements ITallyResult { - - /** - * Constructs a new TallyResult. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.ITallyResult); - - /** TallyResult yes. */ - public yes: string; - - /** TallyResult abstain. */ - public abstain: string; - - /** TallyResult no. */ - public no: string; - - /** TallyResult no_with_veto. */ - public no_with_veto: string; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 proposal_id */ - proposal_id?: (Long|null); - - /** Vote voter */ - voter?: (string|null); - - /** Vote option */ - option?: (cosmos.gov.v1beta1.VoteOption|null); - - /** Vote options */ - options?: (cosmos.gov.v1beta1.IWeightedVoteOption[]|null); - } - - /** Represents a Vote. */ - class Vote implements IVote { - - /** - * Constructs a new Vote. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IVote); - - /** Vote proposal_id. */ - public proposal_id: Long; - - /** Vote voter. */ - public voter: string; - - /** Vote option. */ - public option: cosmos.gov.v1beta1.VoteOption; - - /** Vote options. */ - public options: cosmos.gov.v1beta1.IWeightedVoteOption[]; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DepositParams. */ - interface IDepositParams { - - /** DepositParams min_deposit */ - min_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** DepositParams max_deposit_period */ - max_deposit_period?: (google.protobuf.IDuration|null); - } - - /** Represents a DepositParams. */ - class DepositParams implements IDepositParams { - - /** - * Constructs a new DepositParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IDepositParams); - - /** DepositParams min_deposit. */ - public min_deposit: cosmos.base.v1beta1.ICoin[]; - - /** DepositParams max_deposit_period. */ - public max_deposit_period?: (google.protobuf.IDuration|null); - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @param message DepositParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.IDepositParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @param message DepositParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.IDepositParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.DepositParams; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.DepositParams; - - /** - * Verifies a DepositParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DepositParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.DepositParams; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @param message DepositParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.DepositParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DepositParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VotingParams. */ - interface IVotingParams { - - /** VotingParams voting_period */ - voting_period?: (google.protobuf.IDuration|null); - } - - /** Represents a VotingParams. */ - class VotingParams implements IVotingParams { - - /** - * Constructs a new VotingParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IVotingParams); - - /** VotingParams voting_period. */ - public voting_period?: (google.protobuf.IDuration|null); - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @param message VotingParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.IVotingParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @param message VotingParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.IVotingParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.VotingParams; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.VotingParams; - - /** - * Verifies a VotingParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VotingParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.VotingParams; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @param message VotingParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.VotingParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VotingParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TallyParams. */ - interface ITallyParams { - - /** TallyParams quorum */ - quorum?: (Uint8Array|null); - - /** TallyParams threshold */ - threshold?: (Uint8Array|null); - - /** TallyParams veto_threshold */ - veto_threshold?: (Uint8Array|null); - } - - /** Represents a TallyParams. */ - class TallyParams implements ITallyParams { - - /** - * Constructs a new TallyParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.ITallyParams); - - /** TallyParams quorum. */ - public quorum: Uint8Array; - - /** TallyParams threshold. */ - public threshold: Uint8Array; - - /** TallyParams veto_threshold. */ - public veto_threshold: Uint8Array; - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @param message TallyParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.ITallyParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @param message TallyParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.ITallyParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.TallyParams; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.TallyParams; - - /** - * Verifies a TallyParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TallyParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.TallyParams; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @param message TallyParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.TallyParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TallyParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace base. */ - namespace base { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** 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.base.v1beta1.ICoin); - - /** Coin denom. */ - public denom: string; - - /** Coin amount. */ - public amount: string; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecCoin); - - /** DecCoin denom. */ - public denom: string; - - /** DecCoin amount. */ - public amount: string; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IIntProto); - - /** IntProto int. */ - public int: string; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecProto); - - /** DecProto dec. */ - public dec: string; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DecProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } -} - -/** Namespace cosmos_proto. */ -export namespace cosmos_proto { - - /** Properties of an InterfaceDescriptor. */ - interface IInterfaceDescriptor { - - /** InterfaceDescriptor name */ - name?: (string|null); - - /** InterfaceDescriptor description */ - description?: (string|null); - } - - /** Represents an InterfaceDescriptor. */ - class InterfaceDescriptor implements IInterfaceDescriptor { - - /** - * Constructs a new InterfaceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IInterfaceDescriptor); - - /** InterfaceDescriptor name. */ - public name: string; - - /** InterfaceDescriptor description. */ - public description: string; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.InterfaceDescriptor; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.InterfaceDescriptor; - - /** - * Verifies an InterfaceDescriptor message. - * @param message Plain 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 InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterfaceDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.InterfaceDescriptor; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @param message InterfaceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.InterfaceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ScalarDescriptor. */ - interface IScalarDescriptor { - - /** ScalarDescriptor name */ - name?: (string|null); - - /** ScalarDescriptor description */ - description?: (string|null); - - /** ScalarDescriptor field_type */ - field_type?: (cosmos_proto.ScalarType[]|null); - - /** ScalarDescriptor legacy_amino_encoding */ - legacy_amino_encoding?: (string|null); - } - - /** Represents a ScalarDescriptor. */ - class ScalarDescriptor implements IScalarDescriptor { - - /** - * Constructs a new ScalarDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IScalarDescriptor); - - /** ScalarDescriptor name. */ - public name: string; - - /** ScalarDescriptor description. */ - public description: string; - - /** ScalarDescriptor field_type. */ - public field_type: cosmos_proto.ScalarType[]; - - /** ScalarDescriptor legacy_amino_encoding. */ - public legacy_amino_encoding: string; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.ScalarDescriptor; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.ScalarDescriptor; - - /** - * Verifies a ScalarDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScalarDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.ScalarDescriptor; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @param message ScalarDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.ScalarDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScalarDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** ScalarType enum. */ - enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0, - SCALAR_TYPE_STRING = 1, - SCALAR_TYPE_BYTES = 2 - } -} - -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** 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[]; - - /** - * 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 public_dependency */ - public_dependency?: (number[]|null); - - /** FileDescriptorProto weak_dependency */ - weak_dependency?: (number[]|null); - - /** FileDescriptorProto message_type */ - message_type?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enum_type */ - enum_type?: (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 source_code_info */ - source_code_info?: (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 public_dependency. */ - public public_dependency: number[]; - - /** FileDescriptorProto weak_dependency. */ - public weak_dependency: number[]; - - /** FileDescriptorProto message_type. */ - public message_type: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enum_type. */ - public enum_type: 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 source_code_info. */ - public source_code_info?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * 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 nested_type */ - nested_type?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enum_type */ - enum_type?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extension_range */ - extension_range?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneof_decl */ - oneof_decl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range */ - reserved_range?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reserved_name */ - reserved_name?: (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 nested_type. */ - public nested_type: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enum_type. */ - public enum_type: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extension_range. */ - public extension_range: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneof_decl. */ - public oneof_decl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range. */ - public reserved_range: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reserved_name. */ - public reserved_name: string[]; - - /** - * 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; - - /** - * 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; - - /** - * 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 type_name */ - type_name?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto default_value */ - default_value?: (string|null); - - /** FieldDescriptorProto oneof_index */ - oneof_index?: (number|null); - - /** FieldDescriptorProto json_name */ - json_name?: (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 type_name. */ - public type_name: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto default_value. */ - public default_value: string; - - /** FieldDescriptorProto oneof_index. */ - public oneof_index: number; - - /** FieldDescriptorProto json_name. */ - public json_name: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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 input_type */ - input_type?: (string|null); - - /** MethodDescriptorProto output_type */ - output_type?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming */ - client_streaming?: (boolean|null); - - /** MethodDescriptorProto server_streaming */ - server_streaming?: (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 input_type. */ - public input_type: string; - - /** MethodDescriptorProto output_type. */ - public output_type: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming. */ - public client_streaming: boolean; - - /** MethodDescriptorProto server_streaming. */ - public server_streaming: boolean; - - /** - * 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 java_package */ - java_package?: (string|null); - - /** FileOptions java_outer_classname */ - java_outer_classname?: (string|null); - - /** FileOptions java_multiple_files */ - java_multiple_files?: (boolean|null); - - /** FileOptions java_generate_equals_and_hash */ - java_generate_equals_and_hash?: (boolean|null); - - /** FileOptions java_string_check_utf8 */ - java_string_check_utf8?: (boolean|null); - - /** FileOptions optimize_for */ - optimize_for?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions go_package */ - go_package?: (string|null); - - /** FileOptions cc_generic_services */ - cc_generic_services?: (boolean|null); - - /** FileOptions java_generic_services */ - java_generic_services?: (boolean|null); - - /** FileOptions py_generic_services */ - py_generic_services?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions cc_enable_arenas */ - cc_enable_arenas?: (boolean|null); - - /** FileOptions objc_class_prefix */ - objc_class_prefix?: (string|null); - - /** FileOptions csharp_namespace */ - csharp_namespace?: (string|null); - - /** FileOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .gogoproto.goproto_getters_all */ - ".gogoproto.goproto_getters_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_prefix_all */ - ".gogoproto.goproto_enum_prefix_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_stringer_all */ - ".gogoproto.goproto_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.verbose_equal_all */ - ".gogoproto.verbose_equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.face_all */ - ".gogoproto.face_all"?: (boolean|null); - - /** FileOptions .gogoproto.gostring_all */ - ".gogoproto.gostring_all"?: (boolean|null); - - /** FileOptions .gogoproto.populate_all */ - ".gogoproto.populate_all"?: (boolean|null); - - /** FileOptions .gogoproto.stringer_all */ - ".gogoproto.stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.onlyone_all */ - ".gogoproto.onlyone_all"?: (boolean|null); - - /** FileOptions .gogoproto.equal_all */ - ".gogoproto.equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.description_all */ - ".gogoproto.description_all"?: (boolean|null); - - /** FileOptions .gogoproto.testgen_all */ - ".gogoproto.testgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.benchgen_all */ - ".gogoproto.benchgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.marshaler_all */ - ".gogoproto.marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unmarshaler_all */ - ".gogoproto.unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.stable_marshaler_all */ - ".gogoproto.stable_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.sizer_all */ - ".gogoproto.sizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_stringer_all */ - ".gogoproto.goproto_enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.enum_stringer_all */ - ".gogoproto.enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_marshaler_all */ - ".gogoproto.unsafe_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_unmarshaler_all */ - ".gogoproto.unsafe_unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_extensions_map_all */ - ".gogoproto.goproto_extensions_map_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unrecognized_all */ - ".gogoproto.goproto_unrecognized_all"?: (boolean|null); - - /** FileOptions .gogoproto.gogoproto_import */ - ".gogoproto.gogoproto_import"?: (boolean|null); - - /** FileOptions .gogoproto.protosizer_all */ - ".gogoproto.protosizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.compare_all */ - ".gogoproto.compare_all"?: (boolean|null); - - /** FileOptions .gogoproto.typedecl_all */ - ".gogoproto.typedecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.enumdecl_all */ - ".gogoproto.enumdecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_registration */ - ".gogoproto.goproto_registration"?: (boolean|null); - - /** FileOptions .gogoproto.messagename_all */ - ".gogoproto.messagename_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_sizecache_all */ - ".gogoproto.goproto_sizecache_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unkeyed_all */ - ".gogoproto.goproto_unkeyed_all"?: (boolean|null); - - /** FileOptions .cosmos_proto.declare_interface */ - ".cosmos_proto.declare_interface"?: (cosmos_proto.IInterfaceDescriptor[]|null); - - /** FileOptions .cosmos_proto.declare_scalar */ - ".cosmos_proto.declare_scalar"?: (cosmos_proto.IScalarDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions java_package. */ - public java_package: string; - - /** FileOptions java_outer_classname. */ - public java_outer_classname: string; - - /** FileOptions java_multiple_files. */ - public java_multiple_files: boolean; - - /** FileOptions java_generate_equals_and_hash. */ - public java_generate_equals_and_hash: boolean; - - /** FileOptions java_string_check_utf8. */ - public java_string_check_utf8: boolean; - - /** FileOptions optimize_for. */ - public optimize_for: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions go_package. */ - public go_package: string; - - /** FileOptions cc_generic_services. */ - public cc_generic_services: boolean; - - /** FileOptions java_generic_services. */ - public java_generic_services: boolean; - - /** FileOptions py_generic_services. */ - public py_generic_services: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions cc_enable_arenas. */ - public cc_enable_arenas: boolean; - - /** FileOptions objc_class_prefix. */ - public objc_class_prefix: string; - - /** FileOptions csharp_namespace. */ - public csharp_namespace: string; - - /** FileOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 message_set_wire_format */ - message_set_wire_format?: (boolean|null); - - /** MessageOptions no_standard_descriptor_accessor */ - no_standard_descriptor_accessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions map_entry */ - map_entry?: (boolean|null); - - /** MessageOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .gogoproto.goproto_getters */ - ".gogoproto.goproto_getters"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_stringer */ - ".gogoproto.goproto_stringer"?: (boolean|null); - - /** MessageOptions .gogoproto.verbose_equal */ - ".gogoproto.verbose_equal"?: (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.stable_marshaler */ - ".gogoproto.stable_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.sizer */ - ".gogoproto.sizer"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_marshaler */ - ".gogoproto.unsafe_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_unmarshaler */ - ".gogoproto.unsafe_unmarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_extensions_map */ - ".gogoproto.goproto_extensions_map"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unrecognized */ - ".gogoproto.goproto_unrecognized"?: (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.goproto_sizecache */ - ".gogoproto.goproto_sizecache"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unkeyed */ - ".gogoproto.goproto_unkeyed"?: (boolean|null); - - /** MessageOptions .cosmos_proto.implements_interface */ - ".cosmos_proto.implements_interface"?: (string[]|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions message_set_wire_format. */ - public message_set_wire_format: boolean; - - /** MessageOptions no_standard_descriptor_accessor. */ - public no_standard_descriptor_accessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions map_entry. */ - public map_entry: boolean; - - /** MessageOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|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); - - /** FieldOptions .cosmos_proto.accepts_interface */ - ".cosmos_proto.accepts_interface"?: (string|null); - - /** FieldOptions .cosmos_proto.scalar */ - ".cosmos_proto.scalar"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 allow_alias */ - allow_alias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumOptions .gogoproto.goproto_enum_prefix */ - ".gogoproto.goproto_enum_prefix"?: (boolean|null); - - /** EnumOptions .gogoproto.goproto_enum_stringer */ - ".gogoproto.goproto_enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_stringer */ - ".gogoproto.enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_customname */ - ".gogoproto.enum_customname"?: (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 allow_alias. */ - public allow_alias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumValueOptions .gogoproto.enumvalue_customname */ - ".gogoproto.enumvalue_customname"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 identifier_value */ - identifier_value?: (string|null); - - /** UninterpretedOption positive_int_value */ - positive_int_value?: (Long|null); - - /** UninterpretedOption negative_int_value */ - negative_int_value?: (Long|null); - - /** UninterpretedOption double_value */ - double_value?: (number|null); - - /** UninterpretedOption string_value */ - string_value?: (Uint8Array|null); - - /** UninterpretedOption aggregate_value */ - aggregate_value?: (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 identifier_value. */ - public identifier_value: string; - - /** UninterpretedOption positive_int_value. */ - public positive_int_value: Long; - - /** UninterpretedOption negative_int_value. */ - public negative_int_value: Long; - - /** UninterpretedOption double_value. */ - public double_value: number; - - /** UninterpretedOption string_value. */ - public string_value: Uint8Array; - - /** UninterpretedOption aggregate_value. */ - public aggregate_value: string; - - /** - * 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 name_part */ - name_part: string; - - /** NamePart is_extension */ - is_extension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart name_part. */ - public name_part: string; - - /** NamePart is_extension. */ - public is_extension: boolean; - - /** - * 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[]; - - /** - * 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 leading_comments */ - leading_comments?: (string|null); - - /** Location trailing_comments */ - trailing_comments?: (string|null); - - /** Location leading_detached_comments */ - leading_detached_comments?: (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 leading_comments. */ - public leading_comments: string; - - /** Location trailing_comments. */ - public trailing_comments: string; - - /** Location leading_detached_comments. */ - public leading_detached_comments: string[]; - - /** - * 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[]; - - /** - * 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 source_file */ - source_file?: (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 source_file. */ - public source_file: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * 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 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; - - /** - * 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 Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (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: Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * 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?: (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: Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * 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 }; - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fully_decode_reserved_expansion */ - fully_decode_reserved_expansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fully_decode_reserved_expansion. */ - public fully_decode_reserved_expansion: boolean; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is 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.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the 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.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule response_body */ - response_body?: (string|null); - - /** HttpRule additional_bindings */ - additional_bindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule response_body. */ - public response_body: string; - - /** HttpRule additional_bindings. */ - public additional_bindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is 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.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the 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.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is 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.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the 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.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} diff --git a/src/generated/admin/proto.js b/src/generated/admin/proto.js deleted file mode 100644 index 1984f52f..00000000 --- a/src/generated/admin/proto.js +++ /dev/null @@ -1,16676 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -import * as $protobuf from "protobufjs/minimal"; - -// Common aliases -const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -const $root = $protobuf.roots["@cosmos-client/ibc"] || ($protobuf.roots["@cosmos-client/ibc"] = {}); - -export const cosmos = $root.cosmos = (() => { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - const cosmos = {}; - - cosmos.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos - * @namespace - */ - const adminmodule = {}; - - adminmodule.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos.adminmodule - * @namespace - */ - const adminmodule = {}; - - adminmodule.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#deleteAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef DeleteAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} [response] MsgDeleteAdminResponse - */ - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.DeleteAdminCallback} callback Node-style callback called with the error, if any, and MsgDeleteAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.deleteAdmin = function deleteAdmin(request, callback) { - return this.rpcCall(deleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse, request, callback); - }, "name", { value: "DeleteAdmin" }); - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#addAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef AddAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} [response] MsgAddAdminResponse - */ - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.AddAdminCallback} callback Node-style callback called with the error, if any, and MsgAddAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.addAdmin = function addAdmin(request, callback) { - return this.rpcCall(addAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse, request, callback); - }, "name", { value: "AddAdmin" }); - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposal}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef SubmitProposalCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} [response] MsgSubmitProposalResponse - */ - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { - return this.rpcCall(submitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse, request, callback); - }, "name", { value: "SubmitProposal" }); - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - adminmodule.MsgDeleteAdmin = (function() { - - /** - * Properties of a MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdmin - * @property {string|null} [creator] MsgDeleteAdmin creator - * @property {string|null} [admin] MsgDeleteAdmin admin - */ - - /** - * Constructs a new MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdmin. - * @implements IMsgDeleteAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin=} [properties] Properties to set - */ - function MsgDeleteAdmin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgDeleteAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.creator = ""; - - /** - * MsgDeleteAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgDeleteAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - */ - MsgDeleteAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgDeleteAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} message MsgDeleteAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgDeleteAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdmin; - })(); - - adminmodule.MsgDeleteAdminResponse = (function() { - - /** - * Properties of a MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdminResponse - */ - - /** - * Constructs a new MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdminResponse. - * @implements IMsgDeleteAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse=} [properties] Properties to set - */ - function MsgDeleteAdminResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgDeleteAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - */ - MsgDeleteAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - }; - - /** - * Creates a plain object from a MsgDeleteAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} message MsgDeleteAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgDeleteAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdminResponse; - })(); - - adminmodule.MsgAddAdmin = (function() { - - /** - * Properties of a MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdmin - * @property {string|null} [creator] MsgAddAdmin creator - * @property {string|null} [admin] MsgAddAdmin admin - */ - - /** - * Constructs a new MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdmin. - * @implements IMsgAddAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin=} [properties] Properties to set - */ - function MsgAddAdmin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAddAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.creator = ""; - - /** - * MsgAddAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgAddAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgAddAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgAddAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - */ - MsgAddAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdmin) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgAddAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdmin} message MsgAddAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgAddAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdmin; - })(); - - adminmodule.MsgAddAdminResponse = (function() { - - /** - * Properties of a MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdminResponse - */ - - /** - * Constructs a new MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdminResponse. - * @implements IMsgAddAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse=} [properties] Properties to set - */ - function MsgAddAdminResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgAddAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgAddAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgAddAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - */ - MsgAddAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - }; - - /** - * Creates a plain object from a MsgAddAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} message MsgAddAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgAddAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdminResponse; - })(); - - adminmodule.MsgSubmitProposal = (function() { - - /** - * Properties of a MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposal - * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content - * @property {string|null} [proposer] MsgSubmitProposal proposer - */ - - /** - * Constructs a new MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposal. - * @implements IMsgSubmitProposal - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal=} [properties] Properties to set - */ - function MsgSubmitProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.content = null; - - /** - * MsgSubmitProposal proposer. - * @member {string} proposer - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.proposer = ""; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.proposer = reader.string(); - 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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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")) { - let error = $root.google.protobuf.Any.verify(message.content); - if (error) - return "content." + error; - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposal} MsgSubmitProposal - */ - MsgSubmitProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal(); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposal.content: object expected"); - message.content = $root.google.protobuf.Any.fromObject(object.content); - } - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposal} message MsgSubmitProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.content = null; - object.proposer = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.protobuf.Any.toObject(message.content, options); - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposal; - })(); - - adminmodule.MsgSubmitProposalResponse = (function() { - - /** - * Properties of a MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalResponse - * @property {Long|null} [proposal_id] MsgSubmitProposalResponse proposal_id - */ - - /** - * Constructs a new MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalResponse. - * @implements IMsgSubmitProposalResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse=} [properties] Properties to set - */ - function MsgSubmitProposalResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalResponse proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - */ - MsgSubmitProposalResponse.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - */ - MsgSubmitProposalResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} message MsgSubmitProposalResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - return object; - }; - - /** - * Converts this MsgSubmitProposalResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalResponse; - })(); - - adminmodule.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof cosmos.adminmodule.adminmodule - * @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; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#admins}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef AdminsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} [response] QueryAdminsResponse - */ - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.AdminsCallback} callback Node-style callback called with the error, if any, and QueryAdminsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.admins = function admins(request, callback) { - return this.rpcCall(admins, $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest, $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse, request, callback); - }, "name", { value: "Admins" }); - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposals}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef ArchivedProposalsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} [response] QueryArchivedProposalsResponse - */ - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.ArchivedProposalsCallback} callback Node-style callback called with the error, if any, and QueryArchivedProposalsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.archivedProposals = function archivedProposals(request, callback) { - return this.rpcCall(archivedProposals, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse, request, callback); - }, "name", { value: "ArchivedProposals" }); - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - adminmodule.QueryAdminsRequest = (function() { - - /** - * Properties of a QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsRequest - */ - - /** - * Constructs a new QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsRequest. - * @implements IQueryAdminsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest=} [properties] Properties to set - */ - function QueryAdminsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryAdminsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryAdminsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryAdminsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - */ - QueryAdminsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - }; - - /** - * Creates a plain object from a QueryAdminsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsRequest} message QueryAdminsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryAdminsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsRequest; - })(); - - adminmodule.QueryAdminsResponse = (function() { - - /** - * Properties of a QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsResponse - * @property {Array.|null} [admins] QueryAdminsResponse admins - */ - - /** - * Constructs a new QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsResponse. - * @implements IQueryAdminsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse=} [properties] Properties to set - */ - function QueryAdminsResponse(properties) { - this.admins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAdminsResponse admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - */ - QueryAdminsResponse.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified QueryAdminsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (let i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified QueryAdminsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (let i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a QueryAdminsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - */ - QueryAdminsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryAdminsResponse.admins: array expected"); - message.admins = []; - for (let i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a QueryAdminsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} message QueryAdminsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (let j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this QueryAdminsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsResponse; - })(); - - adminmodule.QueryArchivedProposalsRequest = (function() { - - /** - * Properties of a QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsRequest - */ - - /** - * Constructs a new QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsRequest. - * @implements IQueryArchivedProposalsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest=} [properties] Properties to set - */ - function QueryArchivedProposalsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryArchivedProposalsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryArchivedProposalsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - */ - QueryArchivedProposalsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - }; - - /** - * Creates a plain object from a QueryArchivedProposalsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} message QueryArchivedProposalsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryArchivedProposalsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsRequest; - })(); - - adminmodule.QueryArchivedProposalsResponse = (function() { - - /** - * Properties of a QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsResponse - * @property {Array.|null} [proposals] QueryArchivedProposalsResponse proposals - */ - - /** - * Constructs a new QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsResponse. - * @implements IQueryArchivedProposalsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse=} [properties] Properties to set - */ - function QueryArchivedProposalsResponse(properties) { - this.proposals = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryArchivedProposalsResponse proposals. - * @member {Array.} proposals - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - */ - QueryArchivedProposalsResponse.prototype.proposals = $util.emptyArray; - - /** - * Encodes the specified QueryArchivedProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposals != null && message.proposals.length) - for (let i = 0; i < message.proposals.length; ++i) - $root.cosmos.gov.v1beta1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposals && message.proposals.length)) - message.proposals = []; - message.proposals.push($root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposals != null && message.hasOwnProperty("proposals")) { - if (!Array.isArray(message.proposals)) - return "proposals: array expected"; - for (let i = 0; i < message.proposals.length; ++i) { - let error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposals[i]); - if (error) - return "proposals." + error; - } - } - return null; - }; - - /** - * Creates a QueryArchivedProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - */ - QueryArchivedProposalsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - if (object.proposals) { - if (!Array.isArray(object.proposals)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: array expected"); - message.proposals = []; - for (let i = 0; i < object.proposals.length; ++i) { - if (typeof object.proposals[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: object expected"); - message.proposals[i] = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposals[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryArchivedProposalsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} message QueryArchivedProposalsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proposals = []; - if (message.proposals && message.proposals.length) { - object.proposals = []; - for (let j = 0; j < message.proposals.length; ++j) - object.proposals[j] = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposals[j], options); - } - return object; - }; - - /** - * Converts this QueryArchivedProposalsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsResponse; - })(); - - adminmodule.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @interface IGenesisState - * @property {Array.|null} [admins] GenesisState admins - */ - - /** - * Constructs a new GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {cosmos.adminmodule.adminmodule.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.admins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - */ - GenesisState.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (let i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (let i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.GenesisState) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.GenesisState.admins: array expected"); - message.admins = []; - for (let i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (let j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return adminmodule; - })(); - - return adminmodule; - })(); - - cosmos.gov = (function() { - - /** - * Namespace gov. - * @memberof cosmos - * @namespace - */ - const gov = {}; - - gov.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.gov - * @namespace - */ - const v1beta1 = {}; - - /** - * VoteOption enum. - * @name cosmos.gov.v1beta1.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 - */ - v1beta1.VoteOption = (function() { - const 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; - })(); - - v1beta1.WeightedVoteOption = (function() { - - /** - * Properties of a WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @interface IWeightedVoteOption - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] WeightedVoteOption option - * @property {string|null} [weight] WeightedVoteOption weight - */ - - /** - * Constructs a new WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a WeightedVoteOption. - * @implements IWeightedVoteOption - * @constructor - * @param {cosmos.gov.v1beta1.IWeightedVoteOption=} [properties] Properties to set - */ - function WeightedVoteOption(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeightedVoteOption option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.option = 0; - - /** - * WeightedVoteOption weight. - * @member {string} weight - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.weight = ""; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.option); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.weight); - return writer; - }; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeightedVoteOption message. - * @function verify - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeightedVoteOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isString(message.weight)) - return "weight: string expected"; - return null; - }; - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - */ - WeightedVoteOption.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.WeightedVoteOption) - return object; - let message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - 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; - } - if (object.weight != null) - message.weight = String(object.weight); - return message; - }; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.WeightedVoteOption} message WeightedVoteOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeightedVoteOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - object.weight = ""; - } - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - return object; - }; - - /** - * Converts this WeightedVoteOption to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - * @returns {Object.} JSON object - */ - WeightedVoteOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeightedVoteOption; - })(); - - v1beta1.TextProposal = (function() { - - /** - * Properties of a TextProposal. - * @memberof cosmos.gov.v1beta1 - * @interface ITextProposal - * @property {string|null} [title] TextProposal title - * @property {string|null} [description] TextProposal description - */ - - /** - * Constructs a new TextProposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TextProposal. - * @implements ITextProposal - * @constructor - * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set - */ - function TextProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TextProposal title. - * @member {string} title - * @memberof cosmos.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.title = ""; - - /** - * TextProposal description. - * @member {string} description - * @memberof cosmos.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.description = ""; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TextProposal(); - while (reader.pos < end) { - let 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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal - */ - TextProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) - return object; - let message = new $root.cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.TextProposal} message TextProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.gov.v1beta1.TextProposal - * @instance - * @returns {Object.} JSON object - */ - TextProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextProposal; - })(); - - v1beta1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos.gov.v1beta1 - * @interface IDeposit - * @property {Long|null} [proposal_id] Deposit proposal_id - * @property {string|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set - */ - function Deposit(properties) { - this.amount = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Deposit proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {string} depositor - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.depositor = ""; - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); - if (message.amount != null && message.amount.length) - for (let i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Deposit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!$util.isString(message.depositor)) - return "depositor: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (let i = 0; i < message.amount.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a Deposit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Deposit) - return object; - let message = new $root.cosmos.gov.v1beta1.Deposit(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.depositor != null) - message.depositor = String(object.depositor); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); - message.amount = []; - for (let i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.Deposit} message Deposit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deposit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.depositor = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.depositor = message.depositor; - if (message.amount && message.amount.length) { - object.amount = []; - for (let j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - * @returns {Object.} JSON object - */ - Deposit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Deposit; - })(); - - v1beta1.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof cosmos.gov.v1beta1 - * @interface IProposal - * @property {Long|null} [proposal_id] Proposal proposal_id - * @property {google.protobuf.IAny|null} [content] Proposal content - * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status - * @property {cosmos.gov.v1beta1.ITallyResult|null} [final_tally_result] Proposal final_tally_result - * @property {google.protobuf.ITimestamp|null} [submit_time] Proposal submit_time - * @property {google.protobuf.ITimestamp|null} [deposit_end_time] Proposal deposit_end_time - * @property {Array.|null} [total_deposit] Proposal total_deposit - * @property {google.protobuf.ITimestamp|null} [voting_start_time] Proposal voting_start_time - * @property {google.protobuf.ITimestamp|null} [voting_end_time] Proposal voting_end_time - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - this.total_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Proposal proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.content = null; - - /** - * Proposal status. - * @member {cosmos.gov.v1beta1.ProposalStatus} status - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal final_tally_result. - * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} final_tally_result - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.final_tally_result = null; - - /** - * Proposal submit_time. - * @member {google.protobuf.ITimestamp|null|undefined} submit_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.submit_time = null; - - /** - * Proposal deposit_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} deposit_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.deposit_end_time = null; - - /** - * Proposal total_deposit. - * @member {Array.} total_deposit - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.total_deposit = $util.emptyArray; - - /** - * Proposal voting_start_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_start_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_start_time = null; - - /** - * Proposal voting_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_end_time = null; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - 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.final_tally_result != null && Object.hasOwnProperty.call(message, "final_tally_result")) - $root.cosmos.gov.v1beta1.TallyResult.encode(message.final_tally_result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submit_time != null && Object.hasOwnProperty.call(message, "submit_time")) - $root.google.protobuf.Timestamp.encode(message.submit_time, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deposit_end_time != null && Object.hasOwnProperty.call(message, "deposit_end_time")) - $root.google.protobuf.Timestamp.encode(message.deposit_end_time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.total_deposit != null && message.total_deposit.length) - for (let i = 0; i < message.total_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_deposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.voting_start_time != null && Object.hasOwnProperty.call(message, "voting_start_time")) - $root.google.protobuf.Timestamp.encode(message.voting_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voting_end_time != null && Object.hasOwnProperty.call(message, "voting_end_time")) - $root.google.protobuf.Timestamp.encode(message.voting_end_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Proposal(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = 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.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submit_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.deposit_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.total_deposit && message.total_deposit.length)) - message.total_deposit = []; - message.total_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.voting_end_time = $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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.content != null && message.hasOwnProperty("content")) { - let 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.final_tally_result != null && message.hasOwnProperty("final_tally_result")) { - let error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.final_tally_result); - if (error) - return "final_tally_result." + error; - } - if (message.submit_time != null && message.hasOwnProperty("submit_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.submit_time); - if (error) - return "submit_time." + error; - } - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.deposit_end_time); - if (error) - return "deposit_end_time." + error; - } - if (message.total_deposit != null && message.hasOwnProperty("total_deposit")) { - if (!Array.isArray(message.total_deposit)) - return "total_deposit: array expected"; - for (let i = 0; i < message.total_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.total_deposit[i]); - if (error) - return "total_deposit." + error; - } - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.voting_start_time); - if (error) - return "voting_start_time." + error; - } - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.voting_end_time); - if (error) - return "voting_end_time." + error; - } - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Proposal) - return object; - let message = new $root.cosmos.gov.v1beta1.Proposal(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.gov.v1beta1.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.final_tally_result != null) { - if (typeof object.final_tally_result !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.final_tally_result: object expected"); - message.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.final_tally_result); - } - if (object.submit_time != null) { - if (typeof object.submit_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.submit_time: object expected"); - message.submit_time = $root.google.protobuf.Timestamp.fromObject(object.submit_time); - } - if (object.deposit_end_time != null) { - if (typeof object.deposit_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.deposit_end_time: object expected"); - message.deposit_end_time = $root.google.protobuf.Timestamp.fromObject(object.deposit_end_time); - } - if (object.total_deposit) { - if (!Array.isArray(object.total_deposit)) - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: array expected"); - message.total_deposit = []; - for (let i = 0; i < object.total_deposit.length; ++i) { - if (typeof object.total_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: object expected"); - message.total_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_deposit[i]); - } - } - if (object.voting_start_time != null) { - if (typeof object.voting_start_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_start_time: object expected"); - message.voting_start_time = $root.google.protobuf.Timestamp.fromObject(object.voting_start_time); - } - if (object.voting_end_time != null) { - if (typeof object.voting_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_end_time: object expected"); - message.voting_end_time = $root.google.protobuf.Timestamp.fromObject(object.voting_end_time); - } - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.Proposal} message Proposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.total_deposit = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.content = null; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.final_tally_result = null; - object.submit_time = null; - object.deposit_end_time = null; - object.voting_start_time = null; - object.voting_end_time = null; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - 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.gov.v1beta1.ProposalStatus[message.status] : message.status; - if (message.final_tally_result != null && message.hasOwnProperty("final_tally_result")) - object.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.final_tally_result, options); - if (message.submit_time != null && message.hasOwnProperty("submit_time")) - object.submit_time = $root.google.protobuf.Timestamp.toObject(message.submit_time, options); - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) - object.deposit_end_time = $root.google.protobuf.Timestamp.toObject(message.deposit_end_time, options); - if (message.total_deposit && message.total_deposit.length) { - object.total_deposit = []; - for (let j = 0; j < message.total_deposit.length; ++j) - object.total_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_deposit[j], options); - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) - object.voting_start_time = $root.google.protobuf.Timestamp.toObject(message.voting_start_time, options); - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) - object.voting_end_time = $root.google.protobuf.Timestamp.toObject(message.voting_end_time, options); - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.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.gov.v1beta1.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 - */ - v1beta1.ProposalStatus = (function() { - const 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; - })(); - - v1beta1.TallyResult = (function() { - - /** - * Properties of a TallyResult. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyResult - * @property {string|null} [yes] TallyResult yes - * @property {string|null} [abstain] TallyResult abstain - * @property {string|null} [no] TallyResult no - * @property {string|null} [no_with_veto] TallyResult no_with_veto - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set - */ - function TallyResult(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyResult yes. - * @member {string} yes - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.yes = ""; - - /** - * TallyResult abstain. - * @member {string} abstain - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.abstain = ""; - - /** - * TallyResult no. - * @member {string} no - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no = ""; - - /** - * TallyResult no_with_veto. - * @member {string} no_with_veto - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no_with_veto = ""; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.no_with_veto != null && Object.hasOwnProperty.call(message, "no_with_veto")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.no_with_veto); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyResult(); - while (reader.pos < end) { - let 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.no_with_veto = 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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - if (!$util.isString(message.no_with_veto)) - return "no_with_veto: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) - return object; - let message = new $root.cosmos.gov.v1beta1.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.no_with_veto != null) - message.no_with_veto = String(object.no_with_veto); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.TallyResult} message TallyResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.yes = ""; - object.abstain = ""; - object.no = ""; - object.no_with_veto = ""; - } - 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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - object.no_with_veto = message.no_with_veto; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - * @returns {Object.} JSON object - */ - TallyResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyResult; - })(); - - v1beta1.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof cosmos.gov.v1beta1 - * @interface IVote - * @property {Long|null} [proposal_id] Vote proposal_id - * @property {string|null} [voter] Vote voter - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option - * @property {Array.|null} [options] Vote options - */ - - /** - * Constructs a new Vote. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set - */ - function Vote(properties) { - this.options = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Vote proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {string} voter - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.voter = ""; - - /** - * Vote option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.option = 0; - - /** - * Vote options. - * @member {Array.} options - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.options = $util.emptyArray; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); - if (message.options != null && message.options.length) - for (let i = 0; i < message.options.length; ++i) - $root.cosmos.gov.v1beta1.WeightedVoteOption.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Vote(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.cosmos.gov.v1beta1.WeightedVoteOption.decode(reader, reader.uint32())); - 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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!$util.isString(message.voter)) - return "voter: string 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; - } - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (let i = 0; i < message.options.length; ++i) { - let error = $root.cosmos.gov.v1beta1.WeightedVoteOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Vote) - return object; - let message = new $root.cosmos.gov.v1beta1.Vote(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.voter != null) - message.voter = String(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; - } - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".cosmos.gov.v1beta1.Vote.options: array expected"); - message.options = []; - for (let i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Vote.options: object expected"); - message.options[i] = $root.cosmos.gov.v1beta1.WeightedVoteOption.fromObject(object.options[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.Vote} message Vote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vote.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.voter = ""; - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = message.voter; - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.options && message.options.length) { - object.options = []; - for (let j = 0; j < message.options.length; ++j) - object.options[j] = $root.cosmos.gov.v1beta1.WeightedVoteOption.toObject(message.options[j], options); - } - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - v1beta1.DepositParams = (function() { - - /** - * Properties of a DepositParams. - * @memberof cosmos.gov.v1beta1 - * @interface IDepositParams - * @property {Array.|null} [min_deposit] DepositParams min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] DepositParams max_deposit_period - */ - - /** - * Constructs a new DepositParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a DepositParams. - * @implements IDepositParams - * @constructor - * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set - */ - function DepositParams(properties) { - this.min_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DepositParams min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.min_deposit = $util.emptyArray; - - /** - * DepositParams max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.max_deposit_period = null; - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min_deposit != null && message.min_deposit.length) - for (let i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DepositParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DepositParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (let i = 0; i < message.min_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - let error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - return null; - }; - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - */ - DepositParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) - return object; - let message = new $root.cosmos.gov.v1beta1.DepositParams(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: array expected"); - message.min_deposit = []; - for (let i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - return message; - }; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DepositParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) - object.max_deposit_period = null; - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (let j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - return object; - }; - - /** - * Converts this DepositParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - * @returns {Object.} JSON object - */ - DepositParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DepositParams; - })(); - - v1beta1.VotingParams = (function() { - - /** - * Properties of a VotingParams. - * @memberof cosmos.gov.v1beta1 - * @interface IVotingParams - * @property {google.protobuf.IDuration|null} [voting_period] VotingParams voting_period - */ - - /** - * Constructs a new VotingParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a VotingParams. - * @implements IVotingParams - * @constructor - * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set - */ - function VotingParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VotingParams voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - */ - VotingParams.prototype.voting_period = null; - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VotingParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VotingParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - let error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - return null; - }; - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - */ - VotingParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) - return object; - let message = new $root.cosmos.gov.v1beta1.VotingParams(); - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.VotingParams.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - return message; - }; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VotingParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.voting_period = null; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - return object; - }; - - /** - * Converts this VotingParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - * @returns {Object.} JSON object - */ - VotingParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VotingParams; - })(); - - v1beta1.TallyParams = (function() { - - /** - * Properties of a TallyParams. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyParams - * @property {Uint8Array|null} [quorum] TallyParams quorum - * @property {Uint8Array|null} [threshold] TallyParams threshold - * @property {Uint8Array|null} [veto_threshold] TallyParams veto_threshold - */ - - /** - * Constructs a new TallyParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyParams. - * @implements ITallyParams - * @constructor - * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set - */ - function TallyParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyParams quorum. - * @member {Uint8Array} quorum - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.quorum = $util.newBuffer([]); - - /** - * TallyParams threshold. - * @member {Uint8Array} threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.threshold = $util.newBuffer([]); - - /** - * TallyParams veto_threshold. - * @member {Uint8Array} veto_threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.veto_threshold = $util.newBuffer([]); - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.veto_threshold); - return writer; - }; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.veto_threshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) - return "quorum: buffer expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) - return "threshold: buffer expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!(message.veto_threshold && typeof message.veto_threshold.length === "number" || $util.isString(message.veto_threshold))) - return "veto_threshold: buffer expected"; - return null; - }; - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - */ - TallyParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) - return object; - let message = new $root.cosmos.gov.v1beta1.TallyParams(); - if (object.quorum != null) - if (typeof object.quorum === "string") - $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); - else if (object.quorum.length) - message.quorum = object.quorum; - if (object.threshold != null) - if (typeof object.threshold === "string") - $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); - else if (object.threshold.length) - message.threshold = object.threshold; - if (object.veto_threshold != null) - if (typeof object.veto_threshold === "string") - $util.base64.decode(object.veto_threshold, message.veto_threshold = $util.newBuffer($util.base64.length(object.veto_threshold)), 0); - else if (object.veto_threshold.length) - message.veto_threshold = object.veto_threshold; - return message; - }; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.quorum = ""; - else { - object.quorum = []; - if (options.bytes !== Array) - object.quorum = $util.newBuffer(object.quorum); - } - if (options.bytes === String) - object.threshold = ""; - else { - object.threshold = []; - if (options.bytes !== Array) - object.threshold = $util.newBuffer(object.threshold); - } - if (options.bytes === String) - object.veto_threshold = ""; - else { - object.veto_threshold = []; - if (options.bytes !== Array) - object.veto_threshold = $util.newBuffer(object.veto_threshold); - } - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = options.bytes === String ? $util.base64.encode(message.veto_threshold, 0, message.veto_threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.veto_threshold) : message.veto_threshold; - return object; - }; - - /** - * Converts this TallyParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - * @returns {Object.} JSON object - */ - TallyParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyParams; - })(); - - return v1beta1; - })(); - - return gov; - })(); - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - const base = {}; - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - const v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set - */ - function Coin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Coin denom. - * @member {string} denom - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); - while (reader.pos < end) { - let 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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.Coin} message Coin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Coin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set - */ - function DecCoin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DecCoin denom. - * @member {string} denom - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); - while (reader.pos < end) { - let 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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.DecCoin} message DecCoin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecCoin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set - */ - function IntProto(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntProto int. - * @member {string} int - * @memberof cosmos.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); - while (reader.pos < end) { - let 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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.IntProto} message IntProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set - */ - function DecProto(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DecProto dec. - * @member {string} dec - * @memberof cosmos.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); - while (reader.pos < end) { - let 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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.DecProto} message DecProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - return base; - })(); - - return cosmos; -})(); - -export const gogoproto = $root.gogoproto = (() => { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - const gogoproto = {}; - - return gogoproto; -})(); - -export const cosmos_proto = $root.cosmos_proto = (() => { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - const cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - let message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - * @property {string|null} [legacy_amino_encoding] ScalarDescriptor legacy_amino_encoding - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * ScalarDescriptor legacy_amino_encoding. - * @member {string} legacy_amino_encoding - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.legacy_amino_encoding = ""; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (let i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - if (message.legacy_amino_encoding != null && Object.hasOwnProperty.call(message, "legacy_amino_encoding")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.legacy_amino_encoding); - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - case 4: - message.legacy_amino_encoding = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (let i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - if (!$util.isString(message.legacy_amino_encoding)) - return "legacy_amino_encoding: string expected"; - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - let message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (let i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - if (object.legacy_amino_encoding != null) - message.legacy_amino_encoding = String(object.legacy_amino_encoding); - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.legacy_amino_encoding = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (let j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - object.legacy_amino_encoding = message.legacy_amino_encoding; - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; -})(); - -export const google = $root.google = (() => { - - /** - * Namespace google. - * @exports google - * @namespace - */ - const google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - const protobuf = {}; - - 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.file.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (let 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - this.service = []; - this.extension = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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 (let i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.message_type != null && message.message_type.length) - for (let i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (let i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (let 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 (let 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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (let i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (let i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - let 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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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 (let i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (let i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (let i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (let i = 0; i < message.message_type.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (let i = 0; i < message.enum_type.length; ++i) { - let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (let i = 0; i < message.service.length; ++i) { - let 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 (let i = 0; i < message.extension.length; ++i) { - let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - let error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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; - let 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 (let i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (let i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (let i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (let i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (let i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (let 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 (let 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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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 (let j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.message_type && message.message_type.length) { - object.message_type = []; - for (let j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (let j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (let 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 (let 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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (let j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (let j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_name = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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 (let 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.nested_type != null && message.nested_type.length) - for (let i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (let i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (let i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (let 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.oneof_decl != null && message.oneof_decl.length) - for (let i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (let i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (let i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - let 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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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 (let i = 0; i < message.field.length; ++i) { - let 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 (let i = 0; i < message.extension.length; ++i) { - let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (let i = 0; i < message.nested_type.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (let i = 0; i < message.enum_type.length; ++i) { - let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (let i = 0; i < message.extension_range.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (let i = 0; i < message.oneof_decl.length; ++i) { - let error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (let i = 0; i < message.reserved_range.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (let i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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; - let 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 (let 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 (let 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (let i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (let i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (let i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (let i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (let i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (let i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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 (let j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nested_type && message.nested_type.length) { - object.nested_type = []; - for (let j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (let j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (let j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (let 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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (let j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (let j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (let j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 (let 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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - let 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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 = {}; - let 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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() { - const 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() { - const 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - let 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")) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.value.length; ++i) { - let error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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 (let 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 = {}; - let 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 (let 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - let 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")) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.method.length; ++i) { - let error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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 (let 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 = {}; - let 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 (let 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 (let 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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; - let message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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 = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (let i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (let i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (let i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - let error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (let i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - let error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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; - let message = new $root.google.protobuf.FileOptions(); - if (object.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (let i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (let i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (let j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (let j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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() { - const 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (let i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (let i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] 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; - let message = new $root.google.protobuf.MessageOptions(); - if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (let i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (let j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - let 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: 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; - let 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - 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() { - const 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() { - const 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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; - let message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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; - let message = new $root.google.protobuf.EnumOptions(); - if (object.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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; - let message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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; - let message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - let error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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; - let message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 (let 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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 (let 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - let 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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 (let i = 0; i < message.name.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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; - let 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 (let 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifier_value = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (let j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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; - let message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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 = {}; - let object = {}; - if (options.defaults) { - object.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.location.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (let 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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 (let 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 (let i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (let i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let 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) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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 (let 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 (let i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (let i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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; - let 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 (let 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 (let i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (let i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (let j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (let j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.annotation.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (let 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} [source_file] Annotation source_file - * @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 (let 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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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 (let i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.source_file = 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 (let i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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; - let 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 (let i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.source_file != null) - message.source_file = String(object.source_file); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.source_file = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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.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 (let 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([]); - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let 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 {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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let 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; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - const api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (let i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (let i = 0; i < message.rules.length; ++i) { - let error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - let message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (let i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (let j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (let i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - let error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (let i = 0; i < message.additional_bindings.length; ++i) { - let error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - let message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (let i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (let j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - let message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; -})(); - -export { $root as default }; diff --git a/src/generated/ibc/proto.cjs b/src/generated/ibc/proto.cjs deleted file mode 100644 index 586804bd..00000000 --- a/src/generated/ibc/proto.cjs +++ /dev/null @@ -1,89008 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots["@cosmos-client/ibc"] || ($protobuf.roots["@cosmos-client/ibc"] = {}); - - $root.cosmos = (function() { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - var cosmos = {}; - - cosmos.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos - * @namespace - */ - var adminmodule = {}; - - adminmodule.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos.adminmodule - * @namespace - */ - var adminmodule = {}; - - adminmodule.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#deleteAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef DeleteAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} [response] MsgDeleteAdminResponse - */ - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.DeleteAdminCallback} callback Node-style callback called with the error, if any, and MsgDeleteAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.deleteAdmin = function deleteAdmin(request, callback) { - return this.rpcCall(deleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse, request, callback); - }, "name", { value: "DeleteAdmin" }); - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#addAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef AddAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} [response] MsgAddAdminResponse - */ - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.AddAdminCallback} callback Node-style callback called with the error, if any, and MsgAddAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.addAdmin = function addAdmin(request, callback) { - return this.rpcCall(addAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse, request, callback); - }, "name", { value: "AddAdmin" }); - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposal}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef SubmitProposalCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} [response] MsgSubmitProposalResponse - */ - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { - return this.rpcCall(submitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse, request, callback); - }, "name", { value: "SubmitProposal" }); - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposalLegacy}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef SubmitProposalLegacyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} [response] MsgSubmitProposalLegacyResponse - */ - - /** - * Calls SubmitProposalLegacy. - * @function submitProposalLegacy - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} request MsgSubmitProposalLegacy message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.SubmitProposalLegacyCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalLegacyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitProposalLegacy = function submitProposalLegacy(request, callback) { - return this.rpcCall(submitProposalLegacy, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse, request, callback); - }, "name", { value: "SubmitProposalLegacy" }); - - /** - * Calls SubmitProposalLegacy. - * @function submitProposalLegacy - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} request MsgSubmitProposalLegacy message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - adminmodule.MsgDeleteAdmin = (function() { - - /** - * Properties of a MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdmin - * @property {string|null} [creator] MsgDeleteAdmin creator - * @property {string|null} [admin] MsgDeleteAdmin admin - */ - - /** - * Constructs a new MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdmin. - * @implements IMsgDeleteAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin=} [properties] Properties to set - */ - function MsgDeleteAdmin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgDeleteAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.creator = ""; - - /** - * MsgDeleteAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgDeleteAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - */ - MsgDeleteAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgDeleteAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} message MsgDeleteAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgDeleteAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdmin; - })(); - - adminmodule.MsgDeleteAdminResponse = (function() { - - /** - * Properties of a MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdminResponse - */ - - /** - * Constructs a new MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdminResponse. - * @implements IMsgDeleteAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse=} [properties] Properties to set - */ - function MsgDeleteAdminResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgDeleteAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - */ - MsgDeleteAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - }; - - /** - * Creates a plain object from a MsgDeleteAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} message MsgDeleteAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgDeleteAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdminResponse; - })(); - - adminmodule.MsgAddAdmin = (function() { - - /** - * Properties of a MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdmin - * @property {string|null} [creator] MsgAddAdmin creator - * @property {string|null} [admin] MsgAddAdmin admin - */ - - /** - * Constructs a new MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdmin. - * @implements IMsgAddAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin=} [properties] Properties to set - */ - function MsgAddAdmin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAddAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.creator = ""; - - /** - * MsgAddAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgAddAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgAddAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgAddAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - */ - MsgAddAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdmin) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgAddAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdmin} message MsgAddAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgAddAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdmin; - })(); - - adminmodule.MsgAddAdminResponse = (function() { - - /** - * Properties of a MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdminResponse - */ - - /** - * Constructs a new MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdminResponse. - * @implements IMsgAddAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse=} [properties] Properties to set - */ - function MsgAddAdminResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgAddAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgAddAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgAddAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - */ - MsgAddAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - }; - - /** - * Creates a plain object from a MsgAddAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} message MsgAddAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgAddAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdminResponse; - })(); - - adminmodule.MsgSubmitProposalLegacy = (function() { - - /** - * Properties of a MsgSubmitProposalLegacy. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalLegacy - * @property {google.protobuf.IAny|null} [content] MsgSubmitProposalLegacy content - * @property {string|null} [proposer] MsgSubmitProposalLegacy proposer - */ - - /** - * Constructs a new MsgSubmitProposalLegacy. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalLegacy. - * @implements IMsgSubmitProposalLegacy - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy=} [properties] Properties to set - */ - function MsgSubmitProposalLegacy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalLegacy content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @instance - */ - MsgSubmitProposalLegacy.prototype.content = null; - - /** - * MsgSubmitProposalLegacy proposer. - * @member {string} proposer - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @instance - */ - MsgSubmitProposalLegacy.prototype.proposer = ""; - - /** - * Encodes the specified MsgSubmitProposalLegacy message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} message MsgSubmitProposalLegacy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacy.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.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalLegacy message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} message MsgSubmitProposalLegacy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalLegacy message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} MsgSubmitProposalLegacy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy(); - 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: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalLegacy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} MsgSubmitProposalLegacy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalLegacy message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalLegacy.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.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalLegacy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} MsgSubmitProposalLegacy - */ - MsgSubmitProposalLegacy.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy(); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.content: object expected"); - message.content = $root.google.protobuf.Any.fromObject(object.content); - } - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalLegacy message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} message MsgSubmitProposalLegacy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalLegacy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.content = null; - object.proposer = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.protobuf.Any.toObject(message.content, options); - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposalLegacy to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalLegacy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalLegacy; - })(); - - adminmodule.MsgSubmitProposalLegacyResponse = (function() { - - /** - * Properties of a MsgSubmitProposalLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalLegacyResponse - * @property {Long|null} [proposal_id] MsgSubmitProposalLegacyResponse proposal_id - */ - - /** - * Constructs a new MsgSubmitProposalLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalLegacyResponse. - * @implements IMsgSubmitProposalLegacyResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse=} [properties] Properties to set - */ - function MsgSubmitProposalLegacyResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalLegacyResponse proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @instance - */ - MsgSubmitProposalLegacyResponse.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSubmitProposalLegacyResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse} message MsgSubmitProposalLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalLegacyResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse} message MsgSubmitProposalLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalLegacyResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} MsgSubmitProposalLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalLegacyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} MsgSubmitProposalLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalLegacyResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalLegacyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalLegacyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} MsgSubmitProposalLegacyResponse - */ - MsgSubmitProposalLegacyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalLegacyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} message MsgSubmitProposalLegacyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalLegacyResponse.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.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - return object; - }; - - /** - * Converts this MsgSubmitProposalLegacyResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalLegacyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalLegacyResponse; - })(); - - adminmodule.MsgSubmitProposal = (function() { - - /** - * Properties of a MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposal - * @property {Array.|null} [messages] MsgSubmitProposal messages - * @property {string|null} [proposer] MsgSubmitProposal proposer - */ - - /** - * Constructs a new MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposal. - * @implements IMsgSubmitProposal - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal=} [properties] Properties to set - */ - function MsgSubmitProposal(properties) { - this.messages = []; - if (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 messages. - * @member {Array.} messages - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.messages = $util.emptyArray; - - /** - * MsgSubmitProposal proposer. - * @member {string} proposer - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.proposer = ""; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.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.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal(); - 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.proposer = reader.string(); - 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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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.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.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposal} MsgSubmitProposal - */ - MsgSubmitProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposal.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposal.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.messages = []; - if (options.defaults) - object.proposer = ""; - 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.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposal; - })(); - - adminmodule.MsgSubmitProposalResponse = (function() { - - /** - * Properties of a MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalResponse - * @property {Long|null} [proposal_id] MsgSubmitProposalResponse proposal_id - */ - - /** - * Constructs a new MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalResponse. - * @implements IMsgSubmitProposalResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse=} [properties] Properties to set - */ - function MsgSubmitProposalResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalResponse proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - */ - MsgSubmitProposalResponse.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - */ - MsgSubmitProposalResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} message MsgSubmitProposalResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalResponse.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.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - return object; - }; - - /** - * Converts this MsgSubmitProposalResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalResponse; - })(); - - adminmodule.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof cosmos.adminmodule.adminmodule - * @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; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#admins}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef AdminsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} [response] QueryAdminsResponse - */ - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.AdminsCallback} callback Node-style callback called with the error, if any, and QueryAdminsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.admins = function admins(request, callback) { - return this.rpcCall(admins, $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest, $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse, request, callback); - }, "name", { value: "Admins" }); - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposals}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef ArchivedProposalsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} [response] QueryArchivedProposalsResponse - */ - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.ArchivedProposalsCallback} callback Node-style callback called with the error, if any, and QueryArchivedProposalsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.archivedProposals = function archivedProposals(request, callback) { - return this.rpcCall(archivedProposals, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse, request, callback); - }, "name", { value: "ArchivedProposals" }); - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposalsLegacy}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef ArchivedProposalsLegacyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} [response] QueryArchivedProposalsLegacyResponse - */ - - /** - * Calls ArchivedProposalsLegacy. - * @function archivedProposalsLegacy - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} request QueryArchivedProposalsLegacyRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.ArchivedProposalsLegacyCallback} callback Node-style callback called with the error, if any, and QueryArchivedProposalsLegacyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.archivedProposalsLegacy = function archivedProposalsLegacy(request, callback) { - return this.rpcCall(archivedProposalsLegacy, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse, request, callback); - }, "name", { value: "ArchivedProposalsLegacy" }); - - /** - * Calls ArchivedProposalsLegacy. - * @function archivedProposalsLegacy - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} request QueryArchivedProposalsLegacyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - adminmodule.QueryAdminsRequest = (function() { - - /** - * Properties of a QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsRequest - */ - - /** - * Constructs a new QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsRequest. - * @implements IQueryAdminsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest=} [properties] Properties to set - */ - function QueryAdminsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryAdminsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryAdminsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryAdminsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - */ - QueryAdminsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - }; - - /** - * Creates a plain object from a QueryAdminsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsRequest} message QueryAdminsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryAdminsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsRequest; - })(); - - adminmodule.QueryAdminsResponse = (function() { - - /** - * Properties of a QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsResponse - * @property {Array.|null} [admins] QueryAdminsResponse admins - */ - - /** - * Constructs a new QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsResponse. - * @implements IQueryAdminsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse=} [properties] Properties to set - */ - function QueryAdminsResponse(properties) { - this.admins = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAdminsResponse admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - */ - QueryAdminsResponse.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified QueryAdminsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (var i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified QueryAdminsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (var i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a QueryAdminsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - */ - QueryAdminsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryAdminsResponse.admins: array expected"); - message.admins = []; - for (var i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a QueryAdminsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} message QueryAdminsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (var j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this QueryAdminsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsResponse; - })(); - - adminmodule.QueryArchivedProposalsRequest = (function() { - - /** - * Properties of a QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsRequest - */ - - /** - * Constructs a new QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsRequest. - * @implements IQueryArchivedProposalsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest=} [properties] Properties to set - */ - function QueryArchivedProposalsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryArchivedProposalsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryArchivedProposalsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - */ - QueryArchivedProposalsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - }; - - /** - * Creates a plain object from a QueryArchivedProposalsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} message QueryArchivedProposalsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryArchivedProposalsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsRequest; - })(); - - adminmodule.QueryArchivedProposalsLegacyRequest = (function() { - - /** - * Properties of a QueryArchivedProposalsLegacyRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsLegacyRequest - */ - - /** - * Constructs a new QueryArchivedProposalsLegacyRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsLegacyRequest. - * @implements IQueryArchivedProposalsLegacyRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest=} [properties] Properties to set - */ - function QueryArchivedProposalsLegacyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryArchivedProposalsLegacyRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} message QueryArchivedProposalsLegacyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsLegacyRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} message QueryArchivedProposalsLegacyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsLegacyRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} QueryArchivedProposalsLegacyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsLegacyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} QueryArchivedProposalsLegacyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsLegacyRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsLegacyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryArchivedProposalsLegacyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} QueryArchivedProposalsLegacyRequest - */ - QueryArchivedProposalsLegacyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest(); - }; - - /** - * Creates a plain object from a QueryArchivedProposalsLegacyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} message QueryArchivedProposalsLegacyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsLegacyRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryArchivedProposalsLegacyRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsLegacyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsLegacyRequest; - })(); - - adminmodule.QueryProposalsResponse = (function() { - - /** - * Properties of a QueryProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryProposalsResponse - * @property {Array.|null} [proposals] QueryProposalsResponse proposals - */ - - /** - * Constructs a new QueryProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryProposalsResponse. - * @implements IQueryProposalsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryProposalsResponse=} [properties] Properties to set - */ - function QueryProposalsResponse(properties) { - this.proposals = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryProposalsResponse proposals. - * @member {Array.} proposals - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @instance - */ - QueryProposalsResponse.prototype.proposals = $util.emptyArray; - - /** - * Encodes the specified QueryProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryProposalsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryProposalsResponse} message QueryProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryProposalsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposals != null && message.proposals.length) - for (var i = 0; i < message.proposals.length; ++i) - $root.cosmos.gov.v1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryProposalsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryProposalsResponse} message QueryProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryProposalsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryProposalsResponse} QueryProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryProposalsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryProposalsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposals && message.proposals.length)) - message.proposals = []; - message.proposals.push($root.cosmos.gov.v1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryProposalsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryProposalsResponse} QueryProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryProposalsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryProposalsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryProposalsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposals != null && message.hasOwnProperty("proposals")) { - if (!Array.isArray(message.proposals)) - return "proposals: array expected"; - for (var i = 0; i < message.proposals.length; ++i) { - var error = $root.cosmos.gov.v1.Proposal.verify(message.proposals[i]); - if (error) - return "proposals." + error; - } - } - return null; - }; - - /** - * Creates a QueryProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryProposalsResponse} QueryProposalsResponse - */ - QueryProposalsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryProposalsResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.QueryProposalsResponse(); - if (object.proposals) { - if (!Array.isArray(object.proposals)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryProposalsResponse.proposals: array expected"); - message.proposals = []; - for (var i = 0; i < object.proposals.length; ++i) { - if (typeof object.proposals[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryProposalsResponse.proposals: object expected"); - message.proposals[i] = $root.cosmos.gov.v1.Proposal.fromObject(object.proposals[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryProposalsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryProposalsResponse} message QueryProposalsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryProposalsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.proposals = []; - if (message.proposals && message.proposals.length) { - object.proposals = []; - for (var j = 0; j < message.proposals.length; ++j) - object.proposals[j] = $root.cosmos.gov.v1.Proposal.toObject(message.proposals[j], options); - } - return object; - }; - - /** - * Converts this QueryProposalsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryProposalsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryProposalsResponse; - })(); - - adminmodule.QueryArchivedProposalsResponse = (function() { - - /** - * Properties of a QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsResponse - * @property {Array.|null} [proposals] QueryArchivedProposalsResponse proposals - */ - - /** - * Constructs a new QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsResponse. - * @implements IQueryArchivedProposalsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse=} [properties] Properties to set - */ - function QueryArchivedProposalsResponse(properties) { - this.proposals = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryArchivedProposalsResponse proposals. - * @member {Array.} proposals - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - */ - QueryArchivedProposalsResponse.prototype.proposals = $util.emptyArray; - - /** - * Encodes the specified QueryArchivedProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposals != null && message.proposals.length) - for (var i = 0; i < message.proposals.length; ++i) - $root.cosmos.gov.v1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposals && message.proposals.length)) - message.proposals = []; - message.proposals.push($root.cosmos.gov.v1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposals != null && message.hasOwnProperty("proposals")) { - if (!Array.isArray(message.proposals)) - return "proposals: array expected"; - for (var i = 0; i < message.proposals.length; ++i) { - var error = $root.cosmos.gov.v1.Proposal.verify(message.proposals[i]); - if (error) - return "proposals." + error; - } - } - return null; - }; - - /** - * Creates a QueryArchivedProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - */ - QueryArchivedProposalsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - if (object.proposals) { - if (!Array.isArray(object.proposals)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: array expected"); - message.proposals = []; - for (var i = 0; i < object.proposals.length; ++i) { - if (typeof object.proposals[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: object expected"); - message.proposals[i] = $root.cosmos.gov.v1.Proposal.fromObject(object.proposals[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryArchivedProposalsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} message QueryArchivedProposalsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.proposals = []; - if (message.proposals && message.proposals.length) { - object.proposals = []; - for (var j = 0; j < message.proposals.length; ++j) - object.proposals[j] = $root.cosmos.gov.v1.Proposal.toObject(message.proposals[j], options); - } - return object; - }; - - /** - * Converts this QueryArchivedProposalsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsResponse; - })(); - - adminmodule.QueryArchivedProposalsLegacyResponse = (function() { - - /** - * Properties of a QueryArchivedProposalsLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsLegacyResponse - * @property {Array.|null} [proposalsLegacy] QueryArchivedProposalsLegacyResponse proposalsLegacy - */ - - /** - * Constructs a new QueryArchivedProposalsLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsLegacyResponse. - * @implements IQueryArchivedProposalsLegacyResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse=} [properties] Properties to set - */ - function QueryArchivedProposalsLegacyResponse(properties) { - this.proposalsLegacy = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryArchivedProposalsLegacyResponse proposalsLegacy. - * @member {Array.} proposalsLegacy - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @instance - */ - QueryArchivedProposalsLegacyResponse.prototype.proposalsLegacy = $util.emptyArray; - - /** - * Encodes the specified QueryArchivedProposalsLegacyResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse} message QueryArchivedProposalsLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalsLegacy != null && message.proposalsLegacy.length) - for (var i = 0; i < message.proposalsLegacy.length; ++i) - $root.cosmos.gov.v1beta1.Proposal.encode(message.proposalsLegacy[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsLegacyResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse} message QueryArchivedProposalsLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsLegacyResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} QueryArchivedProposalsLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposalsLegacy && message.proposalsLegacy.length)) - message.proposalsLegacy = []; - message.proposalsLegacy.push($root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsLegacyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} QueryArchivedProposalsLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsLegacyResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsLegacyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalsLegacy != null && message.hasOwnProperty("proposalsLegacy")) { - if (!Array.isArray(message.proposalsLegacy)) - return "proposalsLegacy: array expected"; - for (var i = 0; i < message.proposalsLegacy.length; ++i) { - var error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposalsLegacy[i]); - if (error) - return "proposalsLegacy." + error; - } - } - return null; - }; - - /** - * Creates a QueryArchivedProposalsLegacyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} QueryArchivedProposalsLegacyResponse - */ - QueryArchivedProposalsLegacyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse(); - if (object.proposalsLegacy) { - if (!Array.isArray(object.proposalsLegacy)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.proposalsLegacy: array expected"); - message.proposalsLegacy = []; - for (var i = 0; i < object.proposalsLegacy.length; ++i) { - if (typeof object.proposalsLegacy[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.proposalsLegacy: object expected"); - message.proposalsLegacy[i] = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposalsLegacy[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryArchivedProposalsLegacyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} message QueryArchivedProposalsLegacyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsLegacyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.proposalsLegacy = []; - if (message.proposalsLegacy && message.proposalsLegacy.length) { - object.proposalsLegacy = []; - for (var j = 0; j < message.proposalsLegacy.length; ++j) - object.proposalsLegacy[j] = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposalsLegacy[j], options); - } - return object; - }; - - /** - * Converts this QueryArchivedProposalsLegacyResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsLegacyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsLegacyResponse; - })(); - - adminmodule.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @interface IGenesisState - * @property {Array.|null} [admins] GenesisState admins - */ - - /** - * Constructs a new GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {cosmos.adminmodule.adminmodule.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.admins = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - */ - GenesisState.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (var i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (var i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.GenesisState) - return object; - var message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.GenesisState.admins: array expected"); - message.admins = []; - for (var i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (var j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return adminmodule; - })(); - - return adminmodule; - })(); - - cosmos.gov = (function() { - - /** - * Namespace gov. - * @memberof cosmos - * @namespace - */ - var gov = {}; - - gov.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.gov - * @namespace - */ - var v1beta1 = {}; - - /** - * VoteOption enum. - * @name cosmos.gov.v1beta1.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 - */ - v1beta1.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; - })(); - - v1beta1.WeightedVoteOption = (function() { - - /** - * Properties of a WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @interface IWeightedVoteOption - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] WeightedVoteOption option - * @property {string|null} [weight] WeightedVoteOption weight - */ - - /** - * Constructs a new WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a WeightedVoteOption. - * @implements IWeightedVoteOption - * @constructor - * @param {cosmos.gov.v1beta1.IWeightedVoteOption=} [properties] Properties to set - */ - function WeightedVoteOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeightedVoteOption option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.option = 0; - - /** - * WeightedVoteOption weight. - * @member {string} weight - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.weight = ""; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.option); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.weight); - return writer; - }; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeightedVoteOption message. - * @function verify - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeightedVoteOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isString(message.weight)) - return "weight: string expected"; - return null; - }; - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - */ - WeightedVoteOption.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.WeightedVoteOption) - return object; - var message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - 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; - } - if (object.weight != null) - message.weight = String(object.weight); - return message; - }; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.WeightedVoteOption} message WeightedVoteOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeightedVoteOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - object.weight = ""; - } - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - return object; - }; - - /** - * Converts this WeightedVoteOption to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - * @returns {Object.} JSON object - */ - WeightedVoteOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeightedVoteOption; - })(); - - v1beta1.TextProposal = (function() { - - /** - * Properties of a TextProposal. - * @memberof cosmos.gov.v1beta1 - * @interface ITextProposal - * @property {string|null} [title] TextProposal title - * @property {string|null} [description] TextProposal description - */ - - /** - * Constructs a new TextProposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TextProposal. - * @implements ITextProposal - * @constructor - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.title = ""; - - /** - * TextProposal description. - * @member {string} description - * @memberof cosmos.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.description = ""; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal - */ - TextProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) - return object; - var message = new $root.cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @instance - * @returns {Object.} JSON object - */ - TextProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextProposal; - })(); - - v1beta1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos.gov.v1beta1 - * @interface IDeposit - * @property {Long|null} [proposal_id] Deposit proposal_id - * @property {string|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos.gov.v1beta1.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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {string} depositor - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.depositor = ""; - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.Deposit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!$util.isString(message.depositor)) - return "depositor: 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.base.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Deposit) - return object; - var message = new $root.cosmos.gov.v1beta1.Deposit(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.depositor != null) - message.depositor = String(object.depositor); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.depositor = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.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.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - * @returns {Object.} JSON object - */ - Deposit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Deposit; - })(); - - v1beta1.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof cosmos.gov.v1beta1 - * @interface IProposal - * @property {Long|null} [proposal_id] Proposal proposal_id - * @property {google.protobuf.IAny|null} [content] Proposal content - * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status - * @property {cosmos.gov.v1beta1.ITallyResult|null} [final_tally_result] Proposal final_tally_result - * @property {google.protobuf.ITimestamp|null} [submit_time] Proposal submit_time - * @property {google.protobuf.ITimestamp|null} [deposit_end_time] Proposal deposit_end_time - * @property {Array.|null} [total_deposit] Proposal total_deposit - * @property {google.protobuf.ITimestamp|null} [voting_start_time] Proposal voting_start_time - * @property {google.protobuf.ITimestamp|null} [voting_end_time] Proposal voting_end_time - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - this.total_deposit = []; - if (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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.content = null; - - /** - * Proposal status. - * @member {cosmos.gov.v1beta1.ProposalStatus} status - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal final_tally_result. - * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} final_tally_result - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.final_tally_result = null; - - /** - * Proposal submit_time. - * @member {google.protobuf.ITimestamp|null|undefined} submit_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.submit_time = null; - - /** - * Proposal deposit_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} deposit_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.deposit_end_time = null; - - /** - * Proposal total_deposit. - * @member {Array.} total_deposit - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.total_deposit = $util.emptyArray; - - /** - * Proposal voting_start_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_start_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_start_time = null; - - /** - * Proposal voting_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_end_time = null; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - 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.final_tally_result != null && Object.hasOwnProperty.call(message, "final_tally_result")) - $root.cosmos.gov.v1beta1.TallyResult.encode(message.final_tally_result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submit_time != null && Object.hasOwnProperty.call(message, "submit_time")) - $root.google.protobuf.Timestamp.encode(message.submit_time, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deposit_end_time != null && Object.hasOwnProperty.call(message, "deposit_end_time")) - $root.google.protobuf.Timestamp.encode(message.deposit_end_time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.total_deposit != null && message.total_deposit.length) - for (var i = 0; i < message.total_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_deposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.voting_start_time != null && Object.hasOwnProperty.call(message, "voting_start_time")) - $root.google.protobuf.Timestamp.encode(message.voting_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voting_end_time != null && Object.hasOwnProperty.call(message, "voting_end_time")) - $root.google.protobuf.Timestamp.encode(message.voting_end_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.Proposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = 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.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submit_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.deposit_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.total_deposit && message.total_deposit.length)) - message.total_deposit = []; - message.total_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.voting_end_time = $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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: 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.final_tally_result != null && message.hasOwnProperty("final_tally_result")) { - var error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.final_tally_result); - if (error) - return "final_tally_result." + error; - } - if (message.submit_time != null && message.hasOwnProperty("submit_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.submit_time); - if (error) - return "submit_time." + error; - } - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.deposit_end_time); - if (error) - return "deposit_end_time." + error; - } - if (message.total_deposit != null && message.hasOwnProperty("total_deposit")) { - if (!Array.isArray(message.total_deposit)) - return "total_deposit: array expected"; - for (var i = 0; i < message.total_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.total_deposit[i]); - if (error) - return "total_deposit." + error; - } - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.voting_start_time); - if (error) - return "voting_start_time." + error; - } - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.voting_end_time); - if (error) - return "voting_end_time." + error; - } - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Proposal) - return object; - var message = new $root.cosmos.gov.v1beta1.Proposal(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.gov.v1beta1.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.final_tally_result != null) { - if (typeof object.final_tally_result !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.final_tally_result: object expected"); - message.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.final_tally_result); - } - if (object.submit_time != null) { - if (typeof object.submit_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.submit_time: object expected"); - message.submit_time = $root.google.protobuf.Timestamp.fromObject(object.submit_time); - } - if (object.deposit_end_time != null) { - if (typeof object.deposit_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.deposit_end_time: object expected"); - message.deposit_end_time = $root.google.protobuf.Timestamp.fromObject(object.deposit_end_time); - } - if (object.total_deposit) { - if (!Array.isArray(object.total_deposit)) - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: array expected"); - message.total_deposit = []; - for (var i = 0; i < object.total_deposit.length; ++i) { - if (typeof object.total_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: object expected"); - message.total_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_deposit[i]); - } - } - if (object.voting_start_time != null) { - if (typeof object.voting_start_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_start_time: object expected"); - message.voting_start_time = $root.google.protobuf.Timestamp.fromObject(object.voting_start_time); - } - if (object.voting_end_time != null) { - if (typeof object.voting_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_end_time: object expected"); - message.voting_end_time = $root.google.protobuf.Timestamp.fromObject(object.voting_end_time); - } - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.total_deposit = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.content = null; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.final_tally_result = null; - object.submit_time = null; - object.deposit_end_time = null; - object.voting_start_time = null; - object.voting_end_time = null; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - 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.gov.v1beta1.ProposalStatus[message.status] : message.status; - if (message.final_tally_result != null && message.hasOwnProperty("final_tally_result")) - object.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.final_tally_result, options); - if (message.submit_time != null && message.hasOwnProperty("submit_time")) - object.submit_time = $root.google.protobuf.Timestamp.toObject(message.submit_time, options); - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) - object.deposit_end_time = $root.google.protobuf.Timestamp.toObject(message.deposit_end_time, options); - if (message.total_deposit && message.total_deposit.length) { - object.total_deposit = []; - for (var j = 0; j < message.total_deposit.length; ++j) - object.total_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_deposit[j], options); - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) - object.voting_start_time = $root.google.protobuf.Timestamp.toObject(message.voting_start_time, options); - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) - object.voting_end_time = $root.google.protobuf.Timestamp.toObject(message.voting_end_time, options); - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.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.gov.v1beta1.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 - */ - v1beta1.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; - })(); - - v1beta1.TallyResult = (function() { - - /** - * Properties of a TallyResult. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyResult - * @property {string|null} [yes] TallyResult yes - * @property {string|null} [abstain] TallyResult abstain - * @property {string|null} [no] TallyResult no - * @property {string|null} [no_with_veto] TallyResult no_with_veto - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.yes = ""; - - /** - * TallyResult abstain. - * @member {string} abstain - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.abstain = ""; - - /** - * TallyResult no. - * @member {string} no - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no = ""; - - /** - * TallyResult no_with_veto. - * @member {string} no_with_veto - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no_with_veto = ""; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.no_with_veto != null && Object.hasOwnProperty.call(message, "no_with_veto")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.no_with_veto); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.no_with_veto = 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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - if (!$util.isString(message.no_with_veto)) - return "no_with_veto: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) - return object; - var message = new $root.cosmos.gov.v1beta1.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.no_with_veto != null) - message.no_with_veto = String(object.no_with_veto); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.no_with_veto = ""; - } - 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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - object.no_with_veto = message.no_with_veto; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - * @returns {Object.} JSON object - */ - TallyResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyResult; - })(); - - v1beta1.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof cosmos.gov.v1beta1 - * @interface IVote - * @property {Long|null} [proposal_id] Vote proposal_id - * @property {string|null} [voter] Vote voter - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option - * @property {Array.|null} [options] Vote options - */ - - /** - * Constructs a new Vote. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set - */ - function Vote(properties) { - this.options = []; - if (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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {string} voter - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.voter = ""; - - /** - * Vote option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.option = 0; - - /** - * Vote options. - * @member {Array.} options - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.options = $util.emptyArray; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); - if (message.options != null && message.options.length) - for (var i = 0; i < message.options.length; ++i) - $root.cosmos.gov.v1beta1.WeightedVoteOption.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.Vote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.cosmos.gov.v1beta1.WeightedVoteOption.decode(reader, reader.uint32())); - 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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!$util.isString(message.voter)) - return "voter: string 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; - } - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (var i = 0; i < message.options.length; ++i) { - var error = $root.cosmos.gov.v1beta1.WeightedVoteOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Vote) - return object; - var message = new $root.cosmos.gov.v1beta1.Vote(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.voter != null) - message.voter = String(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; - } - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".cosmos.gov.v1beta1.Vote.options: array expected"); - message.options = []; - for (var i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Vote.options: object expected"); - message.options[i] = $root.cosmos.gov.v1beta1.WeightedVoteOption.fromObject(object.options[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.voter = ""; - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = message.voter; - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.options && message.options.length) { - object.options = []; - for (var j = 0; j < message.options.length; ++j) - object.options[j] = $root.cosmos.gov.v1beta1.WeightedVoteOption.toObject(message.options[j], options); - } - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - v1beta1.DepositParams = (function() { - - /** - * Properties of a DepositParams. - * @memberof cosmos.gov.v1beta1 - * @interface IDepositParams - * @property {Array.|null} [min_deposit] DepositParams min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] DepositParams max_deposit_period - */ - - /** - * Constructs a new DepositParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a DepositParams. - * @implements IDepositParams - * @constructor - * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set - */ - function DepositParams(properties) { - this.min_deposit = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DepositParams min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.min_deposit = $util.emptyArray; - - /** - * DepositParams max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.max_deposit_period = null; - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min_deposit != null && message.min_deposit.length) - for (var i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DepositParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DepositParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (var i = 0; i < message.min_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - var error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - return null; - }; - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - */ - DepositParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) - return object; - var message = new $root.cosmos.gov.v1beta1.DepositParams(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: array expected"); - message.min_deposit = []; - for (var i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - return message; - }; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DepositParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) - object.max_deposit_period = null; - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (var j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - return object; - }; - - /** - * Converts this DepositParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - * @returns {Object.} JSON object - */ - DepositParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DepositParams; - })(); - - v1beta1.VotingParams = (function() { - - /** - * Properties of a VotingParams. - * @memberof cosmos.gov.v1beta1 - * @interface IVotingParams - * @property {google.protobuf.IDuration|null} [voting_period] VotingParams voting_period - */ - - /** - * Constructs a new VotingParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a VotingParams. - * @implements IVotingParams - * @constructor - * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set - */ - function VotingParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VotingParams voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - */ - VotingParams.prototype.voting_period = null; - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VotingParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VotingParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - var error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - return null; - }; - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - */ - VotingParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) - return object; - var message = new $root.cosmos.gov.v1beta1.VotingParams(); - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.VotingParams.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - return message; - }; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VotingParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.voting_period = null; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - return object; - }; - - /** - * Converts this VotingParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - * @returns {Object.} JSON object - */ - VotingParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VotingParams; - })(); - - v1beta1.TallyParams = (function() { - - /** - * Properties of a TallyParams. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyParams - * @property {Uint8Array|null} [quorum] TallyParams quorum - * @property {Uint8Array|null} [threshold] TallyParams threshold - * @property {Uint8Array|null} [veto_threshold] TallyParams veto_threshold - */ - - /** - * Constructs a new TallyParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyParams. - * @implements ITallyParams - * @constructor - * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set - */ - function TallyParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyParams quorum. - * @member {Uint8Array} quorum - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.quorum = $util.newBuffer([]); - - /** - * TallyParams threshold. - * @member {Uint8Array} threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.threshold = $util.newBuffer([]); - - /** - * TallyParams veto_threshold. - * @member {Uint8Array} veto_threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.veto_threshold = $util.newBuffer([]); - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.veto_threshold); - return writer; - }; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.veto_threshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) - return "quorum: buffer expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) - return "threshold: buffer expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!(message.veto_threshold && typeof message.veto_threshold.length === "number" || $util.isString(message.veto_threshold))) - return "veto_threshold: buffer expected"; - return null; - }; - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - */ - TallyParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) - return object; - var message = new $root.cosmos.gov.v1beta1.TallyParams(); - if (object.quorum != null) - if (typeof object.quorum === "string") - $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); - else if (object.quorum.length) - message.quorum = object.quorum; - if (object.threshold != null) - if (typeof object.threshold === "string") - $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); - else if (object.threshold.length) - message.threshold = object.threshold; - if (object.veto_threshold != null) - if (typeof object.veto_threshold === "string") - $util.base64.decode(object.veto_threshold, message.veto_threshold = $util.newBuffer($util.base64.length(object.veto_threshold)), 0); - else if (object.veto_threshold.length) - message.veto_threshold = object.veto_threshold; - return message; - }; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.quorum = ""; - else { - object.quorum = []; - if (options.bytes !== Array) - object.quorum = $util.newBuffer(object.quorum); - } - if (options.bytes === String) - object.threshold = ""; - else { - object.threshold = []; - if (options.bytes !== Array) - object.threshold = $util.newBuffer(object.threshold); - } - if (options.bytes === String) - object.veto_threshold = ""; - else { - object.veto_threshold = []; - if (options.bytes !== Array) - object.veto_threshold = $util.newBuffer(object.veto_threshold); - } - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = options.bytes === String ? $util.base64.encode(message.veto_threshold, 0, message.veto_threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.veto_threshold) : message.veto_threshold; - return object; - }; - - /** - * Converts this TallyParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - * @returns {Object.} JSON object - */ - TallyParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyParams; - })(); - - return v1beta1; - })(); - - gov.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos.gov - * @namespace - */ - var v1 = {}; - - /** - * VoteOption enum. - * @name cosmos.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.WeightedVoteOption = (function() { - - /** - * Properties of a WeightedVoteOption. - * @memberof cosmos.gov.v1 - * @interface IWeightedVoteOption - * @property {cosmos.gov.v1.VoteOption|null} [option] WeightedVoteOption option - * @property {string|null} [weight] WeightedVoteOption weight - */ - - /** - * Constructs a new WeightedVoteOption. - * @memberof cosmos.gov.v1 - * @classdesc Represents a WeightedVoteOption. - * @implements IWeightedVoteOption - * @constructor - * @param {cosmos.gov.v1.IWeightedVoteOption=} [properties] Properties to set - */ - function WeightedVoteOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeightedVoteOption option. - * @member {cosmos.gov.v1.VoteOption} option - * @memberof cosmos.gov.v1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.option = 0; - - /** - * WeightedVoteOption weight. - * @member {string} weight - * @memberof cosmos.gov.v1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.weight = ""; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1.WeightedVoteOption.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.option); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.weight); - return writer; - }; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1.WeightedVoteOption.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.WeightedVoteOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeightedVoteOption message. - * @function verify - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeightedVoteOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isString(message.weight)) - return "weight: string expected"; - return null; - }; - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.WeightedVoteOption} WeightedVoteOption - */ - WeightedVoteOption.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.WeightedVoteOption) - return object; - var message = new $root.cosmos.gov.v1.WeightedVoteOption(); - 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; - } - if (object.weight != null) - message.weight = String(object.weight); - return message; - }; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1.WeightedVoteOption} message WeightedVoteOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeightedVoteOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - object.weight = ""; - } - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1.VoteOption[message.option] : message.option; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - return object; - }; - - /** - * Converts this WeightedVoteOption to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.WeightedVoteOption - * @instance - * @returns {Object.} JSON object - */ - WeightedVoteOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeightedVoteOption; - })(); - - v1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos.gov.v1 - * @interface IDeposit - * @property {Long|null} [proposal_id] Deposit proposal_id - * @property {string|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos.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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1.Deposit - * @instance - */ - Deposit.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {string} depositor - * @memberof cosmos.gov.v1.Deposit - * @instance - */ - Deposit.prototype.depositor = ""; - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos.gov.v1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {cosmos.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {cosmos.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.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.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.gov.v1.Deposit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!$util.isString(message.depositor)) - return "depositor: 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.base.v1beta1.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.gov.v1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Deposit) - return object; - var message = new $root.cosmos.gov.v1.Deposit(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.depositor != null) - message.depositor = String(object.depositor); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.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.gov.v1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.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.gov.v1.Deposit - * @static - * @param {cosmos.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.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.depositor = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.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.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos.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.gov.v1 - * @interface IProposal - * @property {Long|null} [id] Proposal id - * @property {Array.|null} [messages] Proposal messages - * @property {cosmos.gov.v1.ProposalStatus|null} [status] Proposal status - * @property {cosmos.gov.v1.ITallyResult|null} [final_tally_result] Proposal final_tally_result - * @property {google.protobuf.ITimestamp|null} [submit_time] Proposal submit_time - * @property {google.protobuf.ITimestamp|null} [deposit_end_time] Proposal deposit_end_time - * @property {Array.|null} [total_deposit] Proposal total_deposit - * @property {google.protobuf.ITimestamp|null} [voting_start_time] Proposal voting_start_time - * @property {google.protobuf.ITimestamp|null} [voting_end_time] Proposal voting_end_time - * @property {string|null} [metadata] Proposal metadata - * @property {string|null} [title] Proposal title - * @property {string|null} [summary] Proposal summary - * @property {string|null} [proposer] Proposal proposer - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos.gov.v1.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - this.messages = []; - this.total_deposit = []; - if (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 id. - * @member {Long} id - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal messages. - * @member {Array.} messages - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.messages = $util.emptyArray; - - /** - * Proposal status. - * @member {cosmos.gov.v1.ProposalStatus} status - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal final_tally_result. - * @member {cosmos.gov.v1.ITallyResult|null|undefined} final_tally_result - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.final_tally_result = null; - - /** - * Proposal submit_time. - * @member {google.protobuf.ITimestamp|null|undefined} submit_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.submit_time = null; - - /** - * Proposal deposit_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} deposit_end_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.deposit_end_time = null; - - /** - * Proposal total_deposit. - * @member {Array.} total_deposit - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.total_deposit = $util.emptyArray; - - /** - * Proposal voting_start_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_start_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.voting_start_time = null; - - /** - * Proposal voting_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_end_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.voting_end_time = null; - - /** - * Proposal metadata. - * @member {string} metadata - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.metadata = ""; - - /** - * Proposal title. - * @member {string} title - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.title = ""; - - /** - * Proposal summary. - * @member {string} summary - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.summary = ""; - - /** - * Proposal proposer. - * @member {string} proposer - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.proposer = ""; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {cosmos.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - 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 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.final_tally_result != null && Object.hasOwnProperty.call(message, "final_tally_result")) - $root.cosmos.gov.v1.TallyResult.encode(message.final_tally_result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submit_time != null && Object.hasOwnProperty.call(message, "submit_time")) - $root.google.protobuf.Timestamp.encode(message.submit_time, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deposit_end_time != null && Object.hasOwnProperty.call(message, "deposit_end_time")) - $root.google.protobuf.Timestamp.encode(message.deposit_end_time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.total_deposit != null && message.total_deposit.length) - for (var i = 0; i < message.total_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_deposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.voting_start_time != null && Object.hasOwnProperty.call(message, "voting_start_time")) - $root.google.protobuf.Timestamp.encode(message.voting_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voting_end_time != null && Object.hasOwnProperty.call(message, "voting_end_time")) - $root.google.protobuf.Timestamp.encode(message.voting_end_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.metadata); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.title); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.summary); - if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {cosmos.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.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.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.gov.v1.Proposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - case 3: - message.status = reader.int32(); - break; - case 4: - message.final_tally_result = $root.cosmos.gov.v1.TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submit_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.deposit_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.total_deposit && message.total_deposit.length)) - message.total_deposit = []; - message.total_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.voting_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.metadata = reader.string(); - break; - case 11: - message.title = reader.string(); - break; - case 12: - message.summary = reader.string(); - break; - case 13: - message.proposer = reader.string(); - 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.gov.v1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long 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.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.final_tally_result != null && message.hasOwnProperty("final_tally_result")) { - var error = $root.cosmos.gov.v1.TallyResult.verify(message.final_tally_result); - if (error) - return "final_tally_result." + error; - } - if (message.submit_time != null && message.hasOwnProperty("submit_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.submit_time); - if (error) - return "submit_time." + error; - } - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.deposit_end_time); - if (error) - return "deposit_end_time." + error; - } - if (message.total_deposit != null && message.hasOwnProperty("total_deposit")) { - if (!Array.isArray(message.total_deposit)) - return "total_deposit: array expected"; - for (var i = 0; i < message.total_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.total_deposit[i]); - if (error) - return "total_deposit." + error; - } - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.voting_start_time); - if (error) - return "voting_start_time." + error; - } - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) { - var error = $root.google.protobuf.Timestamp.verify(message.voting_end_time); - if (error) - return "voting_end_time." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - if (!$util.isString(message.metadata)) - return "metadata: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - if (message.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Proposal) - return object; - var message = new $root.cosmos.gov.v1.Proposal(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".cosmos.gov.v1.Proposal.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - 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.final_tally_result != null) { - if (typeof object.final_tally_result !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.final_tally_result: object expected"); - message.final_tally_result = $root.cosmos.gov.v1.TallyResult.fromObject(object.final_tally_result); - } - if (object.submit_time != null) { - if (typeof object.submit_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.submit_time: object expected"); - message.submit_time = $root.google.protobuf.Timestamp.fromObject(object.submit_time); - } - if (object.deposit_end_time != null) { - if (typeof object.deposit_end_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.deposit_end_time: object expected"); - message.deposit_end_time = $root.google.protobuf.Timestamp.fromObject(object.deposit_end_time); - } - if (object.total_deposit) { - if (!Array.isArray(object.total_deposit)) - throw TypeError(".cosmos.gov.v1.Proposal.total_deposit: array expected"); - message.total_deposit = []; - for (var i = 0; i < object.total_deposit.length; ++i) { - if (typeof object.total_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.total_deposit: object expected"); - message.total_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_deposit[i]); - } - } - if (object.voting_start_time != null) { - if (typeof object.voting_start_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.voting_start_time: object expected"); - message.voting_start_time = $root.google.protobuf.Timestamp.fromObject(object.voting_start_time); - } - if (object.voting_end_time != null) { - if (typeof object.voting_end_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.voting_end_time: object expected"); - message.voting_end_time = $root.google.protobuf.Timestamp.fromObject(object.voting_end_time); - } - if (object.metadata != null) - message.metadata = String(object.metadata); - if (object.title != null) - message.title = String(object.title); - if (object.summary != null) - message.summary = String(object.summary); - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {cosmos.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.messages = []; - object.total_deposit = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.final_tally_result = null; - object.submit_time = null; - object.deposit_end_time = null; - object.voting_start_time = null; - object.voting_end_time = null; - object.metadata = ""; - object.title = ""; - object.summary = ""; - object.proposer = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - 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.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.cosmos.gov.v1.ProposalStatus[message.status] : message.status; - if (message.final_tally_result != null && message.hasOwnProperty("final_tally_result")) - object.final_tally_result = $root.cosmos.gov.v1.TallyResult.toObject(message.final_tally_result, options); - if (message.submit_time != null && message.hasOwnProperty("submit_time")) - object.submit_time = $root.google.protobuf.Timestamp.toObject(message.submit_time, options); - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) - object.deposit_end_time = $root.google.protobuf.Timestamp.toObject(message.deposit_end_time, options); - if (message.total_deposit && message.total_deposit.length) { - object.total_deposit = []; - for (var j = 0; j < message.total_deposit.length; ++j) - object.total_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_deposit[j], options); - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) - object.voting_start_time = $root.google.protobuf.Timestamp.toObject(message.voting_start_time, options); - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) - object.voting_end_time = $root.google.protobuf.Timestamp.toObject(message.voting_end_time, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = message.metadata; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos.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.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.gov.v1 - * @interface ITallyResult - * @property {string|null} [yes_count] TallyResult yes_count - * @property {string|null} [abstain_count] TallyResult abstain_count - * @property {string|null} [no_count] TallyResult no_count - * @property {string|null} [no_with_veto_count] TallyResult no_with_veto_count - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos.gov.v1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos.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_count. - * @member {string} yes_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.yes_count = ""; - - /** - * TallyResult abstain_count. - * @member {string} abstain_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.abstain_count = ""; - - /** - * TallyResult no_count. - * @member {string} no_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.no_count = ""; - - /** - * TallyResult no_with_veto_count. - * @member {string} no_with_veto_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.no_with_veto_count = ""; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {cosmos.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_count != null && Object.hasOwnProperty.call(message, "yes_count")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes_count); - if (message.abstain_count != null && Object.hasOwnProperty.call(message, "abstain_count")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain_count); - if (message.no_count != null && Object.hasOwnProperty.call(message, "no_count")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.no_count); - if (message.no_with_veto_count != null && Object.hasOwnProperty.call(message, "no_with_veto_count")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.no_with_veto_count); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {cosmos.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.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.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.gov.v1.TallyResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes_count = reader.string(); - break; - case 2: - message.abstain_count = reader.string(); - break; - case 3: - message.no_count = reader.string(); - break; - case 4: - message.no_with_veto_count = 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.gov.v1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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_count != null && message.hasOwnProperty("yes_count")) - if (!$util.isString(message.yes_count)) - return "yes_count: string expected"; - if (message.abstain_count != null && message.hasOwnProperty("abstain_count")) - if (!$util.isString(message.abstain_count)) - return "abstain_count: string expected"; - if (message.no_count != null && message.hasOwnProperty("no_count")) - if (!$util.isString(message.no_count)) - return "no_count: string expected"; - if (message.no_with_veto_count != null && message.hasOwnProperty("no_with_veto_count")) - if (!$util.isString(message.no_with_veto_count)) - return "no_with_veto_count: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.TallyResult) - return object; - var message = new $root.cosmos.gov.v1.TallyResult(); - if (object.yes_count != null) - message.yes_count = String(object.yes_count); - if (object.abstain_count != null) - message.abstain_count = String(object.abstain_count); - if (object.no_count != null) - message.no_count = String(object.no_count); - if (object.no_with_veto_count != null) - message.no_with_veto_count = String(object.no_with_veto_count); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {cosmos.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_count = ""; - object.abstain_count = ""; - object.no_count = ""; - object.no_with_veto_count = ""; - } - if (message.yes_count != null && message.hasOwnProperty("yes_count")) - object.yes_count = message.yes_count; - if (message.abstain_count != null && message.hasOwnProperty("abstain_count")) - object.abstain_count = message.abstain_count; - if (message.no_count != null && message.hasOwnProperty("no_count")) - object.no_count = message.no_count; - if (message.no_with_veto_count != null && message.hasOwnProperty("no_with_veto_count")) - object.no_with_veto_count = message.no_with_veto_count; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos.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.gov.v1 - * @interface IVote - * @property {Long|null} [proposal_id] Vote proposal_id - * @property {string|null} [voter] Vote voter - * @property {Array.|null} [options] Vote options - * @property {string|null} [metadata] Vote metadata - */ - - /** - * Constructs a new Vote. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos.gov.v1.IVote=} [properties] Properties to set - */ - function Vote(properties) { - this.options = []; - if (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 proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {string} voter - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.voter = ""; - - /** - * Vote options. - * @member {Array.} options - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.options = $util.emptyArray; - - /** - * Vote metadata. - * @member {string} metadata - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.metadata = ""; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Vote - * @static - * @param {cosmos.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); - if (message.options != null && message.options.length) - for (var i = 0; i < message.options.length; ++i) - $root.cosmos.gov.v1.WeightedVoteOption.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.metadata); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Vote - * @static - * @param {cosmos.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.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.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.gov.v1.Vote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.cosmos.gov.v1.WeightedVoteOption.decode(reader, reader.uint32())); - break; - case 5: - message.metadata = reader.string(); - 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.gov.v1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!$util.isString(message.voter)) - return "voter: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (var i = 0; i < message.options.length; ++i) { - var error = $root.cosmos.gov.v1.WeightedVoteOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - if (!$util.isString(message.metadata)) - return "metadata: string expected"; - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Vote) - return object; - var message = new $root.cosmos.gov.v1.Vote(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.voter != null) - message.voter = String(object.voter); - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".cosmos.gov.v1.Vote.options: array expected"); - message.options = []; - for (var i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".cosmos.gov.v1.Vote.options: object expected"); - message.options[i] = $root.cosmos.gov.v1.WeightedVoteOption.fromObject(object.options[i]); - } - } - if (object.metadata != null) - message.metadata = String(object.metadata); - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.Vote - * @static - * @param {cosmos.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.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.voter = ""; - object.metadata = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = message.voter; - if (message.options && message.options.length) { - object.options = []; - for (var j = 0; j < message.options.length; ++j) - object.options[j] = $root.cosmos.gov.v1.WeightedVoteOption.toObject(message.options[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = message.metadata; - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - v1.DepositParams = (function() { - - /** - * Properties of a DepositParams. - * @memberof cosmos.gov.v1 - * @interface IDepositParams - * @property {Array.|null} [min_deposit] DepositParams min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] DepositParams max_deposit_period - */ - - /** - * Constructs a new DepositParams. - * @memberof cosmos.gov.v1 - * @classdesc Represents a DepositParams. - * @implements IDepositParams - * @constructor - * @param {cosmos.gov.v1.IDepositParams=} [properties] Properties to set - */ - function DepositParams(properties) { - this.min_deposit = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DepositParams min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1.DepositParams - * @instance - */ - DepositParams.prototype.min_deposit = $util.emptyArray; - - /** - * DepositParams max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1.DepositParams - * @instance - */ - DepositParams.prototype.max_deposit_period = null; - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1.DepositParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {cosmos.gov.v1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min_deposit != null && message.min_deposit.length) - for (var i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.DepositParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {cosmos.gov.v1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.DepositParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DepositParams message. - * @function verify - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DepositParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (var i = 0; i < message.min_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - var error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - return null; - }; - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.DepositParams} DepositParams - */ - DepositParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.DepositParams) - return object; - var message = new $root.cosmos.gov.v1.DepositParams(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1.DepositParams.min_deposit: array expected"); - message.min_deposit = []; - for (var i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1.DepositParams.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1.DepositParams.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - return message; - }; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {cosmos.gov.v1.DepositParams} message DepositParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DepositParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) - object.max_deposit_period = null; - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (var j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - return object; - }; - - /** - * Converts this DepositParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.DepositParams - * @instance - * @returns {Object.} JSON object - */ - DepositParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DepositParams; - })(); - - v1.VotingParams = (function() { - - /** - * Properties of a VotingParams. - * @memberof cosmos.gov.v1 - * @interface IVotingParams - * @property {google.protobuf.IDuration|null} [voting_period] VotingParams voting_period - */ - - /** - * Constructs a new VotingParams. - * @memberof cosmos.gov.v1 - * @classdesc Represents a VotingParams. - * @implements IVotingParams - * @constructor - * @param {cosmos.gov.v1.IVotingParams=} [properties] Properties to set - */ - function VotingParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VotingParams voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1.VotingParams - * @instance - */ - VotingParams.prototype.voting_period = null; - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1.VotingParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {cosmos.gov.v1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.VotingParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {cosmos.gov.v1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.VotingParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VotingParams message. - * @function verify - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VotingParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - var error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - return null; - }; - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.VotingParams} VotingParams - */ - VotingParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.VotingParams) - return object; - var message = new $root.cosmos.gov.v1.VotingParams(); - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1.VotingParams.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - return message; - }; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {cosmos.gov.v1.VotingParams} message VotingParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VotingParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.voting_period = null; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - return object; - }; - - /** - * Converts this VotingParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.VotingParams - * @instance - * @returns {Object.} JSON object - */ - VotingParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VotingParams; - })(); - - v1.TallyParams = (function() { - - /** - * Properties of a TallyParams. - * @memberof cosmos.gov.v1 - * @interface ITallyParams - * @property {string|null} [quorum] TallyParams quorum - * @property {string|null} [threshold] TallyParams threshold - * @property {string|null} [veto_threshold] TallyParams veto_threshold - */ - - /** - * Constructs a new TallyParams. - * @memberof cosmos.gov.v1 - * @classdesc Represents a TallyParams. - * @implements ITallyParams - * @constructor - * @param {cosmos.gov.v1.ITallyParams=} [properties] Properties to set - */ - function TallyParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyParams quorum. - * @member {string} quorum - * @memberof cosmos.gov.v1.TallyParams - * @instance - */ - TallyParams.prototype.quorum = ""; - - /** - * TallyParams threshold. - * @member {string} threshold - * @memberof cosmos.gov.v1.TallyParams - * @instance - */ - TallyParams.prototype.threshold = ""; - - /** - * TallyParams veto_threshold. - * @member {string} veto_threshold - * @memberof cosmos.gov.v1.TallyParams - * @instance - */ - TallyParams.prototype.veto_threshold = ""; - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1.TallyParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {cosmos.gov.v1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.veto_threshold); - return writer; - }; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.TallyParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {cosmos.gov.v1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.TallyParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.string(); - break; - case 2: - message.threshold = reader.string(); - break; - case 3: - message.veto_threshold = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyParams message. - * @function verify - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!$util.isString(message.quorum)) - return "quorum: string expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!$util.isString(message.threshold)) - return "threshold: string expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!$util.isString(message.veto_threshold)) - return "veto_threshold: string expected"; - return null; - }; - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.TallyParams} TallyParams - */ - TallyParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.TallyParams) - return object; - var message = new $root.cosmos.gov.v1.TallyParams(); - if (object.quorum != null) - message.quorum = String(object.quorum); - if (object.threshold != null) - message.threshold = String(object.threshold); - if (object.veto_threshold != null) - message.veto_threshold = String(object.veto_threshold); - return message; - }; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {cosmos.gov.v1.TallyParams} message TallyParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.quorum = ""; - object.threshold = ""; - object.veto_threshold = ""; - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = message.veto_threshold; - return object; - }; - - /** - * Converts this TallyParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.TallyParams - * @instance - * @returns {Object.} JSON object - */ - TallyParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyParams; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos.gov.v1 - * @interface IParams - * @property {Array.|null} [min_deposit] Params min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] Params max_deposit_period - * @property {google.protobuf.IDuration|null} [voting_period] Params voting_period - * @property {string|null} [quorum] Params quorum - * @property {string|null} [threshold] Params threshold - * @property {string|null} [veto_threshold] Params veto_threshold - * @property {string|null} [min_initial_deposit_ratio] Params min_initial_deposit_ratio - * @property {boolean|null} [burn_vote_quorum] Params burn_vote_quorum - * @property {boolean|null} [burn_proposal_deposit_prevote] Params burn_proposal_deposit_prevote - * @property {boolean|null} [burn_vote_veto] Params burn_vote_veto - */ - - /** - * Constructs a new Params. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.gov.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.min_deposit = []; - if (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 min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.min_deposit = $util.emptyArray; - - /** - * Params max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.max_deposit_period = null; - - /** - * Params voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.voting_period = null; - - /** - * Params quorum. - * @member {string} quorum - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.quorum = ""; - - /** - * Params threshold. - * @member {string} threshold - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.threshold = ""; - - /** - * Params veto_threshold. - * @member {string} veto_threshold - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.veto_threshold = ""; - - /** - * Params min_initial_deposit_ratio. - * @member {string} min_initial_deposit_ratio - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.min_initial_deposit_ratio = ""; - - /** - * Params burn_vote_quorum. - * @member {boolean} burn_vote_quorum - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.burn_vote_quorum = false; - - /** - * Params burn_proposal_deposit_prevote. - * @member {boolean} burn_proposal_deposit_prevote - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.burn_proposal_deposit_prevote = false; - - /** - * Params burn_vote_veto. - * @member {boolean} burn_vote_veto - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.burn_vote_veto = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.gov.v1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Params - * @static - * @param {cosmos.gov.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.min_deposit != null && message.min_deposit.length) - for (var i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.veto_threshold); - if (message.min_initial_deposit_ratio != null && Object.hasOwnProperty.call(message, "min_initial_deposit_ratio")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.min_initial_deposit_ratio); - if (message.burn_vote_quorum != null && Object.hasOwnProperty.call(message, "burn_vote_quorum")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.burn_vote_quorum); - if (message.burn_proposal_deposit_prevote != null && Object.hasOwnProperty.call(message, "burn_proposal_deposit_prevote")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.burn_proposal_deposit_prevote); - if (message.burn_vote_veto != null && Object.hasOwnProperty.call(message, "burn_vote_veto")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.burn_vote_veto); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.gov.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Params - * @static - * @param {cosmos.gov.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.gov.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.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.gov.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.quorum = reader.string(); - break; - case 5: - message.threshold = reader.string(); - break; - case 6: - message.veto_threshold = reader.string(); - break; - case 7: - message.min_initial_deposit_ratio = reader.string(); - break; - case 13: - message.burn_vote_quorum = reader.bool(); - break; - case 14: - message.burn_proposal_deposit_prevote = reader.bool(); - break; - case 15: - message.burn_vote_veto = 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.gov.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.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.gov.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.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (var i = 0; i < message.min_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - var error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - var error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!$util.isString(message.quorum)) - return "quorum: string expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!$util.isString(message.threshold)) - return "threshold: string expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!$util.isString(message.veto_threshold)) - return "veto_threshold: string expected"; - if (message.min_initial_deposit_ratio != null && message.hasOwnProperty("min_initial_deposit_ratio")) - if (!$util.isString(message.min_initial_deposit_ratio)) - return "min_initial_deposit_ratio: string expected"; - if (message.burn_vote_quorum != null && message.hasOwnProperty("burn_vote_quorum")) - if (typeof message.burn_vote_quorum !== "boolean") - return "burn_vote_quorum: boolean expected"; - if (message.burn_proposal_deposit_prevote != null && message.hasOwnProperty("burn_proposal_deposit_prevote")) - if (typeof message.burn_proposal_deposit_prevote !== "boolean") - return "burn_proposal_deposit_prevote: boolean expected"; - if (message.burn_vote_veto != null && message.hasOwnProperty("burn_vote_veto")) - if (typeof message.burn_vote_veto !== "boolean") - return "burn_vote_veto: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Params) - return object; - var message = new $root.cosmos.gov.v1.Params(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1.Params.min_deposit: array expected"); - message.min_deposit = []; - for (var i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1.Params.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1.Params.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1.Params.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - if (object.quorum != null) - message.quorum = String(object.quorum); - if (object.threshold != null) - message.threshold = String(object.threshold); - if (object.veto_threshold != null) - message.veto_threshold = String(object.veto_threshold); - if (object.min_initial_deposit_ratio != null) - message.min_initial_deposit_ratio = String(object.min_initial_deposit_ratio); - if (object.burn_vote_quorum != null) - message.burn_vote_quorum = Boolean(object.burn_vote_quorum); - if (object.burn_proposal_deposit_prevote != null) - message.burn_proposal_deposit_prevote = Boolean(object.burn_proposal_deposit_prevote); - if (object.burn_vote_veto != null) - message.burn_vote_veto = Boolean(object.burn_vote_veto); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.Params - * @static - * @param {cosmos.gov.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.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) { - object.max_deposit_period = null; - object.voting_period = null; - object.quorum = ""; - object.threshold = ""; - object.veto_threshold = ""; - object.min_initial_deposit_ratio = ""; - object.burn_vote_quorum = false; - object.burn_proposal_deposit_prevote = false; - object.burn_vote_veto = false; - } - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (var j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = message.veto_threshold; - if (message.min_initial_deposit_ratio != null && message.hasOwnProperty("min_initial_deposit_ratio")) - object.min_initial_deposit_ratio = message.min_initial_deposit_ratio; - if (message.burn_vote_quorum != null && message.hasOwnProperty("burn_vote_quorum")) - object.burn_vote_quorum = message.burn_vote_quorum; - if (message.burn_proposal_deposit_prevote != null && message.hasOwnProperty("burn_proposal_deposit_prevote")) - object.burn_proposal_deposit_prevote = message.burn_proposal_deposit_prevote; - if (message.burn_vote_veto != null && message.hasOwnProperty("burn_vote_veto")) - object.burn_vote_veto = message.burn_vote_veto; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.gov.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 gov; - })(); - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - var base = {}; - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - base.query = (function() { - - /** - * Namespace query. - * @memberof cosmos.base - * @namespace - */ - var query = {}; - - query.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base.query - * @namespace - */ - var v1beta1 = {}; - - v1beta1.PageRequest = (function() { - - /** - * Properties of a PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageRequest - * @property {Uint8Array|null} [key] PageRequest key - * @property {Long|null} [offset] PageRequest offset - * @property {Long|null} [limit] PageRequest limit - * @property {boolean|null} [count_total] PageRequest count_total - * @property {boolean|null} [reverse] PageRequest reverse - */ - - /** - * Constructs a new PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageRequest. - * @implements IPageRequest - * @constructor - * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set - */ - function PageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageRequest key. - * @member {Uint8Array} key - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.key = $util.newBuffer([]); - - /** - * PageRequest offset. - * @member {Long} offset - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest limit. - * @member {Long} limit - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest count_total. - * @member {boolean} count_total - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.count_total = false; - - /** - * PageRequest reverse. - * @member {boolean} reverse - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.reverse = false; - - /** - * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); - if (message.count_total != null && Object.hasOwnProperty.call(message, "count_total")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.count_total); - if (message.reverse != null && Object.hasOwnProperty.call(message, "reverse")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reverse); - return writer; - }; - - /** - * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = reader.uint64(); - break; - case 3: - message.limit = reader.uint64(); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageRequest message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.count_total != null && message.hasOwnProperty("count_total")) - if (typeof message.count_total !== "boolean") - return "count_total: boolean expected"; - if (message.reverse != null && message.hasOwnProperty("reverse")) - if (typeof message.reverse !== "boolean") - return "reverse: boolean expected"; - return null; - }; - - /** - * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - */ - PageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) - return object; - var message = new $root.cosmos.base.query.v1beta1.PageRequest(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - if (object.count_total != null) - message.count_total = Boolean(object.count_total); - if (object.reverse != null) - message.reverse = Boolean(object.reverse); - return message; - }; - - /** - * Creates a plain object from a PageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - 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, true); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.count_total = false; - object.reverse = false; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - if (message.count_total != null && message.hasOwnProperty("count_total")) - object.count_total = message.count_total; - if (message.reverse != null && message.hasOwnProperty("reverse")) - object.reverse = message.reverse; - return object; - }; - - /** - * Converts this PageRequest to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - * @returns {Object.} JSON object - */ - PageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageRequest; - })(); - - v1beta1.PageResponse = (function() { - - /** - * Properties of a PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageResponse - * @property {Uint8Array|null} [next_key] PageResponse next_key - * @property {Long|null} [total] PageResponse total - */ - - /** - * Constructs a new PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageResponse. - * @implements IPageResponse - * @constructor - * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set - */ - function PageResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageResponse next_key. - * @member {Uint8Array} next_key - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.next_key = $util.newBuffer([]); - - /** - * PageResponse total. - * @member {Long} total - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.next_key != null && Object.hasOwnProperty.call(message, "next_key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.next_key); - if (message.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); - return writer; - }; - - /** - * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageResponse message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.next_key != null && message.hasOwnProperty("next_key")) - if (!(message.next_key && typeof message.next_key.length === "number" || $util.isString(message.next_key))) - return "next_key: buffer expected"; - if (message.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - return null; - }; - - /** - * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - */ - PageResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageResponse) - return object; - var message = new $root.cosmos.base.query.v1beta1.PageResponse(); - if (object.next_key != null) - if (typeof object.next_key === "string") - $util.base64.decode(object.next_key, message.next_key = $util.newBuffer($util.base64.length(object.next_key)), 0); - else if (object.next_key.length) - message.next_key = object.next_key; - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = true; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a PageResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.PageResponse} message PageResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.next_key = ""; - else { - object.next_key = []; - if (options.bytes !== Array) - object.next_key = $util.newBuffer(object.next_key); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - } - if (message.next_key != null && message.hasOwnProperty("next_key")) - object.next_key = options.bytes === String ? $util.base64.encode(message.next_key, 0, message.next_key.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_key) : message.next_key; - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; - return object; - }; - - /** - * Converts this PageResponse to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - * @returns {Object.} JSON object - */ - PageResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageResponse; - })(); - - return v1beta1; - })(); - - return query; - })(); - - return base; - })(); - - cosmos.upgrade = (function() { - - /** - * Namespace upgrade. - * @memberof cosmos - * @namespace - */ - var upgrade = {}; - - upgrade.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.upgrade - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Plan = (function() { - - /** - * Properties of a Plan. - * @memberof cosmos.upgrade.v1beta1 - * @interface IPlan - * @property {string|null} [name] Plan name - * @property {google.protobuf.ITimestamp|null} [time] Plan time - * @property {Long|null} [height] Plan height - * @property {string|null} [info] Plan info - * @property {google.protobuf.IAny|null} [upgraded_client_state] Plan upgraded_client_state - */ - - /** - * Constructs a new Plan. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a Plan. - * @implements IPlan - * @constructor - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.name = ""; - - /** - * Plan time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.time = null; - - /** - * Plan height. - * @member {Long} height - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Plan info. - * @member {string} info - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.info = ""; - - /** - * Plan upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.upgraded_client_state = null; - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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; - case 5: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - 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.upgrade.v1beta1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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"; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - var error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates a Plan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.Plan} Plan - */ - Plan.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.Plan) - return object; - var message = new $root.cosmos.upgrade.v1beta1.Plan(); - if (object.name != null) - message.name = String(object.name); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".cosmos.upgrade.v1beta1.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); - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".cosmos.upgrade.v1beta1.Plan.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from a Plan message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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 = ""; - object.upgraded_client_state = null; - } - 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; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this Plan to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - * @returns {Object.} JSON object - */ - Plan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Plan; - })(); - - v1beta1.SoftwareUpgradeProposal = (function() { - - /** - * Properties of a SoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @interface ISoftwareUpgradeProposal - * @property {string|null} [title] SoftwareUpgradeProposal title - * @property {string|null} [description] SoftwareUpgradeProposal description - * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] SoftwareUpgradeProposal plan - */ - - /** - * Constructs a new SoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a SoftwareUpgradeProposal. - * @implements ISoftwareUpgradeProposal - * @constructor - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.title = ""; - - /** - * SoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.description = ""; - - /** - * SoftwareUpgradeProposal plan. - * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.plan = null; - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal - */ - SoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) - return object; - var message = new $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal.plan: object expected"); - message.plan = $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan.toObject(message.plan, options); - return object; - }; - - /** - * Converts this SoftwareUpgradeProposal to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - SoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SoftwareUpgradeProposal; - })(); - - v1beta1.CancelSoftwareUpgradeProposal = (function() { - - /** - * Properties of a CancelSoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @interface ICancelSoftwareUpgradeProposal - * @property {string|null} [title] CancelSoftwareUpgradeProposal title - * @property {string|null} [description] CancelSoftwareUpgradeProposal description - */ - - /** - * Constructs a new CancelSoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a CancelSoftwareUpgradeProposal. - * @implements ICancelSoftwareUpgradeProposal - * @constructor - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.title = ""; - - /** - * CancelSoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.description = ""; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal - */ - CancelSoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) - return object; - var message = new $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - CancelSoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CancelSoftwareUpgradeProposal; - })(); - - v1beta1.ModuleVersion = (function() { - - /** - * Properties of a ModuleVersion. - * @memberof cosmos.upgrade.v1beta1 - * @interface IModuleVersion - * @property {string|null} [name] ModuleVersion name - * @property {Long|null} [version] ModuleVersion version - */ - - /** - * Constructs a new ModuleVersion. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a ModuleVersion. - * @implements IModuleVersion - * @constructor - * @param {cosmos.upgrade.v1beta1.IModuleVersion=} [properties] Properties to set - */ - function ModuleVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleVersion name. - * @member {string} name - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - */ - ModuleVersion.prototype.name = ""; - - /** - * ModuleVersion version. - * @member {Long} version - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - */ - ModuleVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ModuleVersion message. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.IModuleVersion} message ModuleVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleVersion.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.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version); - return writer; - }; - - /** - * Encodes the specified ModuleVersion message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.IModuleVersion} message ModuleVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer. - * @function decode - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.ModuleVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.version = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleVersion message. - * @function verify - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleVersion.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.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) - return "version: integer|Long expected"; - return null; - }; - - /** - * Creates a ModuleVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - */ - ModuleVersion.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.ModuleVersion) - return object; - var message = new $root.cosmos.upgrade.v1beta1.ModuleVersion(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = true; - else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); - else if (typeof object.version === "number") - message.version = object.version; - else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ModuleVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.ModuleVersion} message ModuleVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.version = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; - else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; - return object; - }; - - /** - * Converts this ModuleVersion to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - * @returns {Object.} JSON object - */ - ModuleVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleVersion; - })(); - - return v1beta1; - })(); - - return upgrade; - })(); - - cosmos.auth = (function() { - - /** - * Namespace auth. - * @memberof cosmos - * @namespace - */ - var auth = {}; - - auth.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.auth - * @namespace - */ - var v1beta1 = {}; - - v1beta1.BaseAccount = (function() { - - /** - * Properties of a BaseAccount. - * @memberof cosmos.auth.v1beta1 - * @interface IBaseAccount - * @property {string|null} [address] BaseAccount address - * @property {google.protobuf.IAny|null} [pub_key] BaseAccount pub_key - * @property {Long|null} [account_number] BaseAccount account_number - * @property {Long|null} [sequence] BaseAccount sequence - */ - - /** - * Constructs a new BaseAccount. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a BaseAccount. - * @implements IBaseAccount - * @constructor - * @param {cosmos.auth.v1beta1.IBaseAccount=} [properties] Properties to set - */ - function BaseAccount(properties) { - if (properties) - for (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 {string} address - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.address = ""; - - /** - * BaseAccount pub_key. - * @member {google.protobuf.IAny|null|undefined} pub_key - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.pub_key = null; - - /** - * BaseAccount account_number. - * @member {Long} account_number - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.account_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BaseAccount sequence. - * @member {Long} sequence - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.google.protobuf.Any.encode(message.pub_key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.account_number != null && Object.hasOwnProperty.call(message, "account_number")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.account_number); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.BaseAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pub_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.account_number = reader.uint64(); - break; - case 4: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BaseAccount message. - * @function verify - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BaseAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) { - var error = $root.google.protobuf.Any.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.account_number != null && message.hasOwnProperty("account_number")) - if (!$util.isInteger(message.account_number) && !(message.account_number && $util.isInteger(message.account_number.low) && $util.isInteger(message.account_number.high))) - return "account_number: integer|Long expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) - return "sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - */ - BaseAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.BaseAccount) - return object; - var message = new $root.cosmos.auth.v1beta1.BaseAccount(); - if (object.address != null) - message.address = String(object.address); - if (object.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".cosmos.auth.v1beta1.BaseAccount.pub_key: object expected"); - message.pub_key = $root.google.protobuf.Any.fromObject(object.pub_key); - } - if (object.account_number != null) - if ($util.Long) - (message.account_number = $util.Long.fromValue(object.account_number)).unsigned = true; - else if (typeof object.account_number === "string") - message.account_number = parseInt(object.account_number, 10); - else if (typeof object.account_number === "number") - message.account_number = object.account_number; - else if (typeof object.account_number === "object") - message.account_number = new $util.LongBits(object.account_number.low >>> 0, object.account_number.high >>> 0).toNumber(true); - if (object.sequence != null) - if ($util.Long) - (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; - else if (typeof object.sequence === "string") - message.sequence = parseInt(object.sequence, 10); - else if (typeof object.sequence === "number") - message.sequence = object.sequence; - else if (typeof object.sequence === "object") - message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.BaseAccount} message BaseAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BaseAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.address = ""; - object.pub_key = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.account_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.account_number = 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 = message.address; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.google.protobuf.Any.toObject(message.pub_key, options); - if (message.account_number != null && message.hasOwnProperty("account_number")) - if (typeof message.account_number === "number") - object.account_number = options.longs === String ? String(message.account_number) : message.account_number; - else - object.account_number = options.longs === String ? $util.Long.prototype.toString.call(message.account_number) : options.longs === Number ? new $util.LongBits(message.account_number.low >>> 0, message.account_number.high >>> 0).toNumber(true) : message.account_number; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (typeof message.sequence === "number") - object.sequence = options.longs === String ? String(message.sequence) : message.sequence; - else - object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; - return object; - }; - - /** - * Converts this BaseAccount to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - * @returns {Object.} JSON object - */ - BaseAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BaseAccount; - })(); - - v1beta1.ModuleAccount = (function() { - - /** - * Properties of a ModuleAccount. - * @memberof cosmos.auth.v1beta1 - * @interface IModuleAccount - * @property {cosmos.auth.v1beta1.IBaseAccount|null} [base_account] ModuleAccount base_account - * @property {string|null} [name] ModuleAccount name - * @property {Array.|null} [permissions] ModuleAccount permissions - */ - - /** - * Constructs a new ModuleAccount. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a ModuleAccount. - * @implements IModuleAccount - * @constructor - * @param {cosmos.auth.v1beta1.IModuleAccount=} [properties] Properties to set - */ - function ModuleAccount(properties) { - this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleAccount base_account. - * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} base_account - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.base_account = null; - - /** - * ModuleAccount name. - * @member {string} name - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.name = ""; - - /** - * ModuleAccount permissions. - * @member {Array.} permissions - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.permissions = $util.emptyArray; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.base_account != null && Object.hasOwnProperty.call(message, "base_account")) - $root.cosmos.auth.v1beta1.BaseAccount.encode(message.base_account, 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.auth.v1beta1.ModuleAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.ModuleAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleAccount message. - * @function verify - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.base_account != null && message.hasOwnProperty("base_account")) { - var error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.base_account); - if (error) - return "base_account." + 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.auth.v1beta1.ModuleAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - */ - ModuleAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.ModuleAccount) - return object; - var message = new $root.cosmos.auth.v1beta1.ModuleAccount(); - if (object.base_account != null) { - if (typeof object.base_account !== "object") - throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.base_account: object expected"); - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.base_account); - } - if (object.name != null) - message.name = String(object.name); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.permissions: array expected"); - message.permissions = []; - for (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.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.ModuleAccount} message ModuleAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) { - object.base_account = null; - object.name = ""; - } - if (message.base_account != null && message.hasOwnProperty("base_account")) - object.base_account = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.base_account, 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.auth.v1beta1.ModuleAccount - * @instance - * @returns {Object.} JSON object - */ - ModuleAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleAccount; - })(); - - v1beta1.ModuleCredential = (function() { - - /** - * Properties of a ModuleCredential. - * @memberof cosmos.auth.v1beta1 - * @interface IModuleCredential - * @property {string|null} [module_name] ModuleCredential module_name - * @property {Array.|null} [derivation_keys] ModuleCredential derivation_keys - */ - - /** - * Constructs a new ModuleCredential. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a ModuleCredential. - * @implements IModuleCredential - * @constructor - * @param {cosmos.auth.v1beta1.IModuleCredential=} [properties] Properties to set - */ - function ModuleCredential(properties) { - this.derivation_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]]; - } - - /** - * ModuleCredential module_name. - * @member {string} module_name - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @instance - */ - ModuleCredential.prototype.module_name = ""; - - /** - * ModuleCredential derivation_keys. - * @member {Array.} derivation_keys - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @instance - */ - ModuleCredential.prototype.derivation_keys = $util.emptyArray; - - /** - * Encodes the specified ModuleCredential message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleCredential.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {cosmos.auth.v1beta1.IModuleCredential} message ModuleCredential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleCredential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.module_name != null && Object.hasOwnProperty.call(message, "module_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.module_name); - if (message.derivation_keys != null && message.derivation_keys.length) - for (var i = 0; i < message.derivation_keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.derivation_keys[i]); - return writer; - }; - - /** - * Encodes the specified ModuleCredential message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.ModuleCredential.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {cosmos.auth.v1beta1.IModuleCredential} message ModuleCredential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleCredential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleCredential message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.ModuleCredential} ModuleCredential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleCredential.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.ModuleCredential(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.module_name = reader.string(); - break; - case 2: - if (!(message.derivation_keys && message.derivation_keys.length)) - message.derivation_keys = []; - message.derivation_keys.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleCredential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.ModuleCredential} ModuleCredential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleCredential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleCredential message. - * @function verify - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleCredential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.module_name != null && message.hasOwnProperty("module_name")) - if (!$util.isString(message.module_name)) - return "module_name: string expected"; - if (message.derivation_keys != null && message.hasOwnProperty("derivation_keys")) { - if (!Array.isArray(message.derivation_keys)) - return "derivation_keys: array expected"; - for (var i = 0; i < message.derivation_keys.length; ++i) - if (!(message.derivation_keys[i] && typeof message.derivation_keys[i].length === "number" || $util.isString(message.derivation_keys[i]))) - return "derivation_keys: buffer[] expected"; - } - return null; - }; - - /** - * Creates a ModuleCredential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.ModuleCredential} ModuleCredential - */ - ModuleCredential.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.ModuleCredential) - return object; - var message = new $root.cosmos.auth.v1beta1.ModuleCredential(); - if (object.module_name != null) - message.module_name = String(object.module_name); - if (object.derivation_keys) { - if (!Array.isArray(object.derivation_keys)) - throw TypeError(".cosmos.auth.v1beta1.ModuleCredential.derivation_keys: array expected"); - message.derivation_keys = []; - for (var i = 0; i < object.derivation_keys.length; ++i) - if (typeof object.derivation_keys[i] === "string") - $util.base64.decode(object.derivation_keys[i], message.derivation_keys[i] = $util.newBuffer($util.base64.length(object.derivation_keys[i])), 0); - else if (object.derivation_keys[i].length) - message.derivation_keys[i] = object.derivation_keys[i]; - } - return message; - }; - - /** - * Creates a plain object from a ModuleCredential message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {cosmos.auth.v1beta1.ModuleCredential} message ModuleCredential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleCredential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.derivation_keys = []; - if (options.defaults) - object.module_name = ""; - if (message.module_name != null && message.hasOwnProperty("module_name")) - object.module_name = message.module_name; - if (message.derivation_keys && message.derivation_keys.length) { - object.derivation_keys = []; - for (var j = 0; j < message.derivation_keys.length; ++j) - object.derivation_keys[j] = options.bytes === String ? $util.base64.encode(message.derivation_keys[j], 0, message.derivation_keys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.derivation_keys[j]) : message.derivation_keys[j]; - } - return object; - }; - - /** - * Converts this ModuleCredential to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @instance - * @returns {Object.} JSON object - */ - ModuleCredential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleCredential; - })(); - - v1beta1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos.auth.v1beta1 - * @interface IParams - * @property {Long|null} [max_memo_characters] Params max_memo_characters - * @property {Long|null} [tx_sig_limit] Params tx_sig_limit - * @property {Long|null} [tx_size_cost_per_byte] Params tx_size_cost_per_byte - * @property {Long|null} [sig_verify_cost_ed25519] Params sig_verify_cost_ed25519 - * @property {Long|null} [sig_verify_cost_secp256k1] Params sig_verify_cost_secp256k1 - */ - - /** - * Constructs a new Params. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.auth.v1beta1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params max_memo_characters. - * @member {Long} max_memo_characters - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.max_memo_characters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params tx_sig_limit. - * @member {Long} tx_sig_limit - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.tx_sig_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params tx_size_cost_per_byte. - * @member {Long} tx_size_cost_per_byte - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.tx_size_cost_per_byte = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sig_verify_cost_ed25519. - * @member {Long} sig_verify_cost_ed25519 - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.sig_verify_cost_ed25519 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sig_verify_cost_secp256k1. - * @member {Long} sig_verify_cost_secp256k1 - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.sig_verify_cost_secp256k1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.max_memo_characters != null && Object.hasOwnProperty.call(message, "max_memo_characters")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.max_memo_characters); - if (message.tx_sig_limit != null && Object.hasOwnProperty.call(message, "tx_sig_limit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.tx_sig_limit); - if (message.tx_size_cost_per_byte != null && Object.hasOwnProperty.call(message, "tx_size_cost_per_byte")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.tx_size_cost_per_byte); - if (message.sig_verify_cost_ed25519 != null && Object.hasOwnProperty.call(message, "sig_verify_cost_ed25519")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sig_verify_cost_ed25519); - if (message.sig_verify_cost_secp256k1 != null && Object.hasOwnProperty.call(message, "sig_verify_cost_secp256k1")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.sig_verify_cost_secp256k1); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_memo_characters = reader.uint64(); - break; - case 2: - message.tx_sig_limit = reader.uint64(); - break; - case 3: - message.tx_size_cost_per_byte = reader.uint64(); - break; - case 4: - message.sig_verify_cost_ed25519 = reader.uint64(); - break; - case 5: - message.sig_verify_cost_secp256k1 = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.max_memo_characters != null && message.hasOwnProperty("max_memo_characters")) - if (!$util.isInteger(message.max_memo_characters) && !(message.max_memo_characters && $util.isInteger(message.max_memo_characters.low) && $util.isInteger(message.max_memo_characters.high))) - return "max_memo_characters: integer|Long expected"; - if (message.tx_sig_limit != null && message.hasOwnProperty("tx_sig_limit")) - if (!$util.isInteger(message.tx_sig_limit) && !(message.tx_sig_limit && $util.isInteger(message.tx_sig_limit.low) && $util.isInteger(message.tx_sig_limit.high))) - return "tx_sig_limit: integer|Long expected"; - if (message.tx_size_cost_per_byte != null && message.hasOwnProperty("tx_size_cost_per_byte")) - if (!$util.isInteger(message.tx_size_cost_per_byte) && !(message.tx_size_cost_per_byte && $util.isInteger(message.tx_size_cost_per_byte.low) && $util.isInteger(message.tx_size_cost_per_byte.high))) - return "tx_size_cost_per_byte: integer|Long expected"; - if (message.sig_verify_cost_ed25519 != null && message.hasOwnProperty("sig_verify_cost_ed25519")) - if (!$util.isInteger(message.sig_verify_cost_ed25519) && !(message.sig_verify_cost_ed25519 && $util.isInteger(message.sig_verify_cost_ed25519.low) && $util.isInteger(message.sig_verify_cost_ed25519.high))) - return "sig_verify_cost_ed25519: integer|Long expected"; - if (message.sig_verify_cost_secp256k1 != null && message.hasOwnProperty("sig_verify_cost_secp256k1")) - if (!$util.isInteger(message.sig_verify_cost_secp256k1) && !(message.sig_verify_cost_secp256k1 && $util.isInteger(message.sig_verify_cost_secp256k1.low) && $util.isInteger(message.sig_verify_cost_secp256k1.high))) - return "sig_verify_cost_secp256k1: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.Params) - return object; - var message = new $root.cosmos.auth.v1beta1.Params(); - if (object.max_memo_characters != null) - if ($util.Long) - (message.max_memo_characters = $util.Long.fromValue(object.max_memo_characters)).unsigned = true; - else if (typeof object.max_memo_characters === "string") - message.max_memo_characters = parseInt(object.max_memo_characters, 10); - else if (typeof object.max_memo_characters === "number") - message.max_memo_characters = object.max_memo_characters; - else if (typeof object.max_memo_characters === "object") - message.max_memo_characters = new $util.LongBits(object.max_memo_characters.low >>> 0, object.max_memo_characters.high >>> 0).toNumber(true); - if (object.tx_sig_limit != null) - if ($util.Long) - (message.tx_sig_limit = $util.Long.fromValue(object.tx_sig_limit)).unsigned = true; - else if (typeof object.tx_sig_limit === "string") - message.tx_sig_limit = parseInt(object.tx_sig_limit, 10); - else if (typeof object.tx_sig_limit === "number") - message.tx_sig_limit = object.tx_sig_limit; - else if (typeof object.tx_sig_limit === "object") - message.tx_sig_limit = new $util.LongBits(object.tx_sig_limit.low >>> 0, object.tx_sig_limit.high >>> 0).toNumber(true); - if (object.tx_size_cost_per_byte != null) - if ($util.Long) - (message.tx_size_cost_per_byte = $util.Long.fromValue(object.tx_size_cost_per_byte)).unsigned = true; - else if (typeof object.tx_size_cost_per_byte === "string") - message.tx_size_cost_per_byte = parseInt(object.tx_size_cost_per_byte, 10); - else if (typeof object.tx_size_cost_per_byte === "number") - message.tx_size_cost_per_byte = object.tx_size_cost_per_byte; - else if (typeof object.tx_size_cost_per_byte === "object") - message.tx_size_cost_per_byte = new $util.LongBits(object.tx_size_cost_per_byte.low >>> 0, object.tx_size_cost_per_byte.high >>> 0).toNumber(true); - if (object.sig_verify_cost_ed25519 != null) - if ($util.Long) - (message.sig_verify_cost_ed25519 = $util.Long.fromValue(object.sig_verify_cost_ed25519)).unsigned = true; - else if (typeof object.sig_verify_cost_ed25519 === "string") - message.sig_verify_cost_ed25519 = parseInt(object.sig_verify_cost_ed25519, 10); - else if (typeof object.sig_verify_cost_ed25519 === "number") - message.sig_verify_cost_ed25519 = object.sig_verify_cost_ed25519; - else if (typeof object.sig_verify_cost_ed25519 === "object") - message.sig_verify_cost_ed25519 = new $util.LongBits(object.sig_verify_cost_ed25519.low >>> 0, object.sig_verify_cost_ed25519.high >>> 0).toNumber(true); - if (object.sig_verify_cost_secp256k1 != null) - if ($util.Long) - (message.sig_verify_cost_secp256k1 = $util.Long.fromValue(object.sig_verify_cost_secp256k1)).unsigned = true; - else if (typeof object.sig_verify_cost_secp256k1 === "string") - message.sig_verify_cost_secp256k1 = parseInt(object.sig_verify_cost_secp256k1, 10); - else if (typeof object.sig_verify_cost_secp256k1 === "number") - message.sig_verify_cost_secp256k1 = object.sig_verify_cost_secp256k1; - else if (typeof object.sig_verify_cost_secp256k1 === "object") - message.sig_verify_cost_secp256k1 = new $util.LongBits(object.sig_verify_cost_secp256k1.low >>> 0, object.sig_verify_cost_secp256k1.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.max_memo_characters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_memo_characters = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tx_sig_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tx_sig_limit = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tx_size_cost_per_byte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tx_size_cost_per_byte = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.sig_verify_cost_ed25519 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sig_verify_cost_ed25519 = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.sig_verify_cost_secp256k1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sig_verify_cost_secp256k1 = options.longs === String ? "0" : 0; - } - if (message.max_memo_characters != null && message.hasOwnProperty("max_memo_characters")) - if (typeof message.max_memo_characters === "number") - object.max_memo_characters = options.longs === String ? String(message.max_memo_characters) : message.max_memo_characters; - else - object.max_memo_characters = options.longs === String ? $util.Long.prototype.toString.call(message.max_memo_characters) : options.longs === Number ? new $util.LongBits(message.max_memo_characters.low >>> 0, message.max_memo_characters.high >>> 0).toNumber(true) : message.max_memo_characters; - if (message.tx_sig_limit != null && message.hasOwnProperty("tx_sig_limit")) - if (typeof message.tx_sig_limit === "number") - object.tx_sig_limit = options.longs === String ? String(message.tx_sig_limit) : message.tx_sig_limit; - else - object.tx_sig_limit = options.longs === String ? $util.Long.prototype.toString.call(message.tx_sig_limit) : options.longs === Number ? new $util.LongBits(message.tx_sig_limit.low >>> 0, message.tx_sig_limit.high >>> 0).toNumber(true) : message.tx_sig_limit; - if (message.tx_size_cost_per_byte != null && message.hasOwnProperty("tx_size_cost_per_byte")) - if (typeof message.tx_size_cost_per_byte === "number") - object.tx_size_cost_per_byte = options.longs === String ? String(message.tx_size_cost_per_byte) : message.tx_size_cost_per_byte; - else - object.tx_size_cost_per_byte = options.longs === String ? $util.Long.prototype.toString.call(message.tx_size_cost_per_byte) : options.longs === Number ? new $util.LongBits(message.tx_size_cost_per_byte.low >>> 0, message.tx_size_cost_per_byte.high >>> 0).toNumber(true) : message.tx_size_cost_per_byte; - if (message.sig_verify_cost_ed25519 != null && message.hasOwnProperty("sig_verify_cost_ed25519")) - if (typeof message.sig_verify_cost_ed25519 === "number") - object.sig_verify_cost_ed25519 = options.longs === String ? String(message.sig_verify_cost_ed25519) : message.sig_verify_cost_ed25519; - else - object.sig_verify_cost_ed25519 = options.longs === String ? $util.Long.prototype.toString.call(message.sig_verify_cost_ed25519) : options.longs === Number ? new $util.LongBits(message.sig_verify_cost_ed25519.low >>> 0, message.sig_verify_cost_ed25519.high >>> 0).toNumber(true) : message.sig_verify_cost_ed25519; - if (message.sig_verify_cost_secp256k1 != null && message.hasOwnProperty("sig_verify_cost_secp256k1")) - if (typeof message.sig_verify_cost_secp256k1 === "number") - object.sig_verify_cost_secp256k1 = options.longs === String ? String(message.sig_verify_cost_secp256k1) : message.sig_verify_cost_secp256k1; - else - object.sig_verify_cost_secp256k1 = options.longs === String ? $util.Long.prototype.toString.call(message.sig_verify_cost_secp256k1) : options.longs === Number ? new $util.LongBits(message.sig_verify_cost_secp256k1.low >>> 0, message.sig_verify_cost_secp256k1.high >>> 0).toNumber(true) : message.sig_verify_cost_secp256k1; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - return v1beta1; - })(); - - return auth; - })(); - - cosmos.ics23 = (function() { - - /** - * Namespace ics23. - * @memberof cosmos - * @namespace - */ - var ics23 = {}; - - ics23.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos.ics23 - * @namespace - */ - var v1 = {}; - - /** - * HashOp enum. - * @name cosmos.ics23.v1.HashOp - * @enum {number} - * @property {number} NO_HASH=0 NO_HASH value - * @property {number} SHA256=1 SHA256 value - * @property {number} SHA512=2 SHA512 value - * @property {number} KECCAK=3 KECCAK value - * @property {number} RIPEMD160=4 RIPEMD160 value - * @property {number} BITCOIN=5 BITCOIN value - * @property {number} SHA512_256=6 SHA512_256 value - */ - v1.HashOp = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NO_HASH"] = 0; - values[valuesById[1] = "SHA256"] = 1; - values[valuesById[2] = "SHA512"] = 2; - values[valuesById[3] = "KECCAK"] = 3; - values[valuesById[4] = "RIPEMD160"] = 4; - values[valuesById[5] = "BITCOIN"] = 5; - values[valuesById[6] = "SHA512_256"] = 6; - return values; - })(); - - /** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - * @name cosmos.ics23.v1.LengthOp - * @enum {number} - * @property {number} NO_PREFIX=0 NO_PREFIX value - * @property {number} VAR_PROTO=1 VAR_PROTO value - * @property {number} VAR_RLP=2 VAR_RLP value - * @property {number} FIXED32_BIG=3 FIXED32_BIG value - * @property {number} FIXED32_LITTLE=4 FIXED32_LITTLE value - * @property {number} FIXED64_BIG=5 FIXED64_BIG value - * @property {number} FIXED64_LITTLE=6 FIXED64_LITTLE value - * @property {number} REQUIRE_32_BYTES=7 REQUIRE_32_BYTES value - * @property {number} REQUIRE_64_BYTES=8 REQUIRE_64_BYTES value - */ - v1.LengthOp = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NO_PREFIX"] = 0; - values[valuesById[1] = "VAR_PROTO"] = 1; - values[valuesById[2] = "VAR_RLP"] = 2; - values[valuesById[3] = "FIXED32_BIG"] = 3; - values[valuesById[4] = "FIXED32_LITTLE"] = 4; - values[valuesById[5] = "FIXED64_BIG"] = 5; - values[valuesById[6] = "FIXED64_LITTLE"] = 6; - values[valuesById[7] = "REQUIRE_32_BYTES"] = 7; - values[valuesById[8] = "REQUIRE_64_BYTES"] = 8; - return values; - })(); - - v1.ExistenceProof = (function() { - - /** - * Properties of an ExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface IExistenceProof - * @property {Uint8Array|null} [key] ExistenceProof key - * @property {Uint8Array|null} [value] ExistenceProof value - * @property {cosmos.ics23.v1.ILeafOp|null} [leaf] ExistenceProof leaf - * @property {Array.|null} [path] ExistenceProof path - */ - - /** - * Constructs a new ExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - * @implements IExistenceProof - * @constructor - * @param {cosmos.ics23.v1.IExistenceProof=} [properties] Properties to set - */ - function ExistenceProof(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]]; - } - - /** - * ExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * ExistenceProof value. - * @member {Uint8Array} value - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.value = $util.newBuffer([]); - - /** - * ExistenceProof leaf. - * @member {cosmos.ics23.v1.ILeafOp|null|undefined} leaf - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.leaf = null; - - /** - * ExistenceProof path. - * @member {Array.} path - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.path = $util.emptyArray; - - /** - * Encodes the specified ExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.ExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {cosmos.ics23.v1.IExistenceProof} message ExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExistenceProof.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); - if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) - $root.cosmos.ics23.v1.LeafOp.encode(message.leaf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.path != null && message.path.length) - for (var i = 0; i < message.path.length; ++i) - $root.cosmos.ics23.v1.InnerOp.encode(message.path[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.ExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {cosmos.ics23.v1.IExistenceProof} message ExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.ExistenceProof} ExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.ExistenceProof(); - 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; - case 3: - message.leaf = $root.cosmos.ics23.v1.LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.path && message.path.length)) - message.path = []; - message.path.push($root.cosmos.ics23.v1.InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.ExistenceProof} ExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExistenceProof.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"; - if (message.leaf != null && message.hasOwnProperty("leaf")) { - var error = $root.cosmos.ics23.v1.LeafOp.verify(message.leaf); - if (error) - return "leaf." + error; - } - 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) { - var error = $root.cosmos.ics23.v1.InnerOp.verify(message.path[i]); - if (error) - return "path." + error; - } - } - return null; - }; - - /** - * Creates an ExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.ExistenceProof} ExistenceProof - */ - ExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.ExistenceProof) - return object; - var message = new $root.cosmos.ics23.v1.ExistenceProof(); - 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.leaf != null) { - if (typeof object.leaf !== "object") - throw TypeError(".cosmos.ics23.v1.ExistenceProof.leaf: object expected"); - message.leaf = $root.cosmos.ics23.v1.LeafOp.fromObject(object.leaf); - } - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".cosmos.ics23.v1.ExistenceProof.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) { - if (typeof object.path[i] !== "object") - throw TypeError(".cosmos.ics23.v1.ExistenceProof.path: object expected"); - message.path[i] = $root.cosmos.ics23.v1.InnerOp.fromObject(object.path[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {cosmos.ics23.v1.ExistenceProof} message ExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExistenceProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - 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); - } - object.leaf = null; - } - 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.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.cosmos.ics23.v1.LeafOp.toObject(message.leaf, options); - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = $root.cosmos.ics23.v1.InnerOp.toObject(message.path[j], options); - } - return object; - }; - - /** - * Converts this ExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - * @returns {Object.} JSON object - */ - ExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExistenceProof; - })(); - - v1.NonExistenceProof = (function() { - - /** - * Properties of a NonExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface INonExistenceProof - * @property {Uint8Array|null} [key] NonExistenceProof key - * @property {cosmos.ics23.v1.IExistenceProof|null} [left] NonExistenceProof left - * @property {cosmos.ics23.v1.IExistenceProof|null} [right] NonExistenceProof right - */ - - /** - * Constructs a new NonExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a NonExistenceProof. - * @implements INonExistenceProof - * @constructor - * @param {cosmos.ics23.v1.INonExistenceProof=} [properties] Properties to set - */ - function NonExistenceProof(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NonExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - */ - NonExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * NonExistenceProof left. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} left - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - */ - NonExistenceProof.prototype.left = null; - - /** - * NonExistenceProof right. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} right - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - */ - NonExistenceProof.prototype.right = null; - - /** - * Encodes the specified NonExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.NonExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {cosmos.ics23.v1.INonExistenceProof} message NonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NonExistenceProof.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.left != null && Object.hasOwnProperty.call(message, "left")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.left, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.right != null && Object.hasOwnProperty.call(message, "right")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.right, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NonExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.NonExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {cosmos.ics23.v1.INonExistenceProof} message NonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NonExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NonExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.NonExistenceProof} NonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NonExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.NonExistenceProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NonExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.NonExistenceProof} NonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NonExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NonExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NonExistenceProof.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.left != null && message.hasOwnProperty("left")) { - var error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.left); - if (error) - return "left." + error; - } - if (message.right != null && message.hasOwnProperty("right")) { - var error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.right); - if (error) - return "right." + error; - } - return null; - }; - - /** - * Creates a NonExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.NonExistenceProof} NonExistenceProof - */ - NonExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.NonExistenceProof) - return object; - var message = new $root.cosmos.ics23.v1.NonExistenceProof(); - 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.left != null) { - if (typeof object.left !== "object") - throw TypeError(".cosmos.ics23.v1.NonExistenceProof.left: object expected"); - message.left = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.left); - } - if (object.right != null) { - if (typeof object.right !== "object") - throw TypeError(".cosmos.ics23.v1.NonExistenceProof.right: object expected"); - message.right = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.right); - } - return message; - }; - - /** - * Creates a plain object from a NonExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {cosmos.ics23.v1.NonExistenceProof} message NonExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NonExistenceProof.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); - } - object.left = null; - object.right = null; - } - 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.left != null && message.hasOwnProperty("left")) - object.left = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.left, options); - if (message.right != null && message.hasOwnProperty("right")) - object.right = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.right, options); - return object; - }; - - /** - * Converts this NonExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - * @returns {Object.} JSON object - */ - NonExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NonExistenceProof; - })(); - - v1.CommitmentProof = (function() { - - /** - * Properties of a CommitmentProof. - * @memberof cosmos.ics23.v1 - * @interface ICommitmentProof - * @property {cosmos.ics23.v1.IExistenceProof|null} [exist] CommitmentProof exist - * @property {cosmos.ics23.v1.INonExistenceProof|null} [nonexist] CommitmentProof nonexist - * @property {cosmos.ics23.v1.IBatchProof|null} [batch] CommitmentProof batch - * @property {cosmos.ics23.v1.ICompressedBatchProof|null} [compressed] CommitmentProof compressed - */ - - /** - * Constructs a new CommitmentProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CommitmentProof. - * @implements ICommitmentProof - * @constructor - * @param {cosmos.ics23.v1.ICommitmentProof=} [properties] Properties to set - */ - function CommitmentProof(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitmentProof exist. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} exist - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.exist = null; - - /** - * CommitmentProof nonexist. - * @member {cosmos.ics23.v1.INonExistenceProof|null|undefined} nonexist - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.nonexist = null; - - /** - * CommitmentProof batch. - * @member {cosmos.ics23.v1.IBatchProof|null|undefined} batch - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.batch = null; - - /** - * CommitmentProof compressed. - * @member {cosmos.ics23.v1.ICompressedBatchProof|null|undefined} compressed - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.compressed = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CommitmentProof proof. - * @member {"exist"|"nonexist"|"batch"|"compressed"|undefined} proof - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - Object.defineProperty(CommitmentProof.prototype, "proof", { - get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist", "batch", "compressed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified CommitmentProof message. Does not implicitly {@link cosmos.ics23.v1.CommitmentProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {cosmos.ics23.v1.ICommitmentProof} message CommitmentProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitmentProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) - $root.cosmos.ics23.v1.NonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) - $root.cosmos.ics23.v1.BatchProof.encode(message.batch, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.compressed != null && Object.hasOwnProperty.call(message, "compressed")) - $root.cosmos.ics23.v1.CompressedBatchProof.encode(message.compressed, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CommitmentProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CommitmentProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {cosmos.ics23.v1.ICommitmentProof} message CommitmentProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitmentProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitmentProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CommitmentProof} CommitmentProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitmentProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CommitmentProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = $root.cosmos.ics23.v1.BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = $root.cosmos.ics23.v1.CompressedBatchProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitmentProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CommitmentProof} CommitmentProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitmentProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitmentProof message. - * @function verify - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitmentProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.exist); - if (error) - return "exist." + error; - } - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.NonExistenceProof.verify(message.nonexist); - if (error) - return "nonexist." + error; - } - } - if (message.batch != null && message.hasOwnProperty("batch")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.BatchProof.verify(message.batch); - if (error) - return "batch." + error; - } - } - if (message.compressed != null && message.hasOwnProperty("compressed")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.CompressedBatchProof.verify(message.compressed); - if (error) - return "compressed." + error; - } - } - return null; - }; - - /** - * Creates a CommitmentProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CommitmentProof} CommitmentProof - */ - CommitmentProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CommitmentProof) - return object; - var message = new $root.cosmos.ics23.v1.CommitmentProof(); - if (object.exist != null) { - if (typeof object.exist !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.exist: object expected"); - message.exist = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.exist); - } - if (object.nonexist != null) { - if (typeof object.nonexist !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.nonexist: object expected"); - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.fromObject(object.nonexist); - } - if (object.batch != null) { - if (typeof object.batch !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.batch: object expected"); - message.batch = $root.cosmos.ics23.v1.BatchProof.fromObject(object.batch); - } - if (object.compressed != null) { - if (typeof object.compressed !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.compressed: object expected"); - message.compressed = $root.cosmos.ics23.v1.CompressedBatchProof.fromObject(object.compressed); - } - return message; - }; - - /** - * Creates a plain object from a CommitmentProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {cosmos.ics23.v1.CommitmentProof} message CommitmentProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitmentProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - object.exist = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.exist, options); - if (options.oneofs) - object.proof = "exist"; - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - object.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.toObject(message.nonexist, options); - if (options.oneofs) - object.proof = "nonexist"; - } - if (message.batch != null && message.hasOwnProperty("batch")) { - object.batch = $root.cosmos.ics23.v1.BatchProof.toObject(message.batch, options); - if (options.oneofs) - object.proof = "batch"; - } - if (message.compressed != null && message.hasOwnProperty("compressed")) { - object.compressed = $root.cosmos.ics23.v1.CompressedBatchProof.toObject(message.compressed, options); - if (options.oneofs) - object.proof = "compressed"; - } - return object; - }; - - /** - * Converts this CommitmentProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - * @returns {Object.} JSON object - */ - CommitmentProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitmentProof; - })(); - - v1.LeafOp = (function() { - - /** - * Properties of a LeafOp. - * @memberof cosmos.ics23.v1 - * @interface ILeafOp - * @property {cosmos.ics23.v1.HashOp|null} [hash] LeafOp hash - * @property {cosmos.ics23.v1.HashOp|null} [prehash_key] LeafOp prehash_key - * @property {cosmos.ics23.v1.HashOp|null} [prehash_value] LeafOp prehash_value - * @property {cosmos.ics23.v1.LengthOp|null} [length] LeafOp length - * @property {Uint8Array|null} [prefix] LeafOp prefix - */ - - /** - * Constructs a new LeafOp. - * @memberof cosmos.ics23.v1 - * @classdesc LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - * @implements ILeafOp - * @constructor - * @param {cosmos.ics23.v1.ILeafOp=} [properties] Properties to set - */ - function LeafOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LeafOp hash. - * @member {cosmos.ics23.v1.HashOp} hash - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.hash = 0; - - /** - * LeafOp prehash_key. - * @member {cosmos.ics23.v1.HashOp} prehash_key - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.prehash_key = 0; - - /** - * LeafOp prehash_value. - * @member {cosmos.ics23.v1.HashOp} prehash_value - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.prehash_value = 0; - - /** - * LeafOp length. - * @member {cosmos.ics23.v1.LengthOp} length - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.length = 0; - - /** - * LeafOp prefix. - * @member {Uint8Array} prefix - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.prefix = $util.newBuffer([]); - - /** - * Encodes the specified LeafOp message. Does not implicitly {@link cosmos.ics23.v1.LeafOp.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {cosmos.ics23.v1.ILeafOp} message LeafOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LeafOp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hash); - if (message.prehash_key != null && Object.hasOwnProperty.call(message, "prehash_key")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.prehash_key); - if (message.prehash_value != null && Object.hasOwnProperty.call(message, "prehash_value")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.prehash_value); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.length); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.prefix); - return writer; - }; - - /** - * Encodes the specified LeafOp message, length delimited. Does not implicitly {@link cosmos.ics23.v1.LeafOp.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {cosmos.ics23.v1.ILeafOp} message LeafOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LeafOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LeafOp message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.LeafOp} LeafOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LeafOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.LeafOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32(); - break; - case 2: - message.prehash_key = reader.int32(); - break; - case 3: - message.prehash_value = reader.int32(); - break; - case 4: - message.length = reader.int32(); - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LeafOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.LeafOp} LeafOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LeafOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LeafOp message. - * @function verify - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LeafOp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - switch (message.hash) { - default: - return "hash: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.prehash_key != null && message.hasOwnProperty("prehash_key")) - switch (message.prehash_key) { - default: - return "prehash_key: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.prehash_value != null && message.hasOwnProperty("prehash_value")) - switch (message.prehash_value) { - default: - return "prehash_value: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.length != null && message.hasOwnProperty("length")) - switch (message.length) { - default: - return "length: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.prefix != null && message.hasOwnProperty("prefix")) - if (!(message.prefix && typeof message.prefix.length === "number" || $util.isString(message.prefix))) - return "prefix: buffer expected"; - return null; - }; - - /** - * Creates a LeafOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.LeafOp} LeafOp - */ - LeafOp.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.LeafOp) - return object; - var message = new $root.cosmos.ics23.v1.LeafOp(); - switch (object.hash) { - case "NO_HASH": - case 0: - message.hash = 0; - break; - case "SHA256": - case 1: - message.hash = 1; - break; - case "SHA512": - case 2: - message.hash = 2; - break; - case "KECCAK": - case 3: - message.hash = 3; - break; - case "RIPEMD160": - case 4: - message.hash = 4; - break; - case "BITCOIN": - case 5: - message.hash = 5; - break; - case "SHA512_256": - case 6: - message.hash = 6; - break; - } - switch (object.prehash_key) { - case "NO_HASH": - case 0: - message.prehash_key = 0; - break; - case "SHA256": - case 1: - message.prehash_key = 1; - break; - case "SHA512": - case 2: - message.prehash_key = 2; - break; - case "KECCAK": - case 3: - message.prehash_key = 3; - break; - case "RIPEMD160": - case 4: - message.prehash_key = 4; - break; - case "BITCOIN": - case 5: - message.prehash_key = 5; - break; - case "SHA512_256": - case 6: - message.prehash_key = 6; - break; - } - switch (object.prehash_value) { - case "NO_HASH": - case 0: - message.prehash_value = 0; - break; - case "SHA256": - case 1: - message.prehash_value = 1; - break; - case "SHA512": - case 2: - message.prehash_value = 2; - break; - case "KECCAK": - case 3: - message.prehash_value = 3; - break; - case "RIPEMD160": - case 4: - message.prehash_value = 4; - break; - case "BITCOIN": - case 5: - message.prehash_value = 5; - break; - case "SHA512_256": - case 6: - message.prehash_value = 6; - break; - } - switch (object.length) { - case "NO_PREFIX": - case 0: - message.length = 0; - break; - case "VAR_PROTO": - case 1: - message.length = 1; - break; - case "VAR_RLP": - case 2: - message.length = 2; - break; - case "FIXED32_BIG": - case 3: - message.length = 3; - break; - case "FIXED32_LITTLE": - case 4: - message.length = 4; - break; - case "FIXED64_BIG": - case 5: - message.length = 5; - break; - case "FIXED64_LITTLE": - case 6: - message.length = 6; - break; - case "REQUIRE_32_BYTES": - case 7: - message.length = 7; - break; - case "REQUIRE_64_BYTES": - case 8: - message.length = 8; - break; - } - if (object.prefix != null) - if (typeof object.prefix === "string") - $util.base64.decode(object.prefix, message.prefix = $util.newBuffer($util.base64.length(object.prefix)), 0); - else if (object.prefix.length) - message.prefix = object.prefix; - return message; - }; - - /** - * Creates a plain object from a LeafOp message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {cosmos.ics23.v1.LeafOp} message LeafOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LeafOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hash = options.enums === String ? "NO_HASH" : 0; - object.prehash_key = options.enums === String ? "NO_HASH" : 0; - object.prehash_value = options.enums === String ? "NO_HASH" : 0; - object.length = options.enums === String ? "NO_PREFIX" : 0; - if (options.bytes === String) - object.prefix = ""; - else { - object.prefix = []; - if (options.bytes !== Array) - object.prefix = $util.newBuffer(object.prefix); - } - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.hash] : message.hash; - if (message.prehash_key != null && message.hasOwnProperty("prehash_key")) - object.prehash_key = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.prehash_key] : message.prehash_key; - if (message.prehash_value != null && message.hasOwnProperty("prehash_value")) - object.prehash_value = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.prehash_value] : message.prehash_value; - if (message.length != null && message.hasOwnProperty("length")) - object.length = options.enums === String ? $root.cosmos.ics23.v1.LengthOp[message.length] : message.length; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = options.bytes === String ? $util.base64.encode(message.prefix, 0, message.prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.prefix) : message.prefix; - return object; - }; - - /** - * Converts this LeafOp to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.LeafOp - * @instance - * @returns {Object.} JSON object - */ - LeafOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LeafOp; - })(); - - v1.InnerOp = (function() { - - /** - * Properties of an InnerOp. - * @memberof cosmos.ics23.v1 - * @interface IInnerOp - * @property {cosmos.ics23.v1.HashOp|null} [hash] InnerOp hash - * @property {Uint8Array|null} [prefix] InnerOp prefix - * @property {Uint8Array|null} [suffix] InnerOp suffix - */ - - /** - * Constructs a new InnerOp. - * @memberof cosmos.ics23.v1 - * @classdesc InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - * @implements IInnerOp - * @constructor - * @param {cosmos.ics23.v1.IInnerOp=} [properties] Properties to set - */ - function InnerOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InnerOp hash. - * @member {cosmos.ics23.v1.HashOp} hash - * @memberof cosmos.ics23.v1.InnerOp - * @instance - */ - InnerOp.prototype.hash = 0; - - /** - * InnerOp prefix. - * @member {Uint8Array} prefix - * @memberof cosmos.ics23.v1.InnerOp - * @instance - */ - InnerOp.prototype.prefix = $util.newBuffer([]); - - /** - * InnerOp suffix. - * @member {Uint8Array} suffix - * @memberof cosmos.ics23.v1.InnerOp - * @instance - */ - InnerOp.prototype.suffix = $util.newBuffer([]); - - /** - * Encodes the specified InnerOp message. Does not implicitly {@link cosmos.ics23.v1.InnerOp.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {cosmos.ics23.v1.IInnerOp} message InnerOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerOp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hash); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.prefix); - if (message.suffix != null && Object.hasOwnProperty.call(message, "suffix")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.suffix); - return writer; - }; - - /** - * Encodes the specified InnerOp message, length delimited. Does not implicitly {@link cosmos.ics23.v1.InnerOp.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {cosmos.ics23.v1.IInnerOp} message InnerOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InnerOp message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.InnerOp} InnerOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.InnerOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32(); - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InnerOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.InnerOp} InnerOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InnerOp message. - * @function verify - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InnerOp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - switch (message.hash) { - default: - return "hash: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.prefix != null && message.hasOwnProperty("prefix")) - if (!(message.prefix && typeof message.prefix.length === "number" || $util.isString(message.prefix))) - return "prefix: buffer expected"; - if (message.suffix != null && message.hasOwnProperty("suffix")) - if (!(message.suffix && typeof message.suffix.length === "number" || $util.isString(message.suffix))) - return "suffix: buffer expected"; - return null; - }; - - /** - * Creates an InnerOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.InnerOp} InnerOp - */ - InnerOp.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.InnerOp) - return object; - var message = new $root.cosmos.ics23.v1.InnerOp(); - switch (object.hash) { - case "NO_HASH": - case 0: - message.hash = 0; - break; - case "SHA256": - case 1: - message.hash = 1; - break; - case "SHA512": - case 2: - message.hash = 2; - break; - case "KECCAK": - case 3: - message.hash = 3; - break; - case "RIPEMD160": - case 4: - message.hash = 4; - break; - case "BITCOIN": - case 5: - message.hash = 5; - break; - case "SHA512_256": - case 6: - message.hash = 6; - break; - } - if (object.prefix != null) - if (typeof object.prefix === "string") - $util.base64.decode(object.prefix, message.prefix = $util.newBuffer($util.base64.length(object.prefix)), 0); - else if (object.prefix.length) - message.prefix = object.prefix; - if (object.suffix != null) - if (typeof object.suffix === "string") - $util.base64.decode(object.suffix, message.suffix = $util.newBuffer($util.base64.length(object.suffix)), 0); - else if (object.suffix.length) - message.suffix = object.suffix; - return message; - }; - - /** - * Creates a plain object from an InnerOp message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {cosmos.ics23.v1.InnerOp} message InnerOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InnerOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.hash = options.enums === String ? "NO_HASH" : 0; - if (options.bytes === String) - object.prefix = ""; - else { - object.prefix = []; - if (options.bytes !== Array) - object.prefix = $util.newBuffer(object.prefix); - } - if (options.bytes === String) - object.suffix = ""; - else { - object.suffix = []; - if (options.bytes !== Array) - object.suffix = $util.newBuffer(object.suffix); - } - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.hash] : message.hash; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = options.bytes === String ? $util.base64.encode(message.prefix, 0, message.prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.prefix) : message.prefix; - if (message.suffix != null && message.hasOwnProperty("suffix")) - object.suffix = options.bytes === String ? $util.base64.encode(message.suffix, 0, message.suffix.length) : options.bytes === Array ? Array.prototype.slice.call(message.suffix) : message.suffix; - return object; - }; - - /** - * Converts this InnerOp to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.InnerOp - * @instance - * @returns {Object.} JSON object - */ - InnerOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InnerOp; - })(); - - v1.ProofSpec = (function() { - - /** - * Properties of a ProofSpec. - * @memberof cosmos.ics23.v1 - * @interface IProofSpec - * @property {cosmos.ics23.v1.ILeafOp|null} [leaf_spec] ProofSpec leaf_spec - * @property {cosmos.ics23.v1.IInnerSpec|null} [inner_spec] ProofSpec inner_spec - * @property {number|null} [max_depth] ProofSpec max_depth - * @property {number|null} [min_depth] ProofSpec min_depth - */ - - /** - * Constructs a new ProofSpec. - * @memberof cosmos.ics23.v1 - * @classdesc ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - * @implements IProofSpec - * @constructor - * @param {cosmos.ics23.v1.IProofSpec=} [properties] Properties to set - */ - function ProofSpec(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProofSpec leaf_spec. - * @member {cosmos.ics23.v1.ILeafOp|null|undefined} leaf_spec - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.leaf_spec = null; - - /** - * ProofSpec inner_spec. - * @member {cosmos.ics23.v1.IInnerSpec|null|undefined} inner_spec - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.inner_spec = null; - - /** - * ProofSpec max_depth. - * @member {number} max_depth - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.max_depth = 0; - - /** - * ProofSpec min_depth. - * @member {number} min_depth - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.min_depth = 0; - - /** - * Encodes the specified ProofSpec message. Does not implicitly {@link cosmos.ics23.v1.ProofSpec.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {cosmos.ics23.v1.IProofSpec} message ProofSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.leaf_spec != null && Object.hasOwnProperty.call(message, "leaf_spec")) - $root.cosmos.ics23.v1.LeafOp.encode(message.leaf_spec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.inner_spec != null && Object.hasOwnProperty.call(message, "inner_spec")) - $root.cosmos.ics23.v1.InnerSpec.encode(message.inner_spec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.max_depth != null && Object.hasOwnProperty.call(message, "max_depth")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.max_depth); - if (message.min_depth != null && Object.hasOwnProperty.call(message, "min_depth")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.min_depth); - return writer; - }; - - /** - * Encodes the specified ProofSpec message, length delimited. Does not implicitly {@link cosmos.ics23.v1.ProofSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {cosmos.ics23.v1.IProofSpec} message ProofSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProofSpec message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.ProofSpec} ProofSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.ProofSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leaf_spec = $root.cosmos.ics23.v1.LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.inner_spec = $root.cosmos.ics23.v1.InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.max_depth = reader.int32(); - break; - case 4: - message.min_depth = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProofSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.ProofSpec} ProofSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProofSpec message. - * @function verify - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProofSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.leaf_spec != null && message.hasOwnProperty("leaf_spec")) { - var error = $root.cosmos.ics23.v1.LeafOp.verify(message.leaf_spec); - if (error) - return "leaf_spec." + error; - } - if (message.inner_spec != null && message.hasOwnProperty("inner_spec")) { - var error = $root.cosmos.ics23.v1.InnerSpec.verify(message.inner_spec); - if (error) - return "inner_spec." + error; - } - if (message.max_depth != null && message.hasOwnProperty("max_depth")) - if (!$util.isInteger(message.max_depth)) - return "max_depth: integer expected"; - if (message.min_depth != null && message.hasOwnProperty("min_depth")) - if (!$util.isInteger(message.min_depth)) - return "min_depth: integer expected"; - return null; - }; - - /** - * Creates a ProofSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.ProofSpec} ProofSpec - */ - ProofSpec.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.ProofSpec) - return object; - var message = new $root.cosmos.ics23.v1.ProofSpec(); - if (object.leaf_spec != null) { - if (typeof object.leaf_spec !== "object") - throw TypeError(".cosmos.ics23.v1.ProofSpec.leaf_spec: object expected"); - message.leaf_spec = $root.cosmos.ics23.v1.LeafOp.fromObject(object.leaf_spec); - } - if (object.inner_spec != null) { - if (typeof object.inner_spec !== "object") - throw TypeError(".cosmos.ics23.v1.ProofSpec.inner_spec: object expected"); - message.inner_spec = $root.cosmos.ics23.v1.InnerSpec.fromObject(object.inner_spec); - } - if (object.max_depth != null) - message.max_depth = object.max_depth | 0; - if (object.min_depth != null) - message.min_depth = object.min_depth | 0; - return message; - }; - - /** - * Creates a plain object from a ProofSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {cosmos.ics23.v1.ProofSpec} message ProofSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.leaf_spec = null; - object.inner_spec = null; - object.max_depth = 0; - object.min_depth = 0; - } - if (message.leaf_spec != null && message.hasOwnProperty("leaf_spec")) - object.leaf_spec = $root.cosmos.ics23.v1.LeafOp.toObject(message.leaf_spec, options); - if (message.inner_spec != null && message.hasOwnProperty("inner_spec")) - object.inner_spec = $root.cosmos.ics23.v1.InnerSpec.toObject(message.inner_spec, options); - if (message.max_depth != null && message.hasOwnProperty("max_depth")) - object.max_depth = message.max_depth; - if (message.min_depth != null && message.hasOwnProperty("min_depth")) - object.min_depth = message.min_depth; - return object; - }; - - /** - * Converts this ProofSpec to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - * @returns {Object.} JSON object - */ - ProofSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofSpec; - })(); - - v1.InnerSpec = (function() { - - /** - * Properties of an InnerSpec. - * @memberof cosmos.ics23.v1 - * @interface IInnerSpec - * @property {Array.|null} [child_order] InnerSpec child_order - * @property {number|null} [child_size] InnerSpec child_size - * @property {number|null} [min_prefix_length] InnerSpec min_prefix_length - * @property {number|null} [max_prefix_length] InnerSpec max_prefix_length - * @property {Uint8Array|null} [empty_child] InnerSpec empty_child - * @property {cosmos.ics23.v1.HashOp|null} [hash] InnerSpec hash - */ - - /** - * Constructs a new InnerSpec. - * @memberof cosmos.ics23.v1 - * @classdesc Represents an InnerSpec. - * @implements IInnerSpec - * @constructor - * @param {cosmos.ics23.v1.IInnerSpec=} [properties] Properties to set - */ - function InnerSpec(properties) { - this.child_order = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InnerSpec child_order. - * @member {Array.} child_order - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.child_order = $util.emptyArray; - - /** - * InnerSpec child_size. - * @member {number} child_size - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.child_size = 0; - - /** - * InnerSpec min_prefix_length. - * @member {number} min_prefix_length - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.min_prefix_length = 0; - - /** - * InnerSpec max_prefix_length. - * @member {number} max_prefix_length - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.max_prefix_length = 0; - - /** - * InnerSpec empty_child. - * @member {Uint8Array} empty_child - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.empty_child = $util.newBuffer([]); - - /** - * InnerSpec hash. - * @member {cosmos.ics23.v1.HashOp} hash - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.hash = 0; - - /** - * Encodes the specified InnerSpec message. Does not implicitly {@link cosmos.ics23.v1.InnerSpec.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {cosmos.ics23.v1.IInnerSpec} message InnerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.child_order != null && message.child_order.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.child_order.length; ++i) - writer.int32(message.child_order[i]); - writer.ldelim(); - } - if (message.child_size != null && Object.hasOwnProperty.call(message, "child_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.child_size); - if (message.min_prefix_length != null && Object.hasOwnProperty.call(message, "min_prefix_length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.min_prefix_length); - if (message.max_prefix_length != null && Object.hasOwnProperty.call(message, "max_prefix_length")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.max_prefix_length); - if (message.empty_child != null && Object.hasOwnProperty.call(message, "empty_child")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.empty_child); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.hash); - return writer; - }; - - /** - * Encodes the specified InnerSpec message, length delimited. Does not implicitly {@link cosmos.ics23.v1.InnerSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {cosmos.ics23.v1.IInnerSpec} message InnerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InnerSpec message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.InnerSpec} InnerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.InnerSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.child_order && message.child_order.length)) - message.child_order = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.child_order.push(reader.int32()); - } else - message.child_order.push(reader.int32()); - break; - case 2: - message.child_size = reader.int32(); - break; - case 3: - message.min_prefix_length = reader.int32(); - break; - case 4: - message.max_prefix_length = reader.int32(); - break; - case 5: - message.empty_child = reader.bytes(); - break; - case 6: - message.hash = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InnerSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.InnerSpec} InnerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InnerSpec message. - * @function verify - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InnerSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.child_order != null && message.hasOwnProperty("child_order")) { - if (!Array.isArray(message.child_order)) - return "child_order: array expected"; - for (var i = 0; i < message.child_order.length; ++i) - if (!$util.isInteger(message.child_order[i])) - return "child_order: integer[] expected"; - } - if (message.child_size != null && message.hasOwnProperty("child_size")) - if (!$util.isInteger(message.child_size)) - return "child_size: integer expected"; - if (message.min_prefix_length != null && message.hasOwnProperty("min_prefix_length")) - if (!$util.isInteger(message.min_prefix_length)) - return "min_prefix_length: integer expected"; - if (message.max_prefix_length != null && message.hasOwnProperty("max_prefix_length")) - if (!$util.isInteger(message.max_prefix_length)) - return "max_prefix_length: integer expected"; - if (message.empty_child != null && message.hasOwnProperty("empty_child")) - if (!(message.empty_child && typeof message.empty_child.length === "number" || $util.isString(message.empty_child))) - return "empty_child: buffer expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - switch (message.hash) { - default: - return "hash: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - return null; - }; - - /** - * Creates an InnerSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.InnerSpec} InnerSpec - */ - InnerSpec.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.InnerSpec) - return object; - var message = new $root.cosmos.ics23.v1.InnerSpec(); - if (object.child_order) { - if (!Array.isArray(object.child_order)) - throw TypeError(".cosmos.ics23.v1.InnerSpec.child_order: array expected"); - message.child_order = []; - for (var i = 0; i < object.child_order.length; ++i) - message.child_order[i] = object.child_order[i] | 0; - } - if (object.child_size != null) - message.child_size = object.child_size | 0; - if (object.min_prefix_length != null) - message.min_prefix_length = object.min_prefix_length | 0; - if (object.max_prefix_length != null) - message.max_prefix_length = object.max_prefix_length | 0; - if (object.empty_child != null) - if (typeof object.empty_child === "string") - $util.base64.decode(object.empty_child, message.empty_child = $util.newBuffer($util.base64.length(object.empty_child)), 0); - else if (object.empty_child.length) - message.empty_child = object.empty_child; - switch (object.hash) { - case "NO_HASH": - case 0: - message.hash = 0; - break; - case "SHA256": - case 1: - message.hash = 1; - break; - case "SHA512": - case 2: - message.hash = 2; - break; - case "KECCAK": - case 3: - message.hash = 3; - break; - case "RIPEMD160": - case 4: - message.hash = 4; - break; - case "BITCOIN": - case 5: - message.hash = 5; - break; - case "SHA512_256": - case 6: - message.hash = 6; - break; - } - return message; - }; - - /** - * Creates a plain object from an InnerSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {cosmos.ics23.v1.InnerSpec} message InnerSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InnerSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.child_order = []; - if (options.defaults) { - object.child_size = 0; - object.min_prefix_length = 0; - object.max_prefix_length = 0; - if (options.bytes === String) - object.empty_child = ""; - else { - object.empty_child = []; - if (options.bytes !== Array) - object.empty_child = $util.newBuffer(object.empty_child); - } - object.hash = options.enums === String ? "NO_HASH" : 0; - } - if (message.child_order && message.child_order.length) { - object.child_order = []; - for (var j = 0; j < message.child_order.length; ++j) - object.child_order[j] = message.child_order[j]; - } - if (message.child_size != null && message.hasOwnProperty("child_size")) - object.child_size = message.child_size; - if (message.min_prefix_length != null && message.hasOwnProperty("min_prefix_length")) - object.min_prefix_length = message.min_prefix_length; - if (message.max_prefix_length != null && message.hasOwnProperty("max_prefix_length")) - object.max_prefix_length = message.max_prefix_length; - if (message.empty_child != null && message.hasOwnProperty("empty_child")) - object.empty_child = options.bytes === String ? $util.base64.encode(message.empty_child, 0, message.empty_child.length) : options.bytes === Array ? Array.prototype.slice.call(message.empty_child) : message.empty_child; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.hash] : message.hash; - return object; - }; - - /** - * Converts this InnerSpec to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - * @returns {Object.} JSON object - */ - InnerSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InnerSpec; - })(); - - v1.BatchProof = (function() { - - /** - * Properties of a BatchProof. - * @memberof cosmos.ics23.v1 - * @interface IBatchProof - * @property {Array.|null} [entries] BatchProof entries - */ - - /** - * Constructs a new BatchProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a BatchProof. - * @implements IBatchProof - * @constructor - * @param {cosmos.ics23.v1.IBatchProof=} [properties] Properties to set - */ - function BatchProof(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]]; - } - - /** - * BatchProof entries. - * @member {Array.} entries - * @memberof cosmos.ics23.v1.BatchProof - * @instance - */ - BatchProof.prototype.entries = $util.emptyArray; - - /** - * Encodes the specified BatchProof message. Does not implicitly {@link cosmos.ics23.v1.BatchProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {cosmos.ics23.v1.IBatchProof} message BatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.cosmos.ics23.v1.BatchEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.BatchProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {cosmos.ics23.v1.IBatchProof} message BatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.BatchProof} BatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.BatchProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.cosmos.ics23.v1.BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.BatchProof} BatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchProof message. - * @function verify - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.ics23.v1.BatchEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - return null; - }; - - /** - * Creates a BatchProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.BatchProof} BatchProof - */ - BatchProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.BatchProof) - return object; - var message = new $root.cosmos.ics23.v1.BatchProof(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".cosmos.ics23.v1.BatchProof.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".cosmos.ics23.v1.BatchProof.entries: object expected"); - message.entries[i] = $root.cosmos.ics23.v1.BatchEntry.fromObject(object.entries[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BatchProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {cosmos.ics23.v1.BatchProof} message BatchProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.cosmos.ics23.v1.BatchEntry.toObject(message.entries[j], options); - } - return object; - }; - - /** - * Converts this BatchProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.BatchProof - * @instance - * @returns {Object.} JSON object - */ - BatchProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BatchProof; - })(); - - v1.BatchEntry = (function() { - - /** - * Properties of a BatchEntry. - * @memberof cosmos.ics23.v1 - * @interface IBatchEntry - * @property {cosmos.ics23.v1.IExistenceProof|null} [exist] BatchEntry exist - * @property {cosmos.ics23.v1.INonExistenceProof|null} [nonexist] BatchEntry nonexist - */ - - /** - * Constructs a new BatchEntry. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a BatchEntry. - * @implements IBatchEntry - * @constructor - * @param {cosmos.ics23.v1.IBatchEntry=} [properties] Properties to set - */ - function BatchEntry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchEntry exist. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} exist - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - */ - BatchEntry.prototype.exist = null; - - /** - * BatchEntry nonexist. - * @member {cosmos.ics23.v1.INonExistenceProof|null|undefined} nonexist - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - */ - BatchEntry.prototype.nonexist = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchEntry proof. - * @member {"exist"|"nonexist"|undefined} proof - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - */ - Object.defineProperty(BatchEntry.prototype, "proof", { - get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified BatchEntry message. Does not implicitly {@link cosmos.ics23.v1.BatchEntry.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {cosmos.ics23.v1.IBatchEntry} message BatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) - $root.cosmos.ics23.v1.NonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchEntry message, length delimited. Does not implicitly {@link cosmos.ics23.v1.BatchEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {cosmos.ics23.v1.IBatchEntry} message BatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchEntry message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.BatchEntry} BatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.BatchEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.BatchEntry} BatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchEntry message. - * @function verify - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.exist); - if (error) - return "exist." + error; - } - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.NonExistenceProof.verify(message.nonexist); - if (error) - return "nonexist." + error; - } - } - return null; - }; - - /** - * Creates a BatchEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.BatchEntry} BatchEntry - */ - BatchEntry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.BatchEntry) - return object; - var message = new $root.cosmos.ics23.v1.BatchEntry(); - if (object.exist != null) { - if (typeof object.exist !== "object") - throw TypeError(".cosmos.ics23.v1.BatchEntry.exist: object expected"); - message.exist = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.exist); - } - if (object.nonexist != null) { - if (typeof object.nonexist !== "object") - throw TypeError(".cosmos.ics23.v1.BatchEntry.nonexist: object expected"); - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.fromObject(object.nonexist); - } - return message; - }; - - /** - * Creates a plain object from a BatchEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {cosmos.ics23.v1.BatchEntry} message BatchEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - object.exist = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.exist, options); - if (options.oneofs) - object.proof = "exist"; - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - object.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.toObject(message.nonexist, options); - if (options.oneofs) - object.proof = "nonexist"; - } - return object; - }; - - /** - * Converts this BatchEntry to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - * @returns {Object.} JSON object - */ - BatchEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BatchEntry; - })(); - - v1.CompressedBatchProof = (function() { - - /** - * Properties of a CompressedBatchProof. - * @memberof cosmos.ics23.v1 - * @interface ICompressedBatchProof - * @property {Array.|null} [entries] CompressedBatchProof entries - * @property {Array.|null} [lookup_inners] CompressedBatchProof lookup_inners - */ - - /** - * Constructs a new CompressedBatchProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedBatchProof. - * @implements ICompressedBatchProof - * @constructor - * @param {cosmos.ics23.v1.ICompressedBatchProof=} [properties] Properties to set - */ - function CompressedBatchProof(properties) { - this.entries = []; - this.lookup_inners = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedBatchProof entries. - * @member {Array.} entries - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @instance - */ - CompressedBatchProof.prototype.entries = $util.emptyArray; - - /** - * CompressedBatchProof lookup_inners. - * @member {Array.} lookup_inners - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @instance - */ - CompressedBatchProof.prototype.lookup_inners = $util.emptyArray; - - /** - * Encodes the specified CompressedBatchProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {cosmos.ics23.v1.ICompressedBatchProof} message CompressedBatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.cosmos.ics23.v1.CompressedBatchEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lookup_inners != null && message.lookup_inners.length) - for (var i = 0; i < message.lookup_inners.length; ++i) - $root.cosmos.ics23.v1.InnerOp.encode(message.lookup_inners[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompressedBatchProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {cosmos.ics23.v1.ICompressedBatchProof} message CompressedBatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedBatchProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedBatchProof} CompressedBatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedBatchProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.cosmos.ics23.v1.CompressedBatchEntry.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.lookup_inners && message.lookup_inners.length)) - message.lookup_inners = []; - message.lookup_inners.push($root.cosmos.ics23.v1.InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedBatchProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedBatchProof} CompressedBatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedBatchProof message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedBatchProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.ics23.v1.CompressedBatchEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.lookup_inners != null && message.hasOwnProperty("lookup_inners")) { - if (!Array.isArray(message.lookup_inners)) - return "lookup_inners: array expected"; - for (var i = 0; i < message.lookup_inners.length; ++i) { - var error = $root.cosmos.ics23.v1.InnerOp.verify(message.lookup_inners[i]); - if (error) - return "lookup_inners." + error; - } - } - return null; - }; - - /** - * Creates a CompressedBatchProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedBatchProof} CompressedBatchProof - */ - CompressedBatchProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedBatchProof) - return object; - var message = new $root.cosmos.ics23.v1.CompressedBatchProof(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.entries: object expected"); - message.entries[i] = $root.cosmos.ics23.v1.CompressedBatchEntry.fromObject(object.entries[i]); - } - } - if (object.lookup_inners) { - if (!Array.isArray(object.lookup_inners)) - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.lookup_inners: array expected"); - message.lookup_inners = []; - for (var i = 0; i < object.lookup_inners.length; ++i) { - if (typeof object.lookup_inners[i] !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.lookup_inners: object expected"); - message.lookup_inners[i] = $root.cosmos.ics23.v1.InnerOp.fromObject(object.lookup_inners[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CompressedBatchProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {cosmos.ics23.v1.CompressedBatchProof} message CompressedBatchProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedBatchProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.entries = []; - object.lookup_inners = []; - } - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.cosmos.ics23.v1.CompressedBatchEntry.toObject(message.entries[j], options); - } - if (message.lookup_inners && message.lookup_inners.length) { - object.lookup_inners = []; - for (var j = 0; j < message.lookup_inners.length; ++j) - object.lookup_inners[j] = $root.cosmos.ics23.v1.InnerOp.toObject(message.lookup_inners[j], options); - } - return object; - }; - - /** - * Converts this CompressedBatchProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @instance - * @returns {Object.} JSON object - */ - CompressedBatchProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedBatchProof; - })(); - - v1.CompressedBatchEntry = (function() { - - /** - * Properties of a CompressedBatchEntry. - * @memberof cosmos.ics23.v1 - * @interface ICompressedBatchEntry - * @property {cosmos.ics23.v1.ICompressedExistenceProof|null} [exist] CompressedBatchEntry exist - * @property {cosmos.ics23.v1.ICompressedNonExistenceProof|null} [nonexist] CompressedBatchEntry nonexist - */ - - /** - * Constructs a new CompressedBatchEntry. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedBatchEntry. - * @implements ICompressedBatchEntry - * @constructor - * @param {cosmos.ics23.v1.ICompressedBatchEntry=} [properties] Properties to set - */ - function CompressedBatchEntry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedBatchEntry exist. - * @member {cosmos.ics23.v1.ICompressedExistenceProof|null|undefined} exist - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - */ - CompressedBatchEntry.prototype.exist = null; - - /** - * CompressedBatchEntry nonexist. - * @member {cosmos.ics23.v1.ICompressedNonExistenceProof|null|undefined} nonexist - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - */ - CompressedBatchEntry.prototype.nonexist = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CompressedBatchEntry proof. - * @member {"exist"|"nonexist"|undefined} proof - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - */ - Object.defineProperty(CompressedBatchEntry.prototype, "proof", { - get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified CompressedBatchEntry message. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchEntry.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {cosmos.ics23.v1.ICompressedBatchEntry} message CompressedBatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) - $root.cosmos.ics23.v1.CompressedExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) - $root.cosmos.ics23.v1.CompressedNonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompressedBatchEntry message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {cosmos.ics23.v1.ICompressedBatchEntry} message CompressedBatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedBatchEntry message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedBatchEntry} CompressedBatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedBatchEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = $root.cosmos.ics23.v1.CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = $root.cosmos.ics23.v1.CompressedNonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedBatchEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedBatchEntry} CompressedBatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedBatchEntry message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedBatchEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.CompressedExistenceProof.verify(message.exist); - if (error) - return "exist." + error; - } - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - var error = $root.cosmos.ics23.v1.CompressedNonExistenceProof.verify(message.nonexist); - if (error) - return "nonexist." + error; - } - } - return null; - }; - - /** - * Creates a CompressedBatchEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedBatchEntry} CompressedBatchEntry - */ - CompressedBatchEntry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedBatchEntry) - return object; - var message = new $root.cosmos.ics23.v1.CompressedBatchEntry(); - if (object.exist != null) { - if (typeof object.exist !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchEntry.exist: object expected"); - message.exist = $root.cosmos.ics23.v1.CompressedExistenceProof.fromObject(object.exist); - } - if (object.nonexist != null) { - if (typeof object.nonexist !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchEntry.nonexist: object expected"); - message.nonexist = $root.cosmos.ics23.v1.CompressedNonExistenceProof.fromObject(object.nonexist); - } - return message; - }; - - /** - * Creates a plain object from a CompressedBatchEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {cosmos.ics23.v1.CompressedBatchEntry} message CompressedBatchEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedBatchEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - object.exist = $root.cosmos.ics23.v1.CompressedExistenceProof.toObject(message.exist, options); - if (options.oneofs) - object.proof = "exist"; - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - object.nonexist = $root.cosmos.ics23.v1.CompressedNonExistenceProof.toObject(message.nonexist, options); - if (options.oneofs) - object.proof = "nonexist"; - } - return object; - }; - - /** - * Converts this CompressedBatchEntry to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - * @returns {Object.} JSON object - */ - CompressedBatchEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedBatchEntry; - })(); - - v1.CompressedExistenceProof = (function() { - - /** - * Properties of a CompressedExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface ICompressedExistenceProof - * @property {Uint8Array|null} [key] CompressedExistenceProof key - * @property {Uint8Array|null} [value] CompressedExistenceProof value - * @property {cosmos.ics23.v1.ILeafOp|null} [leaf] CompressedExistenceProof leaf - * @property {Array.|null} [path] CompressedExistenceProof path - */ - - /** - * Constructs a new CompressedExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedExistenceProof. - * @implements ICompressedExistenceProof - * @constructor - * @param {cosmos.ics23.v1.ICompressedExistenceProof=} [properties] Properties to set - */ - function CompressedExistenceProof(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]]; - } - - /** - * CompressedExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * CompressedExistenceProof value. - * @member {Uint8Array} value - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.value = $util.newBuffer([]); - - /** - * CompressedExistenceProof leaf. - * @member {cosmos.ics23.v1.ILeafOp|null|undefined} leaf - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.leaf = null; - - /** - * CompressedExistenceProof path. - * @member {Array.} path - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.path = $util.emptyArray; - - /** - * Encodes the specified CompressedExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedExistenceProof} message CompressedExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedExistenceProof.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); - if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) - $root.cosmos.ics23.v1.LeafOp.encode(message.leaf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CompressedExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedExistenceProof} message CompressedExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedExistenceProof} CompressedExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedExistenceProof(); - 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; - case 3: - message.leaf = $root.cosmos.ics23.v1.LeafOp.decode(reader, reader.uint32()); - break; - case 4: - 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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedExistenceProof} CompressedExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedExistenceProof.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"; - if (message.leaf != null && message.hasOwnProperty("leaf")) { - var error = $root.cosmos.ics23.v1.LeafOp.verify(message.leaf); - if (error) - return "leaf." + error; - } - 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"; - } - return null; - }; - - /** - * Creates a CompressedExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedExistenceProof} CompressedExistenceProof - */ - CompressedExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedExistenceProof) - return object; - var message = new $root.cosmos.ics23.v1.CompressedExistenceProof(); - 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.leaf != null) { - if (typeof object.leaf !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedExistenceProof.leaf: object expected"); - message.leaf = $root.cosmos.ics23.v1.LeafOp.fromObject(object.leaf); - } - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".cosmos.ics23.v1.CompressedExistenceProof.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - return message; - }; - - /** - * Creates a plain object from a CompressedExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {cosmos.ics23.v1.CompressedExistenceProof} message CompressedExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedExistenceProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - 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); - } - object.leaf = null; - } - 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.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.cosmos.ics23.v1.LeafOp.toObject(message.leaf, options); - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - return object; - }; - - /** - * Converts this CompressedExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - * @returns {Object.} JSON object - */ - CompressedExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedExistenceProof; - })(); - - v1.CompressedNonExistenceProof = (function() { - - /** - * Properties of a CompressedNonExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface ICompressedNonExistenceProof - * @property {Uint8Array|null} [key] CompressedNonExistenceProof key - * @property {cosmos.ics23.v1.ICompressedExistenceProof|null} [left] CompressedNonExistenceProof left - * @property {cosmos.ics23.v1.ICompressedExistenceProof|null} [right] CompressedNonExistenceProof right - */ - - /** - * Constructs a new CompressedNonExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedNonExistenceProof. - * @implements ICompressedNonExistenceProof - * @constructor - * @param {cosmos.ics23.v1.ICompressedNonExistenceProof=} [properties] Properties to set - */ - function CompressedNonExistenceProof(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedNonExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - */ - CompressedNonExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * CompressedNonExistenceProof left. - * @member {cosmos.ics23.v1.ICompressedExistenceProof|null|undefined} left - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - */ - CompressedNonExistenceProof.prototype.left = null; - - /** - * CompressedNonExistenceProof right. - * @member {cosmos.ics23.v1.ICompressedExistenceProof|null|undefined} right - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - */ - CompressedNonExistenceProof.prototype.right = null; - - /** - * Encodes the specified CompressedNonExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedNonExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedNonExistenceProof} message CompressedNonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedNonExistenceProof.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.left != null && Object.hasOwnProperty.call(message, "left")) - $root.cosmos.ics23.v1.CompressedExistenceProof.encode(message.left, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.right != null && Object.hasOwnProperty.call(message, "right")) - $root.cosmos.ics23.v1.CompressedExistenceProof.encode(message.right, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompressedNonExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedNonExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedNonExistenceProof} message CompressedNonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedNonExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedNonExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedNonExistenceProof} CompressedNonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedNonExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedNonExistenceProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = $root.cosmos.ics23.v1.CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = $root.cosmos.ics23.v1.CompressedExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedNonExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedNonExistenceProof} CompressedNonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedNonExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedNonExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedNonExistenceProof.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.left != null && message.hasOwnProperty("left")) { - var error = $root.cosmos.ics23.v1.CompressedExistenceProof.verify(message.left); - if (error) - return "left." + error; - } - if (message.right != null && message.hasOwnProperty("right")) { - var error = $root.cosmos.ics23.v1.CompressedExistenceProof.verify(message.right); - if (error) - return "right." + error; - } - return null; - }; - - /** - * Creates a CompressedNonExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedNonExistenceProof} CompressedNonExistenceProof - */ - CompressedNonExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedNonExistenceProof) - return object; - var message = new $root.cosmos.ics23.v1.CompressedNonExistenceProof(); - 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.left != null) { - if (typeof object.left !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedNonExistenceProof.left: object expected"); - message.left = $root.cosmos.ics23.v1.CompressedExistenceProof.fromObject(object.left); - } - if (object.right != null) { - if (typeof object.right !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedNonExistenceProof.right: object expected"); - message.right = $root.cosmos.ics23.v1.CompressedExistenceProof.fromObject(object.right); - } - return message; - }; - - /** - * Creates a plain object from a CompressedNonExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {cosmos.ics23.v1.CompressedNonExistenceProof} message CompressedNonExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedNonExistenceProof.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); - } - object.left = null; - object.right = null; - } - 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.left != null && message.hasOwnProperty("left")) - object.left = $root.cosmos.ics23.v1.CompressedExistenceProof.toObject(message.left, options); - if (message.right != null && message.hasOwnProperty("right")) - object.right = $root.cosmos.ics23.v1.CompressedExistenceProof.toObject(message.right, options); - return object; - }; - - /** - * Converts this CompressedNonExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - * @returns {Object.} JSON object - */ - CompressedNonExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedNonExistenceProof; - })(); - - return v1; - })(); - - return ics23; - })(); - - return cosmos; - })(); - - $root.gogoproto = (function() { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - var gogoproto = {}; - - return gogoproto; - })(); - - $root.cosmos_proto = (function() { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - var cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - var message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (var i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - var message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (var i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (var j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; - })(); - - $root.amino = (function() { - - /** - * Namespace amino. - * @exports amino - * @namespace - */ - var amino = {}; - - return amino; - })(); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - 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; - - /** - * 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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.message_type != null && message.message_type.length) - for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (var i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (var i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (var i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (var i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + 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.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (var i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (var i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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.message_type && message.message_type.length) { - object.message_type = []; - for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (var j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (var j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_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]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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.nested_type != null && message.nested_type.length) - for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[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.oneof_decl != null && message.oneof_decl.length) - for (var i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (var i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (var i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (var i = 0; i < message.oneof_decl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (var i = 0; i < message.reserved_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (var i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (var i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (var i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (var i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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.nested_type && message.nested_type.length) { - object.nested_type = []; - for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (var j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (var j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (var j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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; - - /** - * 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; - - /** - * 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: 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.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (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 java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - var error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - var error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - * @property {string|null} [".amino.name"] MessageOptions .amino.name - * @property {string|null} [".amino.message_encoding"] MessageOptions .amino.message_encoding - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (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 message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * MessageOptions .amino.name. - * @member {string} .amino.name - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".amino.name"] = ""; - - /** - * MessageOptions .amino.message_encoding. - * @member {string} .amino.message_encoding - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".amino.message_encoding"] = ""; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - if (message[".amino.name"] != null && Object.hasOwnProperty.call(message, ".amino.name")) - writer.uint32(/* id 11110001, wireType 2 =*/88880010).string(message[".amino.name"]); - if (message[".amino.message_encoding"] != null && Object.hasOwnProperty.call(message, ".amino.message_encoding")) - writer.uint32(/* id 11110002, wireType 2 =*/88880018).string(message[".amino.message_encoding"]); - 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.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - break; - case 11110001: - message[".amino.name"] = reader.string(); - break; - case 11110002: - message[".amino.message_encoding"] = reader.string(); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] expected"; - } - if (message[".amino.name"] != null && message.hasOwnProperty(".amino.name")) - if (!$util.isString(message[".amino.name"])) - return ".amino.name: string expected"; - if (message[".amino.message_encoding"] != null && message.hasOwnProperty(".amino.message_encoding")) - if (!$util.isString(message[".amino.message_encoding"])) - return ".amino.message_encoding: string 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.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - if (object[".amino.name"] != null) - message[".amino.name"] = String(object[".amino.name"]); - if (object[".amino.message_encoding"] != null) - message[".amino.message_encoding"] = String(object[".amino.message_encoding"]); - 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.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - object[".amino.name"] = ""; - object[".amino.message_encoding"] = ""; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - if (message[".amino.name"] != null && message.hasOwnProperty(".amino.name")) - object[".amino.name"] = message[".amino.name"]; - if (message[".amino.message_encoding"] != null && message.hasOwnProperty(".amino.message_encoding")) - object[".amino.message_encoding"] = message[".amino.message_encoding"]; - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - * @property {string|null} [".amino.encoding"] FieldOptions .amino.encoding - * @property {string|null} [".amino.field_name"] FieldOptions .amino.field_name - * @property {boolean|null} [".amino.dont_omitempty"] FieldOptions .amino.dont_omitempty - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * FieldOptions .amino.encoding. - * @member {string} .amino.encoding - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".amino.encoding"] = ""; - - /** - * FieldOptions .amino.field_name. - * @member {string} .amino.field_name - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".amino.field_name"] = ""; - - /** - * FieldOptions .amino.dont_omitempty. - * @member {boolean} .amino.dont_omitempty - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".amino.dont_omitempty"] = false; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - if (message[".amino.encoding"] != null && Object.hasOwnProperty.call(message, ".amino.encoding")) - writer.uint32(/* id 11110003, wireType 2 =*/88880026).string(message[".amino.encoding"]); - if (message[".amino.field_name"] != null && Object.hasOwnProperty.call(message, ".amino.field_name")) - writer.uint32(/* id 11110004, wireType 2 =*/88880034).string(message[".amino.field_name"]); - if (message[".amino.dont_omitempty"] != null && Object.hasOwnProperty.call(message, ".amino.dont_omitempty")) - writer.uint32(/* id 11110005, wireType 0 =*/88880040).bool(message[".amino.dont_omitempty"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = reader.string(); - break; - case 11110003: - message[".amino.encoding"] = reader.string(); - break; - case 11110004: - message[".amino.field_name"] = reader.string(); - break; - case 11110005: - message[".amino.dont_omitempty"] = reader.bool(); - 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: string expected"; - if (message[".amino.encoding"] != null && message.hasOwnProperty(".amino.encoding")) - if (!$util.isString(message[".amino.encoding"])) - return ".amino.encoding: string expected"; - if (message[".amino.field_name"] != null && message.hasOwnProperty(".amino.field_name")) - if (!$util.isString(message[".amino.field_name"])) - return ".amino.field_name: string expected"; - if (message[".amino.dont_omitempty"] != null && message.hasOwnProperty(".amino.dont_omitempty")) - if (typeof message[".amino.dont_omitempty"] !== "boolean") - return ".amino.dont_omitempty: boolean 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - if (object[".amino.encoding"] != null) - message[".amino.encoding"] = String(object[".amino.encoding"]); - if (object[".amino.field_name"] != null) - message[".amino.field_name"] = String(object[".amino.field_name"]); - if (object[".amino.dont_omitempty"] != null) - message[".amino.dont_omitempty"] = Boolean(object[".amino.dont_omitempty"]); - 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.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - object[".amino.encoding"] = ""; - object[".amino.field_name"] = ""; - object[".amino.dont_omitempty"] = false; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - if (message[".amino.encoding"] != null && message.hasOwnProperty(".amino.encoding")) - object[".amino.encoding"] = message[".amino.encoding"]; - if (message[".amino.field_name"] != null && message.hasOwnProperty(".amino.field_name")) - object[".amino.field_name"] = message[".amino.field_name"]; - if (message[".amino.dont_omitempty"] != null && message.hasOwnProperty(".amino.dont_omitempty")) - object[".amino.dont_omitempty"] = message[".amino.dont_omitempty"]; - 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (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 allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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.identifier_value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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; - - /** - * 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (var i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (var i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (var i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - 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.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (var j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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; - - /** - * 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} [source_file] Annotation source_file - * @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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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.source_file = 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.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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.source_file != null) - message.source_file = String(object.source_file); - 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.source_file = ""; - 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.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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.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([]); - - /** - * 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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {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 {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; - - /** - * 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 {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 {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; - - /** - * 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; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = 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.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (var i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = 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.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (var i = 0; i < message.additional_bindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (var i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (var j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = 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.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; - })(); - - $root.ibc = (function() { - - /** - * Namespace ibc. - * @exports ibc - * @namespace - */ - var ibc = {}; - - ibc.applications = (function() { - - /** - * Namespace applications. - * @memberof ibc - * @namespace - */ - var applications = {}; - - applications.fee = (function() { - - /** - * Namespace fee. - * @memberof ibc.applications - * @namespace - */ - var fee = {}; - - fee.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.fee - * @namespace - */ - var v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#registerPayee}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef RegisterPayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgRegisterPayeeResponse} [response] MsgRegisterPayeeResponse - */ - - /** - * Calls RegisterPayee. - * @function registerPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} request MsgRegisterPayee message or plain object - * @param {ibc.applications.fee.v1.Msg.RegisterPayeeCallback} callback Node-style callback called with the error, if any, and MsgRegisterPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerPayee = function registerPayee(request, callback) { - return this.rpcCall(registerPayee, $root.ibc.applications.fee.v1.MsgRegisterPayee, $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse, request, callback); - }, "name", { value: "RegisterPayee" }); - - /** - * Calls RegisterPayee. - * @function registerPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} request MsgRegisterPayee message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#registerCounterpartyPayee}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef RegisterCounterpartyPayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} [response] MsgRegisterCounterpartyPayeeResponse - */ - - /** - * Calls RegisterCounterpartyPayee. - * @function registerCounterpartyPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} request MsgRegisterCounterpartyPayee message or plain object - * @param {ibc.applications.fee.v1.Msg.RegisterCounterpartyPayeeCallback} callback Node-style callback called with the error, if any, and MsgRegisterCounterpartyPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerCounterpartyPayee = function registerCounterpartyPayee(request, callback) { - return this.rpcCall(registerCounterpartyPayee, $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee, $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse, request, callback); - }, "name", { value: "RegisterCounterpartyPayee" }); - - /** - * Calls RegisterCounterpartyPayee. - * @function registerCounterpartyPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} request MsgRegisterCounterpartyPayee message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#payPacketFee}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef PayPacketFeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgPayPacketFeeResponse} [response] MsgPayPacketFeeResponse - */ - - /** - * Calls PayPacketFee. - * @function payPacketFee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} request MsgPayPacketFee message or plain object - * @param {ibc.applications.fee.v1.Msg.PayPacketFeeCallback} callback Node-style callback called with the error, if any, and MsgPayPacketFeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.payPacketFee = function payPacketFee(request, callback) { - return this.rpcCall(payPacketFee, $root.ibc.applications.fee.v1.MsgPayPacketFee, $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse, request, callback); - }, "name", { value: "PayPacketFee" }); - - /** - * Calls PayPacketFee. - * @function payPacketFee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} request MsgPayPacketFee message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#payPacketFeeAsync}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef PayPacketFeeAsyncCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} [response] MsgPayPacketFeeAsyncResponse - */ - - /** - * Calls PayPacketFeeAsync. - * @function payPacketFeeAsync - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} request MsgPayPacketFeeAsync message or plain object - * @param {ibc.applications.fee.v1.Msg.PayPacketFeeAsyncCallback} callback Node-style callback called with the error, if any, and MsgPayPacketFeeAsyncResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.payPacketFeeAsync = function payPacketFeeAsync(request, callback) { - return this.rpcCall(payPacketFeeAsync, $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync, $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse, request, callback); - }, "name", { value: "PayPacketFeeAsync" }); - - /** - * Calls PayPacketFeeAsync. - * @function payPacketFeeAsync - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} request MsgPayPacketFeeAsync message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgRegisterPayee = (function() { - - /** - * Properties of a MsgRegisterPayee. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterPayee - * @property {string|null} [port_id] MsgRegisterPayee port_id - * @property {string|null} [channel_id] MsgRegisterPayee channel_id - * @property {string|null} [relayer] MsgRegisterPayee relayer - * @property {string|null} [payee] MsgRegisterPayee payee - */ - - /** - * Constructs a new MsgRegisterPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterPayee. - * @implements IMsgRegisterPayee - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterPayee=} [properties] Properties to set - */ - function MsgRegisterPayee(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterPayee port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.port_id = ""; - - /** - * MsgRegisterPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.channel_id = ""; - - /** - * MsgRegisterPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.relayer = ""; - - /** - * MsgRegisterPayee payee. - * @member {string} payee - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.payee = ""; - - /** - * Encodes the specified MsgRegisterPayee message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} message MsgRegisterPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relayer); - if (message.payee != null && Object.hasOwnProperty.call(message, "payee")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.payee); - return writer; - }; - - /** - * Encodes the specified MsgRegisterPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} message MsgRegisterPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterPayee} MsgRegisterPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterPayee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.relayer = reader.string(); - break; - case 4: - message.payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterPayee} MsgRegisterPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.payee != null && message.hasOwnProperty("payee")) - if (!$util.isString(message.payee)) - return "payee: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterPayee} MsgRegisterPayee - */ - MsgRegisterPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterPayee) - return object; - var message = new $root.ibc.applications.fee.v1.MsgRegisterPayee(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.payee != null) - message.payee = String(object.payee); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {ibc.applications.fee.v1.MsgRegisterPayee} message MsgRegisterPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.relayer = ""; - object.payee = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.payee != null && message.hasOwnProperty("payee")) - object.payee = message.payee; - return object; - }; - - /** - * Converts this MsgRegisterPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterPayee; - })(); - - v1.MsgRegisterPayeeResponse = (function() { - - /** - * Properties of a MsgRegisterPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterPayeeResponse - */ - - /** - * Constructs a new MsgRegisterPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterPayeeResponse. - * @implements IMsgRegisterPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterPayeeResponse=} [properties] Properties to set - */ - function MsgRegisterPayeeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgRegisterPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayeeResponse} message MsgRegisterPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgRegisterPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayeeResponse} message MsgRegisterPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterPayeeResponse} MsgRegisterPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterPayeeResponse} MsgRegisterPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgRegisterPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterPayeeResponse} MsgRegisterPayeeResponse - */ - MsgRegisterPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse(); - }; - - /** - * Creates a plain object from a MsgRegisterPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {ibc.applications.fee.v1.MsgRegisterPayeeResponse} message MsgRegisterPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterPayeeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgRegisterPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterPayeeResponse; - })(); - - v1.MsgRegisterCounterpartyPayee = (function() { - - /** - * Properties of a MsgRegisterCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterCounterpartyPayee - * @property {string|null} [port_id] MsgRegisterCounterpartyPayee port_id - * @property {string|null} [channel_id] MsgRegisterCounterpartyPayee channel_id - * @property {string|null} [relayer] MsgRegisterCounterpartyPayee relayer - * @property {string|null} [counterparty_payee] MsgRegisterCounterpartyPayee counterparty_payee - */ - - /** - * Constructs a new MsgRegisterCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterCounterpartyPayee. - * @implements IMsgRegisterCounterpartyPayee - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee=} [properties] Properties to set - */ - function MsgRegisterCounterpartyPayee(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterCounterpartyPayee port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.port_id = ""; - - /** - * MsgRegisterCounterpartyPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.channel_id = ""; - - /** - * MsgRegisterCounterpartyPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.relayer = ""; - - /** - * MsgRegisterCounterpartyPayee counterparty_payee. - * @member {string} counterparty_payee - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.counterparty_payee = ""; - - /** - * Encodes the specified MsgRegisterCounterpartyPayee message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} message MsgRegisterCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relayer); - if (message.counterparty_payee != null && Object.hasOwnProperty.call(message, "counterparty_payee")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterparty_payee); - return writer; - }; - - /** - * Encodes the specified MsgRegisterCounterpartyPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} message MsgRegisterCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterCounterpartyPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} MsgRegisterCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.relayer = reader.string(); - break; - case 4: - message.counterparty_payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterCounterpartyPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} MsgRegisterCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterCounterpartyPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterCounterpartyPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - if (!$util.isString(message.counterparty_payee)) - return "counterparty_payee: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterCounterpartyPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} MsgRegisterCounterpartyPayee - */ - MsgRegisterCounterpartyPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee) - return object; - var message = new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.counterparty_payee != null) - message.counterparty_payee = String(object.counterparty_payee); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterCounterpartyPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} message MsgRegisterCounterpartyPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterCounterpartyPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.relayer = ""; - object.counterparty_payee = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - object.counterparty_payee = message.counterparty_payee; - return object; - }; - - /** - * Converts this MsgRegisterCounterpartyPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterCounterpartyPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterCounterpartyPayee; - })(); - - v1.MsgRegisterCounterpartyPayeeResponse = (function() { - - /** - * Properties of a MsgRegisterCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterCounterpartyPayeeResponse - */ - - /** - * Constructs a new MsgRegisterCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterCounterpartyPayeeResponse. - * @implements IMsgRegisterCounterpartyPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse=} [properties] Properties to set - */ - function MsgRegisterCounterpartyPayeeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgRegisterCounterpartyPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse} message MsgRegisterCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgRegisterCounterpartyPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse} message MsgRegisterCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterCounterpartyPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} MsgRegisterCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterCounterpartyPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} MsgRegisterCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterCounterpartyPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterCounterpartyPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgRegisterCounterpartyPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} MsgRegisterCounterpartyPayeeResponse - */ - MsgRegisterCounterpartyPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse(); - }; - - /** - * Creates a plain object from a MsgRegisterCounterpartyPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} message MsgRegisterCounterpartyPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterCounterpartyPayeeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgRegisterCounterpartyPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterCounterpartyPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterCounterpartyPayeeResponse; - })(); - - v1.MsgPayPacketFee = (function() { - - /** - * Properties of a MsgPayPacketFee. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFee - * @property {ibc.applications.fee.v1.IFee|null} [fee] MsgPayPacketFee fee - * @property {string|null} [source_port_id] MsgPayPacketFee source_port_id - * @property {string|null} [source_channel_id] MsgPayPacketFee source_channel_id - * @property {string|null} [signer] MsgPayPacketFee signer - * @property {Array.|null} [relayers] MsgPayPacketFee relayers - */ - - /** - * Constructs a new MsgPayPacketFee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFee. - * @implements IMsgPayPacketFee - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFee=} [properties] Properties to set - */ - function MsgPayPacketFee(properties) { - this.relayers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgPayPacketFee fee. - * @member {ibc.applications.fee.v1.IFee|null|undefined} fee - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.fee = null; - - /** - * MsgPayPacketFee source_port_id. - * @member {string} source_port_id - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.source_port_id = ""; - - /** - * MsgPayPacketFee source_channel_id. - * @member {string} source_channel_id - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.source_channel_id = ""; - - /** - * MsgPayPacketFee signer. - * @member {string} signer - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.signer = ""; - - /** - * MsgPayPacketFee relayers. - * @member {Array.} relayers - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.relayers = $util.emptyArray; - - /** - * Encodes the specified MsgPayPacketFee message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} message MsgPayPacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.ibc.applications.fee.v1.Fee.encode(message.fee, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.source_port_id != null && Object.hasOwnProperty.call(message, "source_port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_port_id); - if (message.source_channel_id != null && Object.hasOwnProperty.call(message, "source_channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.source_channel_id); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.signer); - if (message.relayers != null && message.relayers.length) - for (var i = 0; i < message.relayers.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.relayers[i]); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} message MsgPayPacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFee} MsgPayPacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee = $root.ibc.applications.fee.v1.Fee.decode(reader, reader.uint32()); - break; - case 2: - message.source_port_id = reader.string(); - break; - case 3: - message.source_channel_id = reader.string(); - break; - case 4: - message.signer = reader.string(); - break; - case 5: - if (!(message.relayers && message.relayers.length)) - message.relayers = []; - message.relayers.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFee} MsgPayPacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFee message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee != null && message.hasOwnProperty("fee")) { - var error = $root.ibc.applications.fee.v1.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - if (message.source_port_id != null && message.hasOwnProperty("source_port_id")) - if (!$util.isString(message.source_port_id)) - return "source_port_id: string expected"; - if (message.source_channel_id != null && message.hasOwnProperty("source_channel_id")) - if (!$util.isString(message.source_channel_id)) - return "source_channel_id: string expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - if (message.relayers != null && message.hasOwnProperty("relayers")) { - if (!Array.isArray(message.relayers)) - return "relayers: array expected"; - for (var i = 0; i < message.relayers.length; ++i) - if (!$util.isString(message.relayers[i])) - return "relayers: string[] expected"; - } - return null; - }; - - /** - * Creates a MsgPayPacketFee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFee} MsgPayPacketFee - */ - MsgPayPacketFee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFee) - return object; - var message = new $root.ibc.applications.fee.v1.MsgPayPacketFee(); - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFee.fee: object expected"); - message.fee = $root.ibc.applications.fee.v1.Fee.fromObject(object.fee); - } - if (object.source_port_id != null) - message.source_port_id = String(object.source_port_id); - if (object.source_channel_id != null) - message.source_channel_id = String(object.source_channel_id); - if (object.signer != null) - message.signer = String(object.signer); - if (object.relayers) { - if (!Array.isArray(object.relayers)) - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFee.relayers: array expected"); - message.relayers = []; - for (var i = 0; i < object.relayers.length; ++i) - message.relayers[i] = String(object.relayers[i]); - } - return message; - }; - - /** - * Creates a plain object from a MsgPayPacketFee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFee} message MsgPayPacketFee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relayers = []; - if (options.defaults) { - object.fee = null; - object.source_port_id = ""; - object.source_channel_id = ""; - object.signer = ""; - } - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.ibc.applications.fee.v1.Fee.toObject(message.fee, options); - if (message.source_port_id != null && message.hasOwnProperty("source_port_id")) - object.source_port_id = message.source_port_id; - if (message.source_channel_id != null && message.hasOwnProperty("source_channel_id")) - object.source_channel_id = message.source_channel_id; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - if (message.relayers && message.relayers.length) { - object.relayers = []; - for (var j = 0; j < message.relayers.length; ++j) - object.relayers[j] = message.relayers[j]; - } - return object; - }; - - /** - * Converts this MsgPayPacketFee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFee; - })(); - - v1.MsgPayPacketFeeResponse = (function() { - - /** - * Properties of a MsgPayPacketFeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFeeResponse - */ - - /** - * Constructs a new MsgPayPacketFeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFeeResponse. - * @implements IMsgPayPacketFeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeResponse=} [properties] Properties to set - */ - function MsgPayPacketFeeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgPayPacketFeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeResponse} message MsgPayPacketFeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeResponse} message MsgPayPacketFeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeResponse} MsgPayPacketFeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeResponse} MsgPayPacketFeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgPayPacketFeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeResponse} MsgPayPacketFeeResponse - */ - MsgPayPacketFeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse(); - }; - - /** - * Creates a plain object from a MsgPayPacketFeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFeeResponse} message MsgPayPacketFeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFeeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgPayPacketFeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFeeResponse; - })(); - - v1.MsgPayPacketFeeAsync = (function() { - - /** - * Properties of a MsgPayPacketFeeAsync. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFeeAsync - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] MsgPayPacketFeeAsync packet_id - * @property {ibc.applications.fee.v1.IPacketFee|null} [packet_fee] MsgPayPacketFeeAsync packet_fee - */ - - /** - * Constructs a new MsgPayPacketFeeAsync. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFeeAsync. - * @implements IMsgPayPacketFeeAsync - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync=} [properties] Properties to set - */ - function MsgPayPacketFeeAsync(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgPayPacketFeeAsync packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @instance - */ - MsgPayPacketFeeAsync.prototype.packet_id = null; - - /** - * MsgPayPacketFeeAsync packet_fee. - * @member {ibc.applications.fee.v1.IPacketFee|null|undefined} packet_fee - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @instance - */ - MsgPayPacketFeeAsync.prototype.packet_fee = null; - - /** - * Encodes the specified MsgPayPacketFeeAsync message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsync.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} message MsgPayPacketFeeAsync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsync.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.packet_fee != null && Object.hasOwnProperty.call(message, "packet_fee")) - $root.ibc.applications.fee.v1.PacketFee.encode(message.packet_fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFeeAsync message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsync.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} message MsgPayPacketFeeAsync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFeeAsync message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsync} MsgPayPacketFeeAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsync.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - case 2: - message.packet_fee = $root.ibc.applications.fee.v1.PacketFee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFeeAsync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsync} MsgPayPacketFeeAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsync.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFeeAsync message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFeeAsync.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.packet_fee != null && message.hasOwnProperty("packet_fee")) { - var error = $root.ibc.applications.fee.v1.PacketFee.verify(message.packet_fee); - if (error) - return "packet_fee." + error; - } - return null; - }; - - /** - * Creates a MsgPayPacketFeeAsync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsync} MsgPayPacketFeeAsync - */ - MsgPayPacketFeeAsync.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync) - return object; - var message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFeeAsync.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - if (object.packet_fee != null) { - if (typeof object.packet_fee !== "object") - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFeeAsync.packet_fee: object expected"); - message.packet_fee = $root.ibc.applications.fee.v1.PacketFee.fromObject(object.packet_fee); - } - return message; - }; - - /** - * Creates a plain object from a MsgPayPacketFeeAsync message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFeeAsync} message MsgPayPacketFeeAsync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFeeAsync.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet_id = null; - object.packet_fee = null; - } - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - if (message.packet_fee != null && message.hasOwnProperty("packet_fee")) - object.packet_fee = $root.ibc.applications.fee.v1.PacketFee.toObject(message.packet_fee, options); - return object; - }; - - /** - * Converts this MsgPayPacketFeeAsync to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFeeAsync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFeeAsync; - })(); - - v1.MsgPayPacketFeeAsyncResponse = (function() { - - /** - * Properties of a MsgPayPacketFeeAsyncResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFeeAsyncResponse - */ - - /** - * Constructs a new MsgPayPacketFeeAsyncResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFeeAsyncResponse. - * @implements IMsgPayPacketFeeAsyncResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse=} [properties] Properties to set - */ - function MsgPayPacketFeeAsyncResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgPayPacketFeeAsyncResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse} message MsgPayPacketFeeAsyncResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsyncResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFeeAsyncResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse} message MsgPayPacketFeeAsyncResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsyncResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFeeAsyncResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} MsgPayPacketFeeAsyncResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsyncResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFeeAsyncResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} MsgPayPacketFeeAsyncResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsyncResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFeeAsyncResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFeeAsyncResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgPayPacketFeeAsyncResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} MsgPayPacketFeeAsyncResponse - */ - MsgPayPacketFeeAsyncResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse(); - }; - - /** - * Creates a plain object from a MsgPayPacketFeeAsyncResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} message MsgPayPacketFeeAsyncResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFeeAsyncResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgPayPacketFeeAsyncResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFeeAsyncResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFeeAsyncResponse; - })(); - - v1.Fee = (function() { - - /** - * Properties of a Fee. - * @memberof ibc.applications.fee.v1 - * @interface IFee - * @property {Array.|null} [recv_fee] Fee recv_fee - * @property {Array.|null} [ack_fee] Fee ack_fee - * @property {Array.|null} [timeout_fee] Fee timeout_fee - */ - - /** - * Constructs a new Fee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a Fee. - * @implements IFee - * @constructor - * @param {ibc.applications.fee.v1.IFee=} [properties] Properties to set - */ - function Fee(properties) { - this.recv_fee = []; - this.ack_fee = []; - this.timeout_fee = []; - if (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 recv_fee. - * @member {Array.} recv_fee - * @memberof ibc.applications.fee.v1.Fee - * @instance - */ - Fee.prototype.recv_fee = $util.emptyArray; - - /** - * Fee ack_fee. - * @member {Array.} ack_fee - * @memberof ibc.applications.fee.v1.Fee - * @instance - */ - Fee.prototype.ack_fee = $util.emptyArray; - - /** - * Fee timeout_fee. - * @member {Array.} timeout_fee - * @memberof ibc.applications.fee.v1.Fee - * @instance - */ - Fee.prototype.timeout_fee = $util.emptyArray; - - /** - * Encodes the specified Fee message. Does not implicitly {@link ibc.applications.fee.v1.Fee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {ibc.applications.fee.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.recv_fee != null && message.recv_fee.length) - for (var i = 0; i < message.recv_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.recv_fee[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.ack_fee != null && message.ack_fee.length) - for (var i = 0; i < message.ack_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.ack_fee[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timeout_fee != null && message.timeout_fee.length) - for (var i = 0; i < message.timeout_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.timeout_fee[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.Fee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {ibc.applications.fee.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 ibc.applications.fee.v1.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.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.ibc.applications.fee.v1.Fee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.recv_fee && message.recv_fee.length)) - message.recv_fee = []; - message.recv_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.ack_fee && message.ack_fee.length)) - message.ack_fee = []; - message.ack_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.timeout_fee && message.timeout_fee.length)) - message.timeout_fee = []; - message.timeout_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.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 ibc.applications.fee.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.recv_fee != null && message.hasOwnProperty("recv_fee")) { - if (!Array.isArray(message.recv_fee)) - return "recv_fee: array expected"; - for (var i = 0; i < message.recv_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.recv_fee[i]); - if (error) - return "recv_fee." + error; - } - } - if (message.ack_fee != null && message.hasOwnProperty("ack_fee")) { - if (!Array.isArray(message.ack_fee)) - return "ack_fee: array expected"; - for (var i = 0; i < message.ack_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.ack_fee[i]); - if (error) - return "ack_fee." + error; - } - } - if (message.timeout_fee != null && message.hasOwnProperty("timeout_fee")) { - if (!Array.isArray(message.timeout_fee)) - return "timeout_fee: array expected"; - for (var i = 0; i < message.timeout_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.timeout_fee[i]); - if (error) - return "timeout_fee." + error; - } - } - return null; - }; - - /** - * Creates a Fee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.Fee} Fee - */ - Fee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.Fee) - return object; - var message = new $root.ibc.applications.fee.v1.Fee(); - if (object.recv_fee) { - if (!Array.isArray(object.recv_fee)) - throw TypeError(".ibc.applications.fee.v1.Fee.recv_fee: array expected"); - message.recv_fee = []; - for (var i = 0; i < object.recv_fee.length; ++i) { - if (typeof object.recv_fee[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.Fee.recv_fee: object expected"); - message.recv_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.recv_fee[i]); - } - } - if (object.ack_fee) { - if (!Array.isArray(object.ack_fee)) - throw TypeError(".ibc.applications.fee.v1.Fee.ack_fee: array expected"); - message.ack_fee = []; - for (var i = 0; i < object.ack_fee.length; ++i) { - if (typeof object.ack_fee[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.Fee.ack_fee: object expected"); - message.ack_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.ack_fee[i]); - } - } - if (object.timeout_fee) { - if (!Array.isArray(object.timeout_fee)) - throw TypeError(".ibc.applications.fee.v1.Fee.timeout_fee: array expected"); - message.timeout_fee = []; - for (var i = 0; i < object.timeout_fee.length; ++i) { - if (typeof object.timeout_fee[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.Fee.timeout_fee: object expected"); - message.timeout_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.timeout_fee[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Fee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {ibc.applications.fee.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.recv_fee = []; - object.ack_fee = []; - object.timeout_fee = []; - } - if (message.recv_fee && message.recv_fee.length) { - object.recv_fee = []; - for (var j = 0; j < message.recv_fee.length; ++j) - object.recv_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.recv_fee[j], options); - } - if (message.ack_fee && message.ack_fee.length) { - object.ack_fee = []; - for (var j = 0; j < message.ack_fee.length; ++j) - object.ack_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.ack_fee[j], options); - } - if (message.timeout_fee && message.timeout_fee.length) { - object.timeout_fee = []; - for (var j = 0; j < message.timeout_fee.length; ++j) - object.timeout_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.timeout_fee[j], options); - } - return object; - }; - - /** - * Converts this Fee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.Fee - * @instance - * @returns {Object.} JSON object - */ - Fee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Fee; - })(); - - v1.PacketFee = (function() { - - /** - * Properties of a PacketFee. - * @memberof ibc.applications.fee.v1 - * @interface IPacketFee - * @property {ibc.applications.fee.v1.IFee|null} [fee] PacketFee fee - * @property {string|null} [refund_address] PacketFee refund_address - * @property {Array.|null} [relayers] PacketFee relayers - */ - - /** - * Constructs a new PacketFee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a PacketFee. - * @implements IPacketFee - * @constructor - * @param {ibc.applications.fee.v1.IPacketFee=} [properties] Properties to set - */ - function PacketFee(properties) { - this.relayers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketFee fee. - * @member {ibc.applications.fee.v1.IFee|null|undefined} fee - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - */ - PacketFee.prototype.fee = null; - - /** - * PacketFee refund_address. - * @member {string} refund_address - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - */ - PacketFee.prototype.refund_address = ""; - - /** - * PacketFee relayers. - * @member {Array.} relayers - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - */ - PacketFee.prototype.relayers = $util.emptyArray; - - /** - * Encodes the specified PacketFee message. Does not implicitly {@link ibc.applications.fee.v1.PacketFee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {ibc.applications.fee.v1.IPacketFee} message PacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.ibc.applications.fee.v1.Fee.encode(message.fee, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.refund_address != null && Object.hasOwnProperty.call(message, "refund_address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.refund_address); - if (message.relayers != null && message.relayers.length) - for (var i = 0; i < message.relayers.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relayers[i]); - return writer; - }; - - /** - * Encodes the specified PacketFee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.PacketFee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {ibc.applications.fee.v1.IPacketFee} message PacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketFee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.PacketFee} PacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.PacketFee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee = $root.ibc.applications.fee.v1.Fee.decode(reader, reader.uint32()); - break; - case 2: - message.refund_address = reader.string(); - break; - case 3: - if (!(message.relayers && message.relayers.length)) - message.relayers = []; - message.relayers.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketFee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.PacketFee} PacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketFee message. - * @function verify - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketFee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee != null && message.hasOwnProperty("fee")) { - var error = $root.ibc.applications.fee.v1.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - if (message.refund_address != null && message.hasOwnProperty("refund_address")) - if (!$util.isString(message.refund_address)) - return "refund_address: string expected"; - if (message.relayers != null && message.hasOwnProperty("relayers")) { - if (!Array.isArray(message.relayers)) - return "relayers: array expected"; - for (var i = 0; i < message.relayers.length; ++i) - if (!$util.isString(message.relayers[i])) - return "relayers: string[] expected"; - } - return null; - }; - - /** - * Creates a PacketFee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.PacketFee} PacketFee - */ - PacketFee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.PacketFee) - return object; - var message = new $root.ibc.applications.fee.v1.PacketFee(); - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".ibc.applications.fee.v1.PacketFee.fee: object expected"); - message.fee = $root.ibc.applications.fee.v1.Fee.fromObject(object.fee); - } - if (object.refund_address != null) - message.refund_address = String(object.refund_address); - if (object.relayers) { - if (!Array.isArray(object.relayers)) - throw TypeError(".ibc.applications.fee.v1.PacketFee.relayers: array expected"); - message.relayers = []; - for (var i = 0; i < object.relayers.length; ++i) - message.relayers[i] = String(object.relayers[i]); - } - return message; - }; - - /** - * Creates a plain object from a PacketFee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {ibc.applications.fee.v1.PacketFee} message PacketFee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketFee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.relayers = []; - if (options.defaults) { - object.fee = null; - object.refund_address = ""; - } - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.ibc.applications.fee.v1.Fee.toObject(message.fee, options); - if (message.refund_address != null && message.hasOwnProperty("refund_address")) - object.refund_address = message.refund_address; - if (message.relayers && message.relayers.length) { - object.relayers = []; - for (var j = 0; j < message.relayers.length; ++j) - object.relayers[j] = message.relayers[j]; - } - return object; - }; - - /** - * Converts this PacketFee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - * @returns {Object.} JSON object - */ - PacketFee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketFee; - })(); - - v1.PacketFees = (function() { - - /** - * Properties of a PacketFees. - * @memberof ibc.applications.fee.v1 - * @interface IPacketFees - * @property {Array.|null} [packet_fees] PacketFees packet_fees - */ - - /** - * Constructs a new PacketFees. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a PacketFees. - * @implements IPacketFees - * @constructor - * @param {ibc.applications.fee.v1.IPacketFees=} [properties] Properties to set - */ - function PacketFees(properties) { - this.packet_fees = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketFees packet_fees. - * @member {Array.} packet_fees - * @memberof ibc.applications.fee.v1.PacketFees - * @instance - */ - PacketFees.prototype.packet_fees = $util.emptyArray; - - /** - * Encodes the specified PacketFees message. Does not implicitly {@link ibc.applications.fee.v1.PacketFees.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {ibc.applications.fee.v1.IPacketFees} message PacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFees.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_fees != null && message.packet_fees.length) - for (var i = 0; i < message.packet_fees.length; ++i) - $root.ibc.applications.fee.v1.PacketFee.encode(message.packet_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PacketFees message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.PacketFees.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {ibc.applications.fee.v1.IPacketFees} message PacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFees.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketFees message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.PacketFees} PacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFees.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.PacketFees(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.packet_fees && message.packet_fees.length)) - message.packet_fees = []; - message.packet_fees.push($root.ibc.applications.fee.v1.PacketFee.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketFees message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.PacketFees} PacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFees.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketFees message. - * @function verify - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketFees.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_fees != null && message.hasOwnProperty("packet_fees")) { - if (!Array.isArray(message.packet_fees)) - return "packet_fees: array expected"; - for (var i = 0; i < message.packet_fees.length; ++i) { - var error = $root.ibc.applications.fee.v1.PacketFee.verify(message.packet_fees[i]); - if (error) - return "packet_fees." + error; - } - } - return null; - }; - - /** - * Creates a PacketFees message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.PacketFees} PacketFees - */ - PacketFees.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.PacketFees) - return object; - var message = new $root.ibc.applications.fee.v1.PacketFees(); - if (object.packet_fees) { - if (!Array.isArray(object.packet_fees)) - throw TypeError(".ibc.applications.fee.v1.PacketFees.packet_fees: array expected"); - message.packet_fees = []; - for (var i = 0; i < object.packet_fees.length; ++i) { - if (typeof object.packet_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.PacketFees.packet_fees: object expected"); - message.packet_fees[i] = $root.ibc.applications.fee.v1.PacketFee.fromObject(object.packet_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PacketFees message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {ibc.applications.fee.v1.PacketFees} message PacketFees - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketFees.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packet_fees = []; - if (message.packet_fees && message.packet_fees.length) { - object.packet_fees = []; - for (var j = 0; j < message.packet_fees.length; ++j) - object.packet_fees[j] = $root.ibc.applications.fee.v1.PacketFee.toObject(message.packet_fees[j], options); - } - return object; - }; - - /** - * Converts this PacketFees to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.PacketFees - * @instance - * @returns {Object.} JSON object - */ - PacketFees.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketFees; - })(); - - v1.IdentifiedPacketFees = (function() { - - /** - * Properties of an IdentifiedPacketFees. - * @memberof ibc.applications.fee.v1 - * @interface IIdentifiedPacketFees - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] IdentifiedPacketFees packet_id - * @property {Array.|null} [packet_fees] IdentifiedPacketFees packet_fees - */ - - /** - * Constructs a new IdentifiedPacketFees. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents an IdentifiedPacketFees. - * @implements IIdentifiedPacketFees - * @constructor - * @param {ibc.applications.fee.v1.IIdentifiedPacketFees=} [properties] Properties to set - */ - function IdentifiedPacketFees(properties) { - this.packet_fees = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedPacketFees packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @instance - */ - IdentifiedPacketFees.prototype.packet_id = null; - - /** - * IdentifiedPacketFees packet_fees. - * @member {Array.} packet_fees - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @instance - */ - IdentifiedPacketFees.prototype.packet_fees = $util.emptyArray; - - /** - * Encodes the specified IdentifiedPacketFees message. Does not implicitly {@link ibc.applications.fee.v1.IdentifiedPacketFees.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {ibc.applications.fee.v1.IIdentifiedPacketFees} message IdentifiedPacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedPacketFees.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.packet_fees != null && message.packet_fees.length) - for (var i = 0; i < message.packet_fees.length; ++i) - $root.ibc.applications.fee.v1.PacketFee.encode(message.packet_fees[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedPacketFees message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.IdentifiedPacketFees.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {ibc.applications.fee.v1.IIdentifiedPacketFees} message IdentifiedPacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedPacketFees.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedPacketFees message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.IdentifiedPacketFees} IdentifiedPacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedPacketFees.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.IdentifiedPacketFees(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.packet_fees && message.packet_fees.length)) - message.packet_fees = []; - message.packet_fees.push($root.ibc.applications.fee.v1.PacketFee.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedPacketFees message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.IdentifiedPacketFees} IdentifiedPacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedPacketFees.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedPacketFees message. - * @function verify - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedPacketFees.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.packet_fees != null && message.hasOwnProperty("packet_fees")) { - if (!Array.isArray(message.packet_fees)) - return "packet_fees: array expected"; - for (var i = 0; i < message.packet_fees.length; ++i) { - var error = $root.ibc.applications.fee.v1.PacketFee.verify(message.packet_fees[i]); - if (error) - return "packet_fees." + error; - } - } - return null; - }; - - /** - * Creates an IdentifiedPacketFees message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.IdentifiedPacketFees} IdentifiedPacketFees - */ - IdentifiedPacketFees.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.IdentifiedPacketFees) - return object; - var message = new $root.ibc.applications.fee.v1.IdentifiedPacketFees(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.IdentifiedPacketFees.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - if (object.packet_fees) { - if (!Array.isArray(object.packet_fees)) - throw TypeError(".ibc.applications.fee.v1.IdentifiedPacketFees.packet_fees: array expected"); - message.packet_fees = []; - for (var i = 0; i < object.packet_fees.length; ++i) { - if (typeof object.packet_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.IdentifiedPacketFees.packet_fees: object expected"); - message.packet_fees[i] = $root.ibc.applications.fee.v1.PacketFee.fromObject(object.packet_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedPacketFees message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {ibc.applications.fee.v1.IdentifiedPacketFees} message IdentifiedPacketFees - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedPacketFees.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packet_fees = []; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - if (message.packet_fees && message.packet_fees.length) { - object.packet_fees = []; - for (var j = 0; j < message.packet_fees.length; ++j) - object.packet_fees[j] = $root.ibc.applications.fee.v1.PacketFee.toObject(message.packet_fees[j], options); - } - return object; - }; - - /** - * Converts this IdentifiedPacketFees to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @instance - * @returns {Object.} JSON object - */ - IdentifiedPacketFees.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedPacketFees; - })(); - - v1.IncentivizedAcknowledgement = (function() { - - /** - * Properties of an IncentivizedAcknowledgement. - * @memberof ibc.applications.fee.v1 - * @interface IIncentivizedAcknowledgement - * @property {Uint8Array|null} [app_acknowledgement] IncentivizedAcknowledgement app_acknowledgement - * @property {string|null} [forward_relayer_address] IncentivizedAcknowledgement forward_relayer_address - * @property {boolean|null} [underlying_app_success] IncentivizedAcknowledgement underlying_app_success - */ - - /** - * Constructs a new IncentivizedAcknowledgement. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents an IncentivizedAcknowledgement. - * @implements IIncentivizedAcknowledgement - * @constructor - * @param {ibc.applications.fee.v1.IIncentivizedAcknowledgement=} [properties] Properties to set - */ - function IncentivizedAcknowledgement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IncentivizedAcknowledgement app_acknowledgement. - * @member {Uint8Array} app_acknowledgement - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - */ - IncentivizedAcknowledgement.prototype.app_acknowledgement = $util.newBuffer([]); - - /** - * IncentivizedAcknowledgement forward_relayer_address. - * @member {string} forward_relayer_address - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - */ - IncentivizedAcknowledgement.prototype.forward_relayer_address = ""; - - /** - * IncentivizedAcknowledgement underlying_app_success. - * @member {boolean} underlying_app_success - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - */ - IncentivizedAcknowledgement.prototype.underlying_app_success = false; - - /** - * Encodes the specified IncentivizedAcknowledgement message. Does not implicitly {@link ibc.applications.fee.v1.IncentivizedAcknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {ibc.applications.fee.v1.IIncentivizedAcknowledgement} message IncentivizedAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncentivizedAcknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.app_acknowledgement != null && Object.hasOwnProperty.call(message, "app_acknowledgement")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.app_acknowledgement); - if (message.forward_relayer_address != null && Object.hasOwnProperty.call(message, "forward_relayer_address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.forward_relayer_address); - if (message.underlying_app_success != null && Object.hasOwnProperty.call(message, "underlying_app_success")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.underlying_app_success); - return writer; - }; - - /** - * Encodes the specified IncentivizedAcknowledgement message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.IncentivizedAcknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {ibc.applications.fee.v1.IIncentivizedAcknowledgement} message IncentivizedAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncentivizedAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IncentivizedAcknowledgement message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.IncentivizedAcknowledgement} IncentivizedAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncentivizedAcknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.IncentivizedAcknowledgement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_acknowledgement = reader.bytes(); - break; - case 2: - message.forward_relayer_address = reader.string(); - break; - case 3: - message.underlying_app_success = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IncentivizedAcknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.IncentivizedAcknowledgement} IncentivizedAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncentivizedAcknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IncentivizedAcknowledgement message. - * @function verify - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IncentivizedAcknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.app_acknowledgement != null && message.hasOwnProperty("app_acknowledgement")) - if (!(message.app_acknowledgement && typeof message.app_acknowledgement.length === "number" || $util.isString(message.app_acknowledgement))) - return "app_acknowledgement: buffer expected"; - if (message.forward_relayer_address != null && message.hasOwnProperty("forward_relayer_address")) - if (!$util.isString(message.forward_relayer_address)) - return "forward_relayer_address: string expected"; - if (message.underlying_app_success != null && message.hasOwnProperty("underlying_app_success")) - if (typeof message.underlying_app_success !== "boolean") - return "underlying_app_success: boolean expected"; - return null; - }; - - /** - * Creates an IncentivizedAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.IncentivizedAcknowledgement} IncentivizedAcknowledgement - */ - IncentivizedAcknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.IncentivizedAcknowledgement) - return object; - var message = new $root.ibc.applications.fee.v1.IncentivizedAcknowledgement(); - if (object.app_acknowledgement != null) - if (typeof object.app_acknowledgement === "string") - $util.base64.decode(object.app_acknowledgement, message.app_acknowledgement = $util.newBuffer($util.base64.length(object.app_acknowledgement)), 0); - else if (object.app_acknowledgement.length) - message.app_acknowledgement = object.app_acknowledgement; - if (object.forward_relayer_address != null) - message.forward_relayer_address = String(object.forward_relayer_address); - if (object.underlying_app_success != null) - message.underlying_app_success = Boolean(object.underlying_app_success); - return message; - }; - - /** - * Creates a plain object from an IncentivizedAcknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {ibc.applications.fee.v1.IncentivizedAcknowledgement} message IncentivizedAcknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IncentivizedAcknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.app_acknowledgement = ""; - else { - object.app_acknowledgement = []; - if (options.bytes !== Array) - object.app_acknowledgement = $util.newBuffer(object.app_acknowledgement); - } - object.forward_relayer_address = ""; - object.underlying_app_success = false; - } - if (message.app_acknowledgement != null && message.hasOwnProperty("app_acknowledgement")) - object.app_acknowledgement = options.bytes === String ? $util.base64.encode(message.app_acknowledgement, 0, message.app_acknowledgement.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_acknowledgement) : message.app_acknowledgement; - if (message.forward_relayer_address != null && message.hasOwnProperty("forward_relayer_address")) - object.forward_relayer_address = message.forward_relayer_address; - if (message.underlying_app_success != null && message.hasOwnProperty("underlying_app_success")) - object.underlying_app_success = message.underlying_app_success; - return object; - }; - - /** - * Converts this IncentivizedAcknowledgement to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - * @returns {Object.} JSON object - */ - IncentivizedAcknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IncentivizedAcknowledgement; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.fee.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; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPackets}. - * @memberof ibc.applications.fee.v1.Query - * @typedef IncentivizedPacketsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} [response] QueryIncentivizedPacketsResponse - */ - - /** - * Calls IncentivizedPackets. - * @function incentivizedPackets - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} request QueryIncentivizedPacketsRequest message or plain object - * @param {ibc.applications.fee.v1.Query.IncentivizedPacketsCallback} callback Node-style callback called with the error, if any, and QueryIncentivizedPacketsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.incentivizedPackets = function incentivizedPackets(request, callback) { - return this.rpcCall(incentivizedPackets, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse, request, callback); - }, "name", { value: "IncentivizedPackets" }); - - /** - * Calls IncentivizedPackets. - * @function incentivizedPackets - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} request QueryIncentivizedPacketsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPacket}. - * @memberof ibc.applications.fee.v1.Query - * @typedef IncentivizedPacketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} [response] QueryIncentivizedPacketResponse - */ - - /** - * Calls IncentivizedPacket. - * @function incentivizedPacket - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} request QueryIncentivizedPacketRequest message or plain object - * @param {ibc.applications.fee.v1.Query.IncentivizedPacketCallback} callback Node-style callback called with the error, if any, and QueryIncentivizedPacketResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.incentivizedPacket = function incentivizedPacket(request, callback) { - return this.rpcCall(incentivizedPacket, $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest, $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse, request, callback); - }, "name", { value: "IncentivizedPacket" }); - - /** - * Calls IncentivizedPacket. - * @function incentivizedPacket - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} request QueryIncentivizedPacketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPacketsForChannel}. - * @memberof ibc.applications.fee.v1.Query - * @typedef IncentivizedPacketsForChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} [response] QueryIncentivizedPacketsForChannelResponse - */ - - /** - * Calls IncentivizedPacketsForChannel. - * @function incentivizedPacketsForChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} request QueryIncentivizedPacketsForChannelRequest message or plain object - * @param {ibc.applications.fee.v1.Query.IncentivizedPacketsForChannelCallback} callback Node-style callback called with the error, if any, and QueryIncentivizedPacketsForChannelResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.incentivizedPacketsForChannel = function incentivizedPacketsForChannel(request, callback) { - return this.rpcCall(incentivizedPacketsForChannel, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse, request, callback); - }, "name", { value: "IncentivizedPacketsForChannel" }); - - /** - * Calls IncentivizedPacketsForChannel. - * @function incentivizedPacketsForChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} request QueryIncentivizedPacketsForChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalRecvFees}. - * @memberof ibc.applications.fee.v1.Query - * @typedef TotalRecvFeesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} [response] QueryTotalRecvFeesResponse - */ - - /** - * Calls TotalRecvFees. - * @function totalRecvFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} request QueryTotalRecvFeesRequest message or plain object - * @param {ibc.applications.fee.v1.Query.TotalRecvFeesCallback} callback Node-style callback called with the error, if any, and QueryTotalRecvFeesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalRecvFees = function totalRecvFees(request, callback) { - return this.rpcCall(totalRecvFees, $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest, $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse, request, callback); - }, "name", { value: "TotalRecvFees" }); - - /** - * Calls TotalRecvFees. - * @function totalRecvFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} request QueryTotalRecvFeesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalAckFees}. - * @memberof ibc.applications.fee.v1.Query - * @typedef TotalAckFeesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryTotalAckFeesResponse} [response] QueryTotalAckFeesResponse - */ - - /** - * Calls TotalAckFees. - * @function totalAckFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} request QueryTotalAckFeesRequest message or plain object - * @param {ibc.applications.fee.v1.Query.TotalAckFeesCallback} callback Node-style callback called with the error, if any, and QueryTotalAckFeesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalAckFees = function totalAckFees(request, callback) { - return this.rpcCall(totalAckFees, $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest, $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse, request, callback); - }, "name", { value: "TotalAckFees" }); - - /** - * Calls TotalAckFees. - * @function totalAckFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} request QueryTotalAckFeesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalTimeoutFees}. - * @memberof ibc.applications.fee.v1.Query - * @typedef TotalTimeoutFeesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} [response] QueryTotalTimeoutFeesResponse - */ - - /** - * Calls TotalTimeoutFees. - * @function totalTimeoutFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} request QueryTotalTimeoutFeesRequest message or plain object - * @param {ibc.applications.fee.v1.Query.TotalTimeoutFeesCallback} callback Node-style callback called with the error, if any, and QueryTotalTimeoutFeesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalTimeoutFees = function totalTimeoutFees(request, callback) { - return this.rpcCall(totalTimeoutFees, $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest, $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse, request, callback); - }, "name", { value: "TotalTimeoutFees" }); - - /** - * Calls TotalTimeoutFees. - * @function totalTimeoutFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} request QueryTotalTimeoutFeesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#payee}. - * @memberof ibc.applications.fee.v1.Query - * @typedef PayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryPayeeResponse} [response] QueryPayeeResponse - */ - - /** - * Calls Payee. - * @function payee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} request QueryPayeeRequest message or plain object - * @param {ibc.applications.fee.v1.Query.PayeeCallback} callback Node-style callback called with the error, if any, and QueryPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.payee = function payee(request, callback) { - return this.rpcCall(payee, $root.ibc.applications.fee.v1.QueryPayeeRequest, $root.ibc.applications.fee.v1.QueryPayeeResponse, request, callback); - }, "name", { value: "Payee" }); - - /** - * Calls Payee. - * @function payee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} request QueryPayeeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#counterpartyPayee}. - * @memberof ibc.applications.fee.v1.Query - * @typedef CounterpartyPayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} [response] QueryCounterpartyPayeeResponse - */ - - /** - * Calls CounterpartyPayee. - * @function counterpartyPayee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} request QueryCounterpartyPayeeRequest message or plain object - * @param {ibc.applications.fee.v1.Query.CounterpartyPayeeCallback} callback Node-style callback called with the error, if any, and QueryCounterpartyPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.counterpartyPayee = function counterpartyPayee(request, callback) { - return this.rpcCall(counterpartyPayee, $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest, $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse, request, callback); - }, "name", { value: "CounterpartyPayee" }); - - /** - * Calls CounterpartyPayee. - * @function counterpartyPayee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} request QueryCounterpartyPayeeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#feeEnabledChannels}. - * @memberof ibc.applications.fee.v1.Query - * @typedef FeeEnabledChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} [response] QueryFeeEnabledChannelsResponse - */ - - /** - * Calls FeeEnabledChannels. - * @function feeEnabledChannels - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} request QueryFeeEnabledChannelsRequest message or plain object - * @param {ibc.applications.fee.v1.Query.FeeEnabledChannelsCallback} callback Node-style callback called with the error, if any, and QueryFeeEnabledChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.feeEnabledChannels = function feeEnabledChannels(request, callback) { - return this.rpcCall(feeEnabledChannels, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse, request, callback); - }, "name", { value: "FeeEnabledChannels" }); - - /** - * Calls FeeEnabledChannels. - * @function feeEnabledChannels - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} request QueryFeeEnabledChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#feeEnabledChannel}. - * @memberof ibc.applications.fee.v1.Query - * @typedef FeeEnabledChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} [response] QueryFeeEnabledChannelResponse - */ - - /** - * Calls FeeEnabledChannel. - * @function feeEnabledChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} request QueryFeeEnabledChannelRequest message or plain object - * @param {ibc.applications.fee.v1.Query.FeeEnabledChannelCallback} callback Node-style callback called with the error, if any, and QueryFeeEnabledChannelResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.feeEnabledChannel = function feeEnabledChannel(request, callback) { - return this.rpcCall(feeEnabledChannel, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse, request, callback); - }, "name", { value: "FeeEnabledChannel" }); - - /** - * Calls FeeEnabledChannel. - * @function feeEnabledChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} request QueryFeeEnabledChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryIncentivizedPacketsRequest = (function() { - - /** - * Properties of a QueryIncentivizedPacketsRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryIncentivizedPacketsRequest pagination - * @property {Long|null} [query_height] QueryIncentivizedPacketsRequest query_height - */ - - /** - * Constructs a new QueryIncentivizedPacketsRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsRequest. - * @implements IQueryIncentivizedPacketsRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest=} [properties] Properties to set - */ - function QueryIncentivizedPacketsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @instance - */ - QueryIncentivizedPacketsRequest.prototype.pagination = null; - - /** - * QueryIncentivizedPacketsRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @instance - */ - QueryIncentivizedPacketsRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryIncentivizedPacketsRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} message QueryIncentivizedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} message QueryIncentivizedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} QueryIncentivizedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} QueryIncentivizedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} QueryIncentivizedPacketsRequest - */ - QueryIncentivizedPacketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} message QueryIncentivizedPacketsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pagination = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsRequest; - })(); - - v1.QueryIncentivizedPacketsResponse = (function() { - - /** - * Properties of a QueryIncentivizedPacketsResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsResponse - * @property {Array.|null} [incentivized_packets] QueryIncentivizedPacketsResponse incentivized_packets - */ - - /** - * Constructs a new QueryIncentivizedPacketsResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsResponse. - * @implements IQueryIncentivizedPacketsResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse=} [properties] Properties to set - */ - function QueryIncentivizedPacketsResponse(properties) { - this.incentivized_packets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsResponse incentivized_packets. - * @member {Array.} incentivized_packets - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @instance - */ - QueryIncentivizedPacketsResponse.prototype.incentivized_packets = $util.emptyArray; - - /** - * Encodes the specified QueryIncentivizedPacketsResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse} message QueryIncentivizedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incentivized_packets != null && message.incentivized_packets.length) - for (var i = 0; i < message.incentivized_packets.length; ++i) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.incentivized_packets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse} message QueryIncentivizedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} QueryIncentivizedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.incentivized_packets && message.incentivized_packets.length)) - message.incentivized_packets = []; - message.incentivized_packets.push($root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} QueryIncentivizedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.incentivized_packets != null && message.hasOwnProperty("incentivized_packets")) { - if (!Array.isArray(message.incentivized_packets)) - return "incentivized_packets: array expected"; - for (var i = 0; i < message.incentivized_packets.length; ++i) { - var error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.incentivized_packets[i]); - if (error) - return "incentivized_packets." + error; - } - } - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} QueryIncentivizedPacketsResponse - */ - QueryIncentivizedPacketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse(); - if (object.incentivized_packets) { - if (!Array.isArray(object.incentivized_packets)) - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.incentivized_packets: array expected"); - message.incentivized_packets = []; - for (var i = 0; i < object.incentivized_packets.length; ++i) { - if (typeof object.incentivized_packets[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.incentivized_packets: object expected"); - message.incentivized_packets[i] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.incentivized_packets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} message QueryIncentivizedPacketsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.incentivized_packets = []; - if (message.incentivized_packets && message.incentivized_packets.length) { - object.incentivized_packets = []; - for (var j = 0; j < message.incentivized_packets.length; ++j) - object.incentivized_packets[j] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.incentivized_packets[j], options); - } - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsResponse; - })(); - - v1.QueryIncentivizedPacketRequest = (function() { - - /** - * Properties of a QueryIncentivizedPacketRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryIncentivizedPacketRequest packet_id - * @property {Long|null} [query_height] QueryIncentivizedPacketRequest query_height - */ - - /** - * Constructs a new QueryIncentivizedPacketRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketRequest. - * @implements IQueryIncentivizedPacketRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest=} [properties] Properties to set - */ - function QueryIncentivizedPacketRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @instance - */ - QueryIncentivizedPacketRequest.prototype.packet_id = null; - - /** - * QueryIncentivizedPacketRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @instance - */ - QueryIncentivizedPacketRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryIncentivizedPacketRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} message QueryIncentivizedPacketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} message QueryIncentivizedPacketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} QueryIncentivizedPacketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - case 2: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} QueryIncentivizedPacketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryIncentivizedPacketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} QueryIncentivizedPacketRequest - */ - QueryIncentivizedPacketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} message QueryIncentivizedPacketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet_id = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryIncentivizedPacketRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketRequest; - })(); - - v1.QueryIncentivizedPacketResponse = (function() { - - /** - * Properties of a QueryIncentivizedPacketResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketResponse - * @property {ibc.applications.fee.v1.IIdentifiedPacketFees|null} [incentivized_packet] QueryIncentivizedPacketResponse incentivized_packet - */ - - /** - * Constructs a new QueryIncentivizedPacketResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketResponse. - * @implements IQueryIncentivizedPacketResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketResponse=} [properties] Properties to set - */ - function QueryIncentivizedPacketResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketResponse incentivized_packet. - * @member {ibc.applications.fee.v1.IIdentifiedPacketFees|null|undefined} incentivized_packet - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @instance - */ - QueryIncentivizedPacketResponse.prototype.incentivized_packet = null; - - /** - * Encodes the specified QueryIncentivizedPacketResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketResponse} message QueryIncentivizedPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incentivized_packet != null && Object.hasOwnProperty.call(message, "incentivized_packet")) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.incentivized_packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketResponse} message QueryIncentivizedPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} QueryIncentivizedPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.incentivized_packet = $root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} QueryIncentivizedPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.incentivized_packet != null && message.hasOwnProperty("incentivized_packet")) { - var error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.incentivized_packet); - if (error) - return "incentivized_packet." + error; - } - return null; - }; - - /** - * Creates a QueryIncentivizedPacketResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} QueryIncentivizedPacketResponse - */ - QueryIncentivizedPacketResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse(); - if (object.incentivized_packet != null) { - if (typeof object.incentivized_packet !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketResponse.incentivized_packet: object expected"); - message.incentivized_packet = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.incentivized_packet); - } - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} message QueryIncentivizedPacketResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.incentivized_packet = null; - if (message.incentivized_packet != null && message.hasOwnProperty("incentivized_packet")) - object.incentivized_packet = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.incentivized_packet, options); - return object; - }; - - /** - * Converts this QueryIncentivizedPacketResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketResponse; - })(); - - v1.QueryIncentivizedPacketsForChannelRequest = (function() { - - /** - * Properties of a QueryIncentivizedPacketsForChannelRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsForChannelRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryIncentivizedPacketsForChannelRequest pagination - * @property {string|null} [port_id] QueryIncentivizedPacketsForChannelRequest port_id - * @property {string|null} [channel_id] QueryIncentivizedPacketsForChannelRequest channel_id - * @property {Long|null} [query_height] QueryIncentivizedPacketsForChannelRequest query_height - */ - - /** - * Constructs a new QueryIncentivizedPacketsForChannelRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsForChannelRequest. - * @implements IQueryIncentivizedPacketsForChannelRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest=} [properties] Properties to set - */ - function QueryIncentivizedPacketsForChannelRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsForChannelRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.pagination = null; - - /** - * QueryIncentivizedPacketsForChannelRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.port_id = ""; - - /** - * QueryIncentivizedPacketsForChannelRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.channel_id = ""; - - /** - * QueryIncentivizedPacketsForChannelRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} message QueryIncentivizedPacketsForChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channel_id); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} message QueryIncentivizedPacketsForChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} QueryIncentivizedPacketsForChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.channel_id = reader.string(); - break; - case 4: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} QueryIncentivizedPacketsForChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsForChannelRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsForChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsForChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} QueryIncentivizedPacketsForChannelRequest - */ - QueryIncentivizedPacketsForChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsForChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} message QueryIncentivizedPacketsForChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsForChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pagination = null; - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsForChannelRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsForChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsForChannelRequest; - })(); - - v1.QueryIncentivizedPacketsForChannelResponse = (function() { - - /** - * Properties of a QueryIncentivizedPacketsForChannelResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsForChannelResponse - * @property {Array.|null} [incentivized_packets] QueryIncentivizedPacketsForChannelResponse incentivized_packets - */ - - /** - * Constructs a new QueryIncentivizedPacketsForChannelResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsForChannelResponse. - * @implements IQueryIncentivizedPacketsForChannelResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse=} [properties] Properties to set - */ - function QueryIncentivizedPacketsForChannelResponse(properties) { - this.incentivized_packets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsForChannelResponse incentivized_packets. - * @member {Array.} incentivized_packets - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @instance - */ - QueryIncentivizedPacketsForChannelResponse.prototype.incentivized_packets = $util.emptyArray; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse} message QueryIncentivizedPacketsForChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incentivized_packets != null && message.incentivized_packets.length) - for (var i = 0; i < message.incentivized_packets.length; ++i) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.incentivized_packets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse} message QueryIncentivizedPacketsForChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} QueryIncentivizedPacketsForChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.incentivized_packets && message.incentivized_packets.length)) - message.incentivized_packets = []; - message.incentivized_packets.push($root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} QueryIncentivizedPacketsForChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsForChannelResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsForChannelResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.incentivized_packets != null && message.hasOwnProperty("incentivized_packets")) { - if (!Array.isArray(message.incentivized_packets)) - return "incentivized_packets: array expected"; - for (var i = 0; i < message.incentivized_packets.length; ++i) { - var error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.incentivized_packets[i]); - if (error) - return "incentivized_packets." + error; - } - } - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsForChannelResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} QueryIncentivizedPacketsForChannelResponse - */ - QueryIncentivizedPacketsForChannelResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse(); - if (object.incentivized_packets) { - if (!Array.isArray(object.incentivized_packets)) - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.incentivized_packets: array expected"); - message.incentivized_packets = []; - for (var i = 0; i < object.incentivized_packets.length; ++i) { - if (typeof object.incentivized_packets[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.incentivized_packets: object expected"); - message.incentivized_packets[i] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.incentivized_packets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsForChannelResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} message QueryIncentivizedPacketsForChannelResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsForChannelResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.incentivized_packets = []; - if (message.incentivized_packets && message.incentivized_packets.length) { - object.incentivized_packets = []; - for (var j = 0; j < message.incentivized_packets.length; ++j) - object.incentivized_packets[j] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.incentivized_packets[j], options); - } - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsForChannelResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsForChannelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsForChannelResponse; - })(); - - v1.QueryTotalRecvFeesRequest = (function() { - - /** - * Properties of a QueryTotalRecvFeesRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalRecvFeesRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryTotalRecvFeesRequest packet_id - */ - - /** - * Constructs a new QueryTotalRecvFeesRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalRecvFeesRequest. - * @implements IQueryTotalRecvFeesRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest=} [properties] Properties to set - */ - function QueryTotalRecvFeesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalRecvFeesRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @instance - */ - QueryTotalRecvFeesRequest.prototype.packet_id = null; - - /** - * Encodes the specified QueryTotalRecvFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} message QueryTotalRecvFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalRecvFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} message QueryTotalRecvFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalRecvFeesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} QueryTotalRecvFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalRecvFeesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} QueryTotalRecvFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalRecvFeesRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalRecvFeesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a QueryTotalRecvFeesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} QueryTotalRecvFeesRequest - */ - QueryTotalRecvFeesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalRecvFeesRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalRecvFeesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} message QueryTotalRecvFeesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalRecvFeesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this QueryTotalRecvFeesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalRecvFeesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalRecvFeesRequest; - })(); - - v1.QueryTotalRecvFeesResponse = (function() { - - /** - * Properties of a QueryTotalRecvFeesResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalRecvFeesResponse - * @property {Array.|null} [recv_fees] QueryTotalRecvFeesResponse recv_fees - */ - - /** - * Constructs a new QueryTotalRecvFeesResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalRecvFeesResponse. - * @implements IQueryTotalRecvFeesResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesResponse=} [properties] Properties to set - */ - function QueryTotalRecvFeesResponse(properties) { - this.recv_fees = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalRecvFeesResponse recv_fees. - * @member {Array.} recv_fees - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @instance - */ - QueryTotalRecvFeesResponse.prototype.recv_fees = $util.emptyArray; - - /** - * Encodes the specified QueryTotalRecvFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesResponse} message QueryTotalRecvFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recv_fees != null && message.recv_fees.length) - for (var i = 0; i < message.recv_fees.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.recv_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalRecvFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesResponse} message QueryTotalRecvFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalRecvFeesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} QueryTotalRecvFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.recv_fees && message.recv_fees.length)) - message.recv_fees = []; - message.recv_fees.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalRecvFeesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} QueryTotalRecvFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalRecvFeesResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalRecvFeesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recv_fees != null && message.hasOwnProperty("recv_fees")) { - if (!Array.isArray(message.recv_fees)) - return "recv_fees: array expected"; - for (var i = 0; i < message.recv_fees.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.recv_fees[i]); - if (error) - return "recv_fees." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalRecvFeesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} QueryTotalRecvFeesResponse - */ - QueryTotalRecvFeesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse(); - if (object.recv_fees) { - if (!Array.isArray(object.recv_fees)) - throw TypeError(".ibc.applications.fee.v1.QueryTotalRecvFeesResponse.recv_fees: array expected"); - message.recv_fees = []; - for (var i = 0; i < object.recv_fees.length; ++i) { - if (typeof object.recv_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalRecvFeesResponse.recv_fees: object expected"); - message.recv_fees[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.recv_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalRecvFeesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} message QueryTotalRecvFeesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalRecvFeesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.recv_fees = []; - if (message.recv_fees && message.recv_fees.length) { - object.recv_fees = []; - for (var j = 0; j < message.recv_fees.length; ++j) - object.recv_fees[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.recv_fees[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalRecvFeesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalRecvFeesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalRecvFeesResponse; - })(); - - v1.QueryTotalAckFeesRequest = (function() { - - /** - * Properties of a QueryTotalAckFeesRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalAckFeesRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryTotalAckFeesRequest packet_id - */ - - /** - * Constructs a new QueryTotalAckFeesRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalAckFeesRequest. - * @implements IQueryTotalAckFeesRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest=} [properties] Properties to set - */ - function QueryTotalAckFeesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalAckFeesRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @instance - */ - QueryTotalAckFeesRequest.prototype.packet_id = null; - - /** - * Encodes the specified QueryTotalAckFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} message QueryTotalAckFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalAckFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} message QueryTotalAckFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalAckFeesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesRequest} QueryTotalAckFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalAckFeesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesRequest} QueryTotalAckFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalAckFeesRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalAckFeesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a QueryTotalAckFeesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesRequest} QueryTotalAckFeesRequest - */ - QueryTotalAckFeesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalAckFeesRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalAckFeesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {ibc.applications.fee.v1.QueryTotalAckFeesRequest} message QueryTotalAckFeesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalAckFeesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this QueryTotalAckFeesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalAckFeesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalAckFeesRequest; - })(); - - v1.QueryTotalAckFeesResponse = (function() { - - /** - * Properties of a QueryTotalAckFeesResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalAckFeesResponse - * @property {Array.|null} [ack_fees] QueryTotalAckFeesResponse ack_fees - */ - - /** - * Constructs a new QueryTotalAckFeesResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalAckFeesResponse. - * @implements IQueryTotalAckFeesResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesResponse=} [properties] Properties to set - */ - function QueryTotalAckFeesResponse(properties) { - this.ack_fees = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalAckFeesResponse ack_fees. - * @member {Array.} ack_fees - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @instance - */ - QueryTotalAckFeesResponse.prototype.ack_fees = $util.emptyArray; - - /** - * Encodes the specified QueryTotalAckFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesResponse} message QueryTotalAckFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ack_fees != null && message.ack_fees.length) - for (var i = 0; i < message.ack_fees.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.ack_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalAckFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesResponse} message QueryTotalAckFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalAckFeesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesResponse} QueryTotalAckFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ack_fees && message.ack_fees.length)) - message.ack_fees = []; - message.ack_fees.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalAckFeesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesResponse} QueryTotalAckFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalAckFeesResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalAckFeesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ack_fees != null && message.hasOwnProperty("ack_fees")) { - if (!Array.isArray(message.ack_fees)) - return "ack_fees: array expected"; - for (var i = 0; i < message.ack_fees.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.ack_fees[i]); - if (error) - return "ack_fees." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalAckFeesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesResponse} QueryTotalAckFeesResponse - */ - QueryTotalAckFeesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse(); - if (object.ack_fees) { - if (!Array.isArray(object.ack_fees)) - throw TypeError(".ibc.applications.fee.v1.QueryTotalAckFeesResponse.ack_fees: array expected"); - message.ack_fees = []; - for (var i = 0; i < object.ack_fees.length; ++i) { - if (typeof object.ack_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalAckFeesResponse.ack_fees: object expected"); - message.ack_fees[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.ack_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalAckFeesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {ibc.applications.fee.v1.QueryTotalAckFeesResponse} message QueryTotalAckFeesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalAckFeesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ack_fees = []; - if (message.ack_fees && message.ack_fees.length) { - object.ack_fees = []; - for (var j = 0; j < message.ack_fees.length; ++j) - object.ack_fees[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.ack_fees[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalAckFeesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalAckFeesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalAckFeesResponse; - })(); - - v1.QueryTotalTimeoutFeesRequest = (function() { - - /** - * Properties of a QueryTotalTimeoutFeesRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalTimeoutFeesRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryTotalTimeoutFeesRequest packet_id - */ - - /** - * Constructs a new QueryTotalTimeoutFeesRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalTimeoutFeesRequest. - * @implements IQueryTotalTimeoutFeesRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest=} [properties] Properties to set - */ - function QueryTotalTimeoutFeesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalTimeoutFeesRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @instance - */ - QueryTotalTimeoutFeesRequest.prototype.packet_id = null; - - /** - * Encodes the specified QueryTotalTimeoutFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} message QueryTotalTimeoutFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalTimeoutFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} message QueryTotalTimeoutFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalTimeoutFeesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} QueryTotalTimeoutFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalTimeoutFeesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} QueryTotalTimeoutFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalTimeoutFeesRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalTimeoutFeesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a QueryTotalTimeoutFeesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} QueryTotalTimeoutFeesRequest - */ - QueryTotalTimeoutFeesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalTimeoutFeesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} message QueryTotalTimeoutFeesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalTimeoutFeesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this QueryTotalTimeoutFeesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalTimeoutFeesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalTimeoutFeesRequest; - })(); - - v1.QueryTotalTimeoutFeesResponse = (function() { - - /** - * Properties of a QueryTotalTimeoutFeesResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalTimeoutFeesResponse - * @property {Array.|null} [timeout_fees] QueryTotalTimeoutFeesResponse timeout_fees - */ - - /** - * Constructs a new QueryTotalTimeoutFeesResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalTimeoutFeesResponse. - * @implements IQueryTotalTimeoutFeesResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse=} [properties] Properties to set - */ - function QueryTotalTimeoutFeesResponse(properties) { - this.timeout_fees = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalTimeoutFeesResponse timeout_fees. - * @member {Array.} timeout_fees - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @instance - */ - QueryTotalTimeoutFeesResponse.prototype.timeout_fees = $util.emptyArray; - - /** - * Encodes the specified QueryTotalTimeoutFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse} message QueryTotalTimeoutFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeout_fees != null && message.timeout_fees.length) - for (var i = 0; i < message.timeout_fees.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.timeout_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalTimeoutFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse} message QueryTotalTimeoutFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalTimeoutFeesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} QueryTotalTimeoutFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.timeout_fees && message.timeout_fees.length)) - message.timeout_fees = []; - message.timeout_fees.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalTimeoutFeesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} QueryTotalTimeoutFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalTimeoutFeesResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalTimeoutFeesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeout_fees != null && message.hasOwnProperty("timeout_fees")) { - if (!Array.isArray(message.timeout_fees)) - return "timeout_fees: array expected"; - for (var i = 0; i < message.timeout_fees.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.timeout_fees[i]); - if (error) - return "timeout_fees." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalTimeoutFeesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} QueryTotalTimeoutFeesResponse - */ - QueryTotalTimeoutFeesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse(); - if (object.timeout_fees) { - if (!Array.isArray(object.timeout_fees)) - throw TypeError(".ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.timeout_fees: array expected"); - message.timeout_fees = []; - for (var i = 0; i < object.timeout_fees.length; ++i) { - if (typeof object.timeout_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.timeout_fees: object expected"); - message.timeout_fees[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.timeout_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalTimeoutFeesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} message QueryTotalTimeoutFeesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalTimeoutFeesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.timeout_fees = []; - if (message.timeout_fees && message.timeout_fees.length) { - object.timeout_fees = []; - for (var j = 0; j < message.timeout_fees.length; ++j) - object.timeout_fees[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.timeout_fees[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalTimeoutFeesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalTimeoutFeesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalTimeoutFeesResponse; - })(); - - v1.QueryPayeeRequest = (function() { - - /** - * Properties of a QueryPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryPayeeRequest - * @property {string|null} [channel_id] QueryPayeeRequest channel_id - * @property {string|null} [relayer] QueryPayeeRequest relayer - */ - - /** - * Constructs a new QueryPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryPayeeRequest. - * @implements IQueryPayeeRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryPayeeRequest=} [properties] Properties to set - */ - function QueryPayeeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPayeeRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @instance - */ - QueryPayeeRequest.prototype.channel_id = ""; - - /** - * QueryPayeeRequest relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @instance - */ - QueryPayeeRequest.prototype.relayer = ""; - - /** - * Encodes the specified QueryPayeeRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} message QueryPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - return writer; - }; - - /** - * Encodes the specified QueryPayeeRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} message QueryPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPayeeRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryPayeeRequest} QueryPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryPayeeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPayeeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryPayeeRequest} QueryPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPayeeRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPayeeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - return null; - }; - - /** - * Creates a QueryPayeeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryPayeeRequest} QueryPayeeRequest - */ - QueryPayeeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryPayeeRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryPayeeRequest(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - return message; - }; - - /** - * Creates a plain object from a QueryPayeeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {ibc.applications.fee.v1.QueryPayeeRequest} message QueryPayeeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPayeeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - return object; - }; - - /** - * Converts this QueryPayeeRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPayeeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPayeeRequest; - })(); - - v1.QueryPayeeResponse = (function() { - - /** - * Properties of a QueryPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryPayeeResponse - * @property {string|null} [payee_address] QueryPayeeResponse payee_address - */ - - /** - * Constructs a new QueryPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryPayeeResponse. - * @implements IQueryPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryPayeeResponse=} [properties] Properties to set - */ - function QueryPayeeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPayeeResponse payee_address. - * @member {string} payee_address - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @instance - */ - QueryPayeeResponse.prototype.payee_address = ""; - - /** - * Encodes the specified QueryPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeResponse} message QueryPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.payee_address != null && Object.hasOwnProperty.call(message, "payee_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.payee_address); - return writer; - }; - - /** - * Encodes the specified QueryPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeResponse} message QueryPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryPayeeResponse} QueryPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryPayeeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payee_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryPayeeResponse} QueryPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.payee_address != null && message.hasOwnProperty("payee_address")) - if (!$util.isString(message.payee_address)) - return "payee_address: string expected"; - return null; - }; - - /** - * Creates a QueryPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryPayeeResponse} QueryPayeeResponse - */ - QueryPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryPayeeResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryPayeeResponse(); - if (object.payee_address != null) - message.payee_address = String(object.payee_address); - return message; - }; - - /** - * Creates a plain object from a QueryPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {ibc.applications.fee.v1.QueryPayeeResponse} message QueryPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPayeeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.payee_address = ""; - if (message.payee_address != null && message.hasOwnProperty("payee_address")) - object.payee_address = message.payee_address; - return object; - }; - - /** - * Converts this QueryPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPayeeResponse; - })(); - - v1.QueryCounterpartyPayeeRequest = (function() { - - /** - * Properties of a QueryCounterpartyPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryCounterpartyPayeeRequest - * @property {string|null} [channel_id] QueryCounterpartyPayeeRequest channel_id - * @property {string|null} [relayer] QueryCounterpartyPayeeRequest relayer - */ - - /** - * Constructs a new QueryCounterpartyPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryCounterpartyPayeeRequest. - * @implements IQueryCounterpartyPayeeRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest=} [properties] Properties to set - */ - function QueryCounterpartyPayeeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryCounterpartyPayeeRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @instance - */ - QueryCounterpartyPayeeRequest.prototype.channel_id = ""; - - /** - * QueryCounterpartyPayeeRequest relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @instance - */ - QueryCounterpartyPayeeRequest.prototype.relayer = ""; - - /** - * Encodes the specified QueryCounterpartyPayeeRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} message QueryCounterpartyPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - return writer; - }; - - /** - * Encodes the specified QueryCounterpartyPayeeRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} message QueryCounterpartyPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryCounterpartyPayeeRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} QueryCounterpartyPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryCounterpartyPayeeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} QueryCounterpartyPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryCounterpartyPayeeRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryCounterpartyPayeeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - return null; - }; - - /** - * Creates a QueryCounterpartyPayeeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} QueryCounterpartyPayeeRequest - */ - QueryCounterpartyPayeeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - return message; - }; - - /** - * Creates a plain object from a QueryCounterpartyPayeeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} message QueryCounterpartyPayeeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryCounterpartyPayeeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - return object; - }; - - /** - * Converts this QueryCounterpartyPayeeRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @instance - * @returns {Object.} JSON object - */ - QueryCounterpartyPayeeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryCounterpartyPayeeRequest; - })(); - - v1.QueryCounterpartyPayeeResponse = (function() { - - /** - * Properties of a QueryCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryCounterpartyPayeeResponse - * @property {string|null} [counterparty_payee] QueryCounterpartyPayeeResponse counterparty_payee - */ - - /** - * Constructs a new QueryCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryCounterpartyPayeeResponse. - * @implements IQueryCounterpartyPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse=} [properties] Properties to set - */ - function QueryCounterpartyPayeeResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryCounterpartyPayeeResponse counterparty_payee. - * @member {string} counterparty_payee - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @instance - */ - QueryCounterpartyPayeeResponse.prototype.counterparty_payee = ""; - - /** - * Encodes the specified QueryCounterpartyPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse} message QueryCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.counterparty_payee != null && Object.hasOwnProperty.call(message, "counterparty_payee")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.counterparty_payee); - return writer; - }; - - /** - * Encodes the specified QueryCounterpartyPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse} message QueryCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryCounterpartyPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} QueryCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.counterparty_payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryCounterpartyPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} QueryCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryCounterpartyPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryCounterpartyPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - if (!$util.isString(message.counterparty_payee)) - return "counterparty_payee: string expected"; - return null; - }; - - /** - * Creates a QueryCounterpartyPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} QueryCounterpartyPayeeResponse - */ - QueryCounterpartyPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse(); - if (object.counterparty_payee != null) - message.counterparty_payee = String(object.counterparty_payee); - return message; - }; - - /** - * Creates a plain object from a QueryCounterpartyPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} message QueryCounterpartyPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryCounterpartyPayeeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.counterparty_payee = ""; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - object.counterparty_payee = message.counterparty_payee; - return object; - }; - - /** - * Converts this QueryCounterpartyPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - QueryCounterpartyPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryCounterpartyPayeeResponse; - })(); - - v1.QueryFeeEnabledChannelsRequest = (function() { - - /** - * Properties of a QueryFeeEnabledChannelsRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryFeeEnabledChannelsRequest pagination - * @property {Long|null} [query_height] QueryFeeEnabledChannelsRequest query_height - */ - - /** - * Constructs a new QueryFeeEnabledChannelsRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelsRequest. - * @implements IQueryFeeEnabledChannelsRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest=} [properties] Properties to set - */ - function QueryFeeEnabledChannelsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @instance - */ - QueryFeeEnabledChannelsRequest.prototype.pagination = null; - - /** - * QueryFeeEnabledChannelsRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @instance - */ - QueryFeeEnabledChannelsRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryFeeEnabledChannelsRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} message QueryFeeEnabledChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelsRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} message QueryFeeEnabledChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} QueryFeeEnabledChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} QueryFeeEnabledChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelsRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} QueryFeeEnabledChannelsRequest - */ - QueryFeeEnabledChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} message QueryFeeEnabledChannelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pagination = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelsRequest; - })(); - - v1.QueryFeeEnabledChannelsResponse = (function() { - - /** - * Properties of a QueryFeeEnabledChannelsResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelsResponse - * @property {Array.|null} [fee_enabled_channels] QueryFeeEnabledChannelsResponse fee_enabled_channels - */ - - /** - * Constructs a new QueryFeeEnabledChannelsResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelsResponse. - * @implements IQueryFeeEnabledChannelsResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse=} [properties] Properties to set - */ - function QueryFeeEnabledChannelsResponse(properties) { - this.fee_enabled_channels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelsResponse fee_enabled_channels. - * @member {Array.} fee_enabled_channels - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @instance - */ - QueryFeeEnabledChannelsResponse.prototype.fee_enabled_channels = $util.emptyArray; - - /** - * Encodes the specified QueryFeeEnabledChannelsResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse} message QueryFeeEnabledChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_enabled_channels != null && message.fee_enabled_channels.length) - for (var i = 0; i < message.fee_enabled_channels.length; ++i) - $root.ibc.applications.fee.v1.FeeEnabledChannel.encode(message.fee_enabled_channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelsResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse} message QueryFeeEnabledChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} QueryFeeEnabledChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.fee_enabled_channels && message.fee_enabled_channels.length)) - message.fee_enabled_channels = []; - message.fee_enabled_channels.push($root.ibc.applications.fee.v1.FeeEnabledChannel.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} QueryFeeEnabledChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelsResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_enabled_channels != null && message.hasOwnProperty("fee_enabled_channels")) { - if (!Array.isArray(message.fee_enabled_channels)) - return "fee_enabled_channels: array expected"; - for (var i = 0; i < message.fee_enabled_channels.length; ++i) { - var error = $root.ibc.applications.fee.v1.FeeEnabledChannel.verify(message.fee_enabled_channels[i]); - if (error) - return "fee_enabled_channels." + error; - } - } - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} QueryFeeEnabledChannelsResponse - */ - QueryFeeEnabledChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse(); - if (object.fee_enabled_channels) { - if (!Array.isArray(object.fee_enabled_channels)) - throw TypeError(".ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.fee_enabled_channels: array expected"); - message.fee_enabled_channels = []; - for (var i = 0; i < object.fee_enabled_channels.length; ++i) { - if (typeof object.fee_enabled_channels[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.fee_enabled_channels: object expected"); - message.fee_enabled_channels[i] = $root.ibc.applications.fee.v1.FeeEnabledChannel.fromObject(object.fee_enabled_channels[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} message QueryFeeEnabledChannelsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fee_enabled_channels = []; - if (message.fee_enabled_channels && message.fee_enabled_channels.length) { - object.fee_enabled_channels = []; - for (var j = 0; j < message.fee_enabled_channels.length; ++j) - object.fee_enabled_channels[j] = $root.ibc.applications.fee.v1.FeeEnabledChannel.toObject(message.fee_enabled_channels[j], options); - } - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelsResponse; - })(); - - v1.QueryFeeEnabledChannelRequest = (function() { - - /** - * Properties of a QueryFeeEnabledChannelRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelRequest - * @property {string|null} [port_id] QueryFeeEnabledChannelRequest port_id - * @property {string|null} [channel_id] QueryFeeEnabledChannelRequest channel_id - */ - - /** - * Constructs a new QueryFeeEnabledChannelRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelRequest. - * @implements IQueryFeeEnabledChannelRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest=} [properties] Properties to set - */ - function QueryFeeEnabledChannelRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @instance - */ - QueryFeeEnabledChannelRequest.prototype.port_id = ""; - - /** - * QueryFeeEnabledChannelRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @instance - */ - QueryFeeEnabledChannelRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryFeeEnabledChannelRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} message QueryFeeEnabledChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} message QueryFeeEnabledChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} QueryFeeEnabledChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} QueryFeeEnabledChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} QueryFeeEnabledChannelRequest - */ - QueryFeeEnabledChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest) - return object; - var message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} message QueryFeeEnabledChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelRequest; - })(); - - v1.QueryFeeEnabledChannelResponse = (function() { - - /** - * Properties of a QueryFeeEnabledChannelResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelResponse - * @property {boolean|null} [fee_enabled] QueryFeeEnabledChannelResponse fee_enabled - */ - - /** - * Constructs a new QueryFeeEnabledChannelResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelResponse. - * @implements IQueryFeeEnabledChannelResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse=} [properties] Properties to set - */ - function QueryFeeEnabledChannelResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelResponse fee_enabled. - * @member {boolean} fee_enabled - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @instance - */ - QueryFeeEnabledChannelResponse.prototype.fee_enabled = false; - - /** - * Encodes the specified QueryFeeEnabledChannelResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse} message QueryFeeEnabledChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_enabled != null && Object.hasOwnProperty.call(message, "fee_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.fee_enabled); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse} message QueryFeeEnabledChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} QueryFeeEnabledChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} QueryFeeEnabledChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_enabled != null && message.hasOwnProperty("fee_enabled")) - if (typeof message.fee_enabled !== "boolean") - return "fee_enabled: boolean expected"; - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} QueryFeeEnabledChannelResponse - */ - QueryFeeEnabledChannelResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) - return object; - var message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse(); - if (object.fee_enabled != null) - message.fee_enabled = Boolean(object.fee_enabled); - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} message QueryFeeEnabledChannelResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fee_enabled = false; - if (message.fee_enabled != null && message.hasOwnProperty("fee_enabled")) - object.fee_enabled = message.fee_enabled; - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.applications.fee.v1 - * @interface IGenesisState - * @property {Array.|null} [identified_fees] GenesisState identified_fees - * @property {Array.|null} [fee_enabled_channels] GenesisState fee_enabled_channels - * @property {Array.|null} [registered_payees] GenesisState registered_payees - * @property {Array.|null} [registered_counterparty_payees] GenesisState registered_counterparty_payees - * @property {Array.|null} [forward_relayers] GenesisState forward_relayers - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.applications.fee.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.identified_fees = []; - this.fee_enabled_channels = []; - this.registered_payees = []; - this.registered_counterparty_payees = []; - this.forward_relayers = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState identified_fees. - * @member {Array.} identified_fees - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.identified_fees = $util.emptyArray; - - /** - * GenesisState fee_enabled_channels. - * @member {Array.} fee_enabled_channels - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.fee_enabled_channels = $util.emptyArray; - - /** - * GenesisState registered_payees. - * @member {Array.} registered_payees - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.registered_payees = $util.emptyArray; - - /** - * GenesisState registered_counterparty_payees. - * @member {Array.} registered_counterparty_payees - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.registered_counterparty_payees = $util.emptyArray; - - /** - * GenesisState forward_relayers. - * @member {Array.} forward_relayers - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.forward_relayers = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.fee.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {ibc.applications.fee.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identified_fees != null && message.identified_fees.length) - for (var i = 0; i < message.identified_fees.length; ++i) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.identified_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fee_enabled_channels != null && message.fee_enabled_channels.length) - for (var i = 0; i < message.fee_enabled_channels.length; ++i) - $root.ibc.applications.fee.v1.FeeEnabledChannel.encode(message.fee_enabled_channels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.registered_payees != null && message.registered_payees.length) - for (var i = 0; i < message.registered_payees.length; ++i) - $root.ibc.applications.fee.v1.RegisteredPayee.encode(message.registered_payees[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.registered_counterparty_payees != null && message.registered_counterparty_payees.length) - for (var i = 0; i < message.registered_counterparty_payees.length; ++i) - $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.encode(message.registered_counterparty_payees[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.forward_relayers != null && message.forward_relayers.length) - for (var i = 0; i < message.forward_relayers.length; ++i) - $root.ibc.applications.fee.v1.ForwardRelayerAddress.encode(message.forward_relayers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {ibc.applications.fee.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.identified_fees && message.identified_fees.length)) - message.identified_fees = []; - message.identified_fees.push($root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.fee_enabled_channels && message.fee_enabled_channels.length)) - message.fee_enabled_channels = []; - message.fee_enabled_channels.push($root.ibc.applications.fee.v1.FeeEnabledChannel.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.registered_payees && message.registered_payees.length)) - message.registered_payees = []; - message.registered_payees.push($root.ibc.applications.fee.v1.RegisteredPayee.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.registered_counterparty_payees && message.registered_counterparty_payees.length)) - message.registered_counterparty_payees = []; - message.registered_counterparty_payees.push($root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.forward_relayers && message.forward_relayers.length)) - message.forward_relayers = []; - message.forward_relayers.push($root.ibc.applications.fee.v1.ForwardRelayerAddress.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identified_fees != null && message.hasOwnProperty("identified_fees")) { - if (!Array.isArray(message.identified_fees)) - return "identified_fees: array expected"; - for (var i = 0; i < message.identified_fees.length; ++i) { - var error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.identified_fees[i]); - if (error) - return "identified_fees." + error; - } - } - if (message.fee_enabled_channels != null && message.hasOwnProperty("fee_enabled_channels")) { - if (!Array.isArray(message.fee_enabled_channels)) - return "fee_enabled_channels: array expected"; - for (var i = 0; i < message.fee_enabled_channels.length; ++i) { - var error = $root.ibc.applications.fee.v1.FeeEnabledChannel.verify(message.fee_enabled_channels[i]); - if (error) - return "fee_enabled_channels." + error; - } - } - if (message.registered_payees != null && message.hasOwnProperty("registered_payees")) { - if (!Array.isArray(message.registered_payees)) - return "registered_payees: array expected"; - for (var i = 0; i < message.registered_payees.length; ++i) { - var error = $root.ibc.applications.fee.v1.RegisteredPayee.verify(message.registered_payees[i]); - if (error) - return "registered_payees." + error; - } - } - if (message.registered_counterparty_payees != null && message.hasOwnProperty("registered_counterparty_payees")) { - if (!Array.isArray(message.registered_counterparty_payees)) - return "registered_counterparty_payees: array expected"; - for (var i = 0; i < message.registered_counterparty_payees.length; ++i) { - var error = $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify(message.registered_counterparty_payees[i]); - if (error) - return "registered_counterparty_payees." + error; - } - } - if (message.forward_relayers != null && message.hasOwnProperty("forward_relayers")) { - if (!Array.isArray(message.forward_relayers)) - return "forward_relayers: array expected"; - for (var i = 0; i < message.forward_relayers.length; ++i) { - var error = $root.ibc.applications.fee.v1.ForwardRelayerAddress.verify(message.forward_relayers[i]); - if (error) - return "forward_relayers." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.GenesisState) - return object; - var message = new $root.ibc.applications.fee.v1.GenesisState(); - if (object.identified_fees) { - if (!Array.isArray(object.identified_fees)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.identified_fees: array expected"); - message.identified_fees = []; - for (var i = 0; i < object.identified_fees.length; ++i) { - if (typeof object.identified_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.identified_fees: object expected"); - message.identified_fees[i] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.identified_fees[i]); - } - } - if (object.fee_enabled_channels) { - if (!Array.isArray(object.fee_enabled_channels)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.fee_enabled_channels: array expected"); - message.fee_enabled_channels = []; - for (var i = 0; i < object.fee_enabled_channels.length; ++i) { - if (typeof object.fee_enabled_channels[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.fee_enabled_channels: object expected"); - message.fee_enabled_channels[i] = $root.ibc.applications.fee.v1.FeeEnabledChannel.fromObject(object.fee_enabled_channels[i]); - } - } - if (object.registered_payees) { - if (!Array.isArray(object.registered_payees)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_payees: array expected"); - message.registered_payees = []; - for (var i = 0; i < object.registered_payees.length; ++i) { - if (typeof object.registered_payees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_payees: object expected"); - message.registered_payees[i] = $root.ibc.applications.fee.v1.RegisteredPayee.fromObject(object.registered_payees[i]); - } - } - if (object.registered_counterparty_payees) { - if (!Array.isArray(object.registered_counterparty_payees)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_counterparty_payees: array expected"); - message.registered_counterparty_payees = []; - for (var i = 0; i < object.registered_counterparty_payees.length; ++i) { - if (typeof object.registered_counterparty_payees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_counterparty_payees: object expected"); - message.registered_counterparty_payees[i] = $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.fromObject(object.registered_counterparty_payees[i]); - } - } - if (object.forward_relayers) { - if (!Array.isArray(object.forward_relayers)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.forward_relayers: array expected"); - message.forward_relayers = []; - for (var i = 0; i < object.forward_relayers.length; ++i) { - if (typeof object.forward_relayers[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.forward_relayers: object expected"); - message.forward_relayers[i] = $root.ibc.applications.fee.v1.ForwardRelayerAddress.fromObject(object.forward_relayers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {ibc.applications.fee.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.identified_fees = []; - object.fee_enabled_channels = []; - object.registered_payees = []; - object.registered_counterparty_payees = []; - object.forward_relayers = []; - } - if (message.identified_fees && message.identified_fees.length) { - object.identified_fees = []; - for (var j = 0; j < message.identified_fees.length; ++j) - object.identified_fees[j] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.identified_fees[j], options); - } - if (message.fee_enabled_channels && message.fee_enabled_channels.length) { - object.fee_enabled_channels = []; - for (var j = 0; j < message.fee_enabled_channels.length; ++j) - object.fee_enabled_channels[j] = $root.ibc.applications.fee.v1.FeeEnabledChannel.toObject(message.fee_enabled_channels[j], options); - } - if (message.registered_payees && message.registered_payees.length) { - object.registered_payees = []; - for (var j = 0; j < message.registered_payees.length; ++j) - object.registered_payees[j] = $root.ibc.applications.fee.v1.RegisteredPayee.toObject(message.registered_payees[j], options); - } - if (message.registered_counterparty_payees && message.registered_counterparty_payees.length) { - object.registered_counterparty_payees = []; - for (var j = 0; j < message.registered_counterparty_payees.length; ++j) - object.registered_counterparty_payees[j] = $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.toObject(message.registered_counterparty_payees[j], options); - } - if (message.forward_relayers && message.forward_relayers.length) { - object.forward_relayers = []; - for (var j = 0; j < message.forward_relayers.length; ++j) - object.forward_relayers[j] = $root.ibc.applications.fee.v1.ForwardRelayerAddress.toObject(message.forward_relayers[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.FeeEnabledChannel = (function() { - - /** - * Properties of a FeeEnabledChannel. - * @memberof ibc.applications.fee.v1 - * @interface IFeeEnabledChannel - * @property {string|null} [port_id] FeeEnabledChannel port_id - * @property {string|null} [channel_id] FeeEnabledChannel channel_id - */ - - /** - * Constructs a new FeeEnabledChannel. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a FeeEnabledChannel. - * @implements IFeeEnabledChannel - * @constructor - * @param {ibc.applications.fee.v1.IFeeEnabledChannel=} [properties] Properties to set - */ - function FeeEnabledChannel(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeeEnabledChannel port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @instance - */ - FeeEnabledChannel.prototype.port_id = ""; - - /** - * FeeEnabledChannel channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @instance - */ - FeeEnabledChannel.prototype.channel_id = ""; - - /** - * Encodes the specified FeeEnabledChannel message. Does not implicitly {@link ibc.applications.fee.v1.FeeEnabledChannel.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {ibc.applications.fee.v1.IFeeEnabledChannel} message FeeEnabledChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeEnabledChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified FeeEnabledChannel message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.FeeEnabledChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {ibc.applications.fee.v1.IFeeEnabledChannel} message FeeEnabledChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeEnabledChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeeEnabledChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.FeeEnabledChannel} FeeEnabledChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeEnabledChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.FeeEnabledChannel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeeEnabledChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.FeeEnabledChannel} FeeEnabledChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeEnabledChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeeEnabledChannel message. - * @function verify - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeeEnabledChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a FeeEnabledChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.FeeEnabledChannel} FeeEnabledChannel - */ - FeeEnabledChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.FeeEnabledChannel) - return object; - var message = new $root.ibc.applications.fee.v1.FeeEnabledChannel(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a FeeEnabledChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {ibc.applications.fee.v1.FeeEnabledChannel} message FeeEnabledChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeeEnabledChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this FeeEnabledChannel to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @instance - * @returns {Object.} JSON object - */ - FeeEnabledChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FeeEnabledChannel; - })(); - - v1.RegisteredPayee = (function() { - - /** - * Properties of a RegisteredPayee. - * @memberof ibc.applications.fee.v1 - * @interface IRegisteredPayee - * @property {string|null} [channel_id] RegisteredPayee channel_id - * @property {string|null} [relayer] RegisteredPayee relayer - * @property {string|null} [payee] RegisteredPayee payee - */ - - /** - * Constructs a new RegisteredPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a RegisteredPayee. - * @implements IRegisteredPayee - * @constructor - * @param {ibc.applications.fee.v1.IRegisteredPayee=} [properties] Properties to set - */ - function RegisteredPayee(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - */ - RegisteredPayee.prototype.channel_id = ""; - - /** - * RegisteredPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - */ - RegisteredPayee.prototype.relayer = ""; - - /** - * RegisteredPayee payee. - * @member {string} payee - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - */ - RegisteredPayee.prototype.payee = ""; - - /** - * Encodes the specified RegisteredPayee message. Does not implicitly {@link ibc.applications.fee.v1.RegisteredPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredPayee} message RegisteredPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - if (message.payee != null && Object.hasOwnProperty.call(message, "payee")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.payee); - return writer; - }; - - /** - * Encodes the specified RegisteredPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.RegisteredPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredPayee} message RegisteredPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.RegisteredPayee} RegisteredPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.RegisteredPayee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - case 3: - message.payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.RegisteredPayee} RegisteredPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.payee != null && message.hasOwnProperty("payee")) - if (!$util.isString(message.payee)) - return "payee: string expected"; - return null; - }; - - /** - * Creates a RegisteredPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.RegisteredPayee} RegisteredPayee - */ - RegisteredPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.RegisteredPayee) - return object; - var message = new $root.ibc.applications.fee.v1.RegisteredPayee(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.payee != null) - message.payee = String(object.payee); - return message; - }; - - /** - * Creates a plain object from a RegisteredPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {ibc.applications.fee.v1.RegisteredPayee} message RegisteredPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - object.payee = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.payee != null && message.hasOwnProperty("payee")) - object.payee = message.payee; - return object; - }; - - /** - * Converts this RegisteredPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - * @returns {Object.} JSON object - */ - RegisteredPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredPayee; - })(); - - v1.RegisteredCounterpartyPayee = (function() { - - /** - * Properties of a RegisteredCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @interface IRegisteredCounterpartyPayee - * @property {string|null} [channel_id] RegisteredCounterpartyPayee channel_id - * @property {string|null} [relayer] RegisteredCounterpartyPayee relayer - * @property {string|null} [counterparty_payee] RegisteredCounterpartyPayee counterparty_payee - */ - - /** - * Constructs a new RegisteredCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a RegisteredCounterpartyPayee. - * @implements IRegisteredCounterpartyPayee - * @constructor - * @param {ibc.applications.fee.v1.IRegisteredCounterpartyPayee=} [properties] Properties to set - */ - function RegisteredCounterpartyPayee(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredCounterpartyPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - */ - RegisteredCounterpartyPayee.prototype.channel_id = ""; - - /** - * RegisteredCounterpartyPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - */ - RegisteredCounterpartyPayee.prototype.relayer = ""; - - /** - * RegisteredCounterpartyPayee counterparty_payee. - * @member {string} counterparty_payee - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - */ - RegisteredCounterpartyPayee.prototype.counterparty_payee = ""; - - /** - * Encodes the specified RegisteredCounterpartyPayee message. Does not implicitly {@link ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredCounterpartyPayee} message RegisteredCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredCounterpartyPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - if (message.counterparty_payee != null && Object.hasOwnProperty.call(message, "counterparty_payee")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterparty_payee); - return writer; - }; - - /** - * Encodes the specified RegisteredCounterpartyPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredCounterpartyPayee} message RegisteredCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredCounterpartyPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredCounterpartyPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.RegisteredCounterpartyPayee} RegisteredCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredCounterpartyPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - case 3: - message.counterparty_payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredCounterpartyPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.RegisteredCounterpartyPayee} RegisteredCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredCounterpartyPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredCounterpartyPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredCounterpartyPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - if (!$util.isString(message.counterparty_payee)) - return "counterparty_payee: string expected"; - return null; - }; - - /** - * Creates a RegisteredCounterpartyPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.RegisteredCounterpartyPayee} RegisteredCounterpartyPayee - */ - RegisteredCounterpartyPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee) - return object; - var message = new $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.counterparty_payee != null) - message.counterparty_payee = String(object.counterparty_payee); - return message; - }; - - /** - * Creates a plain object from a RegisteredCounterpartyPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.RegisteredCounterpartyPayee} message RegisteredCounterpartyPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredCounterpartyPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - object.counterparty_payee = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - object.counterparty_payee = message.counterparty_payee; - return object; - }; - - /** - * Converts this RegisteredCounterpartyPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - * @returns {Object.} JSON object - */ - RegisteredCounterpartyPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredCounterpartyPayee; - })(); - - v1.ForwardRelayerAddress = (function() { - - /** - * Properties of a ForwardRelayerAddress. - * @memberof ibc.applications.fee.v1 - * @interface IForwardRelayerAddress - * @property {string|null} [address] ForwardRelayerAddress address - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] ForwardRelayerAddress packet_id - */ - - /** - * Constructs a new ForwardRelayerAddress. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a ForwardRelayerAddress. - * @implements IForwardRelayerAddress - * @constructor - * @param {ibc.applications.fee.v1.IForwardRelayerAddress=} [properties] Properties to set - */ - function ForwardRelayerAddress(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardRelayerAddress address. - * @member {string} address - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @instance - */ - ForwardRelayerAddress.prototype.address = ""; - - /** - * ForwardRelayerAddress packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @instance - */ - ForwardRelayerAddress.prototype.packet_id = null; - - /** - * Encodes the specified ForwardRelayerAddress message. Does not implicitly {@link ibc.applications.fee.v1.ForwardRelayerAddress.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {ibc.applications.fee.v1.IForwardRelayerAddress} message ForwardRelayerAddress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardRelayerAddress.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ForwardRelayerAddress message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.ForwardRelayerAddress.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {ibc.applications.fee.v1.IForwardRelayerAddress} message ForwardRelayerAddress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardRelayerAddress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardRelayerAddress message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.ForwardRelayerAddress} ForwardRelayerAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardRelayerAddress.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.ForwardRelayerAddress(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardRelayerAddress message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.ForwardRelayerAddress} ForwardRelayerAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardRelayerAddress.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardRelayerAddress message. - * @function verify - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardRelayerAddress.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a ForwardRelayerAddress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.ForwardRelayerAddress} ForwardRelayerAddress - */ - ForwardRelayerAddress.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.ForwardRelayerAddress) - return object; - var message = new $root.ibc.applications.fee.v1.ForwardRelayerAddress(); - if (object.address != null) - message.address = String(object.address); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.ForwardRelayerAddress.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a ForwardRelayerAddress message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {ibc.applications.fee.v1.ForwardRelayerAddress} message ForwardRelayerAddress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardRelayerAddress.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.address = ""; - object.packet_id = null; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this ForwardRelayerAddress to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @instance - * @returns {Object.} JSON object - */ - ForwardRelayerAddress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ForwardRelayerAddress; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof ibc.applications.fee.v1 - * @interface IMetadata - * @property {string|null} [fee_version] Metadata fee_version - * @property {string|null} [app_version] Metadata app_version - */ - - /** - * Constructs a new Metadata. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {ibc.applications.fee.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata fee_version. - * @member {string} fee_version - * @memberof ibc.applications.fee.v1.Metadata - * @instance - */ - Metadata.prototype.fee_version = ""; - - /** - * Metadata app_version. - * @member {string} app_version - * @memberof ibc.applications.fee.v1.Metadata - * @instance - */ - Metadata.prototype.app_version = ""; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link ibc.applications.fee.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {ibc.applications.fee.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_version != null && Object.hasOwnProperty.call(message, "fee_version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fee_version); - if (message.app_version != null && Object.hasOwnProperty.call(message, "app_version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.app_version); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {ibc.applications.fee.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee_version = reader.string(); - break; - case 2: - message.app_version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_version != null && message.hasOwnProperty("fee_version")) - if (!$util.isString(message.fee_version)) - return "fee_version: string expected"; - if (message.app_version != null && message.hasOwnProperty("app_version")) - if (!$util.isString(message.app_version)) - return "app_version: string expected"; - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.Metadata) - return object; - var message = new $root.ibc.applications.fee.v1.Metadata(); - if (object.fee_version != null) - message.fee_version = String(object.fee_version); - if (object.app_version != null) - message.app_version = String(object.app_version); - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {ibc.applications.fee.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fee_version = ""; - object.app_version = ""; - } - if (message.fee_version != null && message.hasOwnProperty("fee_version")) - object.fee_version = message.fee_version; - if (message.app_version != null && message.hasOwnProperty("app_version")) - object.app_version = message.app_version; - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Metadata; - })(); - - return v1; - })(); - - return fee; - })(); - - applications.interchain_accounts = (function() { - - /** - * Namespace interchain_accounts. - * @memberof ibc.applications - * @namespace - */ - var interchain_accounts = {}; - - interchain_accounts.controller = (function() { - - /** - * Namespace controller. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - var controller = {}; - - controller.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts.controller - * @namespace - */ - var v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Msg#registerInterchainAccount}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @typedef RegisterInterchainAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} [response] MsgRegisterInterchainAccountResponse - */ - - /** - * Calls RegisterInterchainAccount. - * @function registerInterchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} request MsgRegisterInterchainAccount message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Msg.RegisterInterchainAccountCallback} callback Node-style callback called with the error, if any, and MsgRegisterInterchainAccountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerInterchainAccount = function registerInterchainAccount(request, callback) { - return this.rpcCall(registerInterchainAccount, $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount, $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse, request, callback); - }, "name", { value: "RegisterInterchainAccount" }); - - /** - * Calls RegisterInterchainAccount. - * @function registerInterchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} request MsgRegisterInterchainAccount message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Msg#sendTx}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @typedef SendTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} [response] MsgSendTxResponse - */ - - /** - * Calls SendTx. - * @function sendTx - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} request MsgSendTx message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Msg.SendTxCallback} callback Node-style callback called with the error, if any, and MsgSendTxResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.sendTx = function sendTx(request, callback) { - return this.rpcCall(sendTx, $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx, $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse, request, callback); - }, "name", { value: "SendTx" }); - - /** - * Calls SendTx. - * @function sendTx - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} request MsgSendTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgRegisterInterchainAccount = (function() { - - /** - * Properties of a MsgRegisterInterchainAccount. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgRegisterInterchainAccount - * @property {string|null} [owner] MsgRegisterInterchainAccount owner - * @property {string|null} [connection_id] MsgRegisterInterchainAccount connection_id - * @property {string|null} [version] MsgRegisterInterchainAccount version - */ - - /** - * Constructs a new MsgRegisterInterchainAccount. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgRegisterInterchainAccount. - * @implements IMsgRegisterInterchainAccount - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount=} [properties] Properties to set - */ - function MsgRegisterInterchainAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterInterchainAccount owner. - * @member {string} owner - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.owner = ""; - - /** - * MsgRegisterInterchainAccount connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.connection_id = ""; - - /** - * MsgRegisterInterchainAccount version. - * @member {string} version - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.version = ""; - - /** - * Encodes the specified MsgRegisterInterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} message MsgRegisterInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} message MsgRegisterInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainAccount message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - */ - MsgRegisterInterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} message MsgRegisterInterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.owner = ""; - object.connection_id = ""; - object.version = ""; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this MsgRegisterInterchainAccount to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainAccount; - })(); - - v1.MsgRegisterInterchainAccountResponse = (function() { - - /** - * Properties of a MsgRegisterInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgRegisterInterchainAccountResponse - * @property {string|null} [channel_id] MsgRegisterInterchainAccountResponse channel_id - * @property {string|null} [port_id] MsgRegisterInterchainAccountResponse port_id - */ - - /** - * Constructs a new MsgRegisterInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgRegisterInterchainAccountResponse. - * @implements IMsgRegisterInterchainAccountResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse=} [properties] Properties to set - */ - function MsgRegisterInterchainAccountResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterInterchainAccountResponse channel_id. - * @member {string} channel_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @instance - */ - MsgRegisterInterchainAccountResponse.prototype.channel_id = ""; - - /** - * MsgRegisterInterchainAccountResponse port_id. - * @member {string} port_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @instance - */ - MsgRegisterInterchainAccountResponse.prototype.port_id = ""; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainAccountResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainAccountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - */ - MsgRegisterInterchainAccountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainAccountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainAccountResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.port_id = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - return object; - }; - - /** - * Converts this MsgRegisterInterchainAccountResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainAccountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainAccountResponse; - })(); - - v1.MsgSendTx = (function() { - - /** - * Properties of a MsgSendTx. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgSendTx - * @property {string|null} [owner] MsgSendTx owner - * @property {string|null} [connection_id] MsgSendTx connection_id - * @property {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData|null} [packet_data] MsgSendTx packet_data - * @property {Long|null} [relative_timeout] MsgSendTx relative_timeout - */ - - /** - * Constructs a new MsgSendTx. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgSendTx. - * @implements IMsgSendTx - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx=} [properties] Properties to set - */ - function MsgSendTx(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSendTx owner. - * @member {string} owner - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.owner = ""; - - /** - * MsgSendTx connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.connection_id = ""; - - /** - * MsgSendTx packet_data. - * @member {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData|null|undefined} packet_data - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.packet_data = null; - - /** - * MsgSendTx relative_timeout. - * @member {Long} relative_timeout - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.relative_timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSendTx message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTx.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} message MsgSendTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.packet_data != null && Object.hasOwnProperty.call(message, "packet_data")) - $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.encode(message.packet_data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.relative_timeout != null && Object.hasOwnProperty.call(message, "relative_timeout")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.relative_timeout); - return writer; - }; - - /** - * Encodes the specified MsgSendTx message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTx.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} message MsgSendTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSendTx message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} MsgSendTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.packet_data = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.decode(reader, reader.uint32()); - break; - case 4: - message.relative_timeout = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSendTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} MsgSendTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSendTx message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSendTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.packet_data != null && message.hasOwnProperty("packet_data")) { - var error = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify(message.packet_data); - if (error) - return "packet_data." + error; - } - if (message.relative_timeout != null && message.hasOwnProperty("relative_timeout")) - if (!$util.isInteger(message.relative_timeout) && !(message.relative_timeout && $util.isInteger(message.relative_timeout.low) && $util.isInteger(message.relative_timeout.high))) - return "relative_timeout: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSendTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} MsgSendTx - */ - MsgSendTx.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.packet_data != null) { - if (typeof object.packet_data !== "object") - throw TypeError(".ibc.applications.interchain_accounts.controller.v1.MsgSendTx.packet_data: object expected"); - message.packet_data = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.fromObject(object.packet_data); - } - if (object.relative_timeout != null) - if ($util.Long) - (message.relative_timeout = $util.Long.fromValue(object.relative_timeout)).unsigned = true; - else if (typeof object.relative_timeout === "string") - message.relative_timeout = parseInt(object.relative_timeout, 10); - else if (typeof object.relative_timeout === "number") - message.relative_timeout = object.relative_timeout; - else if (typeof object.relative_timeout === "object") - message.relative_timeout = new $util.LongBits(object.relative_timeout.low >>> 0, object.relative_timeout.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSendTx message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} message MsgSendTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSendTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.owner = ""; - object.connection_id = ""; - object.packet_data = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.relative_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.relative_timeout = options.longs === String ? "0" : 0; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.packet_data != null && message.hasOwnProperty("packet_data")) - object.packet_data = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.toObject(message.packet_data, options); - if (message.relative_timeout != null && message.hasOwnProperty("relative_timeout")) - if (typeof message.relative_timeout === "number") - object.relative_timeout = options.longs === String ? String(message.relative_timeout) : message.relative_timeout; - else - object.relative_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.relative_timeout) : options.longs === Number ? new $util.LongBits(message.relative_timeout.low >>> 0, message.relative_timeout.high >>> 0).toNumber(true) : message.relative_timeout; - return object; - }; - - /** - * Converts this MsgSendTx to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - * @returns {Object.} JSON object - */ - MsgSendTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSendTx; - })(); - - v1.MsgSendTxResponse = (function() { - - /** - * Properties of a MsgSendTxResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgSendTxResponse - * @property {Long|null} [sequence] MsgSendTxResponse sequence - */ - - /** - * Constructs a new MsgSendTxResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgSendTxResponse. - * @implements IMsgSendTxResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse=} [properties] Properties to set - */ - function MsgSendTxResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSendTxResponse sequence. - * @member {Long} sequence - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @instance - */ - MsgSendTxResponse.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSendTxResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse} message MsgSendTxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTxResponse.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); - return writer; - }; - - /** - * Encodes the specified MsgSendTxResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse} message MsgSendTxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTxResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSendTxResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} MsgSendTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTxResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSendTxResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} MsgSendTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTxResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSendTxResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSendTxResponse.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"; - return null; - }; - - /** - * Creates a MsgSendTxResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} MsgSendTxResponse - */ - MsgSendTxResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse(); - 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 MsgSendTxResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} message MsgSendTxResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSendTxResponse.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; - 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 MsgSendTxResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSendTxResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSendTxResponse; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.interchain_accounts.controller.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; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Query#interchainAccount}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @typedef InterchainAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} [response] QueryInterchainAccountResponse - */ - - /** - * Calls InterchainAccount. - * @function interchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} request QueryInterchainAccountRequest message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Query.InterchainAccountCallback} callback Node-style callback called with the error, if any, and QueryInterchainAccountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.interchainAccount = function interchainAccount(request, callback) { - return this.rpcCall(interchainAccount, $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest, $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse, request, callback); - }, "name", { value: "InterchainAccount" }); - - /** - * Calls InterchainAccount. - * @function interchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} request QueryInterchainAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Query#params}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest, $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryInterchainAccountRequest = (function() { - - /** - * Properties of a QueryInterchainAccountRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryInterchainAccountRequest - * @property {string|null} [owner] QueryInterchainAccountRequest owner - * @property {string|null} [connection_id] QueryInterchainAccountRequest connection_id - */ - - /** - * Constructs a new QueryInterchainAccountRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryInterchainAccountRequest. - * @implements IQueryInterchainAccountRequest - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest=} [properties] Properties to set - */ - function QueryInterchainAccountRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryInterchainAccountRequest owner. - * @member {string} owner - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @instance - */ - QueryInterchainAccountRequest.prototype.owner = ""; - - /** - * QueryInterchainAccountRequest connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @instance - */ - QueryInterchainAccountRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryInterchainAccountRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} message QueryInterchainAccountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryInterchainAccountRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} message QueryInterchainAccountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryInterchainAccountRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} QueryInterchainAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryInterchainAccountRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} QueryInterchainAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryInterchainAccountRequest message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryInterchainAccountRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryInterchainAccountRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} QueryInterchainAccountRequest - */ - QueryInterchainAccountRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryInterchainAccountRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} message QueryInterchainAccountRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryInterchainAccountRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.owner = ""; - object.connection_id = ""; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryInterchainAccountRequest to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @instance - * @returns {Object.} JSON object - */ - QueryInterchainAccountRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryInterchainAccountRequest; - })(); - - v1.QueryInterchainAccountResponse = (function() { - - /** - * Properties of a QueryInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryInterchainAccountResponse - * @property {string|null} [address] QueryInterchainAccountResponse address - */ - - /** - * Constructs a new QueryInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryInterchainAccountResponse. - * @implements IQueryInterchainAccountResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse=} [properties] Properties to set - */ - function QueryInterchainAccountResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryInterchainAccountResponse address. - * @member {string} address - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @instance - */ - QueryInterchainAccountResponse.prototype.address = ""; - - /** - * Encodes the specified QueryInterchainAccountResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse} message QueryInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - return writer; - }; - - /** - * Encodes the specified QueryInterchainAccountResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse} message QueryInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryInterchainAccountResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} QueryInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} QueryInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryInterchainAccountResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryInterchainAccountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - return null; - }; - - /** - * Creates a QueryInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} QueryInterchainAccountResponse - */ - QueryInterchainAccountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse(); - if (object.address != null) - message.address = String(object.address); - return message; - }; - - /** - * Creates a plain object from a QueryInterchainAccountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} message QueryInterchainAccountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryInterchainAccountResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - return object; - }; - - /** - * Converts this QueryInterchainAccountResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @instance - * @returns {Object.} JSON object - */ - QueryInterchainAccountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryInterchainAccountResponse; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.interchain_accounts.controller.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.interchain_accounts.controller.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.controller.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.interchain_accounts.controller.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IParams - * @property {boolean|null} [controller_enabled] Params controller_enabled - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.interchain_accounts.controller.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 controller_enabled. - * @member {boolean} controller_enabled - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @instance - */ - Params.prototype.controller_enabled = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.controller.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.controller_enabled != null && Object.hasOwnProperty.call(message, "controller_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.controller_enabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.controller.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 ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.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.ibc.applications.interchain_accounts.controller.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.controller_enabled = 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 ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.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 ibc.applications.interchain_accounts.controller.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.controller_enabled != null && message.hasOwnProperty("controller_enabled")) - if (typeof message.controller_enabled !== "boolean") - return "controller_enabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.Params) - return object; - var message = new $root.ibc.applications.interchain_accounts.controller.v1.Params(); - if (object.controller_enabled != null) - message.controller_enabled = Boolean(object.controller_enabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.controller.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.controller_enabled = false; - if (message.controller_enabled != null && message.hasOwnProperty("controller_enabled")) - object.controller_enabled = message.controller_enabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.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 controller; - })(); - - interchain_accounts.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - var v1 = {}; - - /** - * Type enum. - * @name ibc.applications.interchain_accounts.v1.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} TYPE_EXECUTE_TX=1 TYPE_EXECUTE_TX value - */ - v1.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_EXECUTE_TX"] = 1; - return values; - })(); - - v1.InterchainAccountPacketData = (function() { - - /** - * Properties of an InterchainAccountPacketData. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface IInterchainAccountPacketData - * @property {ibc.applications.interchain_accounts.v1.Type|null} [type] InterchainAccountPacketData type - * @property {Uint8Array|null} [data] InterchainAccountPacketData data - * @property {string|null} [memo] InterchainAccountPacketData memo - */ - - /** - * Constructs a new InterchainAccountPacketData. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents an InterchainAccountPacketData. - * @implements IInterchainAccountPacketData - * @constructor - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData=} [properties] Properties to set - */ - function InterchainAccountPacketData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterchainAccountPacketData type. - * @member {ibc.applications.interchain_accounts.v1.Type} type - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - */ - InterchainAccountPacketData.prototype.type = 0; - - /** - * InterchainAccountPacketData data. - * @member {Uint8Array} data - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - */ - InterchainAccountPacketData.prototype.data = $util.newBuffer([]); - - /** - * InterchainAccountPacketData memo. - * @member {string} memo - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - */ - InterchainAccountPacketData.prototype.memo = ""; - - /** - * Encodes the specified InterchainAccountPacketData message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData} message InterchainAccountPacketData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccountPacketData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.memo); - return writer; - }; - - /** - * Encodes the specified InterchainAccountPacketData message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData} message InterchainAccountPacketData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccountPacketData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterchainAccountPacketData message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} InterchainAccountPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccountPacketData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.memo = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterchainAccountPacketData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} InterchainAccountPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccountPacketData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterchainAccountPacketData message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterchainAccountPacketData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - 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.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - return null; - }; - - /** - * Creates an InterchainAccountPacketData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} InterchainAccountPacketData - */ - InterchainAccountPacketData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData) - return object; - var message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_EXECUTE_TX": - case 1: - message.type = 1; - break; - } - 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.memo != null) - message.memo = String(object.memo); - return message; - }; - - /** - * Creates a plain object from an InterchainAccountPacketData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} message InterchainAccountPacketData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterchainAccountPacketData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.memo = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.ibc.applications.interchain_accounts.v1.Type[message.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; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - return object; - }; - - /** - * Converts this InterchainAccountPacketData to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - * @returns {Object.} JSON object - */ - InterchainAccountPacketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterchainAccountPacketData; - })(); - - v1.CosmosTx = (function() { - - /** - * Properties of a CosmosTx. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface ICosmosTx - * @property {Array.|null} [messages] CosmosTx messages - */ - - /** - * Constructs a new CosmosTx. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents a CosmosTx. - * @implements ICosmosTx - * @constructor - * @param {ibc.applications.interchain_accounts.v1.ICosmosTx=} [properties] Properties to set - */ - function CosmosTx(properties) { - this.messages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CosmosTx messages. - * @member {Array.} messages - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @instance - */ - CosmosTx.prototype.messages = $util.emptyArray; - - /** - * Encodes the specified CosmosTx message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.CosmosTx.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {ibc.applications.interchain_accounts.v1.ICosmosTx} message CosmosTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CosmosTx.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(); - return writer; - }; - - /** - * Encodes the specified CosmosTx message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.CosmosTx.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {ibc.applications.interchain_accounts.v1.ICosmosTx} message CosmosTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CosmosTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CosmosTx message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.CosmosTx} CosmosTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CosmosTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.CosmosTx(); - 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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CosmosTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.CosmosTx} CosmosTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CosmosTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CosmosTx message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CosmosTx.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; - } - } - return null; - }; - - /** - * Creates a CosmosTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.CosmosTx} CosmosTx - */ - CosmosTx.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.CosmosTx) - return object; - var message = new $root.ibc.applications.interchain_accounts.v1.CosmosTx(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".ibc.applications.interchain_accounts.v1.CosmosTx.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.v1.CosmosTx.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CosmosTx message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {ibc.applications.interchain_accounts.v1.CosmosTx} message CosmosTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CosmosTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - 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); - } - return object; - }; - - /** - * Converts this CosmosTx to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @instance - * @returns {Object.} JSON object - */ - CosmosTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CosmosTx; - })(); - - v1.InterchainAccount = (function() { - - /** - * Properties of an InterchainAccount. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface IInterchainAccount - * @property {cosmos.auth.v1beta1.IBaseAccount|null} [base_account] InterchainAccount base_account - * @property {string|null} [account_owner] InterchainAccount account_owner - */ - - /** - * Constructs a new InterchainAccount. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents an InterchainAccount. - * @implements IInterchainAccount - * @constructor - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccount=} [properties] Properties to set - */ - function InterchainAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterchainAccount base_account. - * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} base_account - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @instance - */ - InterchainAccount.prototype.base_account = null; - - /** - * InterchainAccount account_owner. - * @member {string} account_owner - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @instance - */ - InterchainAccount.prototype.account_owner = ""; - - /** - * Encodes the specified InterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccount.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccount} message InterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.base_account != null && Object.hasOwnProperty.call(message, "base_account")) - $root.cosmos.auth.v1beta1.BaseAccount.encode(message.base_account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.account_owner != null && Object.hasOwnProperty.call(message, "account_owner")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_owner); - return writer; - }; - - /** - * Encodes the specified InterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccount} message InterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccount} InterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.account_owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccount} InterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterchainAccount message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.base_account != null && message.hasOwnProperty("base_account")) { - var error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.base_account); - if (error) - return "base_account." + error; - } - if (message.account_owner != null && message.hasOwnProperty("account_owner")) - if (!$util.isString(message.account_owner)) - return "account_owner: string expected"; - return null; - }; - - /** - * Creates an InterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccount} InterchainAccount - */ - InterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.InterchainAccount) - return object; - var message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccount(); - if (object.base_account != null) { - if (typeof object.base_account !== "object") - throw TypeError(".ibc.applications.interchain_accounts.v1.InterchainAccount.base_account: object expected"); - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.base_account); - } - if (object.account_owner != null) - message.account_owner = String(object.account_owner); - return message; - }; - - /** - * Creates a plain object from an InterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.v1.InterchainAccount} message InterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.base_account = null; - object.account_owner = ""; - } - if (message.base_account != null && message.hasOwnProperty("base_account")) - object.base_account = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.base_account, options); - if (message.account_owner != null && message.hasOwnProperty("account_owner")) - object.account_owner = message.account_owner; - return object; - }; - - /** - * Converts this InterchainAccount to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @instance - * @returns {Object.} JSON object - */ - InterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterchainAccount; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface IMetadata - * @property {string|null} [version] Metadata version - * @property {string|null} [controller_connection_id] Metadata controller_connection_id - * @property {string|null} [host_connection_id] Metadata host_connection_id - * @property {string|null} [address] Metadata address - * @property {string|null} [encoding] Metadata encoding - * @property {string|null} [tx_type] Metadata tx_type - */ - - /** - * Constructs a new Metadata. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {ibc.applications.interchain_accounts.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata version. - * @member {string} version - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.version = ""; - - /** - * Metadata controller_connection_id. - * @member {string} controller_connection_id - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.controller_connection_id = ""; - - /** - * Metadata host_connection_id. - * @member {string} host_connection_id - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.host_connection_id = ""; - - /** - * Metadata address. - * @member {string} address - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.address = ""; - - /** - * Metadata encoding. - * @member {string} encoding - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.encoding = ""; - - /** - * Metadata tx_type. - * @member {string} tx_type - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.tx_type = ""; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {ibc.applications.interchain_accounts.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.controller_connection_id != null && Object.hasOwnProperty.call(message, "controller_connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.controller_connection_id); - if (message.host_connection_id != null && Object.hasOwnProperty.call(message, "host_connection_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.host_connection_id); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.address); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.encoding); - if (message.tx_type != null && Object.hasOwnProperty.call(message, "tx_type")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.tx_type); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {ibc.applications.interchain_accounts.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.controller_connection_id = reader.string(); - break; - case 3: - message.host_connection_id = reader.string(); - break; - case 4: - message.address = reader.string(); - break; - case 5: - message.encoding = reader.string(); - break; - case 6: - message.tx_type = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.controller_connection_id != null && message.hasOwnProperty("controller_connection_id")) - if (!$util.isString(message.controller_connection_id)) - return "controller_connection_id: string expected"; - if (message.host_connection_id != null && message.hasOwnProperty("host_connection_id")) - if (!$util.isString(message.host_connection_id)) - return "host_connection_id: string expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.tx_type != null && message.hasOwnProperty("tx_type")) - if (!$util.isString(message.tx_type)) - return "tx_type: string expected"; - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.Metadata) - return object; - var message = new $root.ibc.applications.interchain_accounts.v1.Metadata(); - if (object.version != null) - message.version = String(object.version); - if (object.controller_connection_id != null) - message.controller_connection_id = String(object.controller_connection_id); - if (object.host_connection_id != null) - message.host_connection_id = String(object.host_connection_id); - if (object.address != null) - message.address = String(object.address); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.tx_type != null) - message.tx_type = String(object.tx_type); - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {ibc.applications.interchain_accounts.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.controller_connection_id = ""; - object.host_connection_id = ""; - object.address = ""; - object.encoding = ""; - object.tx_type = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.controller_connection_id != null && message.hasOwnProperty("controller_connection_id")) - object.controller_connection_id = message.controller_connection_id; - if (message.host_connection_id != null && message.hasOwnProperty("host_connection_id")) - object.host_connection_id = message.host_connection_id; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.tx_type != null && message.hasOwnProperty("tx_type")) - object.tx_type = message.tx_type; - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Metadata; - })(); - - return v1; - })(); - - interchain_accounts.genesis = (function() { - - /** - * Namespace genesis. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - var genesis = {}; - - genesis.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts.genesis - * @namespace - */ - var v1 = {}; - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IGenesisState - * @property {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState|null} [controller_genesis_state] GenesisState controller_genesis_state - * @property {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState|null} [host_genesis_state] GenesisState host_genesis_state - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState controller_genesis_state. - * @member {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState|null|undefined} controller_genesis_state - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @instance - */ - GenesisState.prototype.controller_genesis_state = null; - - /** - * GenesisState host_genesis_state. - * @member {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState|null|undefined} host_genesis_state - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @instance - */ - GenesisState.prototype.host_genesis_state = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.controller_genesis_state != null && Object.hasOwnProperty.call(message, "controller_genesis_state")) - $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.encode(message.controller_genesis_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.host_genesis_state != null && Object.hasOwnProperty.call(message, "host_genesis_state")) - $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.encode(message.host_genesis_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.controller_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.decode(reader, reader.uint32()); - break; - case 2: - message.host_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.controller_genesis_state != null && message.hasOwnProperty("controller_genesis_state")) { - var error = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify(message.controller_genesis_state); - if (error) - return "controller_genesis_state." + error; - } - if (message.host_genesis_state != null && message.hasOwnProperty("host_genesis_state")) { - var error = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify(message.host_genesis_state); - if (error) - return "host_genesis_state." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.GenesisState) - return object; - var message = new $root.ibc.applications.interchain_accounts.genesis.v1.GenesisState(); - if (object.controller_genesis_state != null) { - if (typeof object.controller_genesis_state !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.GenesisState.controller_genesis_state: object expected"); - message.controller_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.fromObject(object.controller_genesis_state); - } - if (object.host_genesis_state != null) { - if (typeof object.host_genesis_state !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.GenesisState.host_genesis_state: object expected"); - message.host_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.fromObject(object.host_genesis_state); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.controller_genesis_state = null; - object.host_genesis_state = null; - } - if (message.controller_genesis_state != null && message.hasOwnProperty("controller_genesis_state")) - object.controller_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.toObject(message.controller_genesis_state, options); - if (message.host_genesis_state != null && message.hasOwnProperty("host_genesis_state")) - object.host_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.toObject(message.host_genesis_state, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.ControllerGenesisState = (function() { - - /** - * Properties of a ControllerGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IControllerGenesisState - * @property {Array.|null} [active_channels] ControllerGenesisState active_channels - * @property {Array.|null} [interchain_accounts] ControllerGenesisState interchain_accounts - * @property {Array.|null} [ports] ControllerGenesisState ports - * @property {ibc.applications.interchain_accounts.controller.v1.IParams|null} [params] ControllerGenesisState params - */ - - /** - * Constructs a new ControllerGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a ControllerGenesisState. - * @implements IControllerGenesisState - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState=} [properties] Properties to set - */ - function ControllerGenesisState(properties) { - this.active_channels = []; - this.interchain_accounts = []; - this.ports = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ControllerGenesisState active_channels. - * @member {Array.} active_channels - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.active_channels = $util.emptyArray; - - /** - * ControllerGenesisState interchain_accounts. - * @member {Array.} interchain_accounts - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.interchain_accounts = $util.emptyArray; - - /** - * ControllerGenesisState ports. - * @member {Array.} ports - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.ports = $util.emptyArray; - - /** - * ControllerGenesisState params. - * @member {ibc.applications.interchain_accounts.controller.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.params = null; - - /** - * Encodes the specified ControllerGenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState} message ControllerGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControllerGenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.active_channels != null && message.active_channels.length) - for (var i = 0; i < message.active_channels.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.encode(message.active_channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.interchain_accounts != null && message.interchain_accounts.length) - for (var i = 0; i < message.interchain_accounts.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.encode(message.interchain_accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ports != null && message.ports.length) - for (var i = 0; i < message.ports.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ports[i]); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.controller.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ControllerGenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState} message ControllerGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControllerGenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ControllerGenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} ControllerGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControllerGenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.active_channels && message.active_channels.length)) - message.active_channels = []; - message.active_channels.push($root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.interchain_accounts && message.interchain_accounts.length)) - message.interchain_accounts = []; - message.interchain_accounts.push($root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.ports && message.ports.length)) - message.ports = []; - message.ports.push(reader.string()); - break; - case 4: - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ControllerGenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} ControllerGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControllerGenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ControllerGenesisState message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControllerGenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.active_channels != null && message.hasOwnProperty("active_channels")) { - if (!Array.isArray(message.active_channels)) - return "active_channels: array expected"; - for (var i = 0; i < message.active_channels.length; ++i) { - var error = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify(message.active_channels[i]); - if (error) - return "active_channels." + error; - } - } - if (message.interchain_accounts != null && message.hasOwnProperty("interchain_accounts")) { - if (!Array.isArray(message.interchain_accounts)) - return "interchain_accounts: array expected"; - for (var i = 0; i < message.interchain_accounts.length; ++i) { - var error = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify(message.interchain_accounts[i]); - if (error) - return "interchain_accounts." + error; - } - } - if (message.ports != null && message.hasOwnProperty("ports")) { - if (!Array.isArray(message.ports)) - return "ports: array expected"; - for (var i = 0; i < message.ports.length; ++i) - if (!$util.isString(message.ports[i])) - return "ports: string[] expected"; - } - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.interchain_accounts.controller.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a ControllerGenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} ControllerGenesisState - */ - ControllerGenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState) - return object; - var message = new $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState(); - if (object.active_channels) { - if (!Array.isArray(object.active_channels)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.active_channels: array expected"); - message.active_channels = []; - for (var i = 0; i < object.active_channels.length; ++i) { - if (typeof object.active_channels[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.active_channels: object expected"); - message.active_channels[i] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.fromObject(object.active_channels[i]); - } - } - if (object.interchain_accounts) { - if (!Array.isArray(object.interchain_accounts)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.interchain_accounts: array expected"); - message.interchain_accounts = []; - for (var i = 0; i < object.interchain_accounts.length; ++i) { - if (typeof object.interchain_accounts[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.interchain_accounts: object expected"); - message.interchain_accounts[i] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.fromObject(object.interchain_accounts[i]); - } - } - if (object.ports) { - if (!Array.isArray(object.ports)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.ports: array expected"); - message.ports = []; - for (var i = 0; i < object.ports.length; ++i) - message.ports[i] = String(object.ports[i]); - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a ControllerGenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} message ControllerGenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControllerGenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.active_channels = []; - object.interchain_accounts = []; - object.ports = []; - } - if (options.defaults) - object.params = null; - if (message.active_channels && message.active_channels.length) { - object.active_channels = []; - for (var j = 0; j < message.active_channels.length; ++j) - object.active_channels[j] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject(message.active_channels[j], options); - } - if (message.interchain_accounts && message.interchain_accounts.length) { - object.interchain_accounts = []; - for (var j = 0; j < message.interchain_accounts.length; ++j) - object.interchain_accounts[j] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject(message.interchain_accounts[j], options); - } - if (message.ports && message.ports.length) { - object.ports = []; - for (var j = 0; j < message.ports.length; ++j) - object.ports[j] = message.ports[j]; - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this ControllerGenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - * @returns {Object.} JSON object - */ - ControllerGenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ControllerGenesisState; - })(); - - v1.HostGenesisState = (function() { - - /** - * Properties of a HostGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IHostGenesisState - * @property {Array.|null} [active_channels] HostGenesisState active_channels - * @property {Array.|null} [interchain_accounts] HostGenesisState interchain_accounts - * @property {string|null} [port] HostGenesisState port - * @property {ibc.applications.interchain_accounts.host.v1.IParams|null} [params] HostGenesisState params - */ - - /** - * Constructs a new HostGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a HostGenesisState. - * @implements IHostGenesisState - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState=} [properties] Properties to set - */ - function HostGenesisState(properties) { - this.active_channels = []; - this.interchain_accounts = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HostGenesisState active_channels. - * @member {Array.} active_channels - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.active_channels = $util.emptyArray; - - /** - * HostGenesisState interchain_accounts. - * @member {Array.} interchain_accounts - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.interchain_accounts = $util.emptyArray; - - /** - * HostGenesisState port. - * @member {string} port - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.port = ""; - - /** - * HostGenesisState params. - * @member {ibc.applications.interchain_accounts.host.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.params = null; - - /** - * Encodes the specified HostGenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState} message HostGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostGenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.active_channels != null && message.active_channels.length) - for (var i = 0; i < message.active_channels.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.encode(message.active_channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.interchain_accounts != null && message.interchain_accounts.length) - for (var i = 0; i < message.interchain_accounts.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.encode(message.interchain_accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.port); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.host.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HostGenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState} message HostGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostGenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HostGenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} HostGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostGenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.active_channels && message.active_channels.length)) - message.active_channels = []; - message.active_channels.push($root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.interchain_accounts && message.interchain_accounts.length)) - message.interchain_accounts = []; - message.interchain_accounts.push($root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.decode(reader, reader.uint32())); - break; - case 3: - message.port = reader.string(); - break; - case 4: - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HostGenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} HostGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostGenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HostGenesisState message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HostGenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.active_channels != null && message.hasOwnProperty("active_channels")) { - if (!Array.isArray(message.active_channels)) - return "active_channels: array expected"; - for (var i = 0; i < message.active_channels.length; ++i) { - var error = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify(message.active_channels[i]); - if (error) - return "active_channels." + error; - } - } - if (message.interchain_accounts != null && message.hasOwnProperty("interchain_accounts")) { - if (!Array.isArray(message.interchain_accounts)) - return "interchain_accounts: array expected"; - for (var i = 0; i < message.interchain_accounts.length; ++i) { - var error = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify(message.interchain_accounts[i]); - if (error) - return "interchain_accounts." + error; - } - } - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isString(message.port)) - return "port: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.interchain_accounts.host.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a HostGenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} HostGenesisState - */ - HostGenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState) - return object; - var message = new $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState(); - if (object.active_channels) { - if (!Array.isArray(object.active_channels)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.active_channels: array expected"); - message.active_channels = []; - for (var i = 0; i < object.active_channels.length; ++i) { - if (typeof object.active_channels[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.active_channels: object expected"); - message.active_channels[i] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.fromObject(object.active_channels[i]); - } - } - if (object.interchain_accounts) { - if (!Array.isArray(object.interchain_accounts)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.interchain_accounts: array expected"); - message.interchain_accounts = []; - for (var i = 0; i < object.interchain_accounts.length; ++i) { - if (typeof object.interchain_accounts[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.interchain_accounts: object expected"); - message.interchain_accounts[i] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.fromObject(object.interchain_accounts[i]); - } - } - if (object.port != null) - message.port = String(object.port); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a HostGenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} message HostGenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HostGenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.active_channels = []; - object.interchain_accounts = []; - } - if (options.defaults) { - object.port = ""; - object.params = null; - } - if (message.active_channels && message.active_channels.length) { - object.active_channels = []; - for (var j = 0; j < message.active_channels.length; ++j) - object.active_channels[j] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject(message.active_channels[j], options); - } - if (message.interchain_accounts && message.interchain_accounts.length) { - object.interchain_accounts = []; - for (var j = 0; j < message.interchain_accounts.length; ++j) - object.interchain_accounts[j] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject(message.interchain_accounts[j], options); - } - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.host.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this HostGenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - * @returns {Object.} JSON object - */ - HostGenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HostGenesisState; - })(); - - v1.ActiveChannel = (function() { - - /** - * Properties of an ActiveChannel. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IActiveChannel - * @property {string|null} [connection_id] ActiveChannel connection_id - * @property {string|null} [port_id] ActiveChannel port_id - * @property {string|null} [channel_id] ActiveChannel channel_id - * @property {boolean|null} [is_middleware_enabled] ActiveChannel is_middleware_enabled - */ - - /** - * Constructs a new ActiveChannel. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents an ActiveChannel. - * @implements IActiveChannel - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IActiveChannel=} [properties] Properties to set - */ - function ActiveChannel(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ActiveChannel connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.connection_id = ""; - - /** - * ActiveChannel port_id. - * @member {string} port_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.port_id = ""; - - /** - * ActiveChannel channel_id. - * @member {string} channel_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.channel_id = ""; - - /** - * ActiveChannel is_middleware_enabled. - * @member {boolean} is_middleware_enabled - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.is_middleware_enabled = false; - - /** - * Encodes the specified ActiveChannel message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IActiveChannel} message ActiveChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channel_id); - if (message.is_middleware_enabled != null && Object.hasOwnProperty.call(message, "is_middleware_enabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_middleware_enabled); - return writer; - }; - - /** - * Encodes the specified ActiveChannel message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IActiveChannel} message ActiveChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActiveChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} ActiveChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.channel_id = reader.string(); - break; - case 4: - message.is_middleware_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActiveChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} ActiveChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActiveChannel message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActiveChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.is_middleware_enabled != null && message.hasOwnProperty("is_middleware_enabled")) - if (typeof message.is_middleware_enabled !== "boolean") - return "is_middleware_enabled: boolean expected"; - return null; - }; - - /** - * Creates an ActiveChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} ActiveChannel - */ - ActiveChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel) - return object; - var message = new $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.is_middleware_enabled != null) - message.is_middleware_enabled = Boolean(object.is_middleware_enabled); - return message; - }; - - /** - * Creates a plain object from an ActiveChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} message ActiveChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActiveChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connection_id = ""; - object.port_id = ""; - object.channel_id = ""; - object.is_middleware_enabled = false; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.is_middleware_enabled != null && message.hasOwnProperty("is_middleware_enabled")) - object.is_middleware_enabled = message.is_middleware_enabled; - return object; - }; - - /** - * Converts this ActiveChannel to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - * @returns {Object.} JSON object - */ - ActiveChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ActiveChannel; - })(); - - v1.RegisteredInterchainAccount = (function() { - - /** - * Properties of a RegisteredInterchainAccount. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IRegisteredInterchainAccount - * @property {string|null} [connection_id] RegisteredInterchainAccount connection_id - * @property {string|null} [port_id] RegisteredInterchainAccount port_id - * @property {string|null} [account_address] RegisteredInterchainAccount account_address - */ - - /** - * Constructs a new RegisteredInterchainAccount. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a RegisteredInterchainAccount. - * @implements IRegisteredInterchainAccount - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount=} [properties] Properties to set - */ - function RegisteredInterchainAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredInterchainAccount connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - */ - RegisteredInterchainAccount.prototype.connection_id = ""; - - /** - * RegisteredInterchainAccount port_id. - * @member {string} port_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - */ - RegisteredInterchainAccount.prototype.port_id = ""; - - /** - * RegisteredInterchainAccount account_address. - * @member {string} account_address - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - */ - RegisteredInterchainAccount.prototype.account_address = ""; - - /** - * Encodes the specified RegisteredInterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount} message RegisteredInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredInterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.account_address != null && Object.hasOwnProperty.call(message, "account_address")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.account_address); - return writer; - }; - - /** - * Encodes the specified RegisteredInterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount} message RegisteredInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredInterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredInterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} RegisteredInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredInterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.account_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredInterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} RegisteredInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredInterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredInterchainAccount message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredInterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.account_address != null && message.hasOwnProperty("account_address")) - if (!$util.isString(message.account_address)) - return "account_address: string expected"; - return null; - }; - - /** - * Creates a RegisteredInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} RegisteredInterchainAccount - */ - RegisteredInterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount) - return object; - var message = new $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.account_address != null) - message.account_address = String(object.account_address); - return message; - }; - - /** - * Creates a plain object from a RegisteredInterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} message RegisteredInterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredInterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connection_id = ""; - object.port_id = ""; - object.account_address = ""; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.account_address != null && message.hasOwnProperty("account_address")) - object.account_address = message.account_address; - return object; - }; - - /** - * Converts this RegisteredInterchainAccount to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - * @returns {Object.} JSON object - */ - RegisteredInterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredInterchainAccount; - })(); - - return v1; - })(); - - return genesis; - })(); - - interchain_accounts.host = (function() { - - /** - * Namespace host. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - var host = {}; - - host.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts.host - * @namespace - */ - var v1 = {}; - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @interface IParams - * @property {boolean|null} [host_enabled] Params host_enabled - * @property {Array.|null} [allow_messages] Params allow_messages - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.interchain_accounts.host.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.allow_messages = []; - if (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 host_enabled. - * @member {boolean} host_enabled - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @instance - */ - Params.prototype.host_enabled = false; - - /** - * Params allow_messages. - * @member {Array.} allow_messages - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @instance - */ - Params.prototype.allow_messages = $util.emptyArray; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.host.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.host_enabled != null && Object.hasOwnProperty.call(message, "host_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.host_enabled); - if (message.allow_messages != null && message.allow_messages.length) - for (var i = 0; i < message.allow_messages.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.allow_messages[i]); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.host.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 ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.host.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.ibc.applications.interchain_accounts.host.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.host_enabled = reader.bool(); - break; - case 2: - if (!(message.allow_messages && message.allow_messages.length)) - message.allow_messages = []; - message.allow_messages.push(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 ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.host.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 ibc.applications.interchain_accounts.host.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.host_enabled != null && message.hasOwnProperty("host_enabled")) - if (typeof message.host_enabled !== "boolean") - return "host_enabled: boolean expected"; - if (message.allow_messages != null && message.hasOwnProperty("allow_messages")) { - if (!Array.isArray(message.allow_messages)) - return "allow_messages: array expected"; - for (var i = 0; i < message.allow_messages.length; ++i) - if (!$util.isString(message.allow_messages[i])) - return "allow_messages: string[] expected"; - } - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.host.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.host.v1.Params) - return object; - var message = new $root.ibc.applications.interchain_accounts.host.v1.Params(); - if (object.host_enabled != null) - message.host_enabled = Boolean(object.host_enabled); - if (object.allow_messages) { - if (!Array.isArray(object.allow_messages)) - throw TypeError(".ibc.applications.interchain_accounts.host.v1.Params.allow_messages: array expected"); - message.allow_messages = []; - for (var i = 0; i < object.allow_messages.length; ++i) - message.allow_messages[i] = String(object.allow_messages[i]); - } - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.host.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.arrays || options.defaults) - object.allow_messages = []; - if (options.defaults) - object.host_enabled = false; - if (message.host_enabled != null && message.hasOwnProperty("host_enabled")) - object.host_enabled = message.host_enabled; - if (message.allow_messages && message.allow_messages.length) { - object.allow_messages = []; - for (var j = 0; j < message.allow_messages.length; ++j) - object.allow_messages[j] = message.allow_messages[j]; - } - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.interchain_accounts.host.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; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.host.v1.Query#params}. - * @memberof ibc.applications.interchain_accounts.host.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.host.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.interchain_accounts.host.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest, $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.host.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.interchain_accounts.host.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.interchain_accounts.host.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.host.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.interchain_accounts.host.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse) - return object; - var message = new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.host.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - return v1; - })(); - - return host; - })(); - - return interchain_accounts; - })(); - - applications.transfer = (function() { - - /** - * Namespace transfer. - * @memberof ibc.applications - * @namespace - */ - var transfer = {}; - - transfer.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.transfer - * @namespace - */ - var v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Msg#transfer}. - * @memberof ibc.applications.transfer.v1.Msg - * @typedef TransferCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.MsgTransferResponse} [response] MsgTransferResponse - */ - - /** - * Calls Transfer. - * @function transfer - * @memberof ibc.applications.transfer.v1.Msg - * @instance - * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object - * @param {ibc.applications.transfer.v1.Msg.TransferCallback} callback Node-style callback called with the error, if any, and MsgTransferResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.transfer = function transfer(request, callback) { - return this.rpcCall(transfer, $root.ibc.applications.transfer.v1.MsgTransfer, $root.ibc.applications.transfer.v1.MsgTransferResponse, request, callback); - }, "name", { value: "Transfer" }); - - /** - * Calls Transfer. - * @function transfer - * @memberof ibc.applications.transfer.v1.Msg - * @instance - * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgTransfer = (function() { - - /** - * Properties of a MsgTransfer. - * @memberof ibc.applications.transfer.v1 - * @interface IMsgTransfer - * @property {string|null} [source_port] MsgTransfer source_port - * @property {string|null} [source_channel] MsgTransfer source_channel - * @property {cosmos.base.v1beta1.ICoin|null} [token] MsgTransfer token - * @property {string|null} [sender] MsgTransfer sender - * @property {string|null} [receiver] MsgTransfer receiver - * @property {ibc.core.client.v1.IHeight|null} [timeout_height] MsgTransfer timeout_height - * @property {Long|null} [timeout_timestamp] MsgTransfer timeout_timestamp - * @property {string|null} [memo] MsgTransfer memo - */ - - /** - * Constructs a new MsgTransfer. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a MsgTransfer. - * @implements IMsgTransfer - * @constructor - * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set - */ - function MsgTransfer(properties) { - if (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 source_port. - * @member {string} source_port - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.source_port = ""; - - /** - * MsgTransfer source_channel. - * @member {string} source_channel - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.source_channel = ""; - - /** - * MsgTransfer token. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} token - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.token = null; - - /** - * MsgTransfer sender. - * @member {string} sender - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.sender = ""; - - /** - * MsgTransfer receiver. - * @member {string} receiver - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.receiver = ""; - - /** - * MsgTransfer timeout_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} timeout_height - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeout_height = null; - - /** - * MsgTransfer timeout_timestamp. - * @member {Long} timeout_timestamp - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeout_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTransfer memo. - * @member {string} memo - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.memo = ""; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {ibc.applications.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.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_channel); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - $root.cosmos.base.v1beta1.Coin.encode(message.token, 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).string(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); - if (message.timeout_height != null && Object.hasOwnProperty.call(message, "timeout_height")) - $root.ibc.core.client.v1.Height.encode(message.timeout_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.timeout_timestamp != null && Object.hasOwnProperty.call(message, "timeout_timestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeout_timestamp); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.memo); - return writer; - }; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {ibc.applications.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 ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.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.ibc.applications.transfer.v1.MsgTransfer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_port = reader.string(); - break; - case 2: - message.source_channel = reader.string(); - break; - case 3: - message.token = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeout_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeout_timestamp = reader.uint64(); - break; - case 8: - message.memo = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.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 ibc.applications.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.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.token != null && message.hasOwnProperty("token")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.token); - if (error) - return "token." + 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"; - if (message.timeout_height != null && message.hasOwnProperty("timeout_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.timeout_height); - if (error) - return "timeout_height." + error; - } - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (!$util.isInteger(message.timeout_timestamp) && !(message.timeout_timestamp && $util.isInteger(message.timeout_timestamp.low) && $util.isInteger(message.timeout_timestamp.high))) - return "timeout_timestamp: integer|Long expected"; - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - return null; - }; - - /** - * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer - */ - MsgTransfer.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.MsgTransfer) - return object; - var message = new $root.ibc.applications.transfer.v1.MsgTransfer(); - if (object.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.token != null) { - if (typeof object.token !== "object") - throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.token: object expected"); - message.token = $root.cosmos.base.v1beta1.Coin.fromObject(object.token); - } - if (object.sender != null) - message.sender = String(object.sender); - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.timeout_height != null) { - if (typeof object.timeout_height !== "object") - throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.timeout_height: object expected"); - message.timeout_height = $root.ibc.core.client.v1.Height.fromObject(object.timeout_height); - } - if (object.timeout_timestamp != null) - if ($util.Long) - (message.timeout_timestamp = $util.Long.fromValue(object.timeout_timestamp)).unsigned = true; - else if (typeof object.timeout_timestamp === "string") - message.timeout_timestamp = parseInt(object.timeout_timestamp, 10); - else if (typeof object.timeout_timestamp === "number") - message.timeout_timestamp = object.timeout_timestamp; - else if (typeof object.timeout_timestamp === "object") - message.timeout_timestamp = new $util.LongBits(object.timeout_timestamp.low >>> 0, object.timeout_timestamp.high >>> 0).toNumber(true); - if (object.memo != null) - message.memo = String(object.memo); - return message; - }; - - /** - * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {ibc.applications.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.defaults) { - object.source_port = ""; - object.source_channel = ""; - object.token = null; - object.sender = ""; - object.receiver = ""; - object.timeout_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeout_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout_timestamp = options.longs === String ? "0" : 0; - object.memo = ""; - } - if (message.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.token != null && message.hasOwnProperty("token")) - object.token = $root.cosmos.base.v1beta1.Coin.toObject(message.token, options); - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.timeout_height != null && message.hasOwnProperty("timeout_height")) - object.timeout_height = $root.ibc.core.client.v1.Height.toObject(message.timeout_height, options); - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (typeof message.timeout_timestamp === "number") - object.timeout_timestamp = options.longs === String ? String(message.timeout_timestamp) : message.timeout_timestamp; - else - object.timeout_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeout_timestamp) : options.longs === Number ? new $util.LongBits(message.timeout_timestamp.low >>> 0, message.timeout_timestamp.high >>> 0).toNumber(true) : message.timeout_timestamp; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - return object; - }; - - /** - * Converts this MsgTransfer to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - * @returns {Object.} JSON object - */ - MsgTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTransfer; - })(); - - v1.MsgTransferResponse = (function() { - - /** - * Properties of a MsgTransferResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IMsgTransferResponse - * @property {Long|null} [sequence] MsgTransferResponse sequence - */ - - /** - * Constructs a new MsgTransferResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a MsgTransferResponse. - * @implements IMsgTransferResponse - * @constructor - * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set - */ - function MsgTransferResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTransferResponse sequence. - * @member {Long} sequence - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @instance - */ - MsgTransferResponse.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgTransferResponse message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransferResponse.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); - return writer; - }; - - /** - * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransferResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransferResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTransferResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTransferResponse.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"; - return null; - }; - - /** - * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse - */ - MsgTransferResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.MsgTransferResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); - 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 MsgTransferResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {ibc.applications.transfer.v1.MsgTransferResponse} message MsgTransferResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTransferResponse.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; - 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 MsgTransferResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTransferResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTransferResponse; - })(); - - v1.DenomTrace = (function() { - - /** - * Properties of a DenomTrace. - * @memberof ibc.applications.transfer.v1 - * @interface IDenomTrace - * @property {string|null} [path] DenomTrace path - * @property {string|null} [base_denom] DenomTrace base_denom - */ - - /** - * Constructs a new DenomTrace. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a DenomTrace. - * @implements IDenomTrace - * @constructor - * @param {ibc.applications.transfer.v1.IDenomTrace=} [properties] Properties to set - */ - function DenomTrace(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DenomTrace path. - * @member {string} path - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - */ - DenomTrace.prototype.path = ""; - - /** - * DenomTrace base_denom. - * @member {string} base_denom - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - */ - DenomTrace.prototype.base_denom = ""; - - /** - * Encodes the specified DenomTrace message. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomTrace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.base_denom != null && Object.hasOwnProperty.call(message, "base_denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.base_denom); - return writer; - }; - - /** - * Encodes the specified DenomTrace message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomTrace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DenomTrace message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomTrace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.DenomTrace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.base_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DenomTrace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomTrace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DenomTrace message. - * @function verify - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DenomTrace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.base_denom != null && message.hasOwnProperty("base_denom")) - if (!$util.isString(message.base_denom)) - return "base_denom: string expected"; - return null; - }; - - /** - * Creates a DenomTrace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - */ - DenomTrace.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.DenomTrace) - return object; - var message = new $root.ibc.applications.transfer.v1.DenomTrace(); - if (object.path != null) - message.path = String(object.path); - if (object.base_denom != null) - message.base_denom = String(object.base_denom); - return message; - }; - - /** - * Creates a plain object from a DenomTrace message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.DenomTrace} message DenomTrace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DenomTrace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.path = ""; - object.base_denom = ""; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.base_denom != null && message.hasOwnProperty("base_denom")) - object.base_denom = message.base_denom; - return object; - }; - - /** - * Converts this DenomTrace to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - * @returns {Object.} JSON object - */ - DenomTrace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DenomTrace; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.transfer.v1 - * @interface IParams - * @property {boolean|null} [send_enabled] Params send_enabled - * @property {boolean|null} [receive_enabled] Params receive_enabled - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.transfer.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 send_enabled. - * @member {boolean} send_enabled - * @memberof ibc.applications.transfer.v1.Params - * @instance - */ - Params.prototype.send_enabled = false; - - /** - * Params receive_enabled. - * @member {boolean} receive_enabled - * @memberof ibc.applications.transfer.v1.Params - * @instance - */ - Params.prototype.receive_enabled = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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.send_enabled != null && Object.hasOwnProperty.call(message, "send_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.send_enabled); - if (message.receive_enabled != null && Object.hasOwnProperty.call(message, "receive_enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.receive_enabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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 ibc.applications.transfer.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.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.ibc.applications.transfer.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.send_enabled = reader.bool(); - break; - case 2: - message.receive_enabled = 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 ibc.applications.transfer.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.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 ibc.applications.transfer.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.send_enabled != null && message.hasOwnProperty("send_enabled")) - if (typeof message.send_enabled !== "boolean") - return "send_enabled: boolean expected"; - if (message.receive_enabled != null && message.hasOwnProperty("receive_enabled")) - if (typeof message.receive_enabled !== "boolean") - return "receive_enabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.Params) - return object; - var message = new $root.ibc.applications.transfer.v1.Params(); - if (object.send_enabled != null) - message.send_enabled = Boolean(object.send_enabled); - if (object.receive_enabled != null) - message.receive_enabled = Boolean(object.receive_enabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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.send_enabled = false; - object.receive_enabled = false; - } - if (message.send_enabled != null && message.hasOwnProperty("send_enabled")) - object.send_enabled = message.send_enabled; - if (message.receive_enabled != null && message.hasOwnProperty("receive_enabled")) - object.receive_enabled = message.receive_enabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.transfer.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; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTrace}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomTraceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} [response] QueryDenomTraceResponse - */ - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomTraceCallback} callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTrace = function denomTrace(request, callback) { - return this.rpcCall(denomTrace, $root.ibc.applications.transfer.v1.QueryDenomTraceRequest, $root.ibc.applications.transfer.v1.QueryDenomTraceResponse, request, callback); - }, "name", { value: "DenomTrace" }); - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTraces}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomTracesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} [response] QueryDenomTracesResponse - */ - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomTracesCallback} callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTraces = function denomTraces(request, callback) { - return this.rpcCall(denomTraces, $root.ibc.applications.transfer.v1.QueryDenomTracesRequest, $root.ibc.applications.transfer.v1.QueryDenomTracesResponse, request, callback); - }, "name", { value: "DenomTraces" }); - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#params}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.transfer.v1.QueryParamsRequest, $root.ibc.applications.transfer.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomHash}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomHashCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} [response] QueryDenomHashResponse - */ - - /** - * Calls DenomHash. - * @function denomHash - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomHashCallback} callback Node-style callback called with the error, if any, and QueryDenomHashResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomHash = function denomHash(request, callback) { - return this.rpcCall(denomHash, $root.ibc.applications.transfer.v1.QueryDenomHashRequest, $root.ibc.applications.transfer.v1.QueryDenomHashResponse, request, callback); - }, "name", { value: "DenomHash" }); - - /** - * Calls DenomHash. - * @function denomHash - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#escrowAddress}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef EscrowAddressCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryEscrowAddressResponse} [response] QueryEscrowAddressResponse - */ - - /** - * Calls EscrowAddress. - * @function escrowAddress - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} request QueryEscrowAddressRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.EscrowAddressCallback} callback Node-style callback called with the error, if any, and QueryEscrowAddressResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.escrowAddress = function escrowAddress(request, callback) { - return this.rpcCall(escrowAddress, $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest, $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse, request, callback); - }, "name", { value: "EscrowAddress" }); - - /** - * Calls EscrowAddress. - * @function escrowAddress - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} request QueryEscrowAddressRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#totalEscrowForDenom}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef TotalEscrowForDenomCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} [response] QueryTotalEscrowForDenomResponse - */ - - /** - * Calls TotalEscrowForDenom. - * @function totalEscrowForDenom - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} request QueryTotalEscrowForDenomRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.TotalEscrowForDenomCallback} callback Node-style callback called with the error, if any, and QueryTotalEscrowForDenomResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalEscrowForDenom = function totalEscrowForDenom(request, callback) { - return this.rpcCall(totalEscrowForDenom, $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest, $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse, request, callback); - }, "name", { value: "TotalEscrowForDenom" }); - - /** - * Calls TotalEscrowForDenom. - * @function totalEscrowForDenom - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} request QueryTotalEscrowForDenomRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryDenomTraceRequest = (function() { - - /** - * Properties of a QueryDenomTraceRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTraceRequest - * @property {string|null} [hash] QueryDenomTraceRequest hash - */ - - /** - * Constructs a new QueryDenomTraceRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTraceRequest. - * @implements IQueryDenomTraceRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest=} [properties] Properties to set - */ - function QueryDenomTraceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTraceRequest hash. - * @member {string} hash - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @instance - */ - QueryDenomTraceRequest.prototype.hash = ""; - - /** - * Encodes the specified QueryDenomTraceRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceRequest.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).string(message.hash); - return writer; - }; - - /** - * Encodes the specified QueryDenomTraceRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTraceRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTraceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!$util.isString(message.hash)) - return "hash: string expected"; - return null; - }; - - /** - * Creates a QueryDenomTraceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - */ - QueryDenomTraceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); - if (object.hash != null) - message.hash = String(object.hash); - return message; - }; - - /** - * Creates a plain object from a QueryDenomTraceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTraceRequest} message QueryDenomTraceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTraceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hash = ""; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = message.hash; - return object; - }; - - /** - * Converts this QueryDenomTraceRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTraceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTraceRequest; - })(); - - v1.QueryDenomTraceResponse = (function() { - - /** - * Properties of a QueryDenomTraceResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTraceResponse - * @property {ibc.applications.transfer.v1.IDenomTrace|null} [denom_trace] QueryDenomTraceResponse denom_trace - */ - - /** - * Constructs a new QueryDenomTraceResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTraceResponse. - * @implements IQueryDenomTraceResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse=} [properties] Properties to set - */ - function QueryDenomTraceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTraceResponse denom_trace. - * @member {ibc.applications.transfer.v1.IDenomTrace|null|undefined} denom_trace - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @instance - */ - QueryDenomTraceResponse.prototype.denom_trace = null; - - /** - * Encodes the specified QueryDenomTraceResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_trace != null && Object.hasOwnProperty.call(message, "denom_trace")) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_trace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTraceResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTraceResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTraceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_trace != null && message.hasOwnProperty("denom_trace")) { - var error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_trace); - if (error) - return "denom_trace." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTraceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - */ - QueryDenomTraceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); - if (object.denom_trace != null) { - if (typeof object.denom_trace !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTraceResponse.denom_trace: object expected"); - message.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_trace); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTraceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} message QueryDenomTraceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTraceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.denom_trace = null; - if (message.denom_trace != null && message.hasOwnProperty("denom_trace")) - object.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_trace, options); - return object; - }; - - /** - * Converts this QueryDenomTraceResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTraceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTraceResponse; - })(); - - v1.QueryDenomTracesRequest = (function() { - - /** - * Properties of a QueryDenomTracesRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTracesRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDenomTracesRequest pagination - */ - - /** - * Constructs a new QueryDenomTracesRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTracesRequest. - * @implements IQueryDenomTracesRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest=} [properties] Properties to set - */ - function QueryDenomTracesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTracesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @instance - */ - QueryDenomTracesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryDenomTracesRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTracesRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTracesRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTracesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTracesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - */ - QueryDenomTracesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTracesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTracesRequest} message QueryDenomTracesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTracesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomTracesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTracesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTracesRequest; - })(); - - v1.QueryDenomTracesResponse = (function() { - - /** - * Properties of a QueryDenomTracesResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTracesResponse - * @property {Array.|null} [denom_traces] QueryDenomTracesResponse denom_traces - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDenomTracesResponse pagination - */ - - /** - * Constructs a new QueryDenomTracesResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTracesResponse. - * @implements IQueryDenomTracesResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse=} [properties] Properties to set - */ - function QueryDenomTracesResponse(properties) { - this.denom_traces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTracesResponse denom_traces. - * @member {Array.} denom_traces - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - */ - QueryDenomTracesResponse.prototype.denom_traces = $util.emptyArray; - - /** - * QueryDenomTracesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - */ - QueryDenomTracesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryDenomTracesResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_traces != null && message.denom_traces.length) - for (var i = 0; i < message.denom_traces.length; ++i) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_traces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTracesResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.denom_traces && message.denom_traces.length)) - message.denom_traces = []; - message.denom_traces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTracesResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTracesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_traces != null && message.hasOwnProperty("denom_traces")) { - if (!Array.isArray(message.denom_traces)) - return "denom_traces: array expected"; - for (var i = 0; i < message.denom_traces.length; ++i) { - var error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_traces[i]); - if (error) - return "denom_traces." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTracesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - */ - QueryDenomTracesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); - if (object.denom_traces) { - if (!Array.isArray(object.denom_traces)) - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denom_traces: array expected"); - message.denom_traces = []; - for (var i = 0; i < object.denom_traces.length; ++i) { - if (typeof object.denom_traces[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denom_traces: object expected"); - message.denom_traces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_traces[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTracesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} message QueryDenomTracesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTracesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.denom_traces = []; - if (options.defaults) - object.pagination = null; - if (message.denom_traces && message.denom_traces.length) { - object.denom_traces = []; - for (var j = 0; j < message.denom_traces.length; ++j) - object.denom_traces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_traces[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomTracesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTracesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTracesResponse; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.transfer.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.transfer.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.transfer.v1.IParams|null|undefined} params - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.transfer.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.QueryDenomHashRequest = (function() { - - /** - * Properties of a QueryDenomHashRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomHashRequest - * @property {string|null} [trace] QueryDenomHashRequest trace - */ - - /** - * Constructs a new QueryDenomHashRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomHashRequest. - * @implements IQueryDenomHashRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest=} [properties] Properties to set - */ - function QueryDenomHashRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomHashRequest trace. - * @member {string} trace - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @instance - */ - QueryDenomHashRequest.prototype.trace = ""; - - /** - * Encodes the specified QueryDenomHashRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} message QueryDenomHashRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.trace != null && Object.hasOwnProperty.call(message, "trace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.trace); - return writer; - }; - - /** - * Encodes the specified QueryDenomHashRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} message QueryDenomHashRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomHashRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomHashRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomHashRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - return null; - }; - - /** - * Creates a QueryDenomHashRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - */ - QueryDenomHashRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomHashRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomHashRequest(); - if (object.trace != null) - message.trace = String(object.trace); - return message; - }; - - /** - * Creates a plain object from a QueryDenomHashRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomHashRequest} message QueryDenomHashRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomHashRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.trace = ""; - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - return object; - }; - - /** - * Converts this QueryDenomHashRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomHashRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomHashRequest; - })(); - - v1.QueryDenomHashResponse = (function() { - - /** - * Properties of a QueryDenomHashResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomHashResponse - * @property {string|null} [hash] QueryDenomHashResponse hash - */ - - /** - * Constructs a new QueryDenomHashResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomHashResponse. - * @implements IQueryDenomHashResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse=} [properties] Properties to set - */ - function QueryDenomHashResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomHashResponse hash. - * @member {string} hash - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @instance - */ - QueryDenomHashResponse.prototype.hash = ""; - - /** - * Encodes the specified QueryDenomHashResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse} message QueryDenomHashResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashResponse.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).string(message.hash); - return writer; - }; - - /** - * Encodes the specified QueryDenomHashResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse} message QueryDenomHashResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomHashResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomHashResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomHashResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!$util.isString(message.hash)) - return "hash: string expected"; - return null; - }; - - /** - * Creates a QueryDenomHashResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - */ - QueryDenomHashResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomHashResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomHashResponse(); - if (object.hash != null) - message.hash = String(object.hash); - return message; - }; - - /** - * Creates a plain object from a QueryDenomHashResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} message QueryDenomHashResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomHashResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hash = ""; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = message.hash; - return object; - }; - - /** - * Converts this QueryDenomHashResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomHashResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomHashResponse; - })(); - - v1.QueryEscrowAddressRequest = (function() { - - /** - * Properties of a QueryEscrowAddressRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryEscrowAddressRequest - * @property {string|null} [port_id] QueryEscrowAddressRequest port_id - * @property {string|null} [channel_id] QueryEscrowAddressRequest channel_id - */ - - /** - * Constructs a new QueryEscrowAddressRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryEscrowAddressRequest. - * @implements IQueryEscrowAddressRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest=} [properties] Properties to set - */ - function QueryEscrowAddressRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryEscrowAddressRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - */ - QueryEscrowAddressRequest.prototype.port_id = ""; - - /** - * QueryEscrowAddressRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - */ - QueryEscrowAddressRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryEscrowAddressRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} message QueryEscrowAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryEscrowAddressRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} message QueryEscrowAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryEscrowAddressRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryEscrowAddressRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryEscrowAddressRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - */ - QueryEscrowAddressRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryEscrowAddressRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.QueryEscrowAddressRequest} message QueryEscrowAddressRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryEscrowAddressRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryEscrowAddressRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - * @returns {Object.} JSON object - */ - QueryEscrowAddressRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryEscrowAddressRequest; - })(); - - v1.QueryEscrowAddressResponse = (function() { - - /** - * Properties of a QueryEscrowAddressResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryEscrowAddressResponse - * @property {string|null} [escrow_address] QueryEscrowAddressResponse escrow_address - */ - - /** - * Constructs a new QueryEscrowAddressResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryEscrowAddressResponse. - * @implements IQueryEscrowAddressResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse=} [properties] Properties to set - */ - function QueryEscrowAddressResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryEscrowAddressResponse escrow_address. - * @member {string} escrow_address - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @instance - */ - QueryEscrowAddressResponse.prototype.escrow_address = ""; - - /** - * Encodes the specified QueryEscrowAddressResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse} message QueryEscrowAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.escrow_address != null && Object.hasOwnProperty.call(message, "escrow_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.escrow_address); - return writer; - }; - - /** - * Encodes the specified QueryEscrowAddressResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse} message QueryEscrowAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.escrow_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryEscrowAddressResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryEscrowAddressResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.escrow_address != null && message.hasOwnProperty("escrow_address")) - if (!$util.isString(message.escrow_address)) - return "escrow_address: string expected"; - return null; - }; - - /** - * Creates a QueryEscrowAddressResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - */ - QueryEscrowAddressResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse(); - if (object.escrow_address != null) - message.escrow_address = String(object.escrow_address); - return message; - }; - - /** - * Creates a plain object from a QueryEscrowAddressResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.QueryEscrowAddressResponse} message QueryEscrowAddressResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryEscrowAddressResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.escrow_address = ""; - if (message.escrow_address != null && message.hasOwnProperty("escrow_address")) - object.escrow_address = message.escrow_address; - return object; - }; - - /** - * Converts this QueryEscrowAddressResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @instance - * @returns {Object.} JSON object - */ - QueryEscrowAddressResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryEscrowAddressResponse; - })(); - - v1.QueryTotalEscrowForDenomRequest = (function() { - - /** - * Properties of a QueryTotalEscrowForDenomRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryTotalEscrowForDenomRequest - * @property {string|null} [denom] QueryTotalEscrowForDenomRequest denom - */ - - /** - * Constructs a new QueryTotalEscrowForDenomRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryTotalEscrowForDenomRequest. - * @implements IQueryTotalEscrowForDenomRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest=} [properties] Properties to set - */ - function QueryTotalEscrowForDenomRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalEscrowForDenomRequest denom. - * @member {string} denom - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @instance - */ - QueryTotalEscrowForDenomRequest.prototype.denom = ""; - - /** - * Encodes the specified QueryTotalEscrowForDenomRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} message QueryTotalEscrowForDenomRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomRequest.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 QueryTotalEscrowForDenomRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} message QueryTotalEscrowForDenomRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalEscrowForDenomRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} QueryTotalEscrowForDenomRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest(); - 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 QueryTotalEscrowForDenomRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} QueryTotalEscrowForDenomRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalEscrowForDenomRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalEscrowForDenomRequest.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 QueryTotalEscrowForDenomRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} QueryTotalEscrowForDenomRequest - */ - QueryTotalEscrowForDenomRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest(); - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QueryTotalEscrowForDenomRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} message QueryTotalEscrowForDenomRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalEscrowForDenomRequest.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 QueryTotalEscrowForDenomRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalEscrowForDenomRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalEscrowForDenomRequest; - })(); - - v1.QueryTotalEscrowForDenomResponse = (function() { - - /** - * Properties of a QueryTotalEscrowForDenomResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryTotalEscrowForDenomResponse - * @property {cosmos.base.v1beta1.ICoin|null} [amount] QueryTotalEscrowForDenomResponse amount - */ - - /** - * Constructs a new QueryTotalEscrowForDenomResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryTotalEscrowForDenomResponse. - * @implements IQueryTotalEscrowForDenomResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse=} [properties] Properties to set - */ - function QueryTotalEscrowForDenomResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalEscrowForDenomResponse amount. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @instance - */ - QueryTotalEscrowForDenomResponse.prototype.amount = null; - - /** - * Encodes the specified QueryTotalEscrowForDenomResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse} message QueryTotalEscrowForDenomResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalEscrowForDenomResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse} message QueryTotalEscrowForDenomResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalEscrowForDenomResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} QueryTotalEscrowForDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalEscrowForDenomResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} QueryTotalEscrowForDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalEscrowForDenomResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalEscrowForDenomResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - return null; - }; - - /** - * Creates a QueryTotalEscrowForDenomResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} QueryTotalEscrowForDenomResponse - */ - QueryTotalEscrowForDenomResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse(); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.amount: object expected"); - message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalEscrowForDenomResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} message QueryTotalEscrowForDenomResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalEscrowForDenomResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.amount = null; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); - return object; - }; - - /** - * Converts this QueryTotalEscrowForDenomResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalEscrowForDenomResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalEscrowForDenomResponse; - })(); - - v1.Allocation = (function() { - - /** - * Properties of an Allocation. - * @memberof ibc.applications.transfer.v1 - * @interface IAllocation - * @property {string|null} [source_port] Allocation source_port - * @property {string|null} [source_channel] Allocation source_channel - * @property {Array.|null} [spend_limit] Allocation spend_limit - * @property {Array.|null} [allow_list] Allocation allow_list - */ - - /** - * Constructs a new Allocation. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents an Allocation. - * @implements IAllocation - * @constructor - * @param {ibc.applications.transfer.v1.IAllocation=} [properties] Properties to set - */ - function Allocation(properties) { - this.spend_limit = []; - this.allow_list = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Allocation source_port. - * @member {string} source_port - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.source_port = ""; - - /** - * Allocation source_channel. - * @member {string} source_channel - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.source_channel = ""; - - /** - * Allocation spend_limit. - * @member {Array.} spend_limit - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.spend_limit = $util.emptyArray; - - /** - * Allocation allow_list. - * @member {Array.} allow_list - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.allow_list = $util.emptyArray; - - /** - * Encodes the specified Allocation message. Does not implicitly {@link ibc.applications.transfer.v1.Allocation.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {ibc.applications.transfer.v1.IAllocation} message Allocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Allocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_channel); - if (message.spend_limit != null && message.spend_limit.length) - for (var i = 0; i < message.spend_limit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.spend_limit[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.allow_list != null && message.allow_list.length) - for (var i = 0; i < message.allow_list.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.allow_list[i]); - return writer; - }; - - /** - * Encodes the specified Allocation message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Allocation.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {ibc.applications.transfer.v1.IAllocation} message Allocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Allocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Allocation message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.Allocation} Allocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Allocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.Allocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_port = reader.string(); - break; - case 2: - message.source_channel = reader.string(); - break; - case 3: - if (!(message.spend_limit && message.spend_limit.length)) - message.spend_limit = []; - message.spend_limit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.allow_list && message.allow_list.length)) - message.allow_list = []; - message.allow_list.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Allocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.Allocation} Allocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Allocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Allocation message. - * @function verify - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Allocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.spend_limit != null && message.hasOwnProperty("spend_limit")) { - if (!Array.isArray(message.spend_limit)) - return "spend_limit: array expected"; - for (var i = 0; i < message.spend_limit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.spend_limit[i]); - if (error) - return "spend_limit." + error; - } - } - if (message.allow_list != null && message.hasOwnProperty("allow_list")) { - if (!Array.isArray(message.allow_list)) - return "allow_list: array expected"; - for (var i = 0; i < message.allow_list.length; ++i) - if (!$util.isString(message.allow_list[i])) - return "allow_list: string[] expected"; - } - return null; - }; - - /** - * Creates an Allocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.Allocation} Allocation - */ - Allocation.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.Allocation) - return object; - var message = new $root.ibc.applications.transfer.v1.Allocation(); - if (object.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.spend_limit) { - if (!Array.isArray(object.spend_limit)) - throw TypeError(".ibc.applications.transfer.v1.Allocation.spend_limit: array expected"); - message.spend_limit = []; - for (var i = 0; i < object.spend_limit.length; ++i) { - if (typeof object.spend_limit[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.Allocation.spend_limit: object expected"); - message.spend_limit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.spend_limit[i]); - } - } - if (object.allow_list) { - if (!Array.isArray(object.allow_list)) - throw TypeError(".ibc.applications.transfer.v1.Allocation.allow_list: array expected"); - message.allow_list = []; - for (var i = 0; i < object.allow_list.length; ++i) - message.allow_list[i] = String(object.allow_list[i]); - } - return message; - }; - - /** - * Creates a plain object from an Allocation message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {ibc.applications.transfer.v1.Allocation} message Allocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Allocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.spend_limit = []; - object.allow_list = []; - } - if (options.defaults) { - object.source_port = ""; - object.source_channel = ""; - } - if (message.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.spend_limit && message.spend_limit.length) { - object.spend_limit = []; - for (var j = 0; j < message.spend_limit.length; ++j) - object.spend_limit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.spend_limit[j], options); - } - if (message.allow_list && message.allow_list.length) { - object.allow_list = []; - for (var j = 0; j < message.allow_list.length; ++j) - object.allow_list[j] = message.allow_list[j]; - } - return object; - }; - - /** - * Converts this Allocation to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - * @returns {Object.} JSON object - */ - Allocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Allocation; - })(); - - v1.TransferAuthorization = (function() { - - /** - * Properties of a TransferAuthorization. - * @memberof ibc.applications.transfer.v1 - * @interface ITransferAuthorization - * @property {Array.|null} [allocations] TransferAuthorization allocations - */ - - /** - * Constructs a new TransferAuthorization. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a TransferAuthorization. - * @implements ITransferAuthorization - * @constructor - * @param {ibc.applications.transfer.v1.ITransferAuthorization=} [properties] Properties to set - */ - function TransferAuthorization(properties) { - this.allocations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TransferAuthorization allocations. - * @member {Array.} allocations - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @instance - */ - TransferAuthorization.prototype.allocations = $util.emptyArray; - - /** - * Encodes the specified TransferAuthorization message. Does not implicitly {@link ibc.applications.transfer.v1.TransferAuthorization.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {ibc.applications.transfer.v1.ITransferAuthorization} message TransferAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransferAuthorization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allocations != null && message.allocations.length) - for (var i = 0; i < message.allocations.length; ++i) - $root.ibc.applications.transfer.v1.Allocation.encode(message.allocations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TransferAuthorization message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.TransferAuthorization.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {ibc.applications.transfer.v1.ITransferAuthorization} message TransferAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransferAuthorization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TransferAuthorization message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.TransferAuthorization} TransferAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransferAuthorization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.TransferAuthorization(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.allocations && message.allocations.length)) - message.allocations = []; - message.allocations.push($root.ibc.applications.transfer.v1.Allocation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TransferAuthorization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.TransferAuthorization} TransferAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransferAuthorization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TransferAuthorization message. - * @function verify - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TransferAuthorization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allocations != null && message.hasOwnProperty("allocations")) { - if (!Array.isArray(message.allocations)) - return "allocations: array expected"; - for (var i = 0; i < message.allocations.length; ++i) { - var error = $root.ibc.applications.transfer.v1.Allocation.verify(message.allocations[i]); - if (error) - return "allocations." + error; - } - } - return null; - }; - - /** - * Creates a TransferAuthorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.TransferAuthorization} TransferAuthorization - */ - TransferAuthorization.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.TransferAuthorization) - return object; - var message = new $root.ibc.applications.transfer.v1.TransferAuthorization(); - if (object.allocations) { - if (!Array.isArray(object.allocations)) - throw TypeError(".ibc.applications.transfer.v1.TransferAuthorization.allocations: array expected"); - message.allocations = []; - for (var i = 0; i < object.allocations.length; ++i) { - if (typeof object.allocations[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.TransferAuthorization.allocations: object expected"); - message.allocations[i] = $root.ibc.applications.transfer.v1.Allocation.fromObject(object.allocations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TransferAuthorization message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {ibc.applications.transfer.v1.TransferAuthorization} message TransferAuthorization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TransferAuthorization.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allocations = []; - if (message.allocations && message.allocations.length) { - object.allocations = []; - for (var j = 0; j < message.allocations.length; ++j) - object.allocations[j] = $root.ibc.applications.transfer.v1.Allocation.toObject(message.allocations[j], options); - } - return object; - }; - - /** - * Converts this TransferAuthorization to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @instance - * @returns {Object.} JSON object - */ - TransferAuthorization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TransferAuthorization; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.applications.transfer.v1 - * @interface IGenesisState - * @property {string|null} [port_id] GenesisState port_id - * @property {Array.|null} [denom_traces] GenesisState denom_traces - * @property {ibc.applications.transfer.v1.IParams|null} [params] GenesisState params - * @property {Array.|null} [total_escrowed] GenesisState total_escrowed - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.applications.transfer.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.denom_traces = []; - this.total_escrowed = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState port_id. - * @member {string} port_id - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.port_id = ""; - - /** - * GenesisState denom_traces. - * @member {Array.} denom_traces - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.denom_traces = $util.emptyArray; - - /** - * GenesisState params. - * @member {ibc.applications.transfer.v1.IParams|null|undefined} params - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState total_escrowed. - * @member {Array.} total_escrowed - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.total_escrowed = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {ibc.applications.transfer.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.denom_traces != null && message.denom_traces.length) - for (var i = 0; i < message.denom_traces.length; ++i) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_traces[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.total_escrowed != null && message.total_escrowed.length) - for (var i = 0; i < message.total_escrowed.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_escrowed[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {ibc.applications.transfer.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - if (!(message.denom_traces && message.denom_traces.length)) - message.denom_traces = []; - message.denom_traces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.total_escrowed && message.total_escrowed.length)) - message.total_escrowed = []; - message.total_escrowed.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.denom_traces != null && message.hasOwnProperty("denom_traces")) { - if (!Array.isArray(message.denom_traces)) - return "denom_traces: array expected"; - for (var i = 0; i < message.denom_traces.length; ++i) { - var error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_traces[i]); - if (error) - return "denom_traces." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.transfer.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.total_escrowed != null && message.hasOwnProperty("total_escrowed")) { - if (!Array.isArray(message.total_escrowed)) - return "total_escrowed: array expected"; - for (var i = 0; i < message.total_escrowed.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.total_escrowed[i]); - if (error) - return "total_escrowed." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.GenesisState) - return object; - var message = new $root.ibc.applications.transfer.v1.GenesisState(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.denom_traces) { - if (!Array.isArray(object.denom_traces)) - throw TypeError(".ibc.applications.transfer.v1.GenesisState.denom_traces: array expected"); - message.denom_traces = []; - for (var i = 0; i < object.denom_traces.length; ++i) { - if (typeof object.denom_traces[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.GenesisState.denom_traces: object expected"); - message.denom_traces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_traces[i]); - } - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.transfer.v1.GenesisState.params: object expected"); - message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); - } - if (object.total_escrowed) { - if (!Array.isArray(object.total_escrowed)) - throw TypeError(".ibc.applications.transfer.v1.GenesisState.total_escrowed: array expected"); - message.total_escrowed = []; - for (var i = 0; i < object.total_escrowed.length; ++i) { - if (typeof object.total_escrowed[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.GenesisState.total_escrowed: object expected"); - message.total_escrowed[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_escrowed[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {ibc.applications.transfer.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.denom_traces = []; - object.total_escrowed = []; - } - if (options.defaults) { - object.port_id = ""; - object.params = null; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.denom_traces && message.denom_traces.length) { - object.denom_traces = []; - for (var j = 0; j < message.denom_traces.length; ++j) - object.denom_traces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_traces[j], options); - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); - if (message.total_escrowed && message.total_escrowed.length) { - object.total_escrowed = []; - for (var j = 0; j < message.total_escrowed.length; ++j) - object.total_escrowed[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_escrowed[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return v1; - })(); - - transfer.v2 = (function() { - - /** - * Namespace v2. - * @memberof ibc.applications.transfer - * @namespace - */ - var v2 = {}; - - v2.FungibleTokenPacketData = (function() { - - /** - * Properties of a FungibleTokenPacketData. - * @memberof ibc.applications.transfer.v2 - * @interface IFungibleTokenPacketData - * @property {string|null} [denom] FungibleTokenPacketData denom - * @property {string|null} [amount] FungibleTokenPacketData amount - * @property {string|null} [sender] FungibleTokenPacketData sender - * @property {string|null} [receiver] FungibleTokenPacketData receiver - * @property {string|null} [memo] FungibleTokenPacketData memo - */ - - /** - * Constructs a new FungibleTokenPacketData. - * @memberof ibc.applications.transfer.v2 - * @classdesc Represents a FungibleTokenPacketData. - * @implements IFungibleTokenPacketData - * @constructor - * @param {ibc.applications.transfer.v2.IFungibleTokenPacketData=} [properties] Properties to set - */ - function FungibleTokenPacketData(properties) { - if (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 denom. - * @member {string} denom - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.denom = ""; - - /** - * FungibleTokenPacketData amount. - * @member {string} amount - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.amount = ""; - - /** - * FungibleTokenPacketData sender. - * @member {string} sender - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.sender = ""; - - /** - * FungibleTokenPacketData receiver. - * @member {string} receiver - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.receiver = ""; - - /** - * FungibleTokenPacketData memo. - * @member {string} memo - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.memo = ""; - - /** - * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link ibc.applications.transfer.v2.FungibleTokenPacketData.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {ibc.applications.transfer.v2.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.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); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.receiver); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.memo); - return writer; - }; - - /** - * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link ibc.applications.transfer.v2.FungibleTokenPacketData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {ibc.applications.transfer.v2.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 ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v2.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.ibc.applications.transfer.v2.FungibleTokenPacketData(); - 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; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - case 5: - message.memo = 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 ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v2.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 ibc.applications.transfer.v2.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.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"; - 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"; - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - return null; - }; - - /** - * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v2.FungibleTokenPacketData} FungibleTokenPacketData - */ - FungibleTokenPacketData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v2.FungibleTokenPacketData) - return object; - var message = new $root.ibc.applications.transfer.v2.FungibleTokenPacketData(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.amount != null) - message.amount = String(object.amount); - if (object.sender != null) - message.sender = String(object.sender); - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.memo != null) - message.memo = String(object.memo); - return message; - }; - - /** - * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {ibc.applications.transfer.v2.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.defaults) { - object.denom = ""; - object.amount = ""; - object.sender = ""; - object.receiver = ""; - object.memo = ""; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = message.amount; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - return object; - }; - - /** - * Converts this FungibleTokenPacketData to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - * @returns {Object.} JSON object - */ - FungibleTokenPacketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FungibleTokenPacketData; - })(); - - return v2; - })(); - - return transfer; - })(); - - return applications; - })(); - - ibc.core = (function() { - - /** - * Namespace core. - * @memberof ibc - * @namespace - */ - var core = {}; - - core.channel = (function() { - - /** - * Namespace channel. - * @memberof ibc.core - * @namespace - */ - var channel = {}; - - channel.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.channel - * @namespace - */ - var v1 = {}; - - v1.Channel = (function() { - - /** - * Properties of a Channel. - * @memberof ibc.core.channel.v1 - * @interface IChannel - * @property {ibc.core.channel.v1.State|null} [state] Channel state - * @property {ibc.core.channel.v1.Order|null} [ordering] Channel ordering - * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] Channel counterparty - * @property {Array.|null} [connection_hops] Channel connection_hops - * @property {string|null} [version] Channel version - */ - - /** - * Constructs a new Channel. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Channel. - * @implements IChannel - * @constructor - * @param {ibc.core.channel.v1.IChannel=} [properties] Properties to set - */ - function Channel(properties) { - this.connection_hops = []; - if (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 {ibc.core.channel.v1.State} state - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.state = 0; - - /** - * Channel ordering. - * @member {ibc.core.channel.v1.Order} ordering - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.ordering = 0; - - /** - * Channel counterparty. - * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.counterparty = null; - - /** - * Channel connection_hops. - * @member {Array.} connection_hops - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.connection_hops = $util.emptyArray; - - /** - * Channel version. - * @member {string} version - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.version = ""; - - /** - * Encodes the specified Channel message. Does not implicitly {@link ibc.core.channel.v1.Channel.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connection_hops != null && message.connection_hops.length) - for (var i = 0; i < message.connection_hops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_hops[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 ibc.core.channel.v1.Channel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.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.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.connection_hops && message.connection_hops.length)) - message.connection_hops = []; - message.connection_hops.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 ibc.core.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.ibc.core.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connection_hops != null && message.hasOwnProperty("connection_hops")) { - if (!Array.isArray(message.connection_hops)) - return "connection_hops: array expected"; - for (var i = 0; i < message.connection_hops.length; ++i) - if (!$util.isString(message.connection_hops[i])) - return "connection_hops: 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 ibc.core.channel.v1.Channel - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Channel} Channel - */ - Channel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Channel) - return object; - var message = new $root.ibc.core.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(".ibc.core.channel.v1.Channel.counterparty: object expected"); - message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connection_hops) { - if (!Array.isArray(object.connection_hops)) - throw TypeError(".ibc.core.channel.v1.Channel.connection_hops: array expected"); - message.connection_hops = []; - for (var i = 0; i < object.connection_hops.length; ++i) - message.connection_hops[i] = String(object.connection_hops[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 ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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.connection_hops = []; - 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.ibc.core.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connection_hops && message.connection_hops.length) { - object.connection_hops = []; - for (var j = 0; j < message.connection_hops.length; ++j) - object.connection_hops[j] = message.connection_hops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this Channel to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Channel - * @instance - * @returns {Object.} JSON object - */ - Channel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Channel; - })(); - - v1.IdentifiedChannel = (function() { - - /** - * Properties of an IdentifiedChannel. - * @memberof ibc.core.channel.v1 - * @interface IIdentifiedChannel - * @property {ibc.core.channel.v1.State|null} [state] IdentifiedChannel state - * @property {ibc.core.channel.v1.Order|null} [ordering] IdentifiedChannel ordering - * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] IdentifiedChannel counterparty - * @property {Array.|null} [connection_hops] IdentifiedChannel connection_hops - * @property {string|null} [version] IdentifiedChannel version - * @property {string|null} [port_id] IdentifiedChannel port_id - * @property {string|null} [channel_id] IdentifiedChannel channel_id - */ - - /** - * Constructs a new IdentifiedChannel. - * @memberof ibc.core.channel.v1 - * @classdesc Represents an IdentifiedChannel. - * @implements IIdentifiedChannel - * @constructor - * @param {ibc.core.channel.v1.IIdentifiedChannel=} [properties] Properties to set - */ - function IdentifiedChannel(properties) { - this.connection_hops = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedChannel state. - * @member {ibc.core.channel.v1.State} state - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.state = 0; - - /** - * IdentifiedChannel ordering. - * @member {ibc.core.channel.v1.Order} ordering - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.ordering = 0; - - /** - * IdentifiedChannel counterparty. - * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.counterparty = null; - - /** - * IdentifiedChannel connection_hops. - * @member {Array.} connection_hops - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.connection_hops = $util.emptyArray; - - /** - * IdentifiedChannel version. - * @member {string} version - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.version = ""; - - /** - * IdentifiedChannel port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.port_id = ""; - - /** - * IdentifiedChannel channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.channel_id = ""; - - /** - * Encodes the specified IdentifiedChannel message. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedChannel.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.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connection_hops != null && message.connection_hops.length) - for (var i = 0; i < message.connection_hops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_hops[i]); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified IdentifiedChannel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.IdentifiedChannel(); - 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.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.connection_hops && message.connection_hops.length)) - message.connection_hops = []; - message.connection_hops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.port_id = reader.string(); - break; - case 7: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedChannel message. - * @function verify - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedChannel.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.ibc.core.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connection_hops != null && message.hasOwnProperty("connection_hops")) { - if (!Array.isArray(message.connection_hops)) - return "connection_hops: array expected"; - for (var i = 0; i < message.connection_hops.length; ++i) - if (!$util.isString(message.connection_hops[i])) - return "connection_hops: string[] expected"; - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates an IdentifiedChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - */ - IdentifiedChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.IdentifiedChannel) - return object; - var message = new $root.ibc.core.channel.v1.IdentifiedChannel(); - 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(".ibc.core.channel.v1.IdentifiedChannel.counterparty: object expected"); - message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connection_hops) { - if (!Array.isArray(object.connection_hops)) - throw TypeError(".ibc.core.channel.v1.IdentifiedChannel.connection_hops: array expected"); - message.connection_hops = []; - for (var i = 0; i < object.connection_hops.length; ++i) - message.connection_hops[i] = String(object.connection_hops[i]); - } - if (object.version != null) - message.version = String(object.version); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from an IdentifiedChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IdentifiedChannel} message IdentifiedChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connection_hops = []; - 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 = ""; - object.port_id = ""; - object.channel_id = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connection_hops && message.connection_hops.length) { - object.connection_hops = []; - for (var j = 0; j < message.connection_hops.length; ++j) - object.connection_hops[j] = message.connection_hops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this IdentifiedChannel to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - * @returns {Object.} JSON object - */ - IdentifiedChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedChannel; - })(); - - /** - * State enum. - * @name ibc.core.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 ibc.core.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 ibc.core.channel.v1 - * @interface ICounterparty - * @property {string|null} [port_id] Counterparty port_id - * @property {string|null} [channel_id] Counterparty channel_id - */ - - /** - * Constructs a new Counterparty. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.port_id = ""; - - /** - * Counterparty channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.channel_id = ""; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.Counterparty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = 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 ibc.core.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Counterparty) - return object; - var message = new $root.ibc.core.channel.v1.Counterparty(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.channel.v1 - * @interface IPacket - * @property {Long|null} [sequence] Packet sequence - * @property {string|null} [source_port] Packet source_port - * @property {string|null} [source_channel] Packet source_channel - * @property {string|null} [destination_port] Packet destination_port - * @property {string|null} [destination_channel] Packet destination_channel - * @property {Uint8Array|null} [data] Packet data - * @property {ibc.core.client.v1.IHeight|null} [timeout_height] Packet timeout_height - * @property {Long|null} [timeout_timestamp] Packet timeout_timestamp - */ - - /** - * Constructs a new Packet. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Packet. - * @implements IPacket - * @constructor - * @param {ibc.core.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 {Long} sequence - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Packet source_port. - * @member {string} source_port - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.source_port = ""; - - /** - * Packet source_channel. - * @member {string} source_channel - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.source_channel = ""; - - /** - * Packet destination_port. - * @member {string} destination_port - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.destination_port = ""; - - /** - * Packet destination_channel. - * @member {string} destination_channel - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.destination_channel = ""; - - /** - * Packet data. - * @member {Uint8Array} data - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.data = $util.newBuffer([]); - - /** - * Packet timeout_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} timeout_height - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.timeout_height = null; - - /** - * Packet timeout_timestamp. - * @member {Long} timeout_timestamp - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.timeout_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Packet message. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.source_channel); - if (message.destination_port != null && Object.hasOwnProperty.call(message, "destination_port")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination_port); - if (message.destination_channel != null && Object.hasOwnProperty.call(message, "destination_channel")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.destination_channel); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.data); - if (message.timeout_height != null && Object.hasOwnProperty.call(message, "timeout_height")) - $root.ibc.core.client.v1.Height.encode(message.timeout_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeout_timestamp != null && Object.hasOwnProperty.call(message, "timeout_timestamp")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.timeout_timestamp); - return writer; - }; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.Packet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.source_port = reader.string(); - break; - case 3: - message.source_channel = reader.string(); - break; - case 4: - message.destination_port = reader.string(); - break; - case 5: - message.destination_channel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeout_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeout_timestamp = 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 ibc.core.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.destination_port != null && message.hasOwnProperty("destination_port")) - if (!$util.isString(message.destination_port)) - return "destination_port: string expected"; - if (message.destination_channel != null && message.hasOwnProperty("destination_channel")) - if (!$util.isString(message.destination_channel)) - return "destination_channel: 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.timeout_height != null && message.hasOwnProperty("timeout_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.timeout_height); - if (error) - return "timeout_height." + error; - } - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (!$util.isInteger(message.timeout_timestamp) && !(message.timeout_timestamp && $util.isInteger(message.timeout_timestamp.low) && $util.isInteger(message.timeout_timestamp.high))) - return "timeout_timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a Packet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Packet} Packet - */ - Packet.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Packet) - return object; - var message = new $root.ibc.core.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.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.destination_port != null) - message.destination_port = String(object.destination_port); - if (object.destination_channel != null) - message.destination_channel = String(object.destination_channel); - 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.timeout_height != null) { - if (typeof object.timeout_height !== "object") - throw TypeError(".ibc.core.channel.v1.Packet.timeout_height: object expected"); - message.timeout_height = $root.ibc.core.client.v1.Height.fromObject(object.timeout_height); - } - if (object.timeout_timestamp != null) - if ($util.Long) - (message.timeout_timestamp = $util.Long.fromValue(object.timeout_timestamp)).unsigned = true; - else if (typeof object.timeout_timestamp === "string") - message.timeout_timestamp = parseInt(object.timeout_timestamp, 10); - else if (typeof object.timeout_timestamp === "number") - message.timeout_timestamp = object.timeout_timestamp; - else if (typeof object.timeout_timestamp === "object") - message.timeout_timestamp = new $util.LongBits(object.timeout_timestamp.low >>> 0, object.timeout_timestamp.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 ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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.source_port = ""; - object.source_channel = ""; - object.destination_port = ""; - object.destination_channel = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.timeout_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeout_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout_timestamp = 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.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.destination_port != null && message.hasOwnProperty("destination_port")) - object.destination_port = message.destination_port; - if (message.destination_channel != null && message.hasOwnProperty("destination_channel")) - object.destination_channel = message.destination_channel; - 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.timeout_height != null && message.hasOwnProperty("timeout_height")) - object.timeout_height = $root.ibc.core.client.v1.Height.toObject(message.timeout_height, options); - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (typeof message.timeout_timestamp === "number") - object.timeout_timestamp = options.longs === String ? String(message.timeout_timestamp) : message.timeout_timestamp; - else - object.timeout_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeout_timestamp) : options.longs === Number ? new $util.LongBits(message.timeout_timestamp.low >>> 0, message.timeout_timestamp.high >>> 0).toNumber(true) : message.timeout_timestamp; - return object; - }; - - /** - * Converts this Packet to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Packet - * @instance - * @returns {Object.} JSON object - */ - Packet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Packet; - })(); - - v1.PacketState = (function() { - - /** - * Properties of a PacketState. - * @memberof ibc.core.channel.v1 - * @interface IPacketState - * @property {string|null} [port_id] PacketState port_id - * @property {string|null} [channel_id] PacketState channel_id - * @property {Long|null} [sequence] PacketState sequence - * @property {Uint8Array|null} [data] PacketState data - */ - - /** - * Constructs a new PacketState. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketState. - * @implements IPacketState - * @constructor - * @param {ibc.core.channel.v1.IPacketState=} [properties] Properties to set - */ - function PacketState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketState port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.port_id = ""; - - /** - * PacketState channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.channel_id = ""; - - /** - * PacketState sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PacketState data. - * @member {Uint8Array} data - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified PacketState message. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified PacketState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketState} PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketState} PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketState message. - * @function verify - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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.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 PacketState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketState} PacketState - */ - PacketState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketState) - return object; - var message = new $root.ibc.core.channel.v1.PacketState(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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.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 PacketState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.PacketState} message PacketState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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 (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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.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 PacketState to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketState - * @instance - * @returns {Object.} JSON object - */ - PacketState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketState; - })(); - - v1.PacketId = (function() { - - /** - * Properties of a PacketId. - * @memberof ibc.core.channel.v1 - * @interface IPacketId - * @property {string|null} [port_id] PacketId port_id - * @property {string|null} [channel_id] PacketId channel_id - * @property {Long|null} [sequence] PacketId sequence - */ - - /** - * Constructs a new PacketId. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketId. - * @implements IPacketId - * @constructor - * @param {ibc.core.channel.v1.IPacketId=} [properties] Properties to set - */ - function PacketId(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketId port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.port_id = ""; - - /** - * PacketId channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.channel_id = ""; - - /** - * PacketId sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PacketId message. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.IPacketId} message PacketId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified PacketId message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.IPacketId} message PacketId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketId message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketId} PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketId.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketId} PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketId message. - * @function verify - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 PacketId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketId} PacketId - */ - PacketId.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketId) - return object; - var message = new $root.ibc.core.channel.v1.PacketId(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 PacketId message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.PacketId} message PacketId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 PacketId to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketId - * @instance - * @returns {Object.} JSON object - */ - PacketId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketId; - })(); - - v1.Acknowledgement = (function() { - - /** - * Properties of an Acknowledgement. - * @memberof ibc.core.channel.v1 - * @interface IAcknowledgement - * @property {Uint8Array|null} [result] Acknowledgement result - * @property {string|null} [error] Acknowledgement error - */ - - /** - * Constructs a new Acknowledgement. - * @memberof ibc.core.channel.v1 - * @classdesc Represents an Acknowledgement. - * @implements IAcknowledgement - * @constructor - * @param {ibc.core.channel.v1.IAcknowledgement=} [properties] Properties to set - */ - function Acknowledgement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Acknowledgement result. - * @member {Uint8Array|null|undefined} result - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Acknowledgement.prototype.result = null; - - /** - * Acknowledgement error. - * @member {string|null|undefined} error - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Acknowledgement.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Acknowledgement response. - * @member {"result"|"error"|undefined} response - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Object.defineProperty(Acknowledgement.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["result", "error"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified Acknowledgement message. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Acknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.result); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.error); - return writer; - }; - - /** - * Encodes the specified Acknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Acknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Acknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Acknowledgement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Acknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Acknowledgement message. - * @function verify - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Acknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.result != null && message.hasOwnProperty("result")) { - properties.response = 1; - if (!(message.result && typeof message.result.length === "number" || $util.isString(message.result))) - return "result: buffer expected"; - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.response === 1) - return "response: multiple values"; - properties.response = 1; - if (!$util.isString(message.error)) - return "error: string expected"; - } - return null; - }; - - /** - * Creates an Acknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - */ - Acknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Acknowledgement) - return object; - var message = new $root.ibc.core.channel.v1.Acknowledgement(); - if (object.result != null) - if (typeof object.result === "string") - $util.base64.decode(object.result, message.result = $util.newBuffer($util.base64.length(object.result)), 0); - else if (object.result.length) - message.result = object.result; - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an Acknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.Acknowledgement} message Acknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Acknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.result != null && message.hasOwnProperty("result")) { - object.result = options.bytes === String ? $util.base64.encode(message.result, 0, message.result.length) : options.bytes === Array ? Array.prototype.slice.call(message.result) : message.result; - if (options.oneofs) - object.response = "result"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = message.error; - if (options.oneofs) - object.response = "error"; - } - return object; - }; - - /** - * Converts this Acknowledgement to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - * @returns {Object.} JSON object - */ - Acknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Acknowledgement; - })(); - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenInit}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenInitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenInitResponse} [response] MsgChannelOpenInitResponse - */ - - /** - * Calls ChannelOpenInit. - * @function channelOpenInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenInit} request MsgChannelOpenInit message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenInitCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenInitResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenInit = function channelOpenInit(request, callback) { - return this.rpcCall(channelOpenInit, $root.ibc.core.channel.v1.MsgChannelOpenInit, $root.ibc.core.channel.v1.MsgChannelOpenInitResponse, request, callback); - }, "name", { value: "ChannelOpenInit" }); - - /** - * Calls ChannelOpenInit. - * @function channelOpenInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenInit} request MsgChannelOpenInit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenTry}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenTryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenTryResponse} [response] MsgChannelOpenTryResponse - */ - - /** - * Calls ChannelOpenTry. - * @function channelOpenTry - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenTry} request MsgChannelOpenTry message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenTryCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenTryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenTry = function channelOpenTry(request, callback) { - return this.rpcCall(channelOpenTry, $root.ibc.core.channel.v1.MsgChannelOpenTry, $root.ibc.core.channel.v1.MsgChannelOpenTryResponse, request, callback); - }, "name", { value: "ChannelOpenTry" }); - - /** - * Calls ChannelOpenTry. - * @function channelOpenTry - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenTry} request MsgChannelOpenTry message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenAck}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenAckCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenAckResponse} [response] MsgChannelOpenAckResponse - */ - - /** - * Calls ChannelOpenAck. - * @function channelOpenAck - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenAck} request MsgChannelOpenAck message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenAckCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenAckResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenAck = function channelOpenAck(request, callback) { - return this.rpcCall(channelOpenAck, $root.ibc.core.channel.v1.MsgChannelOpenAck, $root.ibc.core.channel.v1.MsgChannelOpenAckResponse, request, callback); - }, "name", { value: "ChannelOpenAck" }); - - /** - * Calls ChannelOpenAck. - * @function channelOpenAck - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenAck} request MsgChannelOpenAck message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenConfirm}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenConfirmCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} [response] MsgChannelOpenConfirmResponse - */ - - /** - * Calls ChannelOpenConfirm. - * @function channelOpenConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} request MsgChannelOpenConfirm message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenConfirmCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenConfirmResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenConfirm = function channelOpenConfirm(request, callback) { - return this.rpcCall(channelOpenConfirm, $root.ibc.core.channel.v1.MsgChannelOpenConfirm, $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, request, callback); - }, "name", { value: "ChannelOpenConfirm" }); - - /** - * Calls ChannelOpenConfirm. - * @function channelOpenConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} request MsgChannelOpenConfirm message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseInit}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelCloseInitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelCloseInitResponse} [response] MsgChannelCloseInitResponse - */ - - /** - * Calls ChannelCloseInit. - * @function channelCloseInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseInit} request MsgChannelCloseInit message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelCloseInitCallback} callback Node-style callback called with the error, if any, and MsgChannelCloseInitResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelCloseInit = function channelCloseInit(request, callback) { - return this.rpcCall(channelCloseInit, $root.ibc.core.channel.v1.MsgChannelCloseInit, $root.ibc.core.channel.v1.MsgChannelCloseInitResponse, request, callback); - }, "name", { value: "ChannelCloseInit" }); - - /** - * Calls ChannelCloseInit. - * @function channelCloseInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseInit} request MsgChannelCloseInit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseConfirm}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelCloseConfirmCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} [response] MsgChannelCloseConfirmResponse - */ - - /** - * Calls ChannelCloseConfirm. - * @function channelCloseConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} request MsgChannelCloseConfirm message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelCloseConfirmCallback} callback Node-style callback called with the error, if any, and MsgChannelCloseConfirmResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelCloseConfirm = function channelCloseConfirm(request, callback) { - return this.rpcCall(channelCloseConfirm, $root.ibc.core.channel.v1.MsgChannelCloseConfirm, $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, request, callback); - }, "name", { value: "ChannelCloseConfirm" }); - - /** - * Calls ChannelCloseConfirm. - * @function channelCloseConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} request MsgChannelCloseConfirm message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#recvPacket}. - * @memberof ibc.core.channel.v1.Msg - * @typedef RecvPacketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgRecvPacketResponse} [response] MsgRecvPacketResponse - */ - - /** - * Calls RecvPacket. - * @function recvPacket - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgRecvPacket} request MsgRecvPacket message or plain object - * @param {ibc.core.channel.v1.Msg.RecvPacketCallback} callback Node-style callback called with the error, if any, and MsgRecvPacketResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.recvPacket = function recvPacket(request, callback) { - return this.rpcCall(recvPacket, $root.ibc.core.channel.v1.MsgRecvPacket, $root.ibc.core.channel.v1.MsgRecvPacketResponse, request, callback); - }, "name", { value: "RecvPacket" }); - - /** - * Calls RecvPacket. - * @function recvPacket - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgRecvPacket} request MsgRecvPacket message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#timeout}. - * @memberof ibc.core.channel.v1.Msg - * @typedef TimeoutCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgTimeoutResponse} [response] MsgTimeoutResponse - */ - - /** - * Calls Timeout. - * @function timeout - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeout} request MsgTimeout message or plain object - * @param {ibc.core.channel.v1.Msg.TimeoutCallback} callback Node-style callback called with the error, if any, and MsgTimeoutResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.timeout = function timeout(request, callback) { - return this.rpcCall(timeout, $root.ibc.core.channel.v1.MsgTimeout, $root.ibc.core.channel.v1.MsgTimeoutResponse, request, callback); - }, "name", { value: "Timeout" }); - - /** - * Calls Timeout. - * @function timeout - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeout} request MsgTimeout message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#timeoutOnClose}. - * @memberof ibc.core.channel.v1.Msg - * @typedef TimeoutOnCloseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} [response] MsgTimeoutOnCloseResponse - */ - - /** - * Calls TimeoutOnClose. - * @function timeoutOnClose - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} request MsgTimeoutOnClose message or plain object - * @param {ibc.core.channel.v1.Msg.TimeoutOnCloseCallback} callback Node-style callback called with the error, if any, and MsgTimeoutOnCloseResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.timeoutOnClose = function timeoutOnClose(request, callback) { - return this.rpcCall(timeoutOnClose, $root.ibc.core.channel.v1.MsgTimeoutOnClose, $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, request, callback); - }, "name", { value: "TimeoutOnClose" }); - - /** - * Calls TimeoutOnClose. - * @function timeoutOnClose - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} request MsgTimeoutOnClose message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#acknowledgement}. - * @memberof ibc.core.channel.v1.Msg - * @typedef AcknowledgementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgAcknowledgementResponse} [response] MsgAcknowledgementResponse - */ - - /** - * Calls Acknowledgement. - * @function acknowledgement - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgAcknowledgement} request MsgAcknowledgement message or plain object - * @param {ibc.core.channel.v1.Msg.AcknowledgementCallback} callback Node-style callback called with the error, if any, and MsgAcknowledgementResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.acknowledgement = function acknowledgement(request, callback) { - return this.rpcCall(acknowledgement, $root.ibc.core.channel.v1.MsgAcknowledgement, $root.ibc.core.channel.v1.MsgAcknowledgementResponse, request, callback); - }, "name", { value: "Acknowledgement" }); - - /** - * Calls Acknowledgement. - * @function acknowledgement - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgAcknowledgement} request MsgAcknowledgement message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - /** - * ResponseResultType enum. - * @name ibc.core.channel.v1.ResponseResultType - * @enum {number} - * @property {number} RESPONSE_RESULT_TYPE_UNSPECIFIED=0 RESPONSE_RESULT_TYPE_UNSPECIFIED value - * @property {number} RESPONSE_RESULT_TYPE_NOOP=1 RESPONSE_RESULT_TYPE_NOOP value - * @property {number} RESPONSE_RESULT_TYPE_SUCCESS=2 RESPONSE_RESULT_TYPE_SUCCESS value - */ - v1.ResponseResultType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESPONSE_RESULT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESPONSE_RESULT_TYPE_NOOP"] = 1; - values[valuesById[2] = "RESPONSE_RESULT_TYPE_SUCCESS"] = 2; - return values; - })(); - - v1.MsgChannelOpenInit = (function() { - - /** - * Properties of a MsgChannelOpenInit. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenInit - * @property {string|null} [port_id] MsgChannelOpenInit port_id - * @property {ibc.core.channel.v1.IChannel|null} [channel] MsgChannelOpenInit channel - * @property {string|null} [signer] MsgChannelOpenInit signer - */ - - /** - * Constructs a new MsgChannelOpenInit. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenInit. - * @implements IMsgChannelOpenInit - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.port_id = ""; - - /** - * MsgChannelOpenInit channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.channel = null; - - /** - * MsgChannelOpenInit signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgChannelOpenInit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit - */ - MsgChannelOpenInit.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenInit) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelOpenInit(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenInit.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {ibc.core.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.port_id = ""; - object.channel = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenInit to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenInit; - })(); - - v1.MsgChannelOpenInitResponse = (function() { - - /** - * Properties of a MsgChannelOpenInitResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenInitResponse - * @property {string|null} [channel_id] MsgChannelOpenInitResponse channel_id - * @property {string|null} [version] MsgChannelOpenInitResponse version - */ - - /** - * Constructs a new MsgChannelOpenInitResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenInitResponse. - * @implements IMsgChannelOpenInitResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse=} [properties] Properties to set - */ - function MsgChannelOpenInitResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenInitResponse channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @instance - */ - MsgChannelOpenInitResponse.prototype.channel_id = ""; - - /** - * MsgChannelOpenInitResponse version. - * @member {string} version - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @instance - */ - MsgChannelOpenInitResponse.prototype.version = ""; - - /** - * Encodes the specified MsgChannelOpenInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} message MsgChannelOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenInitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} message MsgChannelOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenInitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenInitResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenInitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenInitResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenInitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenInitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse - */ - MsgChannelOpenInitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenInitResponse) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelOpenInitResponse(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenInitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenInitResponse} message MsgChannelOpenInitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenInitResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.version = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this MsgChannelOpenInitResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenInitResponse; - })(); - - v1.MsgChannelOpenTry = (function() { - - /** - * Properties of a MsgChannelOpenTry. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenTry - * @property {string|null} [port_id] MsgChannelOpenTry port_id - * @property {string|null} [previous_channel_id] MsgChannelOpenTry previous_channel_id - * @property {ibc.core.channel.v1.IChannel|null} [channel] MsgChannelOpenTry channel - * @property {string|null} [counterparty_version] MsgChannelOpenTry counterparty_version - * @property {Uint8Array|null} [proof_init] MsgChannelOpenTry proof_init - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelOpenTry proof_height - * @property {string|null} [signer] MsgChannelOpenTry signer - */ - - /** - * Constructs a new MsgChannelOpenTry. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenTry. - * @implements IMsgChannelOpenTry - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.port_id = ""; - - /** - * MsgChannelOpenTry previous_channel_id. - * @member {string} previous_channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.previous_channel_id = ""; - - /** - * MsgChannelOpenTry channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.channel = null; - - /** - * MsgChannelOpenTry counterparty_version. - * @member {string} counterparty_version - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.counterparty_version = ""; - - /** - * MsgChannelOpenTry proof_init. - * @member {Uint8Array} proof_init - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.proof_init = $util.newBuffer([]); - - /** - * MsgChannelOpenTry proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.proof_height = null; - - /** - * MsgChannelOpenTry signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.previous_channel_id != null && Object.hasOwnProperty.call(message, "previous_channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.previous_channel_id); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.counterparty_version != null && Object.hasOwnProperty.call(message, "counterparty_version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterparty_version); - if (message.proof_init != null && Object.hasOwnProperty.call(message, "proof_init")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proof_init); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgChannelOpenTry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.previous_channel_id = reader.string(); - break; - case 3: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty_version = reader.string(); - break; - case 5: - message.proof_init = reader.bytes(); - break; - case 6: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.previous_channel_id != null && message.hasOwnProperty("previous_channel_id")) - if (!$util.isString(message.previous_channel_id)) - return "previous_channel_id: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - if (!$util.isString(message.counterparty_version)) - return "counterparty_version: string expected"; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - if (!(message.proof_init && typeof message.proof_init.length === "number" || $util.isString(message.proof_init))) - return "proof_init: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry - */ - MsgChannelOpenTry.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenTry) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelOpenTry(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.previous_channel_id != null) - message.previous_channel_id = String(object.previous_channel_id); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenTry.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - if (object.counterparty_version != null) - message.counterparty_version = String(object.counterparty_version); - if (object.proof_init != null) - if (typeof object.proof_init === "string") - $util.base64.decode(object.proof_init, message.proof_init = $util.newBuffer($util.base64.length(object.proof_init)), 0); - else if (object.proof_init.length) - message.proof_init = object.proof_init; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenTry.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {ibc.core.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.port_id = ""; - object.previous_channel_id = ""; - object.channel = null; - object.counterparty_version = ""; - if (options.bytes === String) - object.proof_init = ""; - else { - object.proof_init = []; - if (options.bytes !== Array) - object.proof_init = $util.newBuffer(object.proof_init); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.previous_channel_id != null && message.hasOwnProperty("previous_channel_id")) - object.previous_channel_id = message.previous_channel_id; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - object.counterparty_version = message.counterparty_version; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - object.proof_init = options.bytes === String ? $util.base64.encode(message.proof_init, 0, message.proof_init.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_init) : message.proof_init; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenTry to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenTry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenTry; - })(); - - v1.MsgChannelOpenTryResponse = (function() { - - /** - * Properties of a MsgChannelOpenTryResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenTryResponse - * @property {string|null} [version] MsgChannelOpenTryResponse version - * @property {string|null} [channel_id] MsgChannelOpenTryResponse channel_id - */ - - /** - * Constructs a new MsgChannelOpenTryResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenTryResponse. - * @implements IMsgChannelOpenTryResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse=} [properties] Properties to set - */ - function MsgChannelOpenTryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenTryResponse version. - * @member {string} version - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @instance - */ - MsgChannelOpenTryResponse.prototype.version = ""; - - /** - * MsgChannelOpenTryResponse channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @instance - */ - MsgChannelOpenTryResponse.prototype.channel_id = ""; - - /** - * Encodes the specified MsgChannelOpenTryResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} message MsgChannelOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenTryResponse.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.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} message MsgChannelOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenTryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenTryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenTryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenTryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenTryResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenTryResponse.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.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenTryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse - */ - MsgChannelOpenTryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenTryResponse) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelOpenTryResponse(); - if (object.version != null) - message.version = String(object.version); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenTryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenTryResponse} message MsgChannelOpenTryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenTryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.channel_id = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this MsgChannelOpenTryResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenTryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenTryResponse; - })(); - - v1.MsgChannelOpenAck = (function() { - - /** - * Properties of a MsgChannelOpenAck. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenAck - * @property {string|null} [port_id] MsgChannelOpenAck port_id - * @property {string|null} [channel_id] MsgChannelOpenAck channel_id - * @property {string|null} [counterparty_channel_id] MsgChannelOpenAck counterparty_channel_id - * @property {string|null} [counterparty_version] MsgChannelOpenAck counterparty_version - * @property {Uint8Array|null} [proof_try] MsgChannelOpenAck proof_try - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelOpenAck proof_height - * @property {string|null} [signer] MsgChannelOpenAck signer - */ - - /** - * Constructs a new MsgChannelOpenAck. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenAck. - * @implements IMsgChannelOpenAck - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.port_id = ""; - - /** - * MsgChannelOpenAck channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.channel_id = ""; - - /** - * MsgChannelOpenAck counterparty_channel_id. - * @member {string} counterparty_channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.counterparty_channel_id = ""; - - /** - * MsgChannelOpenAck counterparty_version. - * @member {string} counterparty_version - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.counterparty_version = ""; - - /** - * MsgChannelOpenAck proof_try. - * @member {Uint8Array} proof_try - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.proof_try = $util.newBuffer([]); - - /** - * MsgChannelOpenAck proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.proof_height = null; - - /** - * MsgChannelOpenAck signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.counterparty_channel_id != null && Object.hasOwnProperty.call(message, "counterparty_channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterparty_channel_id); - if (message.counterparty_version != null && Object.hasOwnProperty.call(message, "counterparty_version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterparty_version); - if (message.proof_try != null && Object.hasOwnProperty.call(message, "proof_try")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proof_try); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgChannelOpenAck(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.counterparty_channel_id = reader.string(); - break; - case 4: - message.counterparty_version = reader.string(); - break; - case 5: - message.proof_try = reader.bytes(); - break; - case 6: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.counterparty_channel_id != null && message.hasOwnProperty("counterparty_channel_id")) - if (!$util.isString(message.counterparty_channel_id)) - return "counterparty_channel_id: string expected"; - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - if (!$util.isString(message.counterparty_version)) - return "counterparty_version: string expected"; - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - if (!(message.proof_try && typeof message.proof_try.length === "number" || $util.isString(message.proof_try))) - return "proof_try: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck - */ - MsgChannelOpenAck.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenAck) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelOpenAck(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.counterparty_channel_id != null) - message.counterparty_channel_id = String(object.counterparty_channel_id); - if (object.counterparty_version != null) - message.counterparty_version = String(object.counterparty_version); - if (object.proof_try != null) - if (typeof object.proof_try === "string") - $util.base64.decode(object.proof_try, message.proof_try = $util.newBuffer($util.base64.length(object.proof_try)), 0); - else if (object.proof_try.length) - message.proof_try = object.proof_try; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenAck.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {ibc.core.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.port_id = ""; - object.channel_id = ""; - object.counterparty_channel_id = ""; - object.counterparty_version = ""; - if (options.bytes === String) - object.proof_try = ""; - else { - object.proof_try = []; - if (options.bytes !== Array) - object.proof_try = $util.newBuffer(object.proof_try); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.counterparty_channel_id != null && message.hasOwnProperty("counterparty_channel_id")) - object.counterparty_channel_id = message.counterparty_channel_id; - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - object.counterparty_version = message.counterparty_version; - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - object.proof_try = options.bytes === String ? $util.base64.encode(message.proof_try, 0, message.proof_try.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_try) : message.proof_try; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenAck to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenAck; - })(); - - v1.MsgChannelOpenAckResponse = (function() { - - /** - * Properties of a MsgChannelOpenAckResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenAckResponse - */ - - /** - * Constructs a new MsgChannelOpenAckResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenAckResponse. - * @implements IMsgChannelOpenAckResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse=} [properties] Properties to set - */ - function MsgChannelOpenAckResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelOpenAckResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} message MsgChannelOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenAckResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} message MsgChannelOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenAckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenAckResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenAckResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenAckResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenAckResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenAckResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenAckResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse - */ - MsgChannelOpenAckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenAckResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelOpenAckResponse(); - }; - - /** - * Creates a plain object from a MsgChannelOpenAckResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenAckResponse} message MsgChannelOpenAckResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenAckResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelOpenAckResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenAckResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenAckResponse; - })(); - - v1.MsgChannelOpenConfirm = (function() { - - /** - * Properties of a MsgChannelOpenConfirm. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenConfirm - * @property {string|null} [port_id] MsgChannelOpenConfirm port_id - * @property {string|null} [channel_id] MsgChannelOpenConfirm channel_id - * @property {Uint8Array|null} [proof_ack] MsgChannelOpenConfirm proof_ack - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelOpenConfirm proof_height - * @property {string|null} [signer] MsgChannelOpenConfirm signer - */ - - /** - * Constructs a new MsgChannelOpenConfirm. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenConfirm. - * @implements IMsgChannelOpenConfirm - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.port_id = ""; - - /** - * MsgChannelOpenConfirm channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.channel_id = ""; - - /** - * MsgChannelOpenConfirm proof_ack. - * @member {Uint8Array} proof_ack - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.proof_ack = $util.newBuffer([]); - - /** - * MsgChannelOpenConfirm proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.proof_height = null; - - /** - * MsgChannelOpenConfirm signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.proof_ack != null && Object.hasOwnProperty.call(message, "proof_ack")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_ack); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgChannelOpenConfirm(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.proof_ack = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - if (!(message.proof_ack && typeof message.proof_ack.length === "number" || $util.isString(message.proof_ack))) - return "proof_ack: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm - */ - MsgChannelOpenConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenConfirm) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirm(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.proof_ack != null) - if (typeof object.proof_ack === "string") - $util.base64.decode(object.proof_ack, message.proof_ack = $util.newBuffer($util.base64.length(object.proof_ack)), 0); - else if (object.proof_ack.length) - message.proof_ack = object.proof_ack; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenConfirm.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {ibc.core.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.port_id = ""; - object.channel_id = ""; - if (options.bytes === String) - object.proof_ack = ""; - else { - object.proof_ack = []; - if (options.bytes !== Array) - object.proof_ack = $util.newBuffer(object.proof_ack); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - object.proof_ack = options.bytes === String ? $util.base64.encode(message.proof_ack, 0, message.proof_ack.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_ack) : message.proof_ack; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenConfirm to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenConfirm; - })(); - - v1.MsgChannelOpenConfirmResponse = (function() { - - /** - * Properties of a MsgChannelOpenConfirmResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenConfirmResponse - */ - - /** - * Constructs a new MsgChannelOpenConfirmResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenConfirmResponse. - * @implements IMsgChannelOpenConfirmResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse=} [properties] Properties to set - */ - function MsgChannelOpenConfirmResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelOpenConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenConfirmResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenConfirmResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenConfirmResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenConfirmResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenConfirmResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse - */ - MsgChannelOpenConfirmResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse(); - }; - - /** - * Creates a plain object from a MsgChannelOpenConfirmResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenConfirmResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelOpenConfirmResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenConfirmResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenConfirmResponse; - })(); - - v1.MsgChannelCloseInit = (function() { - - /** - * Properties of a MsgChannelCloseInit. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseInit - * @property {string|null} [port_id] MsgChannelCloseInit port_id - * @property {string|null} [channel_id] MsgChannelCloseInit channel_id - * @property {string|null} [signer] MsgChannelCloseInit signer - */ - - /** - * Constructs a new MsgChannelCloseInit. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseInit. - * @implements IMsgChannelCloseInit - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.port_id = ""; - - /** - * MsgChannelCloseInit channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.channel_id = ""; - - /** - * MsgChannelCloseInit signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgChannelCloseInit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit - */ - MsgChannelCloseInit.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseInit) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelCloseInit(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {ibc.core.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.port_id = ""; - object.channel_id = ""; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelCloseInit to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseInit; - })(); - - v1.MsgChannelCloseInitResponse = (function() { - - /** - * Properties of a MsgChannelCloseInitResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseInitResponse - */ - - /** - * Constructs a new MsgChannelCloseInitResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseInitResponse. - * @implements IMsgChannelCloseInitResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse=} [properties] Properties to set - */ - function MsgChannelCloseInitResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelCloseInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} message MsgChannelCloseInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseInitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} message MsgChannelCloseInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseInitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseInitResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseInitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelCloseInitResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelCloseInitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseInitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse - */ - MsgChannelCloseInitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseInitResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelCloseInitResponse(); - }; - - /** - * Creates a plain object from a MsgChannelCloseInitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelCloseInitResponse} message MsgChannelCloseInitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseInitResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelCloseInitResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseInitResponse; - })(); - - v1.MsgChannelCloseConfirm = (function() { - - /** - * Properties of a MsgChannelCloseConfirm. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseConfirm - * @property {string|null} [port_id] MsgChannelCloseConfirm port_id - * @property {string|null} [channel_id] MsgChannelCloseConfirm channel_id - * @property {Uint8Array|null} [proof_init] MsgChannelCloseConfirm proof_init - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelCloseConfirm proof_height - * @property {string|null} [signer] MsgChannelCloseConfirm signer - */ - - /** - * Constructs a new MsgChannelCloseConfirm. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseConfirm. - * @implements IMsgChannelCloseConfirm - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.port_id = ""; - - /** - * MsgChannelCloseConfirm channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.channel_id = ""; - - /** - * MsgChannelCloseConfirm proof_init. - * @member {Uint8Array} proof_init - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.proof_init = $util.newBuffer([]); - - /** - * MsgChannelCloseConfirm proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.proof_height = null; - - /** - * MsgChannelCloseConfirm signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.proof_init != null && Object.hasOwnProperty.call(message, "proof_init")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_init); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgChannelCloseConfirm(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.proof_init = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - if (!(message.proof_init && typeof message.proof_init.length === "number" || $util.isString(message.proof_init))) - return "proof_init: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm - */ - MsgChannelCloseConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseConfirm) - return object; - var message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirm(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.proof_init != null) - if (typeof object.proof_init === "string") - $util.base64.decode(object.proof_init, message.proof_init = $util.newBuffer($util.base64.length(object.proof_init)), 0); - else if (object.proof_init.length) - message.proof_init = object.proof_init; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelCloseConfirm.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {ibc.core.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.port_id = ""; - object.channel_id = ""; - if (options.bytes === String) - object.proof_init = ""; - else { - object.proof_init = []; - if (options.bytes !== Array) - object.proof_init = $util.newBuffer(object.proof_init); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - object.proof_init = options.bytes === String ? $util.base64.encode(message.proof_init, 0, message.proof_init.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_init) : message.proof_init; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelCloseConfirm to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseConfirm; - })(); - - v1.MsgChannelCloseConfirmResponse = (function() { - - /** - * Properties of a MsgChannelCloseConfirmResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseConfirmResponse - */ - - /** - * Constructs a new MsgChannelCloseConfirmResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseConfirmResponse. - * @implements IMsgChannelCloseConfirmResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse=} [properties] Properties to set - */ - function MsgChannelCloseConfirmResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelCloseConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseConfirmResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseConfirmResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseConfirmResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelCloseConfirmResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelCloseConfirmResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse - */ - MsgChannelCloseConfirmResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse(); - }; - - /** - * Creates a plain object from a MsgChannelCloseConfirmResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseConfirmResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelCloseConfirmResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseConfirmResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseConfirmResponse; - })(); - - v1.MsgRecvPacket = (function() { - - /** - * Properties of a MsgRecvPacket. - * @memberof ibc.core.channel.v1 - * @interface IMsgRecvPacket - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgRecvPacket packet - * @property {Uint8Array|null} [proof_commitment] MsgRecvPacket proof_commitment - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgRecvPacket proof_height - * @property {string|null} [signer] MsgRecvPacket signer - */ - - /** - * Constructs a new MsgRecvPacket. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgRecvPacket. - * @implements IMsgRecvPacket - * @constructor - * @param {ibc.core.channel.v1.IMsgRecvPacket=} [properties] Properties to set - */ - function MsgRecvPacket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRecvPacket packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.packet = null; - - /** - * MsgRecvPacket proof_commitment. - * @member {Uint8Array} proof_commitment - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.proof_commitment = $util.newBuffer([]); - - /** - * MsgRecvPacket proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.proof_height = null; - - /** - * MsgRecvPacket signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.signer = ""; - - /** - * Encodes the specified MsgRecvPacket message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacket} message MsgRecvPacket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof_commitment != null && Object.hasOwnProperty.call(message, "proof_commitment")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_commitment); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, 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).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgRecvPacket message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacket} message MsgRecvPacket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRecvPacket message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgRecvPacket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_commitment = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRecvPacket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRecvPacket message. - * @function verify - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRecvPacket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - var error = $root.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof_commitment != null && message.hasOwnProperty("proof_commitment")) - if (!(message.proof_commitment && typeof message.proof_commitment.length === "number" || $util.isString(message.proof_commitment))) - return "proof_commitment: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgRecvPacket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket - */ - MsgRecvPacket.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgRecvPacket) - return object; - var message = new $root.ibc.core.channel.v1.MsgRecvPacket(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgRecvPacket.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof_commitment != null) - if (typeof object.proof_commitment === "string") - $util.base64.decode(object.proof_commitment, message.proof_commitment = $util.newBuffer($util.base64.length(object.proof_commitment)), 0); - else if (object.proof_commitment.length) - message.proof_commitment = object.proof_commitment; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgRecvPacket.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgRecvPacket message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {ibc.core.channel.v1.MsgRecvPacket} message MsgRecvPacket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRecvPacket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet = null; - if (options.bytes === String) - object.proof_commitment = ""; - else { - object.proof_commitment = []; - if (options.bytes !== Array) - object.proof_commitment = $util.newBuffer(object.proof_commitment); - } - object.proof_height = null; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.proof_commitment != null && message.hasOwnProperty("proof_commitment")) - object.proof_commitment = options.bytes === String ? $util.base64.encode(message.proof_commitment, 0, message.proof_commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_commitment) : message.proof_commitment; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgRecvPacket to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - * @returns {Object.} JSON object - */ - MsgRecvPacket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRecvPacket; - })(); - - v1.MsgRecvPacketResponse = (function() { - - /** - * Properties of a MsgRecvPacketResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgRecvPacketResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgRecvPacketResponse result - */ - - /** - * Constructs a new MsgRecvPacketResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgRecvPacketResponse. - * @implements IMsgRecvPacketResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgRecvPacketResponse=} [properties] Properties to set - */ - function MsgRecvPacketResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRecvPacketResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @instance - */ - MsgRecvPacketResponse.prototype.result = 0; - - /** - * Encodes the specified MsgRecvPacketResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} message MsgRecvPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacketResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgRecvPacketResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} message MsgRecvPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacketResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRecvPacketResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacketResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgRecvPacketResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRecvPacketResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacketResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRecvPacketResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRecvPacketResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgRecvPacketResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse - */ - MsgRecvPacketResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgRecvPacketResponse) - return object; - var message = new $root.ibc.core.channel.v1.MsgRecvPacketResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgRecvPacketResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {ibc.core.channel.v1.MsgRecvPacketResponse} message MsgRecvPacketResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRecvPacketResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgRecvPacketResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRecvPacketResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRecvPacketResponse; - })(); - - v1.MsgTimeout = (function() { - - /** - * Properties of a MsgTimeout. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeout - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgTimeout packet - * @property {Uint8Array|null} [proof_unreceived] MsgTimeout proof_unreceived - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgTimeout proof_height - * @property {Long|null} [next_sequence_recv] MsgTimeout next_sequence_recv - * @property {string|null} [signer] MsgTimeout signer - */ - - /** - * Constructs a new MsgTimeout. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeout. - * @implements IMsgTimeout - * @constructor - * @param {ibc.core.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 {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.packet = null; - - /** - * MsgTimeout proof_unreceived. - * @member {Uint8Array} proof_unreceived - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.proof_unreceived = $util.newBuffer([]); - - /** - * MsgTimeout proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.proof_height = null; - - /** - * MsgTimeout next_sequence_recv. - * @member {Long} next_sequence_recv - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.next_sequence_recv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTimeout signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.signer = ""; - - /** - * Encodes the specified MsgTimeout message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeout.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {ibc.core.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.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof_unreceived != null && Object.hasOwnProperty.call(message, "proof_unreceived")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_unreceived); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.next_sequence_recv != null && Object.hasOwnProperty.call(message, "next_sequence_recv")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.next_sequence_recv); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeout.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgTimeout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgTimeout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_unreceived = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.next_sequence_recv = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - if (!(message.proof_unreceived && typeof message.proof_unreceived.length === "number" || $util.isString(message.proof_unreceived))) - return "proof_unreceived: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (!$util.isInteger(message.next_sequence_recv) && !(message.next_sequence_recv && $util.isInteger(message.next_sequence_recv.low) && $util.isInteger(message.next_sequence_recv.high))) - return "next_sequence_recv: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeout} MsgTimeout - */ - MsgTimeout.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeout) - return object; - var message = new $root.ibc.core.channel.v1.MsgTimeout(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeout.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof_unreceived != null) - if (typeof object.proof_unreceived === "string") - $util.base64.decode(object.proof_unreceived, message.proof_unreceived = $util.newBuffer($util.base64.length(object.proof_unreceived)), 0); - else if (object.proof_unreceived.length) - message.proof_unreceived = object.proof_unreceived; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeout.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.next_sequence_recv != null) - if ($util.Long) - (message.next_sequence_recv = $util.Long.fromValue(object.next_sequence_recv)).unsigned = true; - else if (typeof object.next_sequence_recv === "string") - message.next_sequence_recv = parseInt(object.next_sequence_recv, 10); - else if (typeof object.next_sequence_recv === "number") - message.next_sequence_recv = object.next_sequence_recv; - else if (typeof object.next_sequence_recv === "object") - message.next_sequence_recv = new $util.LongBits(object.next_sequence_recv.low >>> 0, object.next_sequence_recv.high >>> 0).toNumber(true); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {ibc.core.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; - if (options.bytes === String) - object.proof_unreceived = ""; - else { - object.proof_unreceived = []; - if (options.bytes !== Array) - object.proof_unreceived = $util.newBuffer(object.proof_unreceived); - } - object.proof_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.next_sequence_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_sequence_recv = options.longs === String ? "0" : 0; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - object.proof_unreceived = options.bytes === String ? $util.base64.encode(message.proof_unreceived, 0, message.proof_unreceived.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_unreceived) : message.proof_unreceived; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (typeof message.next_sequence_recv === "number") - object.next_sequence_recv = options.longs === String ? String(message.next_sequence_recv) : message.next_sequence_recv; - else - object.next_sequence_recv = options.longs === String ? $util.Long.prototype.toString.call(message.next_sequence_recv) : options.longs === Number ? new $util.LongBits(message.next_sequence_recv.low >>> 0, message.next_sequence_recv.high >>> 0).toNumber(true) : message.next_sequence_recv; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgTimeout to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - * @returns {Object.} JSON object - */ - MsgTimeout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeout; - })(); - - v1.MsgTimeoutResponse = (function() { - - /** - * Properties of a MsgTimeoutResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeoutResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgTimeoutResponse result - */ - - /** - * Constructs a new MsgTimeoutResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeoutResponse. - * @implements IMsgTimeoutResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeoutResponse=} [properties] Properties to set - */ - function MsgTimeoutResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeoutResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @instance - */ - MsgTimeoutResponse.prototype.result = 0; - - /** - * Encodes the specified MsgTimeoutResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutResponse} message MsgTimeoutResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgTimeoutResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutResponse} message MsgTimeoutResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTimeoutResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeoutResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeoutResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeoutResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgTimeoutResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse - */ - MsgTimeoutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutResponse) - return object; - var message = new $root.ibc.core.channel.v1.MsgTimeoutResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgTimeoutResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {ibc.core.channel.v1.MsgTimeoutResponse} message MsgTimeoutResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeoutResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgTimeoutResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTimeoutResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeoutResponse; - })(); - - v1.MsgTimeoutOnClose = (function() { - - /** - * Properties of a MsgTimeoutOnClose. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeoutOnClose - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgTimeoutOnClose packet - * @property {Uint8Array|null} [proof_unreceived] MsgTimeoutOnClose proof_unreceived - * @property {Uint8Array|null} [proof_close] MsgTimeoutOnClose proof_close - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgTimeoutOnClose proof_height - * @property {Long|null} [next_sequence_recv] MsgTimeoutOnClose next_sequence_recv - * @property {string|null} [signer] MsgTimeoutOnClose signer - */ - - /** - * Constructs a new MsgTimeoutOnClose. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeoutOnClose. - * @implements IMsgTimeoutOnClose - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose=} [properties] Properties to set - */ - function MsgTimeoutOnClose(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeoutOnClose packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.packet = null; - - /** - * MsgTimeoutOnClose proof_unreceived. - * @member {Uint8Array} proof_unreceived - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.proof_unreceived = $util.newBuffer([]); - - /** - * MsgTimeoutOnClose proof_close. - * @member {Uint8Array} proof_close - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.proof_close = $util.newBuffer([]); - - /** - * MsgTimeoutOnClose proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.proof_height = null; - - /** - * MsgTimeoutOnClose next_sequence_recv. - * @member {Long} next_sequence_recv - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.next_sequence_recv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTimeoutOnClose signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.signer = ""; - - /** - * Encodes the specified MsgTimeoutOnClose message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} message MsgTimeoutOnClose message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnClose.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof_unreceived != null && Object.hasOwnProperty.call(message, "proof_unreceived")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_unreceived); - if (message.proof_close != null && Object.hasOwnProperty.call(message, "proof_close")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_close); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.next_sequence_recv != null && Object.hasOwnProperty.call(message, "next_sequence_recv")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.next_sequence_recv); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgTimeoutOnClose message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} message MsgTimeoutOnClose message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnClose.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTimeoutOnClose message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnClose.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutOnClose(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_unreceived = reader.bytes(); - break; - case 3: - message.proof_close = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.next_sequence_recv = reader.uint64(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeoutOnClose message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnClose.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeoutOnClose message. - * @function verify - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeoutOnClose.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - var error = $root.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - if (!(message.proof_unreceived && typeof message.proof_unreceived.length === "number" || $util.isString(message.proof_unreceived))) - return "proof_unreceived: buffer expected"; - if (message.proof_close != null && message.hasOwnProperty("proof_close")) - if (!(message.proof_close && typeof message.proof_close.length === "number" || $util.isString(message.proof_close))) - return "proof_close: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (!$util.isInteger(message.next_sequence_recv) && !(message.next_sequence_recv && $util.isInteger(message.next_sequence_recv.low) && $util.isInteger(message.next_sequence_recv.high))) - return "next_sequence_recv: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgTimeoutOnClose message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose - */ - MsgTimeoutOnClose.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutOnClose) - return object; - var message = new $root.ibc.core.channel.v1.MsgTimeoutOnClose(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeoutOnClose.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof_unreceived != null) - if (typeof object.proof_unreceived === "string") - $util.base64.decode(object.proof_unreceived, message.proof_unreceived = $util.newBuffer($util.base64.length(object.proof_unreceived)), 0); - else if (object.proof_unreceived.length) - message.proof_unreceived = object.proof_unreceived; - if (object.proof_close != null) - if (typeof object.proof_close === "string") - $util.base64.decode(object.proof_close, message.proof_close = $util.newBuffer($util.base64.length(object.proof_close)), 0); - else if (object.proof_close.length) - message.proof_close = object.proof_close; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeoutOnClose.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.next_sequence_recv != null) - if ($util.Long) - (message.next_sequence_recv = $util.Long.fromValue(object.next_sequence_recv)).unsigned = true; - else if (typeof object.next_sequence_recv === "string") - message.next_sequence_recv = parseInt(object.next_sequence_recv, 10); - else if (typeof object.next_sequence_recv === "number") - message.next_sequence_recv = object.next_sequence_recv; - else if (typeof object.next_sequence_recv === "object") - message.next_sequence_recv = new $util.LongBits(object.next_sequence_recv.low >>> 0, object.next_sequence_recv.high >>> 0).toNumber(true); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgTimeoutOnClose message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {ibc.core.channel.v1.MsgTimeoutOnClose} message MsgTimeoutOnClose - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeoutOnClose.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet = null; - if (options.bytes === String) - object.proof_unreceived = ""; - else { - object.proof_unreceived = []; - if (options.bytes !== Array) - object.proof_unreceived = $util.newBuffer(object.proof_unreceived); - } - if (options.bytes === String) - object.proof_close = ""; - else { - object.proof_close = []; - if (options.bytes !== Array) - object.proof_close = $util.newBuffer(object.proof_close); - } - object.proof_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.next_sequence_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_sequence_recv = options.longs === String ? "0" : 0; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - object.proof_unreceived = options.bytes === String ? $util.base64.encode(message.proof_unreceived, 0, message.proof_unreceived.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_unreceived) : message.proof_unreceived; - if (message.proof_close != null && message.hasOwnProperty("proof_close")) - object.proof_close = options.bytes === String ? $util.base64.encode(message.proof_close, 0, message.proof_close.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_close) : message.proof_close; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (typeof message.next_sequence_recv === "number") - object.next_sequence_recv = options.longs === String ? String(message.next_sequence_recv) : message.next_sequence_recv; - else - object.next_sequence_recv = options.longs === String ? $util.Long.prototype.toString.call(message.next_sequence_recv) : options.longs === Number ? new $util.LongBits(message.next_sequence_recv.low >>> 0, message.next_sequence_recv.high >>> 0).toNumber(true) : message.next_sequence_recv; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgTimeoutOnClose to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - * @returns {Object.} JSON object - */ - MsgTimeoutOnClose.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeoutOnClose; - })(); - - v1.MsgTimeoutOnCloseResponse = (function() { - - /** - * Properties of a MsgTimeoutOnCloseResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeoutOnCloseResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgTimeoutOnCloseResponse result - */ - - /** - * Constructs a new MsgTimeoutOnCloseResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeoutOnCloseResponse. - * @implements IMsgTimeoutOnCloseResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse=} [properties] Properties to set - */ - function MsgTimeoutOnCloseResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeoutOnCloseResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @instance - */ - MsgTimeoutOnCloseResponse.prototype.result = 0; - - /** - * Encodes the specified MsgTimeoutOnCloseResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnCloseResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgTimeoutOnCloseResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnCloseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnCloseResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnCloseResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeoutOnCloseResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeoutOnCloseResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgTimeoutOnCloseResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse - */ - MsgTimeoutOnCloseResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse) - return object; - var message = new $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgTimeoutOnCloseResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeoutOnCloseResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgTimeoutOnCloseResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTimeoutOnCloseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeoutOnCloseResponse; - })(); - - v1.MsgAcknowledgement = (function() { - - /** - * Properties of a MsgAcknowledgement. - * @memberof ibc.core.channel.v1 - * @interface IMsgAcknowledgement - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgAcknowledgement packet - * @property {Uint8Array|null} [acknowledgement] MsgAcknowledgement acknowledgement - * @property {Uint8Array|null} [proof_acked] MsgAcknowledgement proof_acked - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgAcknowledgement proof_height - * @property {string|null} [signer] MsgAcknowledgement signer - */ - - /** - * Constructs a new MsgAcknowledgement. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgAcknowledgement. - * @implements IMsgAcknowledgement - * @constructor - * @param {ibc.core.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 {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.packet = null; - - /** - * MsgAcknowledgement acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.acknowledgement = $util.newBuffer([]); - - /** - * MsgAcknowledgement proof_acked. - * @member {Uint8Array} proof_acked - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.proof_acked = $util.newBuffer([]); - - /** - * MsgAcknowledgement proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.proof_height = null; - - /** - * MsgAcknowledgement signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.signer = ""; - - /** - * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {ibc.core.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.ibc.core.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_acked != null && Object.hasOwnProperty.call(message, "proof_acked")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_acked); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.MsgAcknowledgement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proof_acked = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.ibc.core.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_acked != null && message.hasOwnProperty("proof_acked")) - if (!(message.proof_acked && typeof message.proof_acked.length === "number" || $util.isString(message.proof_acked))) - return "proof_acked: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgAcknowledgement} MsgAcknowledgement - */ - MsgAcknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgAcknowledgement) - return object; - var message = new $root.ibc.core.channel.v1.MsgAcknowledgement(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgAcknowledgement.packet: object expected"); - message.packet = $root.ibc.core.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_acked != null) - if (typeof object.proof_acked === "string") - $util.base64.decode(object.proof_acked, message.proof_acked = $util.newBuffer($util.base64.length(object.proof_acked)), 0); - else if (object.proof_acked.length) - message.proof_acked = object.proof_acked; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgAcknowledgement.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {ibc.core.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); - } - if (options.bytes === String) - object.proof_acked = ""; - else { - object.proof_acked = []; - if (options.bytes !== Array) - object.proof_acked = $util.newBuffer(object.proof_acked); - } - object.proof_height = null; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.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_acked != null && message.hasOwnProperty("proof_acked")) - object.proof_acked = options.bytes === String ? $util.base64.encode(message.proof_acked, 0, message.proof_acked.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_acked) : message.proof_acked; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgAcknowledgement to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - * @returns {Object.} JSON object - */ - MsgAcknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAcknowledgement; - })(); - - v1.MsgAcknowledgementResponse = (function() { - - /** - * Properties of a MsgAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgAcknowledgementResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgAcknowledgementResponse result - */ - - /** - * Constructs a new MsgAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgAcknowledgementResponse. - * @implements IMsgAcknowledgementResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse=} [properties] Properties to set - */ - function MsgAcknowledgementResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAcknowledgementResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @instance - */ - MsgAcknowledgementResponse.prototype.result = 0; - - /** - * Encodes the specified MsgAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} message MsgAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAcknowledgementResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} message MsgAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAcknowledgementResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAcknowledgementResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgAcknowledgementResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAcknowledgementResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAcknowledgementResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAcknowledgementResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse - */ - MsgAcknowledgementResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgAcknowledgementResponse) - return object; - var message = new $root.ibc.core.channel.v1.MsgAcknowledgementResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgAcknowledgementResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.MsgAcknowledgementResponse} message MsgAcknowledgementResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAcknowledgementResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgAcknowledgementResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAcknowledgementResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAcknowledgementResponse; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.core.channel.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; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channel}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelResponse} [response] QueryChannelResponse - */ - - /** - * Calls Channel. - * @function channel - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelRequest} request QueryChannelRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelCallback} callback Node-style callback called with the error, if any, and QueryChannelResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channel = function channel(request, callback) { - return this.rpcCall(channel, $root.ibc.core.channel.v1.QueryChannelRequest, $root.ibc.core.channel.v1.QueryChannelResponse, request, callback); - }, "name", { value: "Channel" }); - - /** - * Calls Channel. - * @function channel - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelRequest} request QueryChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channels}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelsResponse} [response] QueryChannelsResponse - */ - - /** - * Calls Channels. - * @function channels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelsRequest} request QueryChannelsRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelsCallback} callback Node-style callback called with the error, if any, and QueryChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channels = function channels(request, callback) { - return this.rpcCall(channels, $root.ibc.core.channel.v1.QueryChannelsRequest, $root.ibc.core.channel.v1.QueryChannelsResponse, request, callback); - }, "name", { value: "Channels" }); - - /** - * Calls Channels. - * @function channels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelsRequest} request QueryChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#connectionChannels}. - * @memberof ibc.core.channel.v1.Query - * @typedef ConnectionChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryConnectionChannelsResponse} [response] QueryConnectionChannelsResponse - */ - - /** - * Calls ConnectionChannels. - * @function connectionChannels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} request QueryConnectionChannelsRequest message or plain object - * @param {ibc.core.channel.v1.Query.ConnectionChannelsCallback} callback Node-style callback called with the error, if any, and QueryConnectionChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionChannels = function connectionChannels(request, callback) { - return this.rpcCall(connectionChannels, $root.ibc.core.channel.v1.QueryConnectionChannelsRequest, $root.ibc.core.channel.v1.QueryConnectionChannelsResponse, request, callback); - }, "name", { value: "ConnectionChannels" }); - - /** - * Calls ConnectionChannels. - * @function connectionChannels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} request QueryConnectionChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channelClientState}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelClientStateResponse} [response] QueryChannelClientStateResponse - */ - - /** - * Calls ChannelClientState. - * @function channelClientState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} request QueryChannelClientStateRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelClientStateCallback} callback Node-style callback called with the error, if any, and QueryChannelClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channelClientState = function channelClientState(request, callback) { - return this.rpcCall(channelClientState, $root.ibc.core.channel.v1.QueryChannelClientStateRequest, $root.ibc.core.channel.v1.QueryChannelClientStateResponse, request, callback); - }, "name", { value: "ChannelClientState" }); - - /** - * Calls ChannelClientState. - * @function channelClientState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} request QueryChannelClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channelConsensusState}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelConsensusStateResponse} [response] QueryChannelConsensusStateResponse - */ - - /** - * Calls ChannelConsensusState. - * @function channelConsensusState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} request QueryChannelConsensusStateRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryChannelConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channelConsensusState = function channelConsensusState(request, callback) { - return this.rpcCall(channelConsensusState, $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest, $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse, request, callback); - }, "name", { value: "ChannelConsensusState" }); - - /** - * Calls ChannelConsensusState. - * @function channelConsensusState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} request QueryChannelConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitment}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketCommitmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketCommitmentResponse} [response] QueryPacketCommitmentResponse - */ - - /** - * Calls PacketCommitment. - * @function packetCommitment - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} request QueryPacketCommitmentRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketCommitmentCallback} callback Node-style callback called with the error, if any, and QueryPacketCommitmentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetCommitment = function packetCommitment(request, callback) { - return this.rpcCall(packetCommitment, $root.ibc.core.channel.v1.QueryPacketCommitmentRequest, $root.ibc.core.channel.v1.QueryPacketCommitmentResponse, request, callback); - }, "name", { value: "PacketCommitment" }); - - /** - * Calls PacketCommitment. - * @function packetCommitment - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} request QueryPacketCommitmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitments}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketCommitmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketCommitmentsResponse} [response] QueryPacketCommitmentsResponse - */ - - /** - * Calls PacketCommitments. - * @function packetCommitments - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} request QueryPacketCommitmentsRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketCommitmentsCallback} callback Node-style callback called with the error, if any, and QueryPacketCommitmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetCommitments = function packetCommitments(request, callback) { - return this.rpcCall(packetCommitments, $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest, $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse, request, callback); - }, "name", { value: "PacketCommitments" }); - - /** - * Calls PacketCommitments. - * @function packetCommitments - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} request QueryPacketCommitmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetReceipt}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketReceiptCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketReceiptResponse} [response] QueryPacketReceiptResponse - */ - - /** - * Calls PacketReceipt. - * @function packetReceipt - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} request QueryPacketReceiptRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketReceiptCallback} callback Node-style callback called with the error, if any, and QueryPacketReceiptResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetReceipt = function packetReceipt(request, callback) { - return this.rpcCall(packetReceipt, $root.ibc.core.channel.v1.QueryPacketReceiptRequest, $root.ibc.core.channel.v1.QueryPacketReceiptResponse, request, callback); - }, "name", { value: "PacketReceipt" }); - - /** - * Calls PacketReceipt. - * @function packetReceipt - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} request QueryPacketReceiptRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgement}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketAcknowledgementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} [response] QueryPacketAcknowledgementResponse - */ - - /** - * Calls PacketAcknowledgement. - * @function packetAcknowledgement - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} request QueryPacketAcknowledgementRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketAcknowledgementCallback} callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetAcknowledgement = function packetAcknowledgement(request, callback) { - return this.rpcCall(packetAcknowledgement, $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, request, callback); - }, "name", { value: "PacketAcknowledgement" }); - - /** - * Calls PacketAcknowledgement. - * @function packetAcknowledgement - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} request QueryPacketAcknowledgementRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgements}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketAcknowledgementsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} [response] QueryPacketAcknowledgementsResponse - */ - - /** - * Calls PacketAcknowledgements. - * @function packetAcknowledgements - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} request QueryPacketAcknowledgementsRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketAcknowledgementsCallback} callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetAcknowledgements = function packetAcknowledgements(request, callback) { - return this.rpcCall(packetAcknowledgements, $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, request, callback); - }, "name", { value: "PacketAcknowledgements" }); - - /** - * Calls PacketAcknowledgements. - * @function packetAcknowledgements - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} request QueryPacketAcknowledgementsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedPackets}. - * @memberof ibc.core.channel.v1.Query - * @typedef UnreceivedPacketsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} [response] QueryUnreceivedPacketsResponse - */ - - /** - * Calls UnreceivedPackets. - * @function unreceivedPackets - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} request QueryUnreceivedPacketsRequest message or plain object - * @param {ibc.core.channel.v1.Query.UnreceivedPacketsCallback} callback Node-style callback called with the error, if any, and QueryUnreceivedPacketsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.unreceivedPackets = function unreceivedPackets(request, callback) { - return this.rpcCall(unreceivedPackets, $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, request, callback); - }, "name", { value: "UnreceivedPackets" }); - - /** - * Calls UnreceivedPackets. - * @function unreceivedPackets - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} request QueryUnreceivedPacketsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedAcks}. - * @memberof ibc.core.channel.v1.Query - * @typedef UnreceivedAcksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryUnreceivedAcksResponse} [response] QueryUnreceivedAcksResponse - */ - - /** - * Calls UnreceivedAcks. - * @function unreceivedAcks - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} request QueryUnreceivedAcksRequest message or plain object - * @param {ibc.core.channel.v1.Query.UnreceivedAcksCallback} callback Node-style callback called with the error, if any, and QueryUnreceivedAcksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.unreceivedAcks = function unreceivedAcks(request, callback) { - return this.rpcCall(unreceivedAcks, $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest, $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse, request, callback); - }, "name", { value: "UnreceivedAcks" }); - - /** - * Calls UnreceivedAcks. - * @function unreceivedAcks - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} request QueryUnreceivedAcksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#nextSequenceReceive}. - * @memberof ibc.core.channel.v1.Query - * @typedef NextSequenceReceiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} [response] QueryNextSequenceReceiveResponse - */ - - /** - * Calls NextSequenceReceive. - * @function nextSequenceReceive - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} request QueryNextSequenceReceiveRequest message or plain object - * @param {ibc.core.channel.v1.Query.NextSequenceReceiveCallback} callback Node-style callback called with the error, if any, and QueryNextSequenceReceiveResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.nextSequenceReceive = function nextSequenceReceive(request, callback) { - return this.rpcCall(nextSequenceReceive, $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, request, callback); - }, "name", { value: "NextSequenceReceive" }); - - /** - * Calls NextSequenceReceive. - * @function nextSequenceReceive - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} request QueryNextSequenceReceiveRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryChannelRequest = (function() { - - /** - * Properties of a QueryChannelRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelRequest - * @property {string|null} [port_id] QueryChannelRequest port_id - * @property {string|null} [channel_id] QueryChannelRequest channel_id - */ - - /** - * Constructs a new QueryChannelRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelRequest. - * @implements IQueryChannelRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelRequest=} [properties] Properties to set - */ - function QueryChannelRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @instance - */ - QueryChannelRequest.prototype.port_id = ""; - - /** - * QueryChannelRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @instance - */ - QueryChannelRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryChannelRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelRequest} message QueryChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryChannelRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelRequest} message QueryChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest - */ - QueryChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelRequest} message QueryChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryChannelRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelRequest; - })(); - - v1.QueryChannelResponse = (function() { - - /** - * Properties of a QueryChannelResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelResponse - * @property {ibc.core.channel.v1.IChannel|null} [channel] QueryChannelResponse channel - * @property {Uint8Array|null} [proof] QueryChannelResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryChannelResponse proof_height - */ - - /** - * Constructs a new QueryChannelResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelResponse. - * @implements IQueryChannelResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelResponse=} [properties] Properties to set - */ - function QueryChannelResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelResponse channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - */ - QueryChannelResponse.prototype.channel = null; - - /** - * QueryChannelResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - */ - QueryChannelResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryChannelResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - */ - QueryChannelResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryChannelResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelResponse} message QueryChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelResponse} message QueryChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse - */ - QueryChannelResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelResponse(); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelResponse.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelResponse} message QueryChannelResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryChannelResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelResponse; - })(); - - v1.QueryChannelsRequest = (function() { - - /** - * Properties of a QueryChannelsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryChannelsRequest pagination - */ - - /** - * Constructs a new QueryChannelsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelsRequest. - * @implements IQueryChannelsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelsRequest=} [properties] Properties to set - */ - function QueryChannelsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @instance - */ - QueryChannelsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelsRequest} message QueryChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelsRequest} message QueryChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest - */ - QueryChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelsRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelsRequest} message QueryChannelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryChannelsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelsRequest; - })(); - - v1.QueryChannelsResponse = (function() { - - /** - * Properties of a QueryChannelsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelsResponse - * @property {Array.|null} [channels] QueryChannelsResponse channels - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryChannelsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryChannelsResponse height - */ - - /** - * Constructs a new QueryChannelsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelsResponse. - * @implements IQueryChannelsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelsResponse=} [properties] Properties to set - */ - function QueryChannelsResponse(properties) { - this.channels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelsResponse channels. - * @member {Array.} channels - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - */ - QueryChannelsResponse.prototype.channels = $util.emptyArray; - - /** - * QueryChannelsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - */ - QueryChannelsResponse.prototype.pagination = null; - - /** - * QueryChannelsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - */ - QueryChannelsResponse.prototype.height = null; - - /** - * Encodes the specified QueryChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelsResponse} message QueryChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelsResponse} message QueryChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse - */ - QueryChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelsResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelsResponse(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.channels: object expected"); - message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelsResponse} message QueryChannelsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.channels = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryChannelsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelsResponse; - })(); - - v1.QueryConnectionChannelsRequest = (function() { - - /** - * Properties of a QueryConnectionChannelsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryConnectionChannelsRequest - * @property {string|null} [connection] QueryConnectionChannelsRequest connection - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConnectionChannelsRequest pagination - */ - - /** - * Constructs a new QueryConnectionChannelsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryConnectionChannelsRequest. - * @implements IQueryConnectionChannelsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest=} [properties] Properties to set - */ - function QueryConnectionChannelsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionChannelsRequest connection. - * @member {string} connection - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @instance - */ - QueryConnectionChannelsRequest.prototype.connection = ""; - - /** - * QueryConnectionChannelsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @instance - */ - QueryConnectionChannelsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConnectionChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} message QueryConnectionChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} message QueryConnectionChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryConnectionChannelsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionChannelsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionChannelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection != null && message.hasOwnProperty("connection")) - if (!$util.isString(message.connection)) - return "connection: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest - */ - QueryConnectionChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryConnectionChannelsRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryConnectionChannelsRequest(); - if (object.connection != null) - message.connection = String(object.connection); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionChannelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {ibc.core.channel.v1.QueryConnectionChannelsRequest} message QueryConnectionChannelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionChannelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connection = ""; - object.pagination = null; - } - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = message.connection; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConnectionChannelsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionChannelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionChannelsRequest; - })(); - - v1.QueryConnectionChannelsResponse = (function() { - - /** - * Properties of a QueryConnectionChannelsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryConnectionChannelsResponse - * @property {Array.|null} [channels] QueryConnectionChannelsResponse channels - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConnectionChannelsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryConnectionChannelsResponse height - */ - - /** - * Constructs a new QueryConnectionChannelsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryConnectionChannelsResponse. - * @implements IQueryConnectionChannelsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse=} [properties] Properties to set - */ - function QueryConnectionChannelsResponse(properties) { - this.channels = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionChannelsResponse channels. - * @member {Array.} channels - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - */ - QueryConnectionChannelsResponse.prototype.channels = $util.emptyArray; - - /** - * QueryConnectionChannelsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - */ - QueryConnectionChannelsResponse.prototype.pagination = null; - - /** - * QueryConnectionChannelsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - */ - QueryConnectionChannelsResponse.prototype.height = null; - - /** - * Encodes the specified QueryConnectionChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} message QueryConnectionChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} message QueryConnectionChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryConnectionChannelsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionChannelsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionChannelsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse - */ - QueryConnectionChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryConnectionChannelsResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryConnectionChannelsResponse(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.channels: object expected"); - message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionChannelsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {ibc.core.channel.v1.QueryConnectionChannelsResponse} message QueryConnectionChannelsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionChannelsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.channels = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryConnectionChannelsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionChannelsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionChannelsResponse; - })(); - - v1.QueryChannelClientStateRequest = (function() { - - /** - * Properties of a QueryChannelClientStateRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelClientStateRequest - * @property {string|null} [port_id] QueryChannelClientStateRequest port_id - * @property {string|null} [channel_id] QueryChannelClientStateRequest channel_id - */ - - /** - * Constructs a new QueryChannelClientStateRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelClientStateRequest. - * @implements IQueryChannelClientStateRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest=} [properties] Properties to set - */ - function QueryChannelClientStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelClientStateRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @instance - */ - QueryChannelClientStateRequest.prototype.port_id = ""; - - /** - * QueryChannelClientStateRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @instance - */ - QueryChannelClientStateRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryChannelClientStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} message QueryChannelClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryChannelClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} message QueryChannelClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelClientStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelClientStateRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryChannelClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest - */ - QueryChannelClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelClientStateRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelClientStateRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryChannelClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelClientStateRequest} message QueryChannelClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelClientStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryChannelClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelClientStateRequest; - })(); - - v1.QueryChannelClientStateResponse = (function() { - - /** - * Properties of a QueryChannelClientStateResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelClientStateResponse - * @property {ibc.core.client.v1.IIdentifiedClientState|null} [identified_client_state] QueryChannelClientStateResponse identified_client_state - * @property {Uint8Array|null} [proof] QueryChannelClientStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryChannelClientStateResponse proof_height - */ - - /** - * Constructs a new QueryChannelClientStateResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelClientStateResponse. - * @implements IQueryChannelClientStateResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse=} [properties] Properties to set - */ - function QueryChannelClientStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelClientStateResponse identified_client_state. - * @member {ibc.core.client.v1.IIdentifiedClientState|null|undefined} identified_client_state - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - */ - QueryChannelClientStateResponse.prototype.identified_client_state = null; - - /** - * QueryChannelClientStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - */ - QueryChannelClientStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryChannelClientStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - */ - QueryChannelClientStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryChannelClientStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} message QueryChannelClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identified_client_state != null && Object.hasOwnProperty.call(message, "identified_client_state")) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.identified_client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} message QueryChannelClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelClientStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelClientStateResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) { - var error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.identified_client_state); - if (error) - return "identified_client_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse - */ - QueryChannelClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelClientStateResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelClientStateResponse(); - if (object.identified_client_state != null) { - if (typeof object.identified_client_state !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelClientStateResponse.identified_client_state: object expected"); - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.identified_client_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelClientStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelClientStateResponse} message QueryChannelClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.identified_client_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) - object.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.identified_client_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryChannelClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelClientStateResponse; - })(); - - v1.QueryChannelConsensusStateRequest = (function() { - - /** - * Properties of a QueryChannelConsensusStateRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelConsensusStateRequest - * @property {string|null} [port_id] QueryChannelConsensusStateRequest port_id - * @property {string|null} [channel_id] QueryChannelConsensusStateRequest channel_id - * @property {Long|null} [revision_number] QueryChannelConsensusStateRequest revision_number - * @property {Long|null} [revision_height] QueryChannelConsensusStateRequest revision_height - */ - - /** - * Constructs a new QueryChannelConsensusStateRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelConsensusStateRequest. - * @implements IQueryChannelConsensusStateRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest=} [properties] Properties to set - */ - function QueryChannelConsensusStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelConsensusStateRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.port_id = ""; - - /** - * QueryChannelConsensusStateRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.channel_id = ""; - - /** - * QueryChannelConsensusStateRequest revision_number. - * @member {Long} revision_number - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryChannelConsensusStateRequest revision_height. - * @member {Long} revision_height - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryChannelConsensusStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified QueryChannelConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.revision_number = reader.uint64(); - break; - case 4: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelConsensusStateRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryChannelConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest - */ - QueryChannelConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryChannelConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelConsensusStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this QueryChannelConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelConsensusStateRequest; - })(); - - v1.QueryChannelConsensusStateResponse = (function() { - - /** - * Properties of a QueryChannelConsensusStateResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelConsensusStateResponse - * @property {google.protobuf.IAny|null} [consensus_state] QueryChannelConsensusStateResponse consensus_state - * @property {string|null} [client_id] QueryChannelConsensusStateResponse client_id - * @property {Uint8Array|null} [proof] QueryChannelConsensusStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryChannelConsensusStateResponse proof_height - */ - - /** - * Constructs a new QueryChannelConsensusStateResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelConsensusStateResponse. - * @implements IQueryChannelConsensusStateResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse=} [properties] Properties to set - */ - function QueryChannelConsensusStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelConsensusStateResponse consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.consensus_state = null; - - /** - * QueryChannelConsensusStateResponse client_id. - * @member {string} client_id - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.client_id = ""; - - /** - * QueryChannelConsensusStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryChannelConsensusStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryChannelConsensusStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.client_id); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelConsensusStateResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse - */ - QueryChannelConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse(); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelConsensusStateResponse.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelConsensusStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.consensus_state = null; - object.client_id = ""; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryChannelConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelConsensusStateResponse; - })(); - - v1.QueryPacketCommitmentRequest = (function() { - - /** - * Properties of a QueryPacketCommitmentRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentRequest - * @property {string|null} [port_id] QueryPacketCommitmentRequest port_id - * @property {string|null} [channel_id] QueryPacketCommitmentRequest channel_id - * @property {Long|null} [sequence] QueryPacketCommitmentRequest sequence - */ - - /** - * Constructs a new QueryPacketCommitmentRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentRequest. - * @implements IQueryPacketCommitmentRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest=} [properties] Properties to set - */ - function QueryPacketCommitmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - */ - QueryPacketCommitmentRequest.prototype.port_id = ""; - - /** - * QueryPacketCommitmentRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - */ - QueryPacketCommitmentRequest.prototype.channel_id = ""; - - /** - * QueryPacketCommitmentRequest sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - */ - QueryPacketCommitmentRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryPacketCommitmentRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} message QueryPacketCommitmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} message QueryPacketCommitmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 QueryPacketCommitmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest - */ - QueryPacketCommitmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketCommitmentRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 QueryPacketCommitmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentRequest} message QueryPacketCommitmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 QueryPacketCommitmentRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentRequest; - })(); - - v1.QueryPacketCommitmentResponse = (function() { - - /** - * Properties of a QueryPacketCommitmentResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentResponse - * @property {Uint8Array|null} [commitment] QueryPacketCommitmentResponse commitment - * @property {Uint8Array|null} [proof] QueryPacketCommitmentResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryPacketCommitmentResponse proof_height - */ - - /** - * Constructs a new QueryPacketCommitmentResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentResponse. - * @implements IQueryPacketCommitmentResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse=} [properties] Properties to set - */ - function QueryPacketCommitmentResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentResponse commitment. - * @member {Uint8Array} commitment - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - */ - QueryPacketCommitmentResponse.prototype.commitment = $util.newBuffer([]); - - /** - * QueryPacketCommitmentResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - */ - QueryPacketCommitmentResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryPacketCommitmentResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - */ - QueryPacketCommitmentResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryPacketCommitmentResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} message QueryPacketCommitmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.commitment); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} message QueryPacketCommitmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitment = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commitment != null && message.hasOwnProperty("commitment")) - if (!(message.commitment && typeof message.commitment.length === "number" || $util.isString(message.commitment))) - return "commitment: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketCommitmentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse - */ - QueryPacketCommitmentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketCommitmentResponse(); - if (object.commitment != null) - if (typeof object.commitment === "string") - $util.base64.decode(object.commitment, message.commitment = $util.newBuffer($util.base64.length(object.commitment)), 0); - else if (object.commitment.length) - message.commitment = object.commitment; - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketCommitmentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentResponse} message QueryPacketCommitmentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.commitment = ""; - else { - object.commitment = []; - if (options.bytes !== Array) - object.commitment = $util.newBuffer(object.commitment); - } - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.commitment != null && message.hasOwnProperty("commitment")) - object.commitment = options.bytes === String ? $util.base64.encode(message.commitment, 0, message.commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.commitment) : message.commitment; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryPacketCommitmentResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentResponse; - })(); - - v1.QueryPacketCommitmentsRequest = (function() { - - /** - * Properties of a QueryPacketCommitmentsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentsRequest - * @property {string|null} [port_id] QueryPacketCommitmentsRequest port_id - * @property {string|null} [channel_id] QueryPacketCommitmentsRequest channel_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryPacketCommitmentsRequest pagination - */ - - /** - * Constructs a new QueryPacketCommitmentsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentsRequest. - * @implements IQueryPacketCommitmentsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest=} [properties] Properties to set - */ - function QueryPacketCommitmentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentsRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - */ - QueryPacketCommitmentsRequest.prototype.port_id = ""; - - /** - * QueryPacketCommitmentsRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - */ - QueryPacketCommitmentsRequest.prototype.channel_id = ""; - - /** - * QueryPacketCommitmentsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - */ - QueryPacketCommitmentsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryPacketCommitmentsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryPacketCommitmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest - */ - QueryPacketCommitmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketCommitmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.pagination = null; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryPacketCommitmentsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentsRequest; - })(); - - v1.QueryPacketCommitmentsResponse = (function() { - - /** - * Properties of a QueryPacketCommitmentsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentsResponse - * @property {Array.|null} [commitments] QueryPacketCommitmentsResponse commitments - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryPacketCommitmentsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryPacketCommitmentsResponse height - */ - - /** - * Constructs a new QueryPacketCommitmentsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentsResponse. - * @implements IQueryPacketCommitmentsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse=} [properties] Properties to set - */ - function QueryPacketCommitmentsResponse(properties) { - this.commitments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentsResponse commitments. - * @member {Array.} commitments - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - */ - QueryPacketCommitmentsResponse.prototype.commitments = $util.emptyArray; - - /** - * QueryPacketCommitmentsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - */ - QueryPacketCommitmentsResponse.prototype.pagination = null; - - /** - * QueryPacketCommitmentsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - */ - QueryPacketCommitmentsResponse.prototype.height = null; - - /** - * Encodes the specified QueryPacketCommitmentsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commitments != null && message.commitments.length) - for (var i = 0; i < message.commitments.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.commitments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.commitments && message.commitments.length)) - message.commitments = []; - message.commitments.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commitments != null && message.hasOwnProperty("commitments")) { - if (!Array.isArray(message.commitments)) - return "commitments: array expected"; - for (var i = 0; i < message.commitments.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketState.verify(message.commitments[i]); - if (error) - return "commitments." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketCommitmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse - */ - QueryPacketCommitmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse(); - if (object.commitments) { - if (!Array.isArray(object.commitments)) - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.commitments: array expected"); - message.commitments = []; - for (var i = 0; i < object.commitments.length; ++i) { - if (typeof object.commitments[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.commitments: object expected"); - message.commitments[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.commitments[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketCommitmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.commitments = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.commitments && message.commitments.length) { - object.commitments = []; - for (var j = 0; j < message.commitments.length; ++j) - object.commitments[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.commitments[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryPacketCommitmentsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentsResponse; - })(); - - v1.QueryPacketReceiptRequest = (function() { - - /** - * Properties of a QueryPacketReceiptRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketReceiptRequest - * @property {string|null} [port_id] QueryPacketReceiptRequest port_id - * @property {string|null} [channel_id] QueryPacketReceiptRequest channel_id - * @property {Long|null} [sequence] QueryPacketReceiptRequest sequence - */ - - /** - * Constructs a new QueryPacketReceiptRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketReceiptRequest. - * @implements IQueryPacketReceiptRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest=} [properties] Properties to set - */ - function QueryPacketReceiptRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketReceiptRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - */ - QueryPacketReceiptRequest.prototype.port_id = ""; - - /** - * QueryPacketReceiptRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - */ - QueryPacketReceiptRequest.prototype.channel_id = ""; - - /** - * QueryPacketReceiptRequest sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - */ - QueryPacketReceiptRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryPacketReceiptRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} message QueryPacketReceiptRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified QueryPacketReceiptRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} message QueryPacketReceiptRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketReceiptRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketReceiptRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketReceiptRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 QueryPacketReceiptRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest - */ - QueryPacketReceiptRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketReceiptRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketReceiptRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 QueryPacketReceiptRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketReceiptRequest} message QueryPacketReceiptRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketReceiptRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 QueryPacketReceiptRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketReceiptRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketReceiptRequest; - })(); - - v1.QueryPacketReceiptResponse = (function() { - - /** - * Properties of a QueryPacketReceiptResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketReceiptResponse - * @property {boolean|null} [received] QueryPacketReceiptResponse received - * @property {Uint8Array|null} [proof] QueryPacketReceiptResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryPacketReceiptResponse proof_height - */ - - /** - * Constructs a new QueryPacketReceiptResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketReceiptResponse. - * @implements IQueryPacketReceiptResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse=} [properties] Properties to set - */ - function QueryPacketReceiptResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketReceiptResponse received. - * @member {boolean} received - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - */ - QueryPacketReceiptResponse.prototype.received = false; - - /** - * QueryPacketReceiptResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - */ - QueryPacketReceiptResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryPacketReceiptResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - */ - QueryPacketReceiptResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryPacketReceiptResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} message QueryPacketReceiptResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.received != null && Object.hasOwnProperty.call(message, "received")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.received); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketReceiptResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} message QueryPacketReceiptResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketReceiptResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.received = reader.bool(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketReceiptResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketReceiptResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.received != null && message.hasOwnProperty("received")) - if (typeof message.received !== "boolean") - return "received: boolean expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketReceiptResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse - */ - QueryPacketReceiptResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketReceiptResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketReceiptResponse(); - if (object.received != null) - message.received = Boolean(object.received); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketReceiptResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketReceiptResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketReceiptResponse} message QueryPacketReceiptResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketReceiptResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.received = false; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.received != null && message.hasOwnProperty("received")) - object.received = message.received; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryPacketReceiptResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketReceiptResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketReceiptResponse; - })(); - - v1.QueryPacketAcknowledgementRequest = (function() { - - /** - * Properties of a QueryPacketAcknowledgementRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementRequest - * @property {string|null} [port_id] QueryPacketAcknowledgementRequest port_id - * @property {string|null} [channel_id] QueryPacketAcknowledgementRequest channel_id - * @property {Long|null} [sequence] QueryPacketAcknowledgementRequest sequence - */ - - /** - * Constructs a new QueryPacketAcknowledgementRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementRequest. - * @implements IQueryPacketAcknowledgementRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest=} [properties] Properties to set - */ - function QueryPacketAcknowledgementRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - */ - QueryPacketAcknowledgementRequest.prototype.port_id = ""; - - /** - * QueryPacketAcknowledgementRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - */ - QueryPacketAcknowledgementRequest.prototype.channel_id = ""; - - /** - * QueryPacketAcknowledgementRequest sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - */ - QueryPacketAcknowledgementRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryPacketAcknowledgementRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 QueryPacketAcknowledgementRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest - */ - QueryPacketAcknowledgementRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 QueryPacketAcknowledgementRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 QueryPacketAcknowledgementRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementRequest; - })(); - - v1.QueryPacketAcknowledgementResponse = (function() { - - /** - * Properties of a QueryPacketAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementResponse - * @property {Uint8Array|null} [acknowledgement] QueryPacketAcknowledgementResponse acknowledgement - * @property {Uint8Array|null} [proof] QueryPacketAcknowledgementResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryPacketAcknowledgementResponse proof_height - */ - - /** - * Constructs a new QueryPacketAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementResponse. - * @implements IQueryPacketAcknowledgementResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse=} [properties] Properties to set - */ - function QueryPacketAcknowledgementResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementResponse acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - */ - QueryPacketAcknowledgementResponse.prototype.acknowledgement = $util.newBuffer([]); - - /** - * QueryPacketAcknowledgementResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - */ - QueryPacketAcknowledgementResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryPacketAcknowledgementResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - */ - QueryPacketAcknowledgementResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryPacketAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.acknowledgement); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgement = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse - */ - QueryPacketAcknowledgementResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse(); - 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 === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketAcknowledgementResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.acknowledgement = ""; - else { - object.acknowledgement = []; - if (options.bytes !== Array) - object.acknowledgement = $util.newBuffer(object.acknowledgement); - } - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - 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 = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryPacketAcknowledgementResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementResponse; - })(); - - v1.QueryPacketAcknowledgementsRequest = (function() { - - /** - * Properties of a QueryPacketAcknowledgementsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementsRequest - * @property {string|null} [port_id] QueryPacketAcknowledgementsRequest port_id - * @property {string|null} [channel_id] QueryPacketAcknowledgementsRequest channel_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryPacketAcknowledgementsRequest pagination - * @property {Array.|null} [packet_commitment_sequences] QueryPacketAcknowledgementsRequest packet_commitment_sequences - */ - - /** - * Constructs a new QueryPacketAcknowledgementsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementsRequest. - * @implements IQueryPacketAcknowledgementsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest=} [properties] Properties to set - */ - function QueryPacketAcknowledgementsRequest(properties) { - this.packet_commitment_sequences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementsRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.port_id = ""; - - /** - * QueryPacketAcknowledgementsRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.channel_id = ""; - - /** - * QueryPacketAcknowledgementsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.pagination = null; - - /** - * QueryPacketAcknowledgementsRequest packet_commitment_sequences. - * @member {Array.} packet_commitment_sequences - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.packet_commitment_sequences = $util.emptyArray; - - /** - * Encodes the specified QueryPacketAcknowledgementsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.packet_commitment_sequences != null && message.packet_commitment_sequences.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.packet_commitment_sequences.length; ++i) - writer.uint64(message.packet_commitment_sequences[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.packet_commitment_sequences && message.packet_commitment_sequences.length)) - message.packet_commitment_sequences = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.packet_commitment_sequences.push(reader.uint64()); - } else - message.packet_commitment_sequences.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.packet_commitment_sequences != null && message.hasOwnProperty("packet_commitment_sequences")) { - if (!Array.isArray(message.packet_commitment_sequences)) - return "packet_commitment_sequences: array expected"; - for (var i = 0; i < message.packet_commitment_sequences.length; ++i) - if (!$util.isInteger(message.packet_commitment_sequences[i]) && !(message.packet_commitment_sequences[i] && $util.isInteger(message.packet_commitment_sequences[i].low) && $util.isInteger(message.packet_commitment_sequences[i].high))) - return "packet_commitment_sequences: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a QueryPacketAcknowledgementsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest - */ - QueryPacketAcknowledgementsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.packet_commitment_sequences) { - if (!Array.isArray(object.packet_commitment_sequences)) - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.packet_commitment_sequences: array expected"); - message.packet_commitment_sequences = []; - for (var i = 0; i < object.packet_commitment_sequences.length; ++i) - if ($util.Long) - (message.packet_commitment_sequences[i] = $util.Long.fromValue(object.packet_commitment_sequences[i])).unsigned = true; - else if (typeof object.packet_commitment_sequences[i] === "string") - message.packet_commitment_sequences[i] = parseInt(object.packet_commitment_sequences[i], 10); - else if (typeof object.packet_commitment_sequences[i] === "number") - message.packet_commitment_sequences[i] = object.packet_commitment_sequences[i]; - else if (typeof object.packet_commitment_sequences[i] === "object") - message.packet_commitment_sequences[i] = new $util.LongBits(object.packet_commitment_sequences[i].low >>> 0, object.packet_commitment_sequences[i].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketAcknowledgementsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packet_commitment_sequences = []; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.pagination = null; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.packet_commitment_sequences && message.packet_commitment_sequences.length) { - object.packet_commitment_sequences = []; - for (var j = 0; j < message.packet_commitment_sequences.length; ++j) - if (typeof message.packet_commitment_sequences[j] === "number") - object.packet_commitment_sequences[j] = options.longs === String ? String(message.packet_commitment_sequences[j]) : message.packet_commitment_sequences[j]; - else - object.packet_commitment_sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packet_commitment_sequences[j]) : options.longs === Number ? new $util.LongBits(message.packet_commitment_sequences[j].low >>> 0, message.packet_commitment_sequences[j].high >>> 0).toNumber(true) : message.packet_commitment_sequences[j]; - } - return object; - }; - - /** - * Converts this QueryPacketAcknowledgementsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementsRequest; - })(); - - v1.QueryPacketAcknowledgementsResponse = (function() { - - /** - * Properties of a QueryPacketAcknowledgementsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementsResponse - * @property {Array.|null} [acknowledgements] QueryPacketAcknowledgementsResponse acknowledgements - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryPacketAcknowledgementsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryPacketAcknowledgementsResponse height - */ - - /** - * Constructs a new QueryPacketAcknowledgementsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementsResponse. - * @implements IQueryPacketAcknowledgementsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse=} [properties] Properties to set - */ - function QueryPacketAcknowledgementsResponse(properties) { - this.acknowledgements = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementsResponse acknowledgements. - * @member {Array.} acknowledgements - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - */ - QueryPacketAcknowledgementsResponse.prototype.acknowledgements = $util.emptyArray; - - /** - * QueryPacketAcknowledgementsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - */ - QueryPacketAcknowledgementsResponse.prototype.pagination = null; - - /** - * QueryPacketAcknowledgementsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - */ - QueryPacketAcknowledgementsResponse.prototype.height = null; - - /** - * Encodes the specified QueryPacketAcknowledgementsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acknowledgements != null && message.acknowledgements.length) - for (var i = 0; i < message.acknowledgements.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.acknowledgements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.acknowledgements && message.acknowledgements.length)) - message.acknowledgements = []; - message.acknowledgements.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.acknowledgements != null && message.hasOwnProperty("acknowledgements")) { - if (!Array.isArray(message.acknowledgements)) - return "acknowledgements: array expected"; - for (var i = 0; i < message.acknowledgements.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketState.verify(message.acknowledgements[i]); - if (error) - return "acknowledgements." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketAcknowledgementsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse - */ - QueryPacketAcknowledgementsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse(); - if (object.acknowledgements) { - if (!Array.isArray(object.acknowledgements)) - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.acknowledgements: array expected"); - message.acknowledgements = []; - for (var i = 0; i < object.acknowledgements.length; ++i) { - if (typeof object.acknowledgements[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.acknowledgements: object expected"); - message.acknowledgements[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.acknowledgements[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketAcknowledgementsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.acknowledgements = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.acknowledgements && message.acknowledgements.length) { - object.acknowledgements = []; - for (var j = 0; j < message.acknowledgements.length; ++j) - object.acknowledgements[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.acknowledgements[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryPacketAcknowledgementsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementsResponse; - })(); - - v1.QueryUnreceivedPacketsRequest = (function() { - - /** - * Properties of a QueryUnreceivedPacketsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedPacketsRequest - * @property {string|null} [port_id] QueryUnreceivedPacketsRequest port_id - * @property {string|null} [channel_id] QueryUnreceivedPacketsRequest channel_id - * @property {Array.|null} [packet_commitment_sequences] QueryUnreceivedPacketsRequest packet_commitment_sequences - */ - - /** - * Constructs a new QueryUnreceivedPacketsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedPacketsRequest. - * @implements IQueryUnreceivedPacketsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest=} [properties] Properties to set - */ - function QueryUnreceivedPacketsRequest(properties) { - this.packet_commitment_sequences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedPacketsRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - */ - QueryUnreceivedPacketsRequest.prototype.port_id = ""; - - /** - * QueryUnreceivedPacketsRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - */ - QueryUnreceivedPacketsRequest.prototype.channel_id = ""; - - /** - * QueryUnreceivedPacketsRequest packet_commitment_sequences. - * @member {Array.} packet_commitment_sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - */ - QueryUnreceivedPacketsRequest.prototype.packet_commitment_sequences = $util.emptyArray; - - /** - * Encodes the specified QueryUnreceivedPacketsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.packet_commitment_sequences != null && message.packet_commitment_sequences.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.packet_commitment_sequences.length; ++i) - writer.uint64(message.packet_commitment_sequences[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedPacketsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - if (!(message.packet_commitment_sequences && message.packet_commitment_sequences.length)) - message.packet_commitment_sequences = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.packet_commitment_sequences.push(reader.uint64()); - } else - message.packet_commitment_sequences.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedPacketsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedPacketsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.packet_commitment_sequences != null && message.hasOwnProperty("packet_commitment_sequences")) { - if (!Array.isArray(message.packet_commitment_sequences)) - return "packet_commitment_sequences: array expected"; - for (var i = 0; i < message.packet_commitment_sequences.length; ++i) - if (!$util.isInteger(message.packet_commitment_sequences[i]) && !(message.packet_commitment_sequences[i] && $util.isInteger(message.packet_commitment_sequences[i].low) && $util.isInteger(message.packet_commitment_sequences[i].high))) - return "packet_commitment_sequences: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a QueryUnreceivedPacketsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest - */ - QueryUnreceivedPacketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.packet_commitment_sequences) { - if (!Array.isArray(object.packet_commitment_sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences: array expected"); - message.packet_commitment_sequences = []; - for (var i = 0; i < object.packet_commitment_sequences.length; ++i) - if ($util.Long) - (message.packet_commitment_sequences[i] = $util.Long.fromValue(object.packet_commitment_sequences[i])).unsigned = true; - else if (typeof object.packet_commitment_sequences[i] === "string") - message.packet_commitment_sequences[i] = parseInt(object.packet_commitment_sequences[i], 10); - else if (typeof object.packet_commitment_sequences[i] === "number") - message.packet_commitment_sequences[i] = object.packet_commitment_sequences[i]; - else if (typeof object.packet_commitment_sequences[i] === "object") - message.packet_commitment_sequences[i] = new $util.LongBits(object.packet_commitment_sequences[i].low >>> 0, object.packet_commitment_sequences[i].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedPacketsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedPacketsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packet_commitment_sequences = []; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.packet_commitment_sequences && message.packet_commitment_sequences.length) { - object.packet_commitment_sequences = []; - for (var j = 0; j < message.packet_commitment_sequences.length; ++j) - if (typeof message.packet_commitment_sequences[j] === "number") - object.packet_commitment_sequences[j] = options.longs === String ? String(message.packet_commitment_sequences[j]) : message.packet_commitment_sequences[j]; - else - object.packet_commitment_sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packet_commitment_sequences[j]) : options.longs === Number ? new $util.LongBits(message.packet_commitment_sequences[j].low >>> 0, message.packet_commitment_sequences[j].high >>> 0).toNumber(true) : message.packet_commitment_sequences[j]; - } - return object; - }; - - /** - * Converts this QueryUnreceivedPacketsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedPacketsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedPacketsRequest; - })(); - - v1.QueryUnreceivedPacketsResponse = (function() { - - /** - * Properties of a QueryUnreceivedPacketsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedPacketsResponse - * @property {Array.|null} [sequences] QueryUnreceivedPacketsResponse sequences - * @property {ibc.core.client.v1.IHeight|null} [height] QueryUnreceivedPacketsResponse height - */ - - /** - * Constructs a new QueryUnreceivedPacketsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedPacketsResponse. - * @implements IQueryUnreceivedPacketsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse=} [properties] Properties to set - */ - function QueryUnreceivedPacketsResponse(properties) { - this.sequences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedPacketsResponse sequences. - * @member {Array.} sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @instance - */ - QueryUnreceivedPacketsResponse.prototype.sequences = $util.emptyArray; - - /** - * QueryUnreceivedPacketsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @instance - */ - QueryUnreceivedPacketsResponse.prototype.height = null; - - /** - * Encodes the specified QueryUnreceivedPacketsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequences != null && message.sequences.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.sequences.length; ++i) - writer.uint64(message.sequences[i]); - writer.ldelim(); - } - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedPacketsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sequences && message.sequences.length)) - message.sequences = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sequences.push(reader.uint64()); - } else - message.sequences.push(reader.uint64()); - break; - case 2: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedPacketsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedPacketsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequences != null && message.hasOwnProperty("sequences")) { - if (!Array.isArray(message.sequences)) - return "sequences: array expected"; - for (var i = 0; i < message.sequences.length; ++i) - if (!$util.isInteger(message.sequences[i]) && !(message.sequences[i] && $util.isInteger(message.sequences[i].low) && $util.isInteger(message.sequences[i].high))) - return "sequences: integer|Long[] expected"; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryUnreceivedPacketsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse - */ - QueryUnreceivedPacketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse(); - if (object.sequences) { - if (!Array.isArray(object.sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsResponse.sequences: array expected"); - message.sequences = []; - for (var i = 0; i < object.sequences.length; ++i) - if ($util.Long) - (message.sequences[i] = $util.Long.fromValue(object.sequences[i])).unsigned = true; - else if (typeof object.sequences[i] === "string") - message.sequences[i] = parseInt(object.sequences[i], 10); - else if (typeof object.sequences[i] === "number") - message.sequences[i] = object.sequences[i]; - else if (typeof object.sequences[i] === "object") - message.sequences[i] = new $util.LongBits(object.sequences[i].low >>> 0, object.sequences[i].high >>> 0).toNumber(true); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedPacketsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedPacketsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sequences = []; - if (options.defaults) - object.height = null; - if (message.sequences && message.sequences.length) { - object.sequences = []; - for (var j = 0; j < message.sequences.length; ++j) - if (typeof message.sequences[j] === "number") - object.sequences[j] = options.longs === String ? String(message.sequences[j]) : message.sequences[j]; - else - object.sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.sequences[j]) : options.longs === Number ? new $util.LongBits(message.sequences[j].low >>> 0, message.sequences[j].high >>> 0).toNumber(true) : message.sequences[j]; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryUnreceivedPacketsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedPacketsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedPacketsResponse; - })(); - - v1.QueryUnreceivedAcksRequest = (function() { - - /** - * Properties of a QueryUnreceivedAcksRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedAcksRequest - * @property {string|null} [port_id] QueryUnreceivedAcksRequest port_id - * @property {string|null} [channel_id] QueryUnreceivedAcksRequest channel_id - * @property {Array.|null} [packet_ack_sequences] QueryUnreceivedAcksRequest packet_ack_sequences - */ - - /** - * Constructs a new QueryUnreceivedAcksRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedAcksRequest. - * @implements IQueryUnreceivedAcksRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest=} [properties] Properties to set - */ - function QueryUnreceivedAcksRequest(properties) { - this.packet_ack_sequences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedAcksRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - */ - QueryUnreceivedAcksRequest.prototype.port_id = ""; - - /** - * QueryUnreceivedAcksRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - */ - QueryUnreceivedAcksRequest.prototype.channel_id = ""; - - /** - * QueryUnreceivedAcksRequest packet_ack_sequences. - * @member {Array.} packet_ack_sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - */ - QueryUnreceivedAcksRequest.prototype.packet_ack_sequences = $util.emptyArray; - - /** - * Encodes the specified QueryUnreceivedAcksRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.packet_ack_sequences != null && message.packet_ack_sequences.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.packet_ack_sequences.length; ++i) - writer.uint64(message.packet_ack_sequences[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedAcksRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - if (!(message.packet_ack_sequences && message.packet_ack_sequences.length)) - message.packet_ack_sequences = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.packet_ack_sequences.push(reader.uint64()); - } else - message.packet_ack_sequences.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedAcksRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedAcksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.packet_ack_sequences != null && message.hasOwnProperty("packet_ack_sequences")) { - if (!Array.isArray(message.packet_ack_sequences)) - return "packet_ack_sequences: array expected"; - for (var i = 0; i < message.packet_ack_sequences.length; ++i) - if (!$util.isInteger(message.packet_ack_sequences[i]) && !(message.packet_ack_sequences[i] && $util.isInteger(message.packet_ack_sequences[i].low) && $util.isInteger(message.packet_ack_sequences[i].high))) - return "packet_ack_sequences: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a QueryUnreceivedAcksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest - */ - QueryUnreceivedAcksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.packet_ack_sequences) { - if (!Array.isArray(object.packet_ack_sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksRequest.packet_ack_sequences: array expected"); - message.packet_ack_sequences = []; - for (var i = 0; i < object.packet_ack_sequences.length; ++i) - if ($util.Long) - (message.packet_ack_sequences[i] = $util.Long.fromValue(object.packet_ack_sequences[i])).unsigned = true; - else if (typeof object.packet_ack_sequences[i] === "string") - message.packet_ack_sequences[i] = parseInt(object.packet_ack_sequences[i], 10); - else if (typeof object.packet_ack_sequences[i] === "number") - message.packet_ack_sequences[i] = object.packet_ack_sequences[i]; - else if (typeof object.packet_ack_sequences[i] === "object") - message.packet_ack_sequences[i] = new $util.LongBits(object.packet_ack_sequences[i].low >>> 0, object.packet_ack_sequences[i].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedAcksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedAcksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.packet_ack_sequences = []; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.packet_ack_sequences && message.packet_ack_sequences.length) { - object.packet_ack_sequences = []; - for (var j = 0; j < message.packet_ack_sequences.length; ++j) - if (typeof message.packet_ack_sequences[j] === "number") - object.packet_ack_sequences[j] = options.longs === String ? String(message.packet_ack_sequences[j]) : message.packet_ack_sequences[j]; - else - object.packet_ack_sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packet_ack_sequences[j]) : options.longs === Number ? new $util.LongBits(message.packet_ack_sequences[j].low >>> 0, message.packet_ack_sequences[j].high >>> 0).toNumber(true) : message.packet_ack_sequences[j]; - } - return object; - }; - - /** - * Converts this QueryUnreceivedAcksRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedAcksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedAcksRequest; - })(); - - v1.QueryUnreceivedAcksResponse = (function() { - - /** - * Properties of a QueryUnreceivedAcksResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedAcksResponse - * @property {Array.|null} [sequences] QueryUnreceivedAcksResponse sequences - * @property {ibc.core.client.v1.IHeight|null} [height] QueryUnreceivedAcksResponse height - */ - - /** - * Constructs a new QueryUnreceivedAcksResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedAcksResponse. - * @implements IQueryUnreceivedAcksResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse=} [properties] Properties to set - */ - function QueryUnreceivedAcksResponse(properties) { - this.sequences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedAcksResponse sequences. - * @member {Array.} sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @instance - */ - QueryUnreceivedAcksResponse.prototype.sequences = $util.emptyArray; - - /** - * QueryUnreceivedAcksResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @instance - */ - QueryUnreceivedAcksResponse.prototype.height = null; - - /** - * Encodes the specified QueryUnreceivedAcksResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequences != null && message.sequences.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.sequences.length; ++i) - writer.uint64(message.sequences[i]); - writer.ldelim(); - } - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedAcksResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sequences && message.sequences.length)) - message.sequences = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sequences.push(reader.uint64()); - } else - message.sequences.push(reader.uint64()); - break; - case 2: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedAcksResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedAcksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequences != null && message.hasOwnProperty("sequences")) { - if (!Array.isArray(message.sequences)) - return "sequences: array expected"; - for (var i = 0; i < message.sequences.length; ++i) - if (!$util.isInteger(message.sequences[i]) && !(message.sequences[i] && $util.isInteger(message.sequences[i].low) && $util.isInteger(message.sequences[i].high))) - return "sequences: integer|Long[] expected"; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryUnreceivedAcksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse - */ - QueryUnreceivedAcksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse(); - if (object.sequences) { - if (!Array.isArray(object.sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksResponse.sequences: array expected"); - message.sequences = []; - for (var i = 0; i < object.sequences.length; ++i) - if ($util.Long) - (message.sequences[i] = $util.Long.fromValue(object.sequences[i])).unsigned = true; - else if (typeof object.sequences[i] === "string") - message.sequences[i] = parseInt(object.sequences[i], 10); - else if (typeof object.sequences[i] === "number") - message.sequences[i] = object.sequences[i]; - else if (typeof object.sequences[i] === "object") - message.sequences[i] = new $util.LongBits(object.sequences[i].low >>> 0, object.sequences[i].high >>> 0).toNumber(true); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedAcksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedAcksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sequences = []; - if (options.defaults) - object.height = null; - if (message.sequences && message.sequences.length) { - object.sequences = []; - for (var j = 0; j < message.sequences.length; ++j) - if (typeof message.sequences[j] === "number") - object.sequences[j] = options.longs === String ? String(message.sequences[j]) : message.sequences[j]; - else - object.sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.sequences[j]) : options.longs === Number ? new $util.LongBits(message.sequences[j].low >>> 0, message.sequences[j].high >>> 0).toNumber(true) : message.sequences[j]; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryUnreceivedAcksResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedAcksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedAcksResponse; - })(); - - v1.QueryNextSequenceReceiveRequest = (function() { - - /** - * Properties of a QueryNextSequenceReceiveRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryNextSequenceReceiveRequest - * @property {string|null} [port_id] QueryNextSequenceReceiveRequest port_id - * @property {string|null} [channel_id] QueryNextSequenceReceiveRequest channel_id - */ - - /** - * Constructs a new QueryNextSequenceReceiveRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryNextSequenceReceiveRequest. - * @implements IQueryNextSequenceReceiveRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest=} [properties] Properties to set - */ - function QueryNextSequenceReceiveRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryNextSequenceReceiveRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @instance - */ - QueryNextSequenceReceiveRequest.prototype.port_id = ""; - - /** - * QueryNextSequenceReceiveRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @instance - */ - QueryNextSequenceReceiveRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryNextSequenceReceiveRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryNextSequenceReceiveRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryNextSequenceReceiveRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryNextSequenceReceiveRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryNextSequenceReceiveRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest - */ - QueryNextSequenceReceiveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest) - return object; - var message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryNextSequenceReceiveRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryNextSequenceReceiveRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryNextSequenceReceiveRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @instance - * @returns {Object.} JSON object - */ - QueryNextSequenceReceiveRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryNextSequenceReceiveRequest; - })(); - - v1.QueryNextSequenceReceiveResponse = (function() { - - /** - * Properties of a QueryNextSequenceReceiveResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryNextSequenceReceiveResponse - * @property {Long|null} [next_sequence_receive] QueryNextSequenceReceiveResponse next_sequence_receive - * @property {Uint8Array|null} [proof] QueryNextSequenceReceiveResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryNextSequenceReceiveResponse proof_height - */ - - /** - * Constructs a new QueryNextSequenceReceiveResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryNextSequenceReceiveResponse. - * @implements IQueryNextSequenceReceiveResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse=} [properties] Properties to set - */ - function QueryNextSequenceReceiveResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryNextSequenceReceiveResponse next_sequence_receive. - * @member {Long} next_sequence_receive - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - */ - QueryNextSequenceReceiveResponse.prototype.next_sequence_receive = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryNextSequenceReceiveResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - */ - QueryNextSequenceReceiveResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryNextSequenceReceiveResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - */ - QueryNextSequenceReceiveResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryNextSequenceReceiveResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.next_sequence_receive != null && Object.hasOwnProperty.call(message, "next_sequence_receive")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.next_sequence_receive); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryNextSequenceReceiveResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_sequence_receive = reader.uint64(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryNextSequenceReceiveResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryNextSequenceReceiveResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.next_sequence_receive != null && message.hasOwnProperty("next_sequence_receive")) - if (!$util.isInteger(message.next_sequence_receive) && !(message.next_sequence_receive && $util.isInteger(message.next_sequence_receive.low) && $util.isInteger(message.next_sequence_receive.high))) - return "next_sequence_receive: integer|Long expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryNextSequenceReceiveResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse - */ - QueryNextSequenceReceiveResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse) - return object; - var message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse(); - if (object.next_sequence_receive != null) - if ($util.Long) - (message.next_sequence_receive = $util.Long.fromValue(object.next_sequence_receive)).unsigned = true; - else if (typeof object.next_sequence_receive === "string") - message.next_sequence_receive = parseInt(object.next_sequence_receive, 10); - else if (typeof object.next_sequence_receive === "number") - message.next_sequence_receive = object.next_sequence_receive; - else if (typeof object.next_sequence_receive === "object") - message.next_sequence_receive = new $util.LongBits(object.next_sequence_receive.low >>> 0, object.next_sequence_receive.high >>> 0).toNumber(true); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryNextSequenceReceiveResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryNextSequenceReceiveResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryNextSequenceReceiveResponse.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.next_sequence_receive = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_sequence_receive = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.next_sequence_receive != null && message.hasOwnProperty("next_sequence_receive")) - if (typeof message.next_sequence_receive === "number") - object.next_sequence_receive = options.longs === String ? String(message.next_sequence_receive) : message.next_sequence_receive; - else - object.next_sequence_receive = options.longs === String ? $util.Long.prototype.toString.call(message.next_sequence_receive) : options.longs === Number ? new $util.LongBits(message.next_sequence_receive.low >>> 0, message.next_sequence_receive.high >>> 0).toNumber(true) : message.next_sequence_receive; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryNextSequenceReceiveResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - * @returns {Object.} JSON object - */ - QueryNextSequenceReceiveResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryNextSequenceReceiveResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.channel.v1 - * @interface IGenesisState - * @property {Array.|null} [channels] GenesisState channels - * @property {Array.|null} [acknowledgements] GenesisState acknowledgements - * @property {Array.|null} [commitments] GenesisState commitments - * @property {Array.|null} [receipts] GenesisState receipts - * @property {Array.|null} [send_sequences] GenesisState send_sequences - * @property {Array.|null} [recv_sequences] GenesisState recv_sequences - * @property {Array.|null} [ack_sequences] GenesisState ack_sequences - * @property {Long|null} [next_channel_sequence] GenesisState next_channel_sequence - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.channel.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.channels = []; - this.acknowledgements = []; - this.commitments = []; - this.receipts = []; - this.send_sequences = []; - this.recv_sequences = []; - this.ack_sequences = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState channels. - * @member {Array.} channels - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.channels = $util.emptyArray; - - /** - * GenesisState acknowledgements. - * @member {Array.} acknowledgements - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.acknowledgements = $util.emptyArray; - - /** - * GenesisState commitments. - * @member {Array.} commitments - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.commitments = $util.emptyArray; - - /** - * GenesisState receipts. - * @member {Array.} receipts - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.receipts = $util.emptyArray; - - /** - * GenesisState send_sequences. - * @member {Array.} send_sequences - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.send_sequences = $util.emptyArray; - - /** - * GenesisState recv_sequences. - * @member {Array.} recv_sequences - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.recv_sequences = $util.emptyArray; - - /** - * GenesisState ack_sequences. - * @member {Array.} ack_sequences - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.ack_sequences = $util.emptyArray; - - /** - * GenesisState next_channel_sequence. - * @member {Long} next_channel_sequence - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.next_channel_sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {ibc.core.channel.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (var i = 0; i < message.channels.length; ++i) - $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.acknowledgements != null && message.acknowledgements.length) - for (var i = 0; i < message.acknowledgements.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.acknowledgements[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.commitments != null && message.commitments.length) - for (var i = 0; i < message.commitments.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.commitments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.receipts != null && message.receipts.length) - for (var i = 0; i < message.receipts.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.receipts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.send_sequences != null && message.send_sequences.length) - for (var i = 0; i < message.send_sequences.length; ++i) - $root.ibc.core.channel.v1.PacketSequence.encode(message.send_sequences[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.recv_sequences != null && message.recv_sequences.length) - for (var i = 0; i < message.recv_sequences.length; ++i) - $root.ibc.core.channel.v1.PacketSequence.encode(message.recv_sequences[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.ack_sequences != null && message.ack_sequences.length) - for (var i = 0; i < message.ack_sequences.length; ++i) - $root.ibc.core.channel.v1.PacketSequence.encode(message.ack_sequences[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.next_channel_sequence != null && Object.hasOwnProperty.call(message, "next_channel_sequence")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.next_channel_sequence); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {ibc.core.channel.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.acknowledgements && message.acknowledgements.length)) - message.acknowledgements = []; - message.acknowledgements.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.commitments && message.commitments.length)) - message.commitments = []; - message.commitments.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.receipts && message.receipts.length)) - message.receipts = []; - message.receipts.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.send_sequences && message.send_sequences.length)) - message.send_sequences = []; - message.send_sequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.recv_sequences && message.recv_sequences.length)) - message.recv_sequences = []; - message.recv_sequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.ack_sequences && message.ack_sequences.length)) - message.ack_sequences = []; - message.ack_sequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); - break; - case 8: - message.next_channel_sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (var i = 0; i < message.channels.length; ++i) { - var error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.acknowledgements != null && message.hasOwnProperty("acknowledgements")) { - if (!Array.isArray(message.acknowledgements)) - return "acknowledgements: array expected"; - for (var i = 0; i < message.acknowledgements.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketState.verify(message.acknowledgements[i]); - if (error) - return "acknowledgements." + error; - } - } - if (message.commitments != null && message.hasOwnProperty("commitments")) { - if (!Array.isArray(message.commitments)) - return "commitments: array expected"; - for (var i = 0; i < message.commitments.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketState.verify(message.commitments[i]); - if (error) - return "commitments." + error; - } - } - if (message.receipts != null && message.hasOwnProperty("receipts")) { - if (!Array.isArray(message.receipts)) - return "receipts: array expected"; - for (var i = 0; i < message.receipts.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketState.verify(message.receipts[i]); - if (error) - return "receipts." + error; - } - } - if (message.send_sequences != null && message.hasOwnProperty("send_sequences")) { - if (!Array.isArray(message.send_sequences)) - return "send_sequences: array expected"; - for (var i = 0; i < message.send_sequences.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketSequence.verify(message.send_sequences[i]); - if (error) - return "send_sequences." + error; - } - } - if (message.recv_sequences != null && message.hasOwnProperty("recv_sequences")) { - if (!Array.isArray(message.recv_sequences)) - return "recv_sequences: array expected"; - for (var i = 0; i < message.recv_sequences.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketSequence.verify(message.recv_sequences[i]); - if (error) - return "recv_sequences." + error; - } - } - if (message.ack_sequences != null && message.hasOwnProperty("ack_sequences")) { - if (!Array.isArray(message.ack_sequences)) - return "ack_sequences: array expected"; - for (var i = 0; i < message.ack_sequences.length; ++i) { - var error = $root.ibc.core.channel.v1.PacketSequence.verify(message.ack_sequences[i]); - if (error) - return "ack_sequences." + error; - } - } - if (message.next_channel_sequence != null && message.hasOwnProperty("next_channel_sequence")) - if (!$util.isInteger(message.next_channel_sequence) && !(message.next_channel_sequence && $util.isInteger(message.next_channel_sequence.low) && $util.isInteger(message.next_channel_sequence.high))) - return "next_channel_sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.GenesisState) - return object; - var message = new $root.ibc.core.channel.v1.GenesisState(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".ibc.core.channel.v1.GenesisState.channels: array expected"); - message.channels = []; - for (var i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.channels: object expected"); - message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); - } - } - if (object.acknowledgements) { - if (!Array.isArray(object.acknowledgements)) - throw TypeError(".ibc.core.channel.v1.GenesisState.acknowledgements: array expected"); - message.acknowledgements = []; - for (var i = 0; i < object.acknowledgements.length; ++i) { - if (typeof object.acknowledgements[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.acknowledgements: object expected"); - message.acknowledgements[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.acknowledgements[i]); - } - } - if (object.commitments) { - if (!Array.isArray(object.commitments)) - throw TypeError(".ibc.core.channel.v1.GenesisState.commitments: array expected"); - message.commitments = []; - for (var i = 0; i < object.commitments.length; ++i) { - if (typeof object.commitments[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.commitments: object expected"); - message.commitments[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.commitments[i]); - } - } - if (object.receipts) { - if (!Array.isArray(object.receipts)) - throw TypeError(".ibc.core.channel.v1.GenesisState.receipts: array expected"); - message.receipts = []; - for (var i = 0; i < object.receipts.length; ++i) { - if (typeof object.receipts[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.receipts: object expected"); - message.receipts[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.receipts[i]); - } - } - if (object.send_sequences) { - if (!Array.isArray(object.send_sequences)) - throw TypeError(".ibc.core.channel.v1.GenesisState.send_sequences: array expected"); - message.send_sequences = []; - for (var i = 0; i < object.send_sequences.length; ++i) { - if (typeof object.send_sequences[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.send_sequences: object expected"); - message.send_sequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.send_sequences[i]); - } - } - if (object.recv_sequences) { - if (!Array.isArray(object.recv_sequences)) - throw TypeError(".ibc.core.channel.v1.GenesisState.recv_sequences: array expected"); - message.recv_sequences = []; - for (var i = 0; i < object.recv_sequences.length; ++i) { - if (typeof object.recv_sequences[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.recv_sequences: object expected"); - message.recv_sequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.recv_sequences[i]); - } - } - if (object.ack_sequences) { - if (!Array.isArray(object.ack_sequences)) - throw TypeError(".ibc.core.channel.v1.GenesisState.ack_sequences: array expected"); - message.ack_sequences = []; - for (var i = 0; i < object.ack_sequences.length; ++i) { - if (typeof object.ack_sequences[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.ack_sequences: object expected"); - message.ack_sequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.ack_sequences[i]); - } - } - if (object.next_channel_sequence != null) - if ($util.Long) - (message.next_channel_sequence = $util.Long.fromValue(object.next_channel_sequence)).unsigned = true; - else if (typeof object.next_channel_sequence === "string") - message.next_channel_sequence = parseInt(object.next_channel_sequence, 10); - else if (typeof object.next_channel_sequence === "number") - message.next_channel_sequence = object.next_channel_sequence; - else if (typeof object.next_channel_sequence === "object") - message.next_channel_sequence = new $util.LongBits(object.next_channel_sequence.low >>> 0, object.next_channel_sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {ibc.core.channel.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.channels = []; - object.acknowledgements = []; - object.commitments = []; - object.receipts = []; - object.send_sequences = []; - object.recv_sequences = []; - object.ack_sequences = []; - } - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.next_channel_sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_channel_sequence = options.longs === String ? "0" : 0; - if (message.channels && message.channels.length) { - object.channels = []; - for (var j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); - } - if (message.acknowledgements && message.acknowledgements.length) { - object.acknowledgements = []; - for (var j = 0; j < message.acknowledgements.length; ++j) - object.acknowledgements[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.acknowledgements[j], options); - } - if (message.commitments && message.commitments.length) { - object.commitments = []; - for (var j = 0; j < message.commitments.length; ++j) - object.commitments[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.commitments[j], options); - } - if (message.receipts && message.receipts.length) { - object.receipts = []; - for (var j = 0; j < message.receipts.length; ++j) - object.receipts[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.receipts[j], options); - } - if (message.send_sequences && message.send_sequences.length) { - object.send_sequences = []; - for (var j = 0; j < message.send_sequences.length; ++j) - object.send_sequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.send_sequences[j], options); - } - if (message.recv_sequences && message.recv_sequences.length) { - object.recv_sequences = []; - for (var j = 0; j < message.recv_sequences.length; ++j) - object.recv_sequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.recv_sequences[j], options); - } - if (message.ack_sequences && message.ack_sequences.length) { - object.ack_sequences = []; - for (var j = 0; j < message.ack_sequences.length; ++j) - object.ack_sequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.ack_sequences[j], options); - } - if (message.next_channel_sequence != null && message.hasOwnProperty("next_channel_sequence")) - if (typeof message.next_channel_sequence === "number") - object.next_channel_sequence = options.longs === String ? String(message.next_channel_sequence) : message.next_channel_sequence; - else - object.next_channel_sequence = options.longs === String ? $util.Long.prototype.toString.call(message.next_channel_sequence) : options.longs === Number ? new $util.LongBits(message.next_channel_sequence.low >>> 0, message.next_channel_sequence.high >>> 0).toNumber(true) : message.next_channel_sequence; - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.PacketSequence = (function() { - - /** - * Properties of a PacketSequence. - * @memberof ibc.core.channel.v1 - * @interface IPacketSequence - * @property {string|null} [port_id] PacketSequence port_id - * @property {string|null} [channel_id] PacketSequence channel_id - * @property {Long|null} [sequence] PacketSequence sequence - */ - - /** - * Constructs a new PacketSequence. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketSequence. - * @implements IPacketSequence - * @constructor - * @param {ibc.core.channel.v1.IPacketSequence=} [properties] Properties to set - */ - function PacketSequence(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketSequence port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - */ - PacketSequence.prototype.port_id = ""; - - /** - * PacketSequence channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - */ - PacketSequence.prototype.channel_id = ""; - - /** - * PacketSequence sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - */ - PacketSequence.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PacketSequence message. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {ibc.core.channel.v1.IPacketSequence} message PacketSequence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketSequence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified PacketSequence message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {ibc.core.channel.v1.IPacketSequence} message PacketSequence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketSequence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketSequence message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketSequence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketSequence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketSequence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketSequence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketSequence message. - * @function verify - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketSequence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 PacketSequence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence - */ - PacketSequence.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketSequence) - return object; - var message = new $root.ibc.core.channel.v1.PacketSequence(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 PacketSequence message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {ibc.core.channel.v1.PacketSequence} message PacketSequence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketSequence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 PacketSequence to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - * @returns {Object.} JSON object - */ - PacketSequence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketSequence; - })(); - - return v1; - })(); - - return channel; - })(); - - core.client = (function() { - - /** - * Namespace client. - * @memberof ibc.core - * @namespace - */ - var client = {}; - - client.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.client - * @namespace - */ - var v1 = {}; - - v1.IdentifiedClientState = (function() { - - /** - * Properties of an IdentifiedClientState. - * @memberof ibc.core.client.v1 - * @interface IIdentifiedClientState - * @property {string|null} [client_id] IdentifiedClientState client_id - * @property {google.protobuf.IAny|null} [client_state] IdentifiedClientState client_state - */ - - /** - * Constructs a new IdentifiedClientState. - * @memberof ibc.core.client.v1 - * @classdesc Represents an IdentifiedClientState. - * @implements IIdentifiedClientState - * @constructor - * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set - */ - function IdentifiedClientState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedClientState client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - */ - IdentifiedClientState.prototype.client_id = ""; - - /** - * IdentifiedClientState client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - */ - IdentifiedClientState.prototype.client_state = null; - - /** - * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedClientState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedClientState message. - * @function verify - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - return null; - }; - - /** - * Creates an IdentifiedClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - */ - IdentifiedClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.IdentifiedClientState) - return object; - var message = new $root.ibc.core.client.v1.IdentifiedClientState(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.IdentifiedClientState.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IdentifiedClientState} message IdentifiedClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_state = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - return object; - }; - - /** - * Converts this IdentifiedClientState to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - * @returns {Object.} JSON object - */ - IdentifiedClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedClientState; - })(); - - v1.ConsensusStateWithHeight = (function() { - - /** - * Properties of a ConsensusStateWithHeight. - * @memberof ibc.core.client.v1 - * @interface IConsensusStateWithHeight - * @property {ibc.core.client.v1.IHeight|null} [height] ConsensusStateWithHeight height - * @property {google.protobuf.IAny|null} [consensus_state] ConsensusStateWithHeight consensus_state - */ - - /** - * Constructs a new ConsensusStateWithHeight. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ConsensusStateWithHeight. - * @implements IConsensusStateWithHeight - * @constructor - * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set - */ - function ConsensusStateWithHeight(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusStateWithHeight height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - */ - ConsensusStateWithHeight.prototype.height = null; - - /** - * ConsensusStateWithHeight consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - */ - ConsensusStateWithHeight.prototype.consensus_state = null; - - /** - * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateWithHeight.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateWithHeight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateWithHeight.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateWithHeight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusStateWithHeight message. - * @function verify - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusStateWithHeight.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - */ - ConsensusStateWithHeight.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ConsensusStateWithHeight) - return object; - var message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.ConsensusStateWithHeight} message ConsensusStateWithHeight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusStateWithHeight.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.height = null; - object.consensus_state = null; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ConsensusStateWithHeight to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - * @returns {Object.} JSON object - */ - ConsensusStateWithHeight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusStateWithHeight; - })(); - - v1.ClientConsensusStates = (function() { - - /** - * Properties of a ClientConsensusStates. - * @memberof ibc.core.client.v1 - * @interface IClientConsensusStates - * @property {string|null} [client_id] ClientConsensusStates client_id - * @property {Array.|null} [consensus_states] ClientConsensusStates consensus_states - */ - - /** - * Constructs a new ClientConsensusStates. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ClientConsensusStates. - * @implements IClientConsensusStates - * @constructor - * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set - */ - function ClientConsensusStates(properties) { - this.consensus_states = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientConsensusStates client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - */ - ClientConsensusStates.prototype.client_id = ""; - - /** - * ClientConsensusStates consensus_states. - * @member {Array.} consensus_states - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - */ - ClientConsensusStates.prototype.consensus_states = $util.emptyArray; - - /** - * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientConsensusStates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.consensus_states != null && message.consensus_states.length) - for (var i = 0; i < message.consensus_states.length; ++i) - $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensus_states[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientConsensusStates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientConsensusStates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientConsensusStates(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.consensus_states && message.consensus_states.length)) - message.consensus_states = []; - message.consensus_states.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientConsensusStates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientConsensusStates message. - * @function verify - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientConsensusStates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.consensus_states != null && message.hasOwnProperty("consensus_states")) { - if (!Array.isArray(message.consensus_states)) - return "consensus_states: array expected"; - for (var i = 0; i < message.consensus_states.length; ++i) { - var error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensus_states[i]); - if (error) - return "consensus_states." + error; - } - } - return null; - }; - - /** - * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - */ - ClientConsensusStates.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ClientConsensusStates) - return object; - var message = new $root.ibc.core.client.v1.ClientConsensusStates(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.consensus_states) { - if (!Array.isArray(object.consensus_states)) - throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensus_states: array expected"); - message.consensus_states = []; - for (var i = 0; i < object.consensus_states.length; ++i) { - if (typeof object.consensus_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensus_states: object expected"); - message.consensus_states[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensus_states[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.ClientConsensusStates} message ClientConsensusStates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientConsensusStates.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.consensus_states = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.consensus_states && message.consensus_states.length) { - object.consensus_states = []; - for (var j = 0; j < message.consensus_states.length; ++j) - object.consensus_states[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensus_states[j], options); - } - return object; - }; - - /** - * Converts this ClientConsensusStates to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - * @returns {Object.} JSON object - */ - ClientConsensusStates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientConsensusStates; - })(); - - v1.ClientUpdateProposal = (function() { - - /** - * Properties of a ClientUpdateProposal. - * @memberof ibc.core.client.v1 - * @interface IClientUpdateProposal - * @property {string|null} [title] ClientUpdateProposal title - * @property {string|null} [description] ClientUpdateProposal description - * @property {string|null} [subject_client_id] ClientUpdateProposal subject_client_id - * @property {string|null} [substitute_client_id] ClientUpdateProposal substitute_client_id - */ - - /** - * Constructs a new ClientUpdateProposal. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ClientUpdateProposal. - * @implements IClientUpdateProposal - * @constructor - * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set - */ - function ClientUpdateProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientUpdateProposal title. - * @member {string} title - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.title = ""; - - /** - * ClientUpdateProposal description. - * @member {string} description - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.description = ""; - - /** - * ClientUpdateProposal subject_client_id. - * @member {string} subject_client_id - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.subject_client_id = ""; - - /** - * ClientUpdateProposal substitute_client_id. - * @member {string} substitute_client_id - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.substitute_client_id = ""; - - /** - * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientUpdateProposal.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.subject_client_id != null && Object.hasOwnProperty.call(message, "subject_client_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subject_client_id); - if (message.substitute_client_id != null && Object.hasOwnProperty.call(message, "substitute_client_id")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.substitute_client_id); - return writer; - }; - - /** - * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientUpdateProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientUpdateProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientUpdateProposal(); - 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.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientUpdateProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientUpdateProposal message. - * @function verify - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientUpdateProposal.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.subject_client_id != null && message.hasOwnProperty("subject_client_id")) - if (!$util.isString(message.subject_client_id)) - return "subject_client_id: string expected"; - if (message.substitute_client_id != null && message.hasOwnProperty("substitute_client_id")) - if (!$util.isString(message.substitute_client_id)) - return "substitute_client_id: string expected"; - return null; - }; - - /** - * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - */ - ClientUpdateProposal.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ClientUpdateProposal) - return object; - var message = new $root.ibc.core.client.v1.ClientUpdateProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.subject_client_id != null) - message.subject_client_id = String(object.subject_client_id); - if (object.substitute_client_id != null) - message.substitute_client_id = String(object.substitute_client_id); - return message; - }; - - /** - * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.ClientUpdateProposal} message ClientUpdateProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientUpdateProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.subject_client_id = ""; - object.substitute_client_id = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.subject_client_id != null && message.hasOwnProperty("subject_client_id")) - object.subject_client_id = message.subject_client_id; - if (message.substitute_client_id != null && message.hasOwnProperty("substitute_client_id")) - object.substitute_client_id = message.substitute_client_id; - return object; - }; - - /** - * Converts this ClientUpdateProposal to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - * @returns {Object.} JSON object - */ - ClientUpdateProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientUpdateProposal; - })(); - - v1.UpgradeProposal = (function() { - - /** - * Properties of an UpgradeProposal. - * @memberof ibc.core.client.v1 - * @interface IUpgradeProposal - * @property {string|null} [title] UpgradeProposal title - * @property {string|null} [description] UpgradeProposal description - * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] UpgradeProposal plan - * @property {google.protobuf.IAny|null} [upgraded_client_state] UpgradeProposal upgraded_client_state - */ - - /** - * Constructs a new UpgradeProposal. - * @memberof ibc.core.client.v1 - * @classdesc Represents an UpgradeProposal. - * @implements IUpgradeProposal - * @constructor - * @param {ibc.core.client.v1.IUpgradeProposal=} [properties] Properties to set - */ - function UpgradeProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeProposal title. - * @member {string} title - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.title = ""; - - /** - * UpgradeProposal description. - * @member {string} description - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.description = ""; - - /** - * UpgradeProposal plan. - * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.plan = null; - - /** - * UpgradeProposal upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.upgraded_client_state = null; - - /** - * Encodes the specified UpgradeProposal message. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.IUpgradeProposal} message UpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeProposal.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.upgrade.v1beta1.Plan.encode(message.plan, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.IUpgradeProposal} message UpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.UpgradeProposal(); - 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.upgrade.v1beta1.Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeProposal message. - * @function verify - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeProposal.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.upgrade.v1beta1.Plan.verify(message.plan); - if (error) - return "plan." + error; - } - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - var error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates an UpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - */ - UpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.UpgradeProposal) - return object; - var message = new $root.ibc.core.client.v1.UpgradeProposal(); - 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(".ibc.core.client.v1.UpgradeProposal.plan: object expected"); - message.plan = $root.cosmos.upgrade.v1beta1.Plan.fromObject(object.plan); - } - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".ibc.core.client.v1.UpgradeProposal.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from an UpgradeProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.UpgradeProposal} message UpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.plan = null; - object.upgraded_client_state = 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.upgrade.v1beta1.Plan.toObject(message.plan, options); - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this UpgradeProposal to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - UpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpgradeProposal; - })(); - - v1.Height = (function() { - - /** - * Properties of an Height. - * @memberof ibc.core.client.v1 - * @interface IHeight - * @property {Long|null} [revision_number] Height revision_number - * @property {Long|null} [revision_height] Height revision_height - */ - - /** - * Constructs a new Height. - * @memberof ibc.core.client.v1 - * @classdesc Represents an Height. - * @implements IHeight - * @constructor - * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set - */ - function Height(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Height revision_number. - * @member {Long} revision_number - * @memberof ibc.core.client.v1.Height - * @instance - */ - Height.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Height revision_height. - * @member {Long} revision_height - * @memberof ibc.core.client.v1.Height - * @instance - */ - Height.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Height.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Height.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Height message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.Height - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.Height} Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Height.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Height(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = reader.uint64(); - break; - case 2: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Height message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.Height - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.Height} Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Height.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Height message. - * @function verify - * @memberof ibc.core.client.v1.Height - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Height.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates an Height message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.Height - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.Height} Height - */ - Height.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.Height) - return object; - var message = new $root.ibc.core.client.v1.Height(); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an Height message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.Height} message Height - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Height.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.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this Height to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.Height - * @instance - * @returns {Object.} JSON object - */ - Height.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Height; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.core.client.v1 - * @interface IParams - * @property {Array.|null} [allowed_clients] Params allowed_clients - */ - - /** - * Constructs a new Params. - * @memberof ibc.core.client.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.core.client.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.allowed_clients = []; - if (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 allowed_clients. - * @member {Array.} allowed_clients - * @memberof ibc.core.client.v1.Params - * @instance - */ - Params.prototype.allowed_clients = $util.emptyArray; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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.allowed_clients != null && message.allowed_clients.length) - for (var i = 0; i < message.allowed_clients.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowed_clients[i]); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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 ibc.core.client.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.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.ibc.core.client.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.allowed_clients && message.allowed_clients.length)) - message.allowed_clients = []; - message.allowed_clients.push(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 ibc.core.client.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.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 ibc.core.client.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.allowed_clients != null && message.hasOwnProperty("allowed_clients")) { - if (!Array.isArray(message.allowed_clients)) - return "allowed_clients: array expected"; - for (var i = 0; i < message.allowed_clients.length; ++i) - if (!$util.isString(message.allowed_clients[i])) - return "allowed_clients: string[] expected"; - } - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.Params) - return object; - var message = new $root.ibc.core.client.v1.Params(); - if (object.allowed_clients) { - if (!Array.isArray(object.allowed_clients)) - throw TypeError(".ibc.core.client.v1.Params.allowed_clients: array expected"); - message.allowed_clients = []; - for (var i = 0; i < object.allowed_clients.length; ++i) - message.allowed_clients[i] = String(object.allowed_clients[i]); - } - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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.arrays || options.defaults) - object.allowed_clients = []; - if (message.allowed_clients && message.allowed_clients.length) { - object.allowed_clients = []; - for (var j = 0; j < message.allowed_clients.length; ++j) - object.allowed_clients[j] = message.allowed_clients[j]; - } - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.core.client.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. - * @memberof ibc.core.client.v1.Msg - * @typedef CreateClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgCreateClientResponse} [response] MsgCreateClientResponse - */ - - /** - * Calls CreateClient. - * @function createClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object - * @param {ibc.core.client.v1.Msg.CreateClientCallback} callback Node-style callback called with the error, if any, and MsgCreateClientResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.createClient = function createClient(request, callback) { - return this.rpcCall(createClient, $root.ibc.core.client.v1.MsgCreateClient, $root.ibc.core.client.v1.MsgCreateClientResponse, request, callback); - }, "name", { value: "CreateClient" }); - - /** - * Calls CreateClient. - * @function createClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. - * @memberof ibc.core.client.v1.Msg - * @typedef UpdateClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgUpdateClientResponse} [response] MsgUpdateClientResponse - */ - - /** - * Calls UpdateClient. - * @function updateClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object - * @param {ibc.core.client.v1.Msg.UpdateClientCallback} callback Node-style callback called with the error, if any, and MsgUpdateClientResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateClient = function updateClient(request, callback) { - return this.rpcCall(updateClient, $root.ibc.core.client.v1.MsgUpdateClient, $root.ibc.core.client.v1.MsgUpdateClientResponse, request, callback); - }, "name", { value: "UpdateClient" }); - - /** - * Calls UpdateClient. - * @function updateClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. - * @memberof ibc.core.client.v1.Msg - * @typedef UpgradeClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgUpgradeClientResponse} [response] MsgUpgradeClientResponse - */ - - /** - * Calls UpgradeClient. - * @function upgradeClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object - * @param {ibc.core.client.v1.Msg.UpgradeClientCallback} callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.upgradeClient = function upgradeClient(request, callback) { - return this.rpcCall(upgradeClient, $root.ibc.core.client.v1.MsgUpgradeClient, $root.ibc.core.client.v1.MsgUpgradeClientResponse, request, callback); - }, "name", { value: "UpgradeClient" }); - - /** - * Calls UpgradeClient. - * @function upgradeClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. - * @memberof ibc.core.client.v1.Msg - * @typedef SubmitMisbehaviourCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} [response] MsgSubmitMisbehaviourResponse - */ - - /** - * Calls SubmitMisbehaviour. - * @function submitMisbehaviour - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object - * @param {ibc.core.client.v1.Msg.SubmitMisbehaviourCallback} callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitMisbehaviour = function submitMisbehaviour(request, callback) { - return this.rpcCall(submitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, request, callback); - }, "name", { value: "SubmitMisbehaviour" }); - - /** - * Calls SubmitMisbehaviour. - * @function submitMisbehaviour - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgCreateClient = (function() { - - /** - * Properties of a MsgCreateClient. - * @memberof ibc.core.client.v1 - * @interface IMsgCreateClient - * @property {google.protobuf.IAny|null} [client_state] MsgCreateClient client_state - * @property {google.protobuf.IAny|null} [consensus_state] MsgCreateClient consensus_state - * @property {string|null} [signer] MsgCreateClient signer - */ - - /** - * Constructs a new MsgCreateClient. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgCreateClient. - * @implements IMsgCreateClient - * @constructor - * @param {ibc.core.client.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 client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.client_state = null; - - /** - * MsgCreateClient consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.consensus_state = null; - - /** - * MsgCreateClient signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.signer = ""; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {ibc.core.client.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.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {ibc.core.client.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 ibc.core.client.v1.MsgCreateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.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.ibc.core.client.v1.MsgCreateClient(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.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 ibc.core.client.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.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient - */ - MsgCreateClient.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgCreateClient) - return object; - var message = new $root.ibc.core.client.v1.MsgCreateClient(); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgCreateClient.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgCreateClient.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {ibc.core.client.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) { - object.client_state = null; - object.consensus_state = null; - object.signer = ""; - } - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgCreateClient to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - * @returns {Object.} JSON object - */ - MsgCreateClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgCreateClient; - })(); - - v1.MsgCreateClientResponse = (function() { - - /** - * Properties of a MsgCreateClientResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgCreateClientResponse - */ - - /** - * Constructs a new MsgCreateClientResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgCreateClientResponse. - * @implements IMsgCreateClientResponse - * @constructor - * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set - */ - function MsgCreateClientResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateClientResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgCreateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateClientResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClientResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateClientResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgCreateClientResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgCreateClientResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgCreateClientResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse - */ - MsgCreateClientResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgCreateClientResponse) - return object; - return new $root.ibc.core.client.v1.MsgCreateClientResponse(); - }; - - /** - * Creates a plain object from a MsgCreateClientResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {ibc.core.client.v1.MsgCreateClientResponse} message MsgCreateClientResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateClientResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgCreateClientResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @instance - * @returns {Object.} JSON object - */ - MsgCreateClientResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgCreateClientResponse; - })(); - - v1.MsgUpdateClient = (function() { - - /** - * Properties of a MsgUpdateClient. - * @memberof ibc.core.client.v1 - * @interface IMsgUpdateClient - * @property {string|null} [client_id] MsgUpdateClient client_id - * @property {google.protobuf.IAny|null} [client_message] MsgUpdateClient client_message - * @property {string|null} [signer] MsgUpdateClient signer - */ - - /** - * Constructs a new MsgUpdateClient. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpdateClient. - * @implements IMsgUpdateClient - * @constructor - * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set - */ - function MsgUpdateClient(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateClient client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - */ - MsgUpdateClient.prototype.client_id = ""; - - /** - * MsgUpdateClient client_message. - * @member {google.protobuf.IAny|null|undefined} client_message - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - */ - MsgUpdateClient.prototype.client_message = null; - - /** - * MsgUpdateClient signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - */ - MsgUpdateClient.prototype.signer = ""; - - /** - * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClient.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_message != null && Object.hasOwnProperty.call(message, "client_message")) - $root.google.protobuf.Any.encode(message.client_message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgUpdateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClient.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClient(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_message = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClient.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateClient message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateClient.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_message != null && message.hasOwnProperty("client_message")) { - var error = $root.google.protobuf.Any.verify(message.client_message); - if (error) - return "client_message." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgUpdateClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient - */ - MsgUpdateClient.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpdateClient) - return object; - var message = new $root.ibc.core.client.v1.MsgUpdateClient(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_message != null) { - if (typeof object.client_message !== "object") - throw TypeError(".ibc.core.client.v1.MsgUpdateClient.client_message: object expected"); - message.client_message = $root.google.protobuf.Any.fromObject(object.client_message); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgUpdateClient message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {ibc.core.client.v1.MsgUpdateClient} message MsgUpdateClient - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateClient.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_message = null; - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_message != null && message.hasOwnProperty("client_message")) - object.client_message = $root.google.protobuf.Any.toObject(message.client_message, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgUpdateClient to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateClient; - })(); - - v1.MsgUpdateClientResponse = (function() { - - /** - * Properties of a MsgUpdateClientResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgUpdateClientResponse - */ - - /** - * Constructs a new MsgUpdateClientResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpdateClientResponse. - * @implements IMsgUpdateClientResponse - * @constructor - * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set - */ - function MsgUpdateClientResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClientResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClientResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClientResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClientResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateClientResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateClientResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateClientResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse - */ - MsgUpdateClientResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpdateClientResponse) - return object; - return new $root.ibc.core.client.v1.MsgUpdateClientResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateClientResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {ibc.core.client.v1.MsgUpdateClientResponse} message MsgUpdateClientResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateClientResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateClientResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateClientResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateClientResponse; - })(); - - v1.MsgUpgradeClient = (function() { - - /** - * Properties of a MsgUpgradeClient. - * @memberof ibc.core.client.v1 - * @interface IMsgUpgradeClient - * @property {string|null} [client_id] MsgUpgradeClient client_id - * @property {google.protobuf.IAny|null} [client_state] MsgUpgradeClient client_state - * @property {google.protobuf.IAny|null} [consensus_state] MsgUpgradeClient consensus_state - * @property {Uint8Array|null} [proof_upgrade_client] MsgUpgradeClient proof_upgrade_client - * @property {Uint8Array|null} [proof_upgrade_consensus_state] MsgUpgradeClient proof_upgrade_consensus_state - * @property {string|null} [signer] MsgUpgradeClient signer - */ - - /** - * Constructs a new MsgUpgradeClient. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpgradeClient. - * @implements IMsgUpgradeClient - * @constructor - * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set - */ - function MsgUpgradeClient(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpgradeClient client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.client_id = ""; - - /** - * MsgUpgradeClient client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.client_state = null; - - /** - * MsgUpgradeClient consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.consensus_state = null; - - /** - * MsgUpgradeClient proof_upgrade_client. - * @member {Uint8Array} proof_upgrade_client - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.proof_upgrade_client = $util.newBuffer([]); - - /** - * MsgUpgradeClient proof_upgrade_consensus_state. - * @member {Uint8Array} proof_upgrade_consensus_state - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.proof_upgrade_consensus_state = $util.newBuffer([]); - - /** - * MsgUpgradeClient signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.signer = ""; - - /** - * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClient.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.proof_upgrade_client != null && Object.hasOwnProperty.call(message, "proof_upgrade_client")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proof_upgrade_client); - if (message.proof_upgrade_consensus_state != null && Object.hasOwnProperty.call(message, "proof_upgrade_consensus_state")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proof_upgrade_consensus_state); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgUpgradeClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClient.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClient(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 4: - message.proof_upgrade_client = reader.bytes(); - break; - case 5: - message.proof_upgrade_consensus_state = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClient.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpgradeClient message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpgradeClient.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.proof_upgrade_client != null && message.hasOwnProperty("proof_upgrade_client")) - if (!(message.proof_upgrade_client && typeof message.proof_upgrade_client.length === "number" || $util.isString(message.proof_upgrade_client))) - return "proof_upgrade_client: buffer expected"; - if (message.proof_upgrade_consensus_state != null && message.hasOwnProperty("proof_upgrade_consensus_state")) - if (!(message.proof_upgrade_consensus_state && typeof message.proof_upgrade_consensus_state.length === "number" || $util.isString(message.proof_upgrade_consensus_state))) - return "proof_upgrade_consensus_state: buffer expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgUpgradeClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient - */ - MsgUpgradeClient.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClient) - return object; - var message = new $root.ibc.core.client.v1.MsgUpgradeClient(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.proof_upgrade_client != null) - if (typeof object.proof_upgrade_client === "string") - $util.base64.decode(object.proof_upgrade_client, message.proof_upgrade_client = $util.newBuffer($util.base64.length(object.proof_upgrade_client)), 0); - else if (object.proof_upgrade_client.length) - message.proof_upgrade_client = object.proof_upgrade_client; - if (object.proof_upgrade_consensus_state != null) - if (typeof object.proof_upgrade_consensus_state === "string") - $util.base64.decode(object.proof_upgrade_consensus_state, message.proof_upgrade_consensus_state = $util.newBuffer($util.base64.length(object.proof_upgrade_consensus_state)), 0); - else if (object.proof_upgrade_consensus_state.length) - message.proof_upgrade_consensus_state = object.proof_upgrade_consensus_state; - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgUpgradeClient message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {ibc.core.client.v1.MsgUpgradeClient} message MsgUpgradeClient - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpgradeClient.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_state = null; - object.consensus_state = null; - if (options.bytes === String) - object.proof_upgrade_client = ""; - else { - object.proof_upgrade_client = []; - if (options.bytes !== Array) - object.proof_upgrade_client = $util.newBuffer(object.proof_upgrade_client); - } - if (options.bytes === String) - object.proof_upgrade_consensus_state = ""; - else { - object.proof_upgrade_consensus_state = []; - if (options.bytes !== Array) - object.proof_upgrade_consensus_state = $util.newBuffer(object.proof_upgrade_consensus_state); - } - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.proof_upgrade_client != null && message.hasOwnProperty("proof_upgrade_client")) - object.proof_upgrade_client = options.bytes === String ? $util.base64.encode(message.proof_upgrade_client, 0, message.proof_upgrade_client.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_upgrade_client) : message.proof_upgrade_client; - if (message.proof_upgrade_consensus_state != null && message.hasOwnProperty("proof_upgrade_consensus_state")) - object.proof_upgrade_consensus_state = options.bytes === String ? $util.base64.encode(message.proof_upgrade_consensus_state, 0, message.proof_upgrade_consensus_state.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_upgrade_consensus_state) : message.proof_upgrade_consensus_state; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgUpgradeClient to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - * @returns {Object.} JSON object - */ - MsgUpgradeClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpgradeClient; - })(); - - v1.MsgUpgradeClientResponse = (function() { - - /** - * Properties of a MsgUpgradeClientResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgUpgradeClientResponse - */ - - /** - * Constructs a new MsgUpgradeClientResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpgradeClientResponse. - * @implements IMsgUpgradeClientResponse - * @constructor - * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set - */ - function MsgUpgradeClientResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClientResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpgradeClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClientResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClientResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpgradeClientResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpgradeClientResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpgradeClientResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse - */ - MsgUpgradeClientResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClientResponse) - return object; - return new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); - }; - - /** - * Creates a plain object from a MsgUpgradeClientResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {ibc.core.client.v1.MsgUpgradeClientResponse} message MsgUpgradeClientResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpgradeClientResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpgradeClientResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpgradeClientResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpgradeClientResponse; - })(); - - v1.MsgSubmitMisbehaviour = (function() { - - /** - * Properties of a MsgSubmitMisbehaviour. - * @memberof ibc.core.client.v1 - * @interface IMsgSubmitMisbehaviour - * @property {string|null} [client_id] MsgSubmitMisbehaviour client_id - * @property {google.protobuf.IAny|null} [misbehaviour] MsgSubmitMisbehaviour misbehaviour - * @property {string|null} [signer] MsgSubmitMisbehaviour signer - */ - - /** - * Constructs a new MsgSubmitMisbehaviour. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgSubmitMisbehaviour. - * @implements IMsgSubmitMisbehaviour - * @constructor - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set - */ - function MsgSubmitMisbehaviour(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitMisbehaviour client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - */ - MsgSubmitMisbehaviour.prototype.client_id = ""; - - /** - * MsgSubmitMisbehaviour misbehaviour. - * @member {google.protobuf.IAny|null|undefined} misbehaviour - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - */ - MsgSubmitMisbehaviour.prototype.misbehaviour = null; - - /** - * MsgSubmitMisbehaviour signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - */ - MsgSubmitMisbehaviour.prototype.signer = ""; - - /** - * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviour.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.misbehaviour != null && Object.hasOwnProperty.call(message, "misbehaviour")) - $root.google.protobuf.Any.encode(message.misbehaviour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitMisbehaviour message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.misbehaviour = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitMisbehaviour message. - * @function verify - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitMisbehaviour.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) { - var error = $root.google.protobuf.Any.verify(message.misbehaviour); - if (error) - return "misbehaviour." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitMisbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour - */ - MsgSubmitMisbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviour) - return object; - var message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.misbehaviour != null) { - if (typeof object.misbehaviour !== "object") - throw TypeError(".ibc.core.client.v1.MsgSubmitMisbehaviour.misbehaviour: object expected"); - message.misbehaviour = $root.google.protobuf.Any.fromObject(object.misbehaviour); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitMisbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {ibc.core.client.v1.MsgSubmitMisbehaviour} message MsgSubmitMisbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitMisbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.misbehaviour = null; - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) - object.misbehaviour = $root.google.protobuf.Any.toObject(message.misbehaviour, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgSubmitMisbehaviour to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitMisbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitMisbehaviour; - })(); - - v1.MsgSubmitMisbehaviourResponse = (function() { - - /** - * Properties of a MsgSubmitMisbehaviourResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgSubmitMisbehaviourResponse - */ - - /** - * Constructs a new MsgSubmitMisbehaviourResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgSubmitMisbehaviourResponse. - * @implements IMsgSubmitMisbehaviourResponse - * @constructor - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set - */ - function MsgSubmitMisbehaviourResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviourResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviourResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviourResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviourResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitMisbehaviourResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitMisbehaviourResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgSubmitMisbehaviourResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse - */ - MsgSubmitMisbehaviourResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse) - return object; - return new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); - }; - - /** - * Creates a plain object from a MsgSubmitMisbehaviourResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitMisbehaviourResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgSubmitMisbehaviourResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitMisbehaviourResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitMisbehaviourResponse; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.core.client.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; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientState}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientStateResponse} [response] QueryClientStateResponse - */ - - /** - * Calls ClientState. - * @function clientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientStateCallback} callback Node-style callback called with the error, if any, and QueryClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientState = function clientState(request, callback) { - return this.rpcCall(clientState, $root.ibc.core.client.v1.QueryClientStateRequest, $root.ibc.core.client.v1.QueryClientStateResponse, request, callback); - }, "name", { value: "ClientState" }); - - /** - * Calls ClientState. - * @function clientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientStates}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientStatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientStatesResponse} [response] QueryClientStatesResponse - */ - - /** - * Calls ClientStates. - * @function clientStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientStatesCallback} callback Node-style callback called with the error, if any, and QueryClientStatesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientStates = function clientStates(request, callback) { - return this.rpcCall(clientStates, $root.ibc.core.client.v1.QueryClientStatesRequest, $root.ibc.core.client.v1.QueryClientStatesResponse, request, callback); - }, "name", { value: "ClientStates" }); - - /** - * Calls ClientStates. - * @function clientStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusState}. - * @memberof ibc.core.client.v1.Query - * @typedef ConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryConsensusStateResponse} [response] QueryConsensusStateResponse - */ - - /** - * Calls ConsensusState. - * @function consensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object - * @param {ibc.core.client.v1.Query.ConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.consensusState = function consensusState(request, callback) { - return this.rpcCall(consensusState, $root.ibc.core.client.v1.QueryConsensusStateRequest, $root.ibc.core.client.v1.QueryConsensusStateResponse, request, callback); - }, "name", { value: "ConsensusState" }); - - /** - * Calls ConsensusState. - * @function consensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusStates}. - * @memberof ibc.core.client.v1.Query - * @typedef ConsensusStatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryConsensusStatesResponse} [response] QueryConsensusStatesResponse - */ - - /** - * Calls ConsensusStates. - * @function consensusStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object - * @param {ibc.core.client.v1.Query.ConsensusStatesCallback} callback Node-style callback called with the error, if any, and QueryConsensusStatesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.consensusStates = function consensusStates(request, callback) { - return this.rpcCall(consensusStates, $root.ibc.core.client.v1.QueryConsensusStatesRequest, $root.ibc.core.client.v1.QueryConsensusStatesResponse, request, callback); - }, "name", { value: "ConsensusStates" }); - - /** - * Calls ConsensusStates. - * @function consensusStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusStateHeights}. - * @memberof ibc.core.client.v1.Query - * @typedef ConsensusStateHeightsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryConsensusStateHeightsResponse} [response] QueryConsensusStateHeightsResponse - */ - - /** - * Calls ConsensusStateHeights. - * @function consensusStateHeights - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} request QueryConsensusStateHeightsRequest message or plain object - * @param {ibc.core.client.v1.Query.ConsensusStateHeightsCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateHeightsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.consensusStateHeights = function consensusStateHeights(request, callback) { - return this.rpcCall(consensusStateHeights, $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest, $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse, request, callback); - }, "name", { value: "ConsensusStateHeights" }); - - /** - * Calls ConsensusStateHeights. - * @function consensusStateHeights - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} request QueryConsensusStateHeightsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientStatus}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientStatusCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientStatusResponse} [response] QueryClientStatusResponse - */ - - /** - * Calls ClientStatus. - * @function clientStatus - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatusRequest} request QueryClientStatusRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientStatusCallback} callback Node-style callback called with the error, if any, and QueryClientStatusResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientStatus = function clientStatus(request, callback) { - return this.rpcCall(clientStatus, $root.ibc.core.client.v1.QueryClientStatusRequest, $root.ibc.core.client.v1.QueryClientStatusResponse, request, callback); - }, "name", { value: "ClientStatus" }); - - /** - * Calls ClientStatus. - * @function clientStatus - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatusRequest} request QueryClientStatusRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientParams}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientParamsResponse} [response] QueryClientParamsResponse - */ - - /** - * Calls ClientParams. - * @function clientParams - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientParamsCallback} callback Node-style callback called with the error, if any, and QueryClientParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientParams = function clientParams(request, callback) { - return this.rpcCall(clientParams, $root.ibc.core.client.v1.QueryClientParamsRequest, $root.ibc.core.client.v1.QueryClientParamsResponse, request, callback); - }, "name", { value: "ClientParams" }); - - /** - * Calls ClientParams. - * @function clientParams - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#upgradedClientState}. - * @memberof ibc.core.client.v1.Query - * @typedef UpgradedClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryUpgradedClientStateResponse} [response] QueryUpgradedClientStateResponse - */ - - /** - * Calls UpgradedClientState. - * @function upgradedClientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} request QueryUpgradedClientStateRequest message or plain object - * @param {ibc.core.client.v1.Query.UpgradedClientStateCallback} callback Node-style callback called with the error, if any, and QueryUpgradedClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.upgradedClientState = function upgradedClientState(request, callback) { - return this.rpcCall(upgradedClientState, $root.ibc.core.client.v1.QueryUpgradedClientStateRequest, $root.ibc.core.client.v1.QueryUpgradedClientStateResponse, request, callback); - }, "name", { value: "UpgradedClientState" }); - - /** - * Calls UpgradedClientState. - * @function upgradedClientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} request QueryUpgradedClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#upgradedConsensusState}. - * @memberof ibc.core.client.v1.Query - * @typedef UpgradedConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} [response] QueryUpgradedConsensusStateResponse - */ - - /** - * Calls UpgradedConsensusState. - * @function upgradedConsensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} request QueryUpgradedConsensusStateRequest message or plain object - * @param {ibc.core.client.v1.Query.UpgradedConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryUpgradedConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.upgradedConsensusState = function upgradedConsensusState(request, callback) { - return this.rpcCall(upgradedConsensusState, $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, request, callback); - }, "name", { value: "UpgradedConsensusState" }); - - /** - * Calls UpgradedConsensusState. - * @function upgradedConsensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} request QueryUpgradedConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryClientStateRequest = (function() { - - /** - * Properties of a QueryClientStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStateRequest - * @property {string|null} [client_id] QueryClientStateRequest client_id - */ - - /** - * Constructs a new QueryClientStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStateRequest. - * @implements IQueryClientStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set - */ - function QueryClientStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStateRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @instance - */ - QueryClientStateRequest.prototype.client_id = ""; - - /** - * Encodes the specified QueryClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - return writer; - }; - - /** - * Encodes the specified QueryClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - return null; - }; - - /** - * Creates a QueryClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest - */ - QueryClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStateRequest) - return object; - var message = new $root.ibc.core.client.v1.QueryClientStateRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - return message; - }; - - /** - * Creates a plain object from a QueryClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {ibc.core.client.v1.QueryClientStateRequest} message QueryClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - return object; - }; - - /** - * Converts this QueryClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStateRequest; - })(); - - v1.QueryClientStateResponse = (function() { - - /** - * Properties of a QueryClientStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStateResponse - * @property {google.protobuf.IAny|null} [client_state] QueryClientStateResponse client_state - * @property {Uint8Array|null} [proof] QueryClientStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryClientStateResponse proof_height - */ - - /** - * Constructs a new QueryClientStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStateResponse. - * @implements IQueryClientStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set - */ - function QueryClientStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStateResponse client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - */ - QueryClientStateResponse.prototype.client_state = null; - - /** - * QueryClientStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - */ - QueryClientStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryClientStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - */ - QueryClientStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse - */ - QueryClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStateResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryClientStateResponse(); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {ibc.core.client.v1.QueryClientStateResponse} message QueryClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStateResponse; - })(); - - v1.QueryClientStatesRequest = (function() { - - /** - * Properties of a QueryClientStatesRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatesRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryClientStatesRequest pagination - */ - - /** - * Constructs a new QueryClientStatesRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatesRequest. - * @implements IQueryClientStatesRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set - */ - function QueryClientStatesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @instance - */ - QueryClientStatesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryClientStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatesRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryClientStatesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest - */ - QueryClientStatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatesRequest) - return object; - var message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStatesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientStatesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {ibc.core.client.v1.QueryClientStatesRequest} message QueryClientStatesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryClientStatesRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatesRequest; - })(); - - v1.QueryClientStatesResponse = (function() { - - /** - * Properties of a QueryClientStatesResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatesResponse - * @property {Array.|null} [client_states] QueryClientStatesResponse client_states - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryClientStatesResponse pagination - */ - - /** - * Constructs a new QueryClientStatesResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatesResponse. - * @implements IQueryClientStatesResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set - */ - function QueryClientStatesResponse(properties) { - this.client_states = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatesResponse client_states. - * @member {Array.} client_states - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @instance - */ - QueryClientStatesResponse.prototype.client_states = $util.emptyArray; - - /** - * QueryClientStatesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @instance - */ - QueryClientStatesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryClientStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_states != null && message.client_states.length) - for (var i = 0; i < message.client_states.length; ++i) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.client_states[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.client_states && message.client_states.length)) - message.client_states = []; - message.client_states.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatesResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_states != null && message.hasOwnProperty("client_states")) { - if (!Array.isArray(message.client_states)) - return "client_states: array expected"; - for (var i = 0; i < message.client_states.length; ++i) { - var error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.client_states[i]); - if (error) - return "client_states." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryClientStatesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse - */ - QueryClientStatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatesResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); - if (object.client_states) { - if (!Array.isArray(object.client_states)) - throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.client_states: array expected"); - message.client_states = []; - for (var i = 0; i < object.client_states.length; ++i) { - if (typeof object.client_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.client_states: object expected"); - message.client_states[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.client_states[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientStatesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {ibc.core.client.v1.QueryClientStatesResponse} message QueryClientStatesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.client_states = []; - if (options.defaults) - object.pagination = null; - if (message.client_states && message.client_states.length) { - object.client_states = []; - for (var j = 0; j < message.client_states.length; ++j) - object.client_states[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.client_states[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryClientStatesResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatesResponse; - })(); - - v1.QueryConsensusStateRequest = (function() { - - /** - * Properties of a QueryConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateRequest - * @property {string|null} [client_id] QueryConsensusStateRequest client_id - * @property {Long|null} [revision_number] QueryConsensusStateRequest revision_number - * @property {Long|null} [revision_height] QueryConsensusStateRequest revision_height - * @property {boolean|null} [latest_height] QueryConsensusStateRequest latest_height - */ - - /** - * Constructs a new QueryConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateRequest. - * @implements IQueryConsensusStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set - */ - function QueryConsensusStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.client_id = ""; - - /** - * QueryConsensusStateRequest revision_number. - * @member {Long} revision_number - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryConsensusStateRequest revision_height. - * @member {Long} revision_height - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryConsensusStateRequest latest_height. - * @member {boolean} latest_height - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.latest_height = false; - - /** - * Encodes the specified QueryConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revision_height); - if (message.latest_height != null && Object.hasOwnProperty.call(message, "latest_height")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.latest_height); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.revision_number = reader.uint64(); - break; - case 3: - message.revision_height = reader.uint64(); - break; - case 4: - message.latest_height = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - if (typeof message.latest_height !== "boolean") - return "latest_height: boolean expected"; - return null; - }; - - /** - * Creates a QueryConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest - */ - QueryConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateRequest) - return object; - var message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - if (object.latest_height != null) - message.latest_height = Boolean(object.latest_height); - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {ibc.core.client.v1.QueryConsensusStateRequest} message QueryConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - object.latest_height = false; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - object.latest_height = message.latest_height; - return object; - }; - - /** - * Converts this QueryConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateRequest; - })(); - - v1.QueryConsensusStateResponse = (function() { - - /** - * Properties of a QueryConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateResponse - * @property {google.protobuf.IAny|null} [consensus_state] QueryConsensusStateResponse consensus_state - * @property {Uint8Array|null} [proof] QueryConsensusStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConsensusStateResponse proof_height - */ - - /** - * Constructs a new QueryConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateResponse. - * @implements IQueryConsensusStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set - */ - function QueryConsensusStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateResponse consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - */ - QueryConsensusStateResponse.prototype.consensus_state = null; - - /** - * QueryConsensusStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - */ - QueryConsensusStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConsensusStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - */ - QueryConsensusStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse - */ - QueryConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {ibc.core.client.v1.QueryConsensusStateResponse} message QueryConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.consensus_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateResponse; - })(); - - v1.QueryConsensusStatesRequest = (function() { - - /** - * Properties of a QueryConsensusStatesRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStatesRequest - * @property {string|null} [client_id] QueryConsensusStatesRequest client_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStatesRequest pagination - */ - - /** - * Constructs a new QueryConsensusStatesRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStatesRequest. - * @implements IQueryConsensusStatesRequest - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set - */ - function QueryConsensusStatesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStatesRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @instance - */ - QueryConsensusStatesRequest.prototype.client_id = ""; - - /** - * QueryConsensusStatesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @instance - */ - QueryConsensusStatesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStatesRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStatesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStatesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest - */ - QueryConsensusStatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesRequest) - return object; - var message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStatesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {ibc.core.client.v1.QueryConsensusStatesRequest} message QueryConsensusStatesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStatesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.pagination = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStatesRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStatesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStatesRequest; - })(); - - v1.QueryConsensusStatesResponse = (function() { - - /** - * Properties of a QueryConsensusStatesResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStatesResponse - * @property {Array.|null} [consensus_states] QueryConsensusStatesResponse consensus_states - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStatesResponse pagination - */ - - /** - * Constructs a new QueryConsensusStatesResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStatesResponse. - * @implements IQueryConsensusStatesResponse - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set - */ - function QueryConsensusStatesResponse(properties) { - this.consensus_states = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStatesResponse consensus_states. - * @member {Array.} consensus_states - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @instance - */ - QueryConsensusStatesResponse.prototype.consensus_states = $util.emptyArray; - - /** - * QueryConsensusStatesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @instance - */ - QueryConsensusStatesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_states != null && message.consensus_states.length) - for (var i = 0; i < message.consensus_states.length; ++i) - $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensus_states[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.consensus_states && message.consensus_states.length)) - message.consensus_states = []; - message.consensus_states.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStatesResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStatesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_states != null && message.hasOwnProperty("consensus_states")) { - if (!Array.isArray(message.consensus_states)) - return "consensus_states: array expected"; - for (var i = 0; i < message.consensus_states.length; ++i) { - var error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensus_states[i]); - if (error) - return "consensus_states." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStatesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse - */ - QueryConsensusStatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); - if (object.consensus_states) { - if (!Array.isArray(object.consensus_states)) - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensus_states: array expected"); - message.consensus_states = []; - for (var i = 0; i < object.consensus_states.length; ++i) { - if (typeof object.consensus_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensus_states: object expected"); - message.consensus_states[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensus_states[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStatesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {ibc.core.client.v1.QueryConsensusStatesResponse} message QueryConsensusStatesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStatesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.consensus_states = []; - if (options.defaults) - object.pagination = null; - if (message.consensus_states && message.consensus_states.length) { - object.consensus_states = []; - for (var j = 0; j < message.consensus_states.length; ++j) - object.consensus_states[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensus_states[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStatesResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStatesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStatesResponse; - })(); - - v1.QueryConsensusStateHeightsRequest = (function() { - - /** - * Properties of a QueryConsensusStateHeightsRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateHeightsRequest - * @property {string|null} [client_id] QueryConsensusStateHeightsRequest client_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStateHeightsRequest pagination - */ - - /** - * Constructs a new QueryConsensusStateHeightsRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateHeightsRequest. - * @implements IQueryConsensusStateHeightsRequest - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest=} [properties] Properties to set - */ - function QueryConsensusStateHeightsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateHeightsRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @instance - */ - QueryConsensusStateHeightsRequest.prototype.client_id = ""; - - /** - * QueryConsensusStateHeightsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @instance - */ - QueryConsensusStateHeightsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStateHeightsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} message QueryConsensusStateHeightsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateHeightsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} message QueryConsensusStateHeightsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateHeightsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsRequest} QueryConsensusStateHeightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateHeightsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsRequest} QueryConsensusStateHeightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateHeightsRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateHeightsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStateHeightsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsRequest} QueryConsensusStateHeightsRequest - */ - QueryConsensusStateHeightsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest) - return object; - var message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateHeightsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {ibc.core.client.v1.QueryConsensusStateHeightsRequest} message QueryConsensusStateHeightsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateHeightsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.pagination = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStateHeightsRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateHeightsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateHeightsRequest; - })(); - - v1.QueryConsensusStateHeightsResponse = (function() { - - /** - * Properties of a QueryConsensusStateHeightsResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateHeightsResponse - * @property {Array.|null} [consensus_state_heights] QueryConsensusStateHeightsResponse consensus_state_heights - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStateHeightsResponse pagination - */ - - /** - * Constructs a new QueryConsensusStateHeightsResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateHeightsResponse. - * @implements IQueryConsensusStateHeightsResponse - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsResponse=} [properties] Properties to set - */ - function QueryConsensusStateHeightsResponse(properties) { - this.consensus_state_heights = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateHeightsResponse consensus_state_heights. - * @member {Array.} consensus_state_heights - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @instance - */ - QueryConsensusStateHeightsResponse.prototype.consensus_state_heights = $util.emptyArray; - - /** - * QueryConsensusStateHeightsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @instance - */ - QueryConsensusStateHeightsResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStateHeightsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsResponse} message QueryConsensusStateHeightsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state_heights != null && message.consensus_state_heights.length) - for (var i = 0; i < message.consensus_state_heights.length; ++i) - $root.ibc.core.client.v1.Height.encode(message.consensus_state_heights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateHeightsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsResponse} message QueryConsensusStateHeightsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateHeightsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsResponse} QueryConsensusStateHeightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.consensus_state_heights && message.consensus_state_heights.length)) - message.consensus_state_heights = []; - message.consensus_state_heights.push($root.ibc.core.client.v1.Height.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateHeightsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsResponse} QueryConsensusStateHeightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateHeightsResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateHeightsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state_heights != null && message.hasOwnProperty("consensus_state_heights")) { - if (!Array.isArray(message.consensus_state_heights)) - return "consensus_state_heights: array expected"; - for (var i = 0; i < message.consensus_state_heights.length; ++i) { - var error = $root.ibc.core.client.v1.Height.verify(message.consensus_state_heights[i]); - if (error) - return "consensus_state_heights." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStateHeightsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsResponse} QueryConsensusStateHeightsResponse - */ - QueryConsensusStateHeightsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse(); - if (object.consensus_state_heights) { - if (!Array.isArray(object.consensus_state_heights)) - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsResponse.consensus_state_heights: array expected"); - message.consensus_state_heights = []; - for (var i = 0; i < object.consensus_state_heights.length; ++i) { - if (typeof object.consensus_state_heights[i] !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsResponse.consensus_state_heights: object expected"); - message.consensus_state_heights[i] = $root.ibc.core.client.v1.Height.fromObject(object.consensus_state_heights[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateHeightsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {ibc.core.client.v1.QueryConsensusStateHeightsResponse} message QueryConsensusStateHeightsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateHeightsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.consensus_state_heights = []; - if (options.defaults) - object.pagination = null; - if (message.consensus_state_heights && message.consensus_state_heights.length) { - object.consensus_state_heights = []; - for (var j = 0; j < message.consensus_state_heights.length; ++j) - object.consensus_state_heights[j] = $root.ibc.core.client.v1.Height.toObject(message.consensus_state_heights[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStateHeightsResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateHeightsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateHeightsResponse; - })(); - - v1.QueryClientStatusRequest = (function() { - - /** - * Properties of a QueryClientStatusRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatusRequest - * @property {string|null} [client_id] QueryClientStatusRequest client_id - */ - - /** - * Constructs a new QueryClientStatusRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatusRequest. - * @implements IQueryClientStatusRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatusRequest=} [properties] Properties to set - */ - function QueryClientStatusRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatusRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @instance - */ - QueryClientStatusRequest.prototype.client_id = ""; - - /** - * Encodes the specified QueryClientStatusRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatusRequest} message QueryClientStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - return writer; - }; - - /** - * Encodes the specified QueryClientStatusRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatusRequest} message QueryClientStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatusRequest} QueryClientStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatusRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatusRequest} QueryClientStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatusRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - return null; - }; - - /** - * Creates a QueryClientStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatusRequest} QueryClientStatusRequest - */ - QueryClientStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatusRequest) - return object; - var message = new $root.ibc.core.client.v1.QueryClientStatusRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - return message; - }; - - /** - * Creates a plain object from a QueryClientStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {ibc.core.client.v1.QueryClientStatusRequest} message QueryClientStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatusRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - return object; - }; - - /** - * Converts this QueryClientStatusRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatusRequest; - })(); - - v1.QueryClientStatusResponse = (function() { - - /** - * Properties of a QueryClientStatusResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatusResponse - * @property {string|null} [status] QueryClientStatusResponse status - */ - - /** - * Constructs a new QueryClientStatusResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatusResponse. - * @implements IQueryClientStatusResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatusResponse=} [properties] Properties to set - */ - function QueryClientStatusResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatusResponse status. - * @member {string} status - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @instance - */ - QueryClientStatusResponse.prototype.status = ""; - - /** - * Encodes the specified QueryClientStatusResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatusResponse} message QueryClientStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.status); - return writer; - }; - - /** - * Encodes the specified QueryClientStatusResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatusResponse} message QueryClientStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatusResponse} QueryClientStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatusResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatusResponse} QueryClientStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatusResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isString(message.status)) - return "status: string expected"; - return null; - }; - - /** - * Creates a QueryClientStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatusResponse} QueryClientStatusResponse - */ - QueryClientStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatusResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryClientStatusResponse(); - if (object.status != null) - message.status = String(object.status); - return message; - }; - - /** - * Creates a plain object from a QueryClientStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {ibc.core.client.v1.QueryClientStatusResponse} message QueryClientStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatusResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.status = ""; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - return object; - }; - - /** - * Converts this QueryClientStatusResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatusResponse; - })(); - - v1.QueryClientParamsRequest = (function() { - - /** - * Properties of a QueryClientParamsRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientParamsRequest - */ - - /** - * Constructs a new QueryClientParamsRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientParamsRequest. - * @implements IQueryClientParamsRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set - */ - function QueryClientParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryClientParamsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryClientParamsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientParamsRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryClientParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest - */ - QueryClientParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientParamsRequest) - return object; - return new $root.ibc.core.client.v1.QueryClientParamsRequest(); - }; - - /** - * Creates a plain object from a QueryClientParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {ibc.core.client.v1.QueryClientParamsRequest} message QueryClientParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryClientParamsRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientParamsRequest; - })(); - - v1.QueryClientParamsResponse = (function() { - - /** - * Properties of a QueryClientParamsResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientParamsResponse - * @property {ibc.core.client.v1.IParams|null} [params] QueryClientParamsResponse params - */ - - /** - * Constructs a new QueryClientParamsResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientParamsResponse. - * @implements IQueryClientParamsResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set - */ - function QueryClientParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientParamsResponse params. - * @member {ibc.core.client.v1.IParams|null|undefined} params - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @instance - */ - QueryClientParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryClientParamsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientParamsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientParamsResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.core.client.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryClientParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse - */ - QueryClientParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientParamsResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientParamsResponse.params: object expected"); - message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {ibc.core.client.v1.QueryClientParamsResponse} message QueryClientParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryClientParamsResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientParamsResponse; - })(); - - v1.QueryUpgradedClientStateRequest = (function() { - - /** - * Properties of a QueryUpgradedClientStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedClientStateRequest - */ - - /** - * Constructs a new QueryUpgradedClientStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedClientStateRequest. - * @implements IQueryUpgradedClientStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest=} [properties] Properties to set - */ - function QueryUpgradedClientStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryUpgradedClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} message QueryUpgradedClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} message QueryUpgradedClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedClientStateRequest} QueryUpgradedClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedClientStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedClientStateRequest} QueryUpgradedClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedClientStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryUpgradedClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedClientStateRequest} QueryUpgradedClientStateRequest - */ - QueryUpgradedClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedClientStateRequest) - return object; - return new $root.ibc.core.client.v1.QueryUpgradedClientStateRequest(); - }; - - /** - * Creates a plain object from a QueryUpgradedClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {ibc.core.client.v1.QueryUpgradedClientStateRequest} message QueryUpgradedClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedClientStateRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryUpgradedClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedClientStateRequest; - })(); - - v1.QueryUpgradedClientStateResponse = (function() { - - /** - * Properties of a QueryUpgradedClientStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedClientStateResponse - * @property {google.protobuf.IAny|null} [upgraded_client_state] QueryUpgradedClientStateResponse upgraded_client_state - */ - - /** - * Constructs a new QueryUpgradedClientStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedClientStateResponse. - * @implements IQueryUpgradedClientStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedClientStateResponse=} [properties] Properties to set - */ - function QueryUpgradedClientStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUpgradedClientStateResponse upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @instance - */ - QueryUpgradedClientStateResponse.prototype.upgraded_client_state = null; - - /** - * Encodes the specified QueryUpgradedClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateResponse} message QueryUpgradedClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateResponse} message QueryUpgradedClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedClientStateResponse} QueryUpgradedClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedClientStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedClientStateResponse} QueryUpgradedClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedClientStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - var error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates a QueryUpgradedClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedClientStateResponse} QueryUpgradedClientStateResponse - */ - QueryUpgradedClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedClientStateResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryUpgradedClientStateResponse(); - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryUpgradedClientStateResponse.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from a QueryUpgradedClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {ibc.core.client.v1.QueryUpgradedClientStateResponse} message QueryUpgradedClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.upgraded_client_state = null; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this QueryUpgradedClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedClientStateResponse; - })(); - - v1.QueryUpgradedConsensusStateRequest = (function() { - - /** - * Properties of a QueryUpgradedConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedConsensusStateRequest - */ - - /** - * Constructs a new QueryUpgradedConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedConsensusStateRequest. - * @implements IQueryUpgradedConsensusStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest=} [properties] Properties to set - */ - function QueryUpgradedConsensusStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryUpgradedConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedConsensusStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryUpgradedConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest - */ - QueryUpgradedConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest) - return object; - return new $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest(); - }; - - /** - * Creates a plain object from a QueryUpgradedConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedConsensusStateRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryUpgradedConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedConsensusStateRequest; - })(); - - v1.QueryUpgradedConsensusStateResponse = (function() { - - /** - * Properties of a QueryUpgradedConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedConsensusStateResponse - * @property {google.protobuf.IAny|null} [upgraded_consensus_state] QueryUpgradedConsensusStateResponse upgraded_consensus_state - */ - - /** - * Constructs a new QueryUpgradedConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedConsensusStateResponse. - * @implements IQueryUpgradedConsensusStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateResponse=} [properties] Properties to set - */ - function QueryUpgradedConsensusStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUpgradedConsensusStateResponse upgraded_consensus_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_consensus_state - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @instance - */ - QueryUpgradedConsensusStateResponse.prototype.upgraded_consensus_state = null; - - /** - * Encodes the specified QueryUpgradedConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.upgraded_consensus_state != null && Object.hasOwnProperty.call(message, "upgraded_consensus_state")) - $root.google.protobuf.Any.encode(message.upgraded_consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgraded_consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedConsensusStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.upgraded_consensus_state != null && message.hasOwnProperty("upgraded_consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.upgraded_consensus_state); - if (error) - return "upgraded_consensus_state." + error; - } - return null; - }; - - /** - * Creates a QueryUpgradedConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse - */ - QueryUpgradedConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse) - return object; - var message = new $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse(); - if (object.upgraded_consensus_state != null) { - if (typeof object.upgraded_consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state: object expected"); - message.upgraded_consensus_state = $root.google.protobuf.Any.fromObject(object.upgraded_consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a QueryUpgradedConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.upgraded_consensus_state = null; - if (message.upgraded_consensus_state != null && message.hasOwnProperty("upgraded_consensus_state")) - object.upgraded_consensus_state = $root.google.protobuf.Any.toObject(message.upgraded_consensus_state, options); - return object; - }; - - /** - * Converts this QueryUpgradedConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedConsensusStateResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.client.v1 - * @interface IGenesisState - * @property {Array.|null} [clients] GenesisState clients - * @property {Array.|null} [clients_consensus] GenesisState clients_consensus - * @property {Array.|null} [clients_metadata] GenesisState clients_metadata - * @property {ibc.core.client.v1.IParams|null} [params] GenesisState params - * @property {boolean|null} [create_localhost] GenesisState create_localhost - * @property {Long|null} [next_client_sequence] GenesisState next_client_sequence - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.client.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.clients = []; - this.clients_consensus = []; - this.clients_metadata = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState clients. - * @member {Array.} clients - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.clients = $util.emptyArray; - - /** - * GenesisState clients_consensus. - * @member {Array.} clients_consensus - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.clients_consensus = $util.emptyArray; - - /** - * GenesisState clients_metadata. - * @member {Array.} clients_metadata - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.clients_metadata = $util.emptyArray; - - /** - * GenesisState params. - * @member {ibc.core.client.v1.IParams|null|undefined} params - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState create_localhost. - * @member {boolean} create_localhost - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.create_localhost = false; - - /** - * GenesisState next_client_sequence. - * @member {Long} next_client_sequence - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.next_client_sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clients != null && message.clients.length) - for (var i = 0; i < message.clients.length; ++i) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clients[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.clients_consensus != null && message.clients_consensus.length) - for (var i = 0; i < message.clients_consensus.length; ++i) - $root.ibc.core.client.v1.ClientConsensusStates.encode(message.clients_consensus[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.clients_metadata != null && message.clients_metadata.length) - for (var i = 0; i < message.clients_metadata.length; ++i) - $root.ibc.core.client.v1.IdentifiedGenesisMetadata.encode(message.clients_metadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.create_localhost != null && Object.hasOwnProperty.call(message, "create_localhost")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.create_localhost); - if (message.next_client_sequence != null && Object.hasOwnProperty.call(message, "next_client_sequence")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.next_client_sequence); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.clients && message.clients.length)) - message.clients = []; - message.clients.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.clients_consensus && message.clients_consensus.length)) - message.clients_consensus = []; - message.clients_consensus.push($root.ibc.core.client.v1.ClientConsensusStates.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.clients_metadata && message.clients_metadata.length)) - message.clients_metadata = []; - message.clients_metadata.push($root.ibc.core.client.v1.IdentifiedGenesisMetadata.decode(reader, reader.uint32())); - break; - case 4: - message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); - break; - case 5: - message.create_localhost = reader.bool(); - break; - case 6: - message.next_client_sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clients != null && message.hasOwnProperty("clients")) { - if (!Array.isArray(message.clients)) - return "clients: array expected"; - for (var i = 0; i < message.clients.length; ++i) { - var error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clients[i]); - if (error) - return "clients." + error; - } - } - if (message.clients_consensus != null && message.hasOwnProperty("clients_consensus")) { - if (!Array.isArray(message.clients_consensus)) - return "clients_consensus: array expected"; - for (var i = 0; i < message.clients_consensus.length; ++i) { - var error = $root.ibc.core.client.v1.ClientConsensusStates.verify(message.clients_consensus[i]); - if (error) - return "clients_consensus." + error; - } - } - if (message.clients_metadata != null && message.hasOwnProperty("clients_metadata")) { - if (!Array.isArray(message.clients_metadata)) - return "clients_metadata: array expected"; - for (var i = 0; i < message.clients_metadata.length; ++i) { - var error = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.verify(message.clients_metadata[i]); - if (error) - return "clients_metadata." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.core.client.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.create_localhost != null && message.hasOwnProperty("create_localhost")) - if (typeof message.create_localhost !== "boolean") - return "create_localhost: boolean expected"; - if (message.next_client_sequence != null && message.hasOwnProperty("next_client_sequence")) - if (!$util.isInteger(message.next_client_sequence) && !(message.next_client_sequence && $util.isInteger(message.next_client_sequence.low) && $util.isInteger(message.next_client_sequence.high))) - return "next_client_sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.GenesisState) - return object; - var message = new $root.ibc.core.client.v1.GenesisState(); - if (object.clients) { - if (!Array.isArray(object.clients)) - throw TypeError(".ibc.core.client.v1.GenesisState.clients: array expected"); - message.clients = []; - for (var i = 0; i < object.clients.length; ++i) { - if (typeof object.clients[i] !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.clients: object expected"); - message.clients[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clients[i]); - } - } - if (object.clients_consensus) { - if (!Array.isArray(object.clients_consensus)) - throw TypeError(".ibc.core.client.v1.GenesisState.clients_consensus: array expected"); - message.clients_consensus = []; - for (var i = 0; i < object.clients_consensus.length; ++i) { - if (typeof object.clients_consensus[i] !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.clients_consensus: object expected"); - message.clients_consensus[i] = $root.ibc.core.client.v1.ClientConsensusStates.fromObject(object.clients_consensus[i]); - } - } - if (object.clients_metadata) { - if (!Array.isArray(object.clients_metadata)) - throw TypeError(".ibc.core.client.v1.GenesisState.clients_metadata: array expected"); - message.clients_metadata = []; - for (var i = 0; i < object.clients_metadata.length; ++i) { - if (typeof object.clients_metadata[i] !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.clients_metadata: object expected"); - message.clients_metadata[i] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.fromObject(object.clients_metadata[i]); - } - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.params: object expected"); - message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); - } - if (object.create_localhost != null) - message.create_localhost = Boolean(object.create_localhost); - if (object.next_client_sequence != null) - if ($util.Long) - (message.next_client_sequence = $util.Long.fromValue(object.next_client_sequence)).unsigned = true; - else if (typeof object.next_client_sequence === "string") - message.next_client_sequence = parseInt(object.next_client_sequence, 10); - else if (typeof object.next_client_sequence === "number") - message.next_client_sequence = object.next_client_sequence; - else if (typeof object.next_client_sequence === "object") - message.next_client_sequence = new $util.LongBits(object.next_client_sequence.low >>> 0, object.next_client_sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {ibc.core.client.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.clients = []; - object.clients_consensus = []; - object.clients_metadata = []; - } - if (options.defaults) { - object.params = null; - object.create_localhost = false; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.next_client_sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_client_sequence = options.longs === String ? "0" : 0; - } - if (message.clients && message.clients.length) { - object.clients = []; - for (var j = 0; j < message.clients.length; ++j) - object.clients[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clients[j], options); - } - if (message.clients_consensus && message.clients_consensus.length) { - object.clients_consensus = []; - for (var j = 0; j < message.clients_consensus.length; ++j) - object.clients_consensus[j] = $root.ibc.core.client.v1.ClientConsensusStates.toObject(message.clients_consensus[j], options); - } - if (message.clients_metadata && message.clients_metadata.length) { - object.clients_metadata = []; - for (var j = 0; j < message.clients_metadata.length; ++j) - object.clients_metadata[j] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(message.clients_metadata[j], options); - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); - if (message.create_localhost != null && message.hasOwnProperty("create_localhost")) - object.create_localhost = message.create_localhost; - if (message.next_client_sequence != null && message.hasOwnProperty("next_client_sequence")) - if (typeof message.next_client_sequence === "number") - object.next_client_sequence = options.longs === String ? String(message.next_client_sequence) : message.next_client_sequence; - else - object.next_client_sequence = options.longs === String ? $util.Long.prototype.toString.call(message.next_client_sequence) : options.longs === Number ? new $util.LongBits(message.next_client_sequence.low >>> 0, message.next_client_sequence.high >>> 0).toNumber(true) : message.next_client_sequence; - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.GenesisMetadata = (function() { - - /** - * Properties of a GenesisMetadata. - * @memberof ibc.core.client.v1 - * @interface IGenesisMetadata - * @property {Uint8Array|null} [key] GenesisMetadata key - * @property {Uint8Array|null} [value] GenesisMetadata value - */ - - /** - * Constructs a new GenesisMetadata. - * @memberof ibc.core.client.v1 - * @classdesc Represents a GenesisMetadata. - * @implements IGenesisMetadata - * @constructor - * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set - */ - function GenesisMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisMetadata key. - * @member {Uint8Array} key - * @memberof ibc.core.client.v1.GenesisMetadata - * @instance - */ - GenesisMetadata.prototype.key = $util.newBuffer([]); - - /** - * GenesisMetadata value. - * @member {Uint8Array} value - * @memberof ibc.core.client.v1.GenesisMetadata - * @instance - */ - GenesisMetadata.prototype.value = $util.newBuffer([]); - - /** - * Encodes the specified GenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisMetadata.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 GenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisMetadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisMetadata(); - 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 GenesisMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisMetadata message. - * @function verify - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisMetadata.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 GenesisMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata - */ - GenesisMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.GenesisMetadata) - return object; - var message = new $root.ibc.core.client.v1.GenesisMetadata(); - 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 GenesisMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {ibc.core.client.v1.GenesisMetadata} message GenesisMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisMetadata.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 GenesisMetadata to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.GenesisMetadata - * @instance - * @returns {Object.} JSON object - */ - GenesisMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisMetadata; - })(); - - v1.IdentifiedGenesisMetadata = (function() { - - /** - * Properties of an IdentifiedGenesisMetadata. - * @memberof ibc.core.client.v1 - * @interface IIdentifiedGenesisMetadata - * @property {string|null} [client_id] IdentifiedGenesisMetadata client_id - * @property {Array.|null} [client_metadata] IdentifiedGenesisMetadata client_metadata - */ - - /** - * Constructs a new IdentifiedGenesisMetadata. - * @memberof ibc.core.client.v1 - * @classdesc Represents an IdentifiedGenesisMetadata. - * @implements IIdentifiedGenesisMetadata - * @constructor - * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set - */ - function IdentifiedGenesisMetadata(properties) { - this.client_metadata = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedGenesisMetadata client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @instance - */ - IdentifiedGenesisMetadata.prototype.client_id = ""; - - /** - * IdentifiedGenesisMetadata client_metadata. - * @member {Array.} client_metadata - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @instance - */ - IdentifiedGenesisMetadata.prototype.client_metadata = $util.emptyArray; - - /** - * Encodes the specified IdentifiedGenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedGenesisMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_metadata != null && message.client_metadata.length) - for (var i = 0; i < message.client_metadata.length; ++i) - $root.ibc.core.client.v1.GenesisMetadata.encode(message.client_metadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedGenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedGenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedGenesisMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.client_metadata && message.client_metadata.length)) - message.client_metadata = []; - message.client_metadata.push($root.ibc.core.client.v1.GenesisMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedGenesisMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedGenesisMetadata message. - * @function verify - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedGenesisMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_metadata != null && message.hasOwnProperty("client_metadata")) { - if (!Array.isArray(message.client_metadata)) - return "client_metadata: array expected"; - for (var i = 0; i < message.client_metadata.length; ++i) { - var error = $root.ibc.core.client.v1.GenesisMetadata.verify(message.client_metadata[i]); - if (error) - return "client_metadata." + error; - } - } - return null; - }; - - /** - * Creates an IdentifiedGenesisMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata - */ - IdentifiedGenesisMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.IdentifiedGenesisMetadata) - return object; - var message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_metadata) { - if (!Array.isArray(object.client_metadata)) - throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.client_metadata: array expected"); - message.client_metadata = []; - for (var i = 0; i < object.client_metadata.length; ++i) { - if (typeof object.client_metadata[i] !== "object") - throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.client_metadata: object expected"); - message.client_metadata[i] = $root.ibc.core.client.v1.GenesisMetadata.fromObject(object.client_metadata[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedGenesisMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {ibc.core.client.v1.IdentifiedGenesisMetadata} message IdentifiedGenesisMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedGenesisMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.client_metadata = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_metadata && message.client_metadata.length) { - object.client_metadata = []; - for (var j = 0; j < message.client_metadata.length; ++j) - object.client_metadata[j] = $root.ibc.core.client.v1.GenesisMetadata.toObject(message.client_metadata[j], options); - } - return object; - }; - - /** - * Converts this IdentifiedGenesisMetadata to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @instance - * @returns {Object.} JSON object - */ - IdentifiedGenesisMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedGenesisMetadata; - })(); - - return v1; - })(); - - return client; - })(); - - core.commitment = (function() { - - /** - * Namespace commitment. - * @memberof ibc.core - * @namespace - */ - var commitment = {}; - - commitment.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.commitment - * @namespace - */ - var v1 = {}; - - v1.MerkleRoot = (function() { - - /** - * Properties of a MerkleRoot. - * @memberof ibc.core.commitment.v1 - * @interface IMerkleRoot - * @property {Uint8Array|null} [hash] MerkleRoot hash - */ - - /** - * Constructs a new MerkleRoot. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerkleRoot. - * @implements IMerkleRoot - * @constructor - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @instance - */ - MerkleRoot.prototype.hash = $util.newBuffer([]); - - /** - * Encodes the specified MerkleRoot message. Does not implicitly {@link ibc.core.commitment.v1.MerkleRoot.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerkleRoot - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleRoot.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerkleRoot - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerkleRoot} MerkleRoot - */ - MerkleRoot.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerkleRoot) - return object; - var message = new $root.ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {ibc.core.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 ibc.core.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 ibc.core.commitment.v1 - * @interface IMerklePrefix - * @property {Uint8Array|null} [key_prefix] MerklePrefix key_prefix - */ - - /** - * Constructs a new MerklePrefix. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerklePrefix. - * @implements IMerklePrefix - * @constructor - * @param {ibc.core.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 key_prefix. - * @member {Uint8Array} key_prefix - * @memberof ibc.core.commitment.v1.MerklePrefix - * @instance - */ - MerklePrefix.prototype.key_prefix = $util.newBuffer([]); - - /** - * Encodes the specified MerklePrefix message. Does not implicitly {@link ibc.core.commitment.v1.MerklePrefix.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {ibc.core.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.key_prefix != null && Object.hasOwnProperty.call(message, "key_prefix")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key_prefix); - return writer; - }; - - /** - * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerklePrefix.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerklePrefix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.commitment.v1.MerklePrefix(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_prefix = 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 ibc.core.commitment.v1.MerklePrefix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.key_prefix != null && message.hasOwnProperty("key_prefix")) - if (!(message.key_prefix && typeof message.key_prefix.length === "number" || $util.isString(message.key_prefix))) - return "key_prefix: buffer expected"; - return null; - }; - - /** - * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerklePrefix} MerklePrefix - */ - MerklePrefix.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerklePrefix) - return object; - var message = new $root.ibc.core.commitment.v1.MerklePrefix(); - if (object.key_prefix != null) - if (typeof object.key_prefix === "string") - $util.base64.decode(object.key_prefix, message.key_prefix = $util.newBuffer($util.base64.length(object.key_prefix)), 0); - else if (object.key_prefix.length) - message.key_prefix = object.key_prefix; - return message; - }; - - /** - * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {ibc.core.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.key_prefix = ""; - else { - object.key_prefix = []; - if (options.bytes !== Array) - object.key_prefix = $util.newBuffer(object.key_prefix); - } - if (message.key_prefix != null && message.hasOwnProperty("key_prefix")) - object.key_prefix = options.bytes === String ? $util.base64.encode(message.key_prefix, 0, message.key_prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.key_prefix) : message.key_prefix; - return object; - }; - - /** - * Converts this MerklePrefix to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.commitment.v1 - * @interface IMerklePath - * @property {Array.|null} [key_path] MerklePath key_path - */ - - /** - * Constructs a new MerklePath. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerklePath. - * @implements IMerklePath - * @constructor - * @param {ibc.core.commitment.v1.IMerklePath=} [properties] Properties to set - */ - function MerklePath(properties) { - this.key_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]]; - } - - /** - * MerklePath key_path. - * @member {Array.} key_path - * @memberof ibc.core.commitment.v1.MerklePath - * @instance - */ - MerklePath.prototype.key_path = $util.emptyArray; - - /** - * Encodes the specified MerklePath message. Does not implicitly {@link ibc.core.commitment.v1.MerklePath.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {ibc.core.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.key_path != null && message.key_path.length) - for (var i = 0; i < message.key_path.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key_path[i]); - return writer; - }; - - /** - * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerklePath.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerklePath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.commitment.v1.MerklePath(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.key_path && message.key_path.length)) - message.key_path = []; - message.key_path.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MerklePath message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.key_path != null && message.hasOwnProperty("key_path")) { - if (!Array.isArray(message.key_path)) - return "key_path: array expected"; - for (var i = 0; i < message.key_path.length; ++i) - if (!$util.isString(message.key_path[i])) - return "key_path: string[] expected"; - } - return null; - }; - - /** - * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerklePath} MerklePath - */ - MerklePath.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerklePath) - return object; - var message = new $root.ibc.core.commitment.v1.MerklePath(); - if (object.key_path) { - if (!Array.isArray(object.key_path)) - throw TypeError(".ibc.core.commitment.v1.MerklePath.key_path: array expected"); - message.key_path = []; - for (var i = 0; i < object.key_path.length; ++i) - message.key_path[i] = String(object.key_path[i]); - } - return message; - }; - - /** - * Creates a plain object from a MerklePath message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {ibc.core.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.arrays || options.defaults) - object.key_path = []; - if (message.key_path && message.key_path.length) { - object.key_path = []; - for (var j = 0; j < message.key_path.length; ++j) - object.key_path[j] = message.key_path[j]; - } - return object; - }; - - /** - * Converts this MerklePath to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.commitment.v1 - * @interface IMerkleProof - * @property {Array.|null} [proofs] MerkleProof proofs - */ - - /** - * Constructs a new MerkleProof. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerkleProof. - * @implements IMerkleProof - * @constructor - * @param {ibc.core.commitment.v1.IMerkleProof=} [properties] Properties to set - */ - function MerkleProof(properties) { - this.proofs = []; - if (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 proofs. - * @member {Array.} proofs - * @memberof ibc.core.commitment.v1.MerkleProof - * @instance - */ - MerkleProof.prototype.proofs = $util.emptyArray; - - /** - * Encodes the specified MerkleProof message. Does not implicitly {@link ibc.core.commitment.v1.MerkleProof.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {ibc.core.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.proofs != null && message.proofs.length) - for (var i = 0; i < message.proofs.length; ++i) - $root.cosmos.ics23.v1.CommitmentProof.encode(message.proofs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerkleProof.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.commitment.v1.MerkleProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proofs && message.proofs.length)) - message.proofs = []; - message.proofs.push($root.cosmos.ics23.v1.CommitmentProof.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 ibc.core.commitment.v1.MerkleProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.proofs != null && message.hasOwnProperty("proofs")) { - if (!Array.isArray(message.proofs)) - return "proofs: array expected"; - for (var i = 0; i < message.proofs.length; ++i) { - var error = $root.cosmos.ics23.v1.CommitmentProof.verify(message.proofs[i]); - if (error) - return "proofs." + error; - } - } - return null; - }; - - /** - * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerkleProof} MerkleProof - */ - MerkleProof.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerkleProof) - return object; - var message = new $root.ibc.core.commitment.v1.MerkleProof(); - if (object.proofs) { - if (!Array.isArray(object.proofs)) - throw TypeError(".ibc.core.commitment.v1.MerkleProof.proofs: array expected"); - message.proofs = []; - for (var i = 0; i < object.proofs.length; ++i) { - if (typeof object.proofs[i] !== "object") - throw TypeError(".ibc.core.commitment.v1.MerkleProof.proofs: object expected"); - message.proofs[i] = $root.cosmos.ics23.v1.CommitmentProof.fromObject(object.proofs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {ibc.core.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.arrays || options.defaults) - object.proofs = []; - if (message.proofs && message.proofs.length) { - object.proofs = []; - for (var j = 0; j < message.proofs.length; ++j) - object.proofs[j] = $root.cosmos.ics23.v1.CommitmentProof.toObject(message.proofs[j], options); - } - return object; - }; - - /** - * Converts this MerkleProof to JSON. - * @function toJSON - * @memberof ibc.core.commitment.v1.MerkleProof - * @instance - * @returns {Object.} JSON object - */ - MerkleProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MerkleProof; - })(); - - return v1; - })(); - - return commitment; - })(); - - core.connection = (function() { - - /** - * Namespace connection. - * @memberof ibc.core - * @namespace - */ - var connection = {}; - - connection.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.connection - * @namespace - */ - var v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenInit}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenInitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenInitResponse} [response] MsgConnectionOpenInitResponse - */ - - /** - * Calls ConnectionOpenInit. - * @function connectionOpenInit - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} request MsgConnectionOpenInit message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenInitCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenInitResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenInit = function connectionOpenInit(request, callback) { - return this.rpcCall(connectionOpenInit, $root.ibc.core.connection.v1.MsgConnectionOpenInit, $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse, request, callback); - }, "name", { value: "ConnectionOpenInit" }); - - /** - * Calls ConnectionOpenInit. - * @function connectionOpenInit - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} request MsgConnectionOpenInit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenTry}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenTryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenTryResponse} [response] MsgConnectionOpenTryResponse - */ - - /** - * Calls ConnectionOpenTry. - * @function connectionOpenTry - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} request MsgConnectionOpenTry message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenTryCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenTryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenTry = function connectionOpenTry(request, callback) { - return this.rpcCall(connectionOpenTry, $root.ibc.core.connection.v1.MsgConnectionOpenTry, $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse, request, callback); - }, "name", { value: "ConnectionOpenTry" }); - - /** - * Calls ConnectionOpenTry. - * @function connectionOpenTry - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} request MsgConnectionOpenTry message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenAck}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenAckCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenAckResponse} [response] MsgConnectionOpenAckResponse - */ - - /** - * Calls ConnectionOpenAck. - * @function connectionOpenAck - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} request MsgConnectionOpenAck message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenAckCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenAckResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenAck = function connectionOpenAck(request, callback) { - return this.rpcCall(connectionOpenAck, $root.ibc.core.connection.v1.MsgConnectionOpenAck, $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse, request, callback); - }, "name", { value: "ConnectionOpenAck" }); - - /** - * Calls ConnectionOpenAck. - * @function connectionOpenAck - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} request MsgConnectionOpenAck message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenConfirm}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenConfirmCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} [response] MsgConnectionOpenConfirmResponse - */ - - /** - * Calls ConnectionOpenConfirm. - * @function connectionOpenConfirm - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} request MsgConnectionOpenConfirm message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenConfirmCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenConfirmResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenConfirm = function connectionOpenConfirm(request, callback) { - return this.rpcCall(connectionOpenConfirm, $root.ibc.core.connection.v1.MsgConnectionOpenConfirm, $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, request, callback); - }, "name", { value: "ConnectionOpenConfirm" }); - - /** - * Calls ConnectionOpenConfirm. - * @function connectionOpenConfirm - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} request MsgConnectionOpenConfirm message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgConnectionOpenInit = (function() { - - /** - * Properties of a MsgConnectionOpenInit. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenInit - * @property {string|null} [client_id] MsgConnectionOpenInit client_id - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenInit counterparty - * @property {ibc.core.connection.v1.IVersion|null} [version] MsgConnectionOpenInit version - * @property {Long|null} [delay_period] MsgConnectionOpenInit delay_period - * @property {string|null} [signer] MsgConnectionOpenInit signer - */ - - /** - * Constructs a new MsgConnectionOpenInit. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenInit. - * @implements IMsgConnectionOpenInit - * @constructor - * @param {ibc.core.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 client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.client_id = ""; - - /** - * MsgConnectionOpenInit counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.counterparty = null; - - /** - * MsgConnectionOpenInit version. - * @member {ibc.core.connection.v1.IVersion|null|undefined} version - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.version = null; - - /** - * MsgConnectionOpenInit delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenInit signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.signer = ""; - - /** - * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.ibc.core.connection.v1.Version.encode(message.version, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.delay_period); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.connection.v1.MsgConnectionOpenInit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = $root.ibc.core.connection.v1.Version.decode(reader, reader.uint32()); - break; - case 4: - message.delay_period = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - var error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.ibc.core.connection.v1.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit - */ - MsgConnectionOpenInit.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenInit) - return object; - var message = new $root.ibc.core.connection.v1.MsgConnectionOpenInit(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenInit.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenInit.version: object expected"); - message.version = $root.ibc.core.connection.v1.Version.fromObject(object.version); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {ibc.core.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.client_id = ""; - object.counterparty = null; - object.version = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.ibc.core.connection.v1.Version.toObject(message.version, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenInit to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenInit; - })(); - - v1.MsgConnectionOpenInitResponse = (function() { - - /** - * Properties of a MsgConnectionOpenInitResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenInitResponse - */ - - /** - * Constructs a new MsgConnectionOpenInitResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenInitResponse. - * @implements IMsgConnectionOpenInitResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse=} [properties] Properties to set - */ - function MsgConnectionOpenInitResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenInitResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenInitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenInitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenInitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenInitResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenInitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenInitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse - */ - MsgConnectionOpenInitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenInitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenInitResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenInitResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenInitResponse; - })(); - - v1.MsgConnectionOpenTry = (function() { - - /** - * Properties of a MsgConnectionOpenTry. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenTry - * @property {string|null} [client_id] MsgConnectionOpenTry client_id - * @property {string|null} [previous_connection_id] MsgConnectionOpenTry previous_connection_id - * @property {google.protobuf.IAny|null} [client_state] MsgConnectionOpenTry client_state - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenTry counterparty - * @property {Long|null} [delay_period] MsgConnectionOpenTry delay_period - * @property {Array.|null} [counterparty_versions] MsgConnectionOpenTry counterparty_versions - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgConnectionOpenTry proof_height - * @property {Uint8Array|null} [proof_init] MsgConnectionOpenTry proof_init - * @property {Uint8Array|null} [proof_client] MsgConnectionOpenTry proof_client - * @property {Uint8Array|null} [proof_consensus] MsgConnectionOpenTry proof_consensus - * @property {ibc.core.client.v1.IHeight|null} [consensus_height] MsgConnectionOpenTry consensus_height - * @property {string|null} [signer] MsgConnectionOpenTry signer - * @property {Uint8Array|null} [host_consensus_state_proof] MsgConnectionOpenTry host_consensus_state_proof - */ - - /** - * Constructs a new MsgConnectionOpenTry. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenTry. - * @implements IMsgConnectionOpenTry - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set - */ - function MsgConnectionOpenTry(properties) { - this.counterparty_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]]; - } - - /** - * MsgConnectionOpenTry client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.client_id = ""; - - /** - * MsgConnectionOpenTry previous_connection_id. - * @member {string} previous_connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.previous_connection_id = ""; - - /** - * MsgConnectionOpenTry client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.client_state = null; - - /** - * MsgConnectionOpenTry counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.counterparty = null; - - /** - * MsgConnectionOpenTry delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenTry counterparty_versions. - * @member {Array.} counterparty_versions - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.counterparty_versions = $util.emptyArray; - - /** - * MsgConnectionOpenTry proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_height = null; - - /** - * MsgConnectionOpenTry proof_init. - * @member {Uint8Array} proof_init - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_init = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry proof_client. - * @member {Uint8Array} proof_client - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_client = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry proof_consensus. - * @member {Uint8Array} proof_consensus - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_consensus = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry consensus_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} consensus_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.consensus_height = null; - - /** - * MsgConnectionOpenTry signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.signer = ""; - - /** - * MsgConnectionOpenTry host_consensus_state_proof. - * @member {Uint8Array} host_consensus_state_proof - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.host_consensus_state_proof = $util.newBuffer([]); - - /** - * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.previous_connection_id != null && Object.hasOwnProperty.call(message, "previous_connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.previous_connection_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.delay_period); - if (message.counterparty_versions != null && message.counterparty_versions.length) - for (var i = 0; i < message.counterparty_versions.length; ++i) - $root.ibc.core.connection.v1.Version.encode(message.counterparty_versions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.proof_init != null && Object.hasOwnProperty.call(message, "proof_init")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.proof_init); - if (message.proof_client != null && Object.hasOwnProperty.call(message, "proof_client")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.proof_client); - if (message.proof_consensus != null && Object.hasOwnProperty.call(message, "proof_consensus")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.proof_consensus); - if (message.consensus_height != null && Object.hasOwnProperty.call(message, "consensus_height")) - $root.ibc.core.client.v1.Height.encode(message.consensus_height, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.signer); - if (message.host_consensus_state_proof != null && Object.hasOwnProperty.call(message, "host_consensus_state_proof")) - writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.host_consensus_state_proof); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.connection.v1.MsgConnectionOpenTry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.previous_connection_id = reader.string(); - break; - case 3: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delay_period = reader.uint64(); - break; - case 6: - if (!(message.counterparty_versions && message.counterparty_versions.length)) - message.counterparty_versions = []; - message.counterparty_versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); - break; - case 7: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - message.proof_init = reader.bytes(); - break; - case 9: - message.proof_client = reader.bytes(); - break; - case 10: - message.proof_consensus = reader.bytes(); - break; - case 11: - message.consensus_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - case 13: - message.host_consensus_state_proof = 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 ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.previous_connection_id != null && message.hasOwnProperty("previous_connection_id")) - if (!$util.isString(message.previous_connection_id)) - return "previous_connection_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - var error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - if (message.counterparty_versions != null && message.hasOwnProperty("counterparty_versions")) { - if (!Array.isArray(message.counterparty_versions)) - return "counterparty_versions: array expected"; - for (var i = 0; i < message.counterparty_versions.length; ++i) { - var error = $root.ibc.core.connection.v1.Version.verify(message.counterparty_versions[i]); - if (error) - return "counterparty_versions." + error; - } - } - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - if (!(message.proof_init && typeof message.proof_init.length === "number" || $util.isString(message.proof_init))) - return "proof_init: buffer expected"; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - if (!(message.proof_client && typeof message.proof_client.length === "number" || $util.isString(message.proof_client))) - return "proof_client: buffer expected"; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - if (!(message.proof_consensus && typeof message.proof_consensus.length === "number" || $util.isString(message.proof_consensus))) - return "proof_consensus: buffer expected"; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.consensus_height); - if (error) - return "consensus_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - if (!(message.host_consensus_state_proof && typeof message.host_consensus_state_proof.length === "number" || $util.isString(message.host_consensus_state_proof))) - return "host_consensus_state_proof: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry - */ - MsgConnectionOpenTry.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenTry) - return object; - var message = new $root.ibc.core.connection.v1.MsgConnectionOpenTry(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.previous_connection_id != null) - message.previous_connection_id = String(object.previous_connection_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - if (object.counterparty_versions) { - if (!Array.isArray(object.counterparty_versions)) - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty_versions: array expected"); - message.counterparty_versions = []; - for (var i = 0; i < object.counterparty_versions.length; ++i) { - if (typeof object.counterparty_versions[i] !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty_versions: object expected"); - message.counterparty_versions[i] = $root.ibc.core.connection.v1.Version.fromObject(object.counterparty_versions[i]); - } - } - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.proof_init != null) - if (typeof object.proof_init === "string") - $util.base64.decode(object.proof_init, message.proof_init = $util.newBuffer($util.base64.length(object.proof_init)), 0); - else if (object.proof_init.length) - message.proof_init = object.proof_init; - if (object.proof_client != null) - if (typeof object.proof_client === "string") - $util.base64.decode(object.proof_client, message.proof_client = $util.newBuffer($util.base64.length(object.proof_client)), 0); - else if (object.proof_client.length) - message.proof_client = object.proof_client; - if (object.proof_consensus != null) - if (typeof object.proof_consensus === "string") - $util.base64.decode(object.proof_consensus, message.proof_consensus = $util.newBuffer($util.base64.length(object.proof_consensus)), 0); - else if (object.proof_consensus.length) - message.proof_consensus = object.proof_consensus; - if (object.consensus_height != null) { - if (typeof object.consensus_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.consensus_height: object expected"); - message.consensus_height = $root.ibc.core.client.v1.Height.fromObject(object.consensus_height); - } - if (object.signer != null) - message.signer = String(object.signer); - if (object.host_consensus_state_proof != null) - if (typeof object.host_consensus_state_proof === "string") - $util.base64.decode(object.host_consensus_state_proof, message.host_consensus_state_proof = $util.newBuffer($util.base64.length(object.host_consensus_state_proof)), 0); - else if (object.host_consensus_state_proof.length) - message.host_consensus_state_proof = object.host_consensus_state_proof; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {ibc.core.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.counterparty_versions = []; - if (options.defaults) { - object.client_id = ""; - object.previous_connection_id = ""; - object.client_state = null; - object.counterparty = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - object.proof_height = null; - if (options.bytes === String) - object.proof_init = ""; - else { - object.proof_init = []; - if (options.bytes !== Array) - object.proof_init = $util.newBuffer(object.proof_init); - } - if (options.bytes === String) - object.proof_client = ""; - else { - object.proof_client = []; - if (options.bytes !== Array) - object.proof_client = $util.newBuffer(object.proof_client); - } - if (options.bytes === String) - object.proof_consensus = ""; - else { - object.proof_consensus = []; - if (options.bytes !== Array) - object.proof_consensus = $util.newBuffer(object.proof_consensus); - } - object.consensus_height = null; - object.signer = ""; - if (options.bytes === String) - object.host_consensus_state_proof = ""; - else { - object.host_consensus_state_proof = []; - if (options.bytes !== Array) - object.host_consensus_state_proof = $util.newBuffer(object.host_consensus_state_proof); - } - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.previous_connection_id != null && message.hasOwnProperty("previous_connection_id")) - object.previous_connection_id = message.previous_connection_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - if (message.counterparty_versions && message.counterparty_versions.length) { - object.counterparty_versions = []; - for (var j = 0; j < message.counterparty_versions.length; ++j) - object.counterparty_versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.counterparty_versions[j], options); - } - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - object.proof_init = options.bytes === String ? $util.base64.encode(message.proof_init, 0, message.proof_init.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_init) : message.proof_init; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - object.proof_client = options.bytes === String ? $util.base64.encode(message.proof_client, 0, message.proof_client.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_client) : message.proof_client; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - object.proof_consensus = options.bytes === String ? $util.base64.encode(message.proof_consensus, 0, message.proof_consensus.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_consensus) : message.proof_consensus; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) - object.consensus_height = $root.ibc.core.client.v1.Height.toObject(message.consensus_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - object.host_consensus_state_proof = options.bytes === String ? $util.base64.encode(message.host_consensus_state_proof, 0, message.host_consensus_state_proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.host_consensus_state_proof) : message.host_consensus_state_proof; - return object; - }; - - /** - * Converts this MsgConnectionOpenTry to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenTry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenTry; - })(); - - v1.MsgConnectionOpenTryResponse = (function() { - - /** - * Properties of a MsgConnectionOpenTryResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenTryResponse - */ - - /** - * Constructs a new MsgConnectionOpenTryResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenTryResponse. - * @implements IMsgConnectionOpenTryResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse=} [properties] Properties to set - */ - function MsgConnectionOpenTryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenTryResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenTryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenTryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenTryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenTryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenTryResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenTryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenTryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse - */ - MsgConnectionOpenTryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenTryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenTryResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenTryResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenTryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenTryResponse; - })(); - - v1.MsgConnectionOpenAck = (function() { - - /** - * Properties of a MsgConnectionOpenAck. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenAck - * @property {string|null} [connection_id] MsgConnectionOpenAck connection_id - * @property {string|null} [counterparty_connection_id] MsgConnectionOpenAck counterparty_connection_id - * @property {ibc.core.connection.v1.IVersion|null} [version] MsgConnectionOpenAck version - * @property {google.protobuf.IAny|null} [client_state] MsgConnectionOpenAck client_state - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgConnectionOpenAck proof_height - * @property {Uint8Array|null} [proof_try] MsgConnectionOpenAck proof_try - * @property {Uint8Array|null} [proof_client] MsgConnectionOpenAck proof_client - * @property {Uint8Array|null} [proof_consensus] MsgConnectionOpenAck proof_consensus - * @property {ibc.core.client.v1.IHeight|null} [consensus_height] MsgConnectionOpenAck consensus_height - * @property {string|null} [signer] MsgConnectionOpenAck signer - * @property {Uint8Array|null} [host_consensus_state_proof] MsgConnectionOpenAck host_consensus_state_proof - */ - - /** - * Constructs a new MsgConnectionOpenAck. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenAck. - * @implements IMsgConnectionOpenAck - * @constructor - * @param {ibc.core.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 connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.connection_id = ""; - - /** - * MsgConnectionOpenAck counterparty_connection_id. - * @member {string} counterparty_connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.counterparty_connection_id = ""; - - /** - * MsgConnectionOpenAck version. - * @member {ibc.core.connection.v1.IVersion|null|undefined} version - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.version = null; - - /** - * MsgConnectionOpenAck client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.client_state = null; - - /** - * MsgConnectionOpenAck proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_height = null; - - /** - * MsgConnectionOpenAck proof_try. - * @member {Uint8Array} proof_try - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_try = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck proof_client. - * @member {Uint8Array} proof_client - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_client = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck proof_consensus. - * @member {Uint8Array} proof_consensus - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_consensus = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck consensus_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} consensus_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.consensus_height = null; - - /** - * MsgConnectionOpenAck signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.signer = ""; - - /** - * MsgConnectionOpenAck host_consensus_state_proof. - * @member {Uint8Array} host_consensus_state_proof - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.host_consensus_state_proof = $util.newBuffer([]); - - /** - * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {ibc.core.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.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.counterparty_connection_id != null && Object.hasOwnProperty.call(message, "counterparty_connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.counterparty_connection_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.ibc.core.connection.v1.Version.encode(message.version, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.proof_try != null && Object.hasOwnProperty.call(message, "proof_try")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.proof_try); - if (message.proof_client != null && Object.hasOwnProperty.call(message, "proof_client")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.proof_client); - if (message.proof_consensus != null && Object.hasOwnProperty.call(message, "proof_consensus")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.proof_consensus); - if (message.consensus_height != null && Object.hasOwnProperty.call(message, "consensus_height")) - $root.ibc.core.client.v1.Height.encode(message.consensus_height, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.signer); - if (message.host_consensus_state_proof != null && Object.hasOwnProperty.call(message, "host_consensus_state_proof")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.host_consensus_state_proof); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.connection.v1.MsgConnectionOpenAck(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.counterparty_connection_id = reader.string(); - break; - case 3: - message.version = $root.ibc.core.connection.v1.Version.decode(reader, reader.uint32()); - break; - case 4: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 5: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 6: - message.proof_try = reader.bytes(); - break; - case 7: - message.proof_client = reader.bytes(); - break; - case 8: - message.proof_consensus = reader.bytes(); - break; - case 9: - message.consensus_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - case 11: - message.host_consensus_state_proof = 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 ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.counterparty_connection_id != null && message.hasOwnProperty("counterparty_connection_id")) - if (!$util.isString(message.counterparty_connection_id)) - return "counterparty_connection_id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.ibc.core.connection.v1.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - if (!(message.proof_try && typeof message.proof_try.length === "number" || $util.isString(message.proof_try))) - return "proof_try: buffer expected"; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - if (!(message.proof_client && typeof message.proof_client.length === "number" || $util.isString(message.proof_client))) - return "proof_client: buffer expected"; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - if (!(message.proof_consensus && typeof message.proof_consensus.length === "number" || $util.isString(message.proof_consensus))) - return "proof_consensus: buffer expected"; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.consensus_height); - if (error) - return "consensus_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - if (!(message.host_consensus_state_proof && typeof message.host_consensus_state_proof.length === "number" || $util.isString(message.host_consensus_state_proof))) - return "host_consensus_state_proof: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck - */ - MsgConnectionOpenAck.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenAck) - return object; - var message = new $root.ibc.core.connection.v1.MsgConnectionOpenAck(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.counterparty_connection_id != null) - message.counterparty_connection_id = String(object.counterparty_connection_id); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.version: object expected"); - message.version = $root.ibc.core.connection.v1.Version.fromObject(object.version); - } - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.proof_try != null) - if (typeof object.proof_try === "string") - $util.base64.decode(object.proof_try, message.proof_try = $util.newBuffer($util.base64.length(object.proof_try)), 0); - else if (object.proof_try.length) - message.proof_try = object.proof_try; - if (object.proof_client != null) - if (typeof object.proof_client === "string") - $util.base64.decode(object.proof_client, message.proof_client = $util.newBuffer($util.base64.length(object.proof_client)), 0); - else if (object.proof_client.length) - message.proof_client = object.proof_client; - if (object.proof_consensus != null) - if (typeof object.proof_consensus === "string") - $util.base64.decode(object.proof_consensus, message.proof_consensus = $util.newBuffer($util.base64.length(object.proof_consensus)), 0); - else if (object.proof_consensus.length) - message.proof_consensus = object.proof_consensus; - if (object.consensus_height != null) { - if (typeof object.consensus_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.consensus_height: object expected"); - message.consensus_height = $root.ibc.core.client.v1.Height.fromObject(object.consensus_height); - } - if (object.signer != null) - message.signer = String(object.signer); - if (object.host_consensus_state_proof != null) - if (typeof object.host_consensus_state_proof === "string") - $util.base64.decode(object.host_consensus_state_proof, message.host_consensus_state_proof = $util.newBuffer($util.base64.length(object.host_consensus_state_proof)), 0); - else if (object.host_consensus_state_proof.length) - message.host_consensus_state_proof = object.host_consensus_state_proof; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {ibc.core.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.connection_id = ""; - object.counterparty_connection_id = ""; - object.version = null; - object.client_state = null; - object.proof_height = null; - if (options.bytes === String) - object.proof_try = ""; - else { - object.proof_try = []; - if (options.bytes !== Array) - object.proof_try = $util.newBuffer(object.proof_try); - } - if (options.bytes === String) - object.proof_client = ""; - else { - object.proof_client = []; - if (options.bytes !== Array) - object.proof_client = $util.newBuffer(object.proof_client); - } - if (options.bytes === String) - object.proof_consensus = ""; - else { - object.proof_consensus = []; - if (options.bytes !== Array) - object.proof_consensus = $util.newBuffer(object.proof_consensus); - } - object.consensus_height = null; - object.signer = ""; - if (options.bytes === String) - object.host_consensus_state_proof = ""; - else { - object.host_consensus_state_proof = []; - if (options.bytes !== Array) - object.host_consensus_state_proof = $util.newBuffer(object.host_consensus_state_proof); - } - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.counterparty_connection_id != null && message.hasOwnProperty("counterparty_connection_id")) - object.counterparty_connection_id = message.counterparty_connection_id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.ibc.core.connection.v1.Version.toObject(message.version, options); - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - object.proof_try = options.bytes === String ? $util.base64.encode(message.proof_try, 0, message.proof_try.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_try) : message.proof_try; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - object.proof_client = options.bytes === String ? $util.base64.encode(message.proof_client, 0, message.proof_client.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_client) : message.proof_client; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - object.proof_consensus = options.bytes === String ? $util.base64.encode(message.proof_consensus, 0, message.proof_consensus.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_consensus) : message.proof_consensus; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) - object.consensus_height = $root.ibc.core.client.v1.Height.toObject(message.consensus_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - object.host_consensus_state_proof = options.bytes === String ? $util.base64.encode(message.host_consensus_state_proof, 0, message.host_consensus_state_proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.host_consensus_state_proof) : message.host_consensus_state_proof; - return object; - }; - - /** - * Converts this MsgConnectionOpenAck to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenAck; - })(); - - v1.MsgConnectionOpenAckResponse = (function() { - - /** - * Properties of a MsgConnectionOpenAckResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenAckResponse - */ - - /** - * Constructs a new MsgConnectionOpenAckResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenAckResponse. - * @implements IMsgConnectionOpenAckResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse=} [properties] Properties to set - */ - function MsgConnectionOpenAckResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenAckResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenAckResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenAckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenAckResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenAckResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenAckResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenAckResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenAckResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse - */ - MsgConnectionOpenAckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenAckResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenAckResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenAckResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenAckResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenAckResponse; - })(); - - v1.MsgConnectionOpenConfirm = (function() { - - /** - * Properties of a MsgConnectionOpenConfirm. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenConfirm - * @property {string|null} [connection_id] MsgConnectionOpenConfirm connection_id - * @property {Uint8Array|null} [proof_ack] MsgConnectionOpenConfirm proof_ack - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgConnectionOpenConfirm proof_height - * @property {string|null} [signer] MsgConnectionOpenConfirm signer - */ - - /** - * Constructs a new MsgConnectionOpenConfirm. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenConfirm. - * @implements IMsgConnectionOpenConfirm - * @constructor - * @param {ibc.core.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 connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.connection_id = ""; - - /** - * MsgConnectionOpenConfirm proof_ack. - * @member {Uint8Array} proof_ack - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.proof_ack = $util.newBuffer([]); - - /** - * MsgConnectionOpenConfirm proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.proof_height = null; - - /** - * MsgConnectionOpenConfirm signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.signer = ""; - - /** - * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {ibc.core.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.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.proof_ack != null && Object.hasOwnProperty.call(message, "proof_ack")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_ack); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, 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).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.connection.v1.MsgConnectionOpenConfirm(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.proof_ack = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - if (!(message.proof_ack && typeof message.proof_ack.length === "number" || $util.isString(message.proof_ack))) - return "proof_ack: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm - */ - MsgConnectionOpenConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenConfirm) - return object; - var message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirm(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.proof_ack != null) - if (typeof object.proof_ack === "string") - $util.base64.decode(object.proof_ack, message.proof_ack = $util.newBuffer($util.base64.length(object.proof_ack)), 0); - else if (object.proof_ack.length) - message.proof_ack = object.proof_ack; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenConfirm.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {ibc.core.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.connection_id = ""; - if (options.bytes === String) - object.proof_ack = ""; - else { - object.proof_ack = []; - if (options.bytes !== Array) - object.proof_ack = $util.newBuffer(object.proof_ack); - } - object.proof_height = null; - object.signer = ""; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - object.proof_ack = options.bytes === String ? $util.base64.encode(message.proof_ack, 0, message.proof_ack.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_ack) : message.proof_ack; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenConfirm to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenConfirm; - })(); - - v1.MsgConnectionOpenConfirmResponse = (function() { - - /** - * Properties of a MsgConnectionOpenConfirmResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenConfirmResponse - */ - - /** - * Constructs a new MsgConnectionOpenConfirmResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenConfirmResponse. - * @implements IMsgConnectionOpenConfirmResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse=} [properties] Properties to set - */ - function MsgConnectionOpenConfirmResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenConfirmResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenConfirmResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenConfirmResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenConfirmResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenConfirmResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenConfirmResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse - */ - MsgConnectionOpenConfirmResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenConfirmResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenConfirmResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenConfirmResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenConfirmResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenConfirmResponse; - })(); - - v1.ConnectionEnd = (function() { - - /** - * Properties of a ConnectionEnd. - * @memberof ibc.core.connection.v1 - * @interface IConnectionEnd - * @property {string|null} [client_id] ConnectionEnd client_id - * @property {Array.|null} [versions] ConnectionEnd versions - * @property {ibc.core.connection.v1.State|null} [state] ConnectionEnd state - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] ConnectionEnd counterparty - * @property {Long|null} [delay_period] ConnectionEnd delay_period - */ - - /** - * Constructs a new ConnectionEnd. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a ConnectionEnd. - * @implements IConnectionEnd - * @constructor - * @param {ibc.core.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 client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.client_id = ""; - - /** - * ConnectionEnd versions. - * @member {Array.} versions - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.versions = $util.emptyArray; - - /** - * ConnectionEnd state. - * @member {ibc.core.connection.v1.State} state - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.state = 0; - - /** - * ConnectionEnd counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.counterparty = null; - - /** - * ConnectionEnd delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ConnectionEnd message. Does not implicitly {@link ibc.core.connection.v1.ConnectionEnd.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.versions != null && message.versions.length) - for (var i = 0; i < message.versions.length; ++i) - $root.ibc.core.connection.v1.Version.encode(message.versions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.delay_period); - return writer; - }; - - /** - * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionEnd.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {ibc.core.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 ibc.core.connection.v1.ConnectionEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.connection.v1.ConnectionEnd(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delay_period = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: 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) { - var error = $root.ibc.core.connection.v1.Version.verify(message.versions[i]); - if (error) - return "versions." + error; - } - } - 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.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - return null; - }; - - /** - * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.ConnectionEnd} ConnectionEnd - */ - ConnectionEnd.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.ConnectionEnd) - return object; - var message = new $root.ibc.core.connection.v1.ConnectionEnd(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".ibc.core.connection.v1.ConnectionEnd.versions: array expected"); - message.versions = []; - for (var i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".ibc.core.connection.v1.ConnectionEnd.versions: object expected"); - message.versions[i] = $root.ibc.core.connection.v1.Version.fromObject(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(".ibc.core.connection.v1.ConnectionEnd.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {ibc.core.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.client_id = ""; - object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; - object.counterparty = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.versions && message.versions.length) { - object.versions = []; - for (var j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.versions[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.connection.v1.State[message.state] : message.state; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - return object; - }; - - /** - * Converts this ConnectionEnd to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - * @returns {Object.} JSON object - */ - ConnectionEnd.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConnectionEnd; - })(); - - v1.IdentifiedConnection = (function() { - - /** - * Properties of an IdentifiedConnection. - * @memberof ibc.core.connection.v1 - * @interface IIdentifiedConnection - * @property {string|null} [id] IdentifiedConnection id - * @property {string|null} [client_id] IdentifiedConnection client_id - * @property {Array.|null} [versions] IdentifiedConnection versions - * @property {ibc.core.connection.v1.State|null} [state] IdentifiedConnection state - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] IdentifiedConnection counterparty - * @property {Long|null} [delay_period] IdentifiedConnection delay_period - */ - - /** - * Constructs a new IdentifiedConnection. - * @memberof ibc.core.connection.v1 - * @classdesc Represents an IdentifiedConnection. - * @implements IIdentifiedConnection - * @constructor - * @param {ibc.core.connection.v1.IIdentifiedConnection=} [properties] Properties to set - */ - function IdentifiedConnection(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]]; - } - - /** - * IdentifiedConnection id. - * @member {string} id - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.id = ""; - - /** - * IdentifiedConnection client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.client_id = ""; - - /** - * IdentifiedConnection versions. - * @member {Array.} versions - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.versions = $util.emptyArray; - - /** - * IdentifiedConnection state. - * @member {ibc.core.connection.v1.State} state - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.state = 0; - - /** - * IdentifiedConnection counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.counterparty = null; - - /** - * IdentifiedConnection delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified IdentifiedConnection message. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {ibc.core.connection.v1.IIdentifiedConnection} message IdentifiedConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedConnection.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.client_id); - if (message.versions != null && message.versions.length) - for (var i = 0; i < message.versions.length; ++i) - $root.ibc.core.connection.v1.Version.encode(message.versions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.delay_period); - return writer; - }; - - /** - * Encodes the specified IdentifiedConnection message, length delimited. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {ibc.core.connection.v1.IIdentifiedConnection} message IdentifiedConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedConnection message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedConnection.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.IdentifiedConnection(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delay_period = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedConnection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedConnection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedConnection message. - * @function verify - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedConnection.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: 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) { - var error = $root.ibc.core.connection.v1.Version.verify(message.versions[i]); - if (error) - return "versions." + error; - } - } - 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.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - return null; - }; - - /** - * Creates an IdentifiedConnection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection - */ - IdentifiedConnection.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.IdentifiedConnection) - return object; - var message = new $root.ibc.core.connection.v1.IdentifiedConnection(); - if (object.id != null) - message.id = String(object.id); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.versions: array expected"); - message.versions = []; - for (var i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.versions: object expected"); - message.versions[i] = $root.ibc.core.connection.v1.Version.fromObject(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(".ibc.core.connection.v1.IdentifiedConnection.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an IdentifiedConnection message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {ibc.core.connection.v1.IdentifiedConnection} message IdentifiedConnection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedConnection.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.versions = []; - if (options.defaults) { - object.id = ""; - object.client_id = ""; - object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; - object.counterparty = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.versions && message.versions.length) { - object.versions = []; - for (var j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.versions[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.connection.v1.State[message.state] : message.state; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - return object; - }; - - /** - * Converts this IdentifiedConnection to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - * @returns {Object.} JSON object - */ - IdentifiedConnection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedConnection; - })(); - - /** - * State enum. - * @name ibc.core.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 ibc.core.connection.v1 - * @interface ICounterparty - * @property {string|null} [client_id] Counterparty client_id - * @property {string|null} [connection_id] Counterparty connection_id - * @property {ibc.core.commitment.v1.IMerklePrefix|null} [prefix] Counterparty prefix - */ - - /** - * Constructs a new Counterparty. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {ibc.core.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 client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.client_id = ""; - - /** - * Counterparty connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.connection_id = ""; - - /** - * Counterparty prefix. - * @member {ibc.core.commitment.v1.IMerklePrefix|null|undefined} prefix - * @memberof ibc.core.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.prefix = null; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.connection.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.Counterparty - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - $root.ibc.core.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 ibc.core.connection.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.Counterparty - * @static - * @param {ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.connection.v1.Counterparty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.prefix = $root.ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.prefix != null && message.hasOwnProperty("prefix")) { - var error = $root.ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.Counterparty) - return object; - var message = new $root.ibc.core.connection.v1.Counterparty(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.prefix != null) { - if (typeof object.prefix !== "object") - throw TypeError(".ibc.core.connection.v1.Counterparty.prefix: object expected"); - message.prefix = $root.ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {ibc.core.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.client_id = ""; - object.connection_id = ""; - object.prefix = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = $root.ibc.core.commitment.v1.MerklePrefix.toObject(message.prefix, options); - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.connection.v1 - * @interface IClientPaths - * @property {Array.|null} [paths] ClientPaths paths - */ - - /** - * Constructs a new ClientPaths. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a ClientPaths. - * @implements IClientPaths - * @constructor - * @param {ibc.core.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 ibc.core.connection.v1.ClientPaths - * @instance - */ - ClientPaths.prototype.paths = $util.emptyArray; - - /** - * Encodes the specified ClientPaths message. Does not implicitly {@link ibc.core.connection.v1.ClientPaths.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.ClientPaths - * @static - * @param {ibc.core.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 ibc.core.connection.v1.ClientPaths.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.ClientPaths - * @static - * @param {ibc.core.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 ibc.core.connection.v1.ClientPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.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 ibc.core.connection.v1.ClientPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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 ibc.core.connection.v1.ClientPaths - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.ClientPaths} ClientPaths - */ - ClientPaths.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.ClientPaths) - return object; - var message = new $root.ibc.core.connection.v1.ClientPaths(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".ibc.core.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 ibc.core.connection.v1.ClientPaths - * @static - * @param {ibc.core.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 ibc.core.connection.v1.ClientPaths - * @instance - * @returns {Object.} JSON object - */ - ClientPaths.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientPaths; - })(); - - v1.ConnectionPaths = (function() { - - /** - * Properties of a ConnectionPaths. - * @memberof ibc.core.connection.v1 - * @interface IConnectionPaths - * @property {string|null} [client_id] ConnectionPaths client_id - * @property {Array.|null} [paths] ConnectionPaths paths - */ - - /** - * Constructs a new ConnectionPaths. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a ConnectionPaths. - * @implements IConnectionPaths - * @constructor - * @param {ibc.core.connection.v1.IConnectionPaths=} [properties] Properties to set - */ - function ConnectionPaths(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]]; - } - - /** - * ConnectionPaths client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.ConnectionPaths - * @instance - */ - ConnectionPaths.prototype.client_id = ""; - - /** - * ConnectionPaths paths. - * @member {Array.} paths - * @memberof ibc.core.connection.v1.ConnectionPaths - * @instance - */ - ConnectionPaths.prototype.paths = $util.emptyArray; - - /** - * Encodes the specified ConnectionPaths message. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {ibc.core.connection.v1.IConnectionPaths} message ConnectionPaths message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionPaths.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified ConnectionPaths message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {ibc.core.connection.v1.IConnectionPaths} message ConnectionPaths message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionPaths.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectionPaths message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionPaths.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ConnectionPaths(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionPaths message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionPaths.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionPaths message. - * @function verify - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionPaths.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string 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 ConnectionPaths message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths - */ - ConnectionPaths.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.ConnectionPaths) - return object; - var message = new $root.ibc.core.connection.v1.ConnectionPaths(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".ibc.core.connection.v1.ConnectionPaths.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 ConnectionPaths message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {ibc.core.connection.v1.ConnectionPaths} message ConnectionPaths - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionPaths.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - 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 ConnectionPaths to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.ConnectionPaths - * @instance - * @returns {Object.} JSON object - */ - ConnectionPaths.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConnectionPaths; - })(); - - v1.Version = (function() { - - /** - * Properties of a Version. - * @memberof ibc.core.connection.v1 - * @interface IVersion - * @property {string|null} [identifier] Version identifier - * @property {Array.|null} [features] Version features - */ - - /** - * Constructs a new Version. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Version. - * @implements IVersion - * @constructor - * @param {ibc.core.connection.v1.IVersion=} [properties] Properties to set - */ - function Version(properties) { - this.features = []; - if (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 identifier. - * @member {string} identifier - * @memberof ibc.core.connection.v1.Version - * @instance - */ - Version.prototype.identifier = ""; - - /** - * Version features. - * @member {Array.} features - * @memberof ibc.core.connection.v1.Version - * @instance - */ - Version.prototype.features = $util.emptyArray; - - /** - * Encodes the specified Version message. Does not implicitly {@link ibc.core.connection.v1.Version.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.Version - * @static - * @param {ibc.core.connection.v1.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.identifier != null && Object.hasOwnProperty.call(message, "identifier")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.identifier); - if (message.features != null && message.features.length) - for (var i = 0; i < message.features.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.features[i]); - return writer; - }; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link ibc.core.connection.v1.Version.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.Version - * @static - * @param {ibc.core.connection.v1.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 ibc.core.connection.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.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.ibc.core.connection.v1.Version(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - if (!(message.features && message.features.length)) - message.features = []; - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.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 ibc.core.connection.v1.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.identifier != null && message.hasOwnProperty("identifier")) - if (!$util.isString(message.identifier)) - return "identifier: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - if (!Array.isArray(message.features)) - return "features: array expected"; - for (var i = 0; i < message.features.length; ++i) - if (!$util.isString(message.features[i])) - return "features: string[] expected"; - } - return null; - }; - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.Version - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.Version} Version - */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.Version) - return object; - var message = new $root.ibc.core.connection.v1.Version(); - if (object.identifier != null) - message.identifier = String(object.identifier); - if (object.features) { - if (!Array.isArray(object.features)) - throw TypeError(".ibc.core.connection.v1.Version.features: array expected"); - message.features = []; - for (var i = 0; i < object.features.length; ++i) - message.features[i] = String(object.features[i]); - } - return message; - }; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.Version - * @static - * @param {ibc.core.connection.v1.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.arrays || options.defaults) - object.features = []; - if (options.defaults) - object.identifier = ""; - if (message.identifier != null && message.hasOwnProperty("identifier")) - object.identifier = message.identifier; - if (message.features && message.features.length) { - object.features = []; - for (var j = 0; j < message.features.length; ++j) - object.features[j] = message.features[j]; - } - return object; - }; - - /** - * Converts this Version to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.Version - * @instance - * @returns {Object.} JSON object - */ - Version.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Version; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.core.connection.v1 - * @interface IParams - * @property {Long|null} [max_expected_time_per_block] Params max_expected_time_per_block - */ - - /** - * Constructs a new Params. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.core.connection.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 max_expected_time_per_block. - * @member {Long} max_expected_time_per_block - * @memberof ibc.core.connection.v1.Params - * @instance - */ - Params.prototype.max_expected_time_per_block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.connection.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.Params - * @static - * @param {ibc.core.connection.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.max_expected_time_per_block != null && Object.hasOwnProperty.call(message, "max_expected_time_per_block")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.max_expected_time_per_block); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.connection.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.Params - * @static - * @param {ibc.core.connection.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 ibc.core.connection.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.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.ibc.core.connection.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_expected_time_per_block = 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 ibc.core.connection.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.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 ibc.core.connection.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.max_expected_time_per_block != null && message.hasOwnProperty("max_expected_time_per_block")) - if (!$util.isInteger(message.max_expected_time_per_block) && !(message.max_expected_time_per_block && $util.isInteger(message.max_expected_time_per_block.low) && $util.isInteger(message.max_expected_time_per_block.high))) - return "max_expected_time_per_block: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.Params) - return object; - var message = new $root.ibc.core.connection.v1.Params(); - if (object.max_expected_time_per_block != null) - if ($util.Long) - (message.max_expected_time_per_block = $util.Long.fromValue(object.max_expected_time_per_block)).unsigned = true; - else if (typeof object.max_expected_time_per_block === "string") - message.max_expected_time_per_block = parseInt(object.max_expected_time_per_block, 10); - else if (typeof object.max_expected_time_per_block === "number") - message.max_expected_time_per_block = object.max_expected_time_per_block; - else if (typeof object.max_expected_time_per_block === "object") - message.max_expected_time_per_block = new $util.LongBits(object.max_expected_time_per_block.low >>> 0, object.max_expected_time_per_block.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 ibc.core.connection.v1.Params - * @static - * @param {ibc.core.connection.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.max_expected_time_per_block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_expected_time_per_block = options.longs === String ? "0" : 0; - if (message.max_expected_time_per_block != null && message.hasOwnProperty("max_expected_time_per_block")) - if (typeof message.max_expected_time_per_block === "number") - object.max_expected_time_per_block = options.longs === String ? String(message.max_expected_time_per_block) : message.max_expected_time_per_block; - else - object.max_expected_time_per_block = options.longs === String ? $util.Long.prototype.toString.call(message.max_expected_time_per_block) : options.longs === Number ? new $util.LongBits(message.max_expected_time_per_block.low >>> 0, message.max_expected_time_per_block.high >>> 0).toNumber(true) : message.max_expected_time_per_block; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.core.connection.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; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connection}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionResponse} [response] QueryConnectionResponse - */ - - /** - * Calls Connection. - * @function connection - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionRequest} request QueryConnectionRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionCallback} callback Node-style callback called with the error, if any, and QueryConnectionResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connection = function connection(request, callback) { - return this.rpcCall(connection, $root.ibc.core.connection.v1.QueryConnectionRequest, $root.ibc.core.connection.v1.QueryConnectionResponse, request, callback); - }, "name", { value: "Connection" }); - - /** - * Calls Connection. - * @function connection - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionRequest} request QueryConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connections}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionsResponse} [response] QueryConnectionsResponse - */ - - /** - * Calls Connections. - * @function connections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} request QueryConnectionsRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionsCallback} callback Node-style callback called with the error, if any, and QueryConnectionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connections = function connections(request, callback) { - return this.rpcCall(connections, $root.ibc.core.connection.v1.QueryConnectionsRequest, $root.ibc.core.connection.v1.QueryConnectionsResponse, request, callback); - }, "name", { value: "Connections" }); - - /** - * Calls Connections. - * @function connections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} request QueryConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#clientConnections}. - * @memberof ibc.core.connection.v1.Query - * @typedef ClientConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryClientConnectionsResponse} [response] QueryClientConnectionsResponse - */ - - /** - * Calls ClientConnections. - * @function clientConnections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} request QueryClientConnectionsRequest message or plain object - * @param {ibc.core.connection.v1.Query.ClientConnectionsCallback} callback Node-style callback called with the error, if any, and QueryClientConnectionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientConnections = function clientConnections(request, callback) { - return this.rpcCall(clientConnections, $root.ibc.core.connection.v1.QueryClientConnectionsRequest, $root.ibc.core.connection.v1.QueryClientConnectionsResponse, request, callback); - }, "name", { value: "ClientConnections" }); - - /** - * Calls ClientConnections. - * @function clientConnections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} request QueryClientConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionClientState}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionClientStateResponse} [response] QueryConnectionClientStateResponse - */ - - /** - * Calls ConnectionClientState. - * @function connectionClientState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} request QueryConnectionClientStateRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionClientStateCallback} callback Node-style callback called with the error, if any, and QueryConnectionClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionClientState = function connectionClientState(request, callback) { - return this.rpcCall(connectionClientState, $root.ibc.core.connection.v1.QueryConnectionClientStateRequest, $root.ibc.core.connection.v1.QueryConnectionClientStateResponse, request, callback); - }, "name", { value: "ConnectionClientState" }); - - /** - * Calls ConnectionClientState. - * @function connectionClientState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} request QueryConnectionClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionConsensusState}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} [response] QueryConnectionConsensusStateResponse - */ - - /** - * Calls ConnectionConsensusState. - * @function connectionConsensusState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} request QueryConnectionConsensusStateRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConnectionConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionConsensusState = function connectionConsensusState(request, callback) { - return this.rpcCall(connectionConsensusState, $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, request, callback); - }, "name", { value: "ConnectionConsensusState" }); - - /** - * Calls ConnectionConsensusState. - * @function connectionConsensusState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} request QueryConnectionConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionParams}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionParamsResponse} [response] QueryConnectionParamsResponse - */ - - /** - * Calls ConnectionParams. - * @function connectionParams - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} request QueryConnectionParamsRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionParamsCallback} callback Node-style callback called with the error, if any, and QueryConnectionParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionParams = function connectionParams(request, callback) { - return this.rpcCall(connectionParams, $root.ibc.core.connection.v1.QueryConnectionParamsRequest, $root.ibc.core.connection.v1.QueryConnectionParamsResponse, request, callback); - }, "name", { value: "ConnectionParams" }); - - /** - * Calls ConnectionParams. - * @function connectionParams - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} request QueryConnectionParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryConnectionRequest = (function() { - - /** - * Properties of a QueryConnectionRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionRequest - * @property {string|null} [connection_id] QueryConnectionRequest connection_id - */ - - /** - * Constructs a new QueryConnectionRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionRequest. - * @implements IQueryConnectionRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionRequest=} [properties] Properties to set - */ - function QueryConnectionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionRequest connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @instance - */ - QueryConnectionRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryConnectionRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionRequest} message QueryConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryConnectionRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionRequest} message QueryConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest - */ - QueryConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionRequest) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionRequest(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionRequest} message QueryConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.connection_id = ""; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryConnectionRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionRequest; - })(); - - v1.QueryConnectionResponse = (function() { - - /** - * Properties of a QueryConnectionResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionResponse - * @property {ibc.core.connection.v1.IConnectionEnd|null} [connection] QueryConnectionResponse connection - * @property {Uint8Array|null} [proof] QueryConnectionResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConnectionResponse proof_height - */ - - /** - * Constructs a new QueryConnectionResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionResponse. - * @implements IQueryConnectionResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionResponse=} [properties] Properties to set - */ - function QueryConnectionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionResponse connection. - * @member {ibc.core.connection.v1.IConnectionEnd|null|undefined} connection - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - */ - QueryConnectionResponse.prototype.connection = null; - - /** - * QueryConnectionResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - */ - QueryConnectionResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConnectionResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - */ - QueryConnectionResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConnectionResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionResponse} message QueryConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - $root.ibc.core.connection.v1.ConnectionEnd.encode(message.connection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionResponse} message QueryConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection != null && message.hasOwnProperty("connection")) { - var error = $root.ibc.core.connection.v1.ConnectionEnd.verify(message.connection); - if (error) - return "connection." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse - */ - QueryConnectionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionResponse) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionResponse(); - if (object.connection != null) { - if (typeof object.connection !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionResponse.connection: object expected"); - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.fromObject(object.connection); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionResponse} message QueryConnectionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connection = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = $root.ibc.core.connection.v1.ConnectionEnd.toObject(message.connection, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConnectionResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionResponse; - })(); - - v1.QueryConnectionsRequest = (function() { - - /** - * Properties of a QueryConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConnectionsRequest pagination - */ - - /** - * Constructs a new QueryConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionsRequest. - * @implements IQueryConnectionsRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionsRequest=} [properties] Properties to set - */ - function QueryConnectionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @instance - */ - QueryConnectionsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} message QueryConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} message QueryConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionsRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest - */ - QueryConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionsRequest) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionsRequest} message QueryConnectionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConnectionsRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionsRequest; - })(); - - v1.QueryConnectionsResponse = (function() { - - /** - * Properties of a QueryConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionsResponse - * @property {Array.|null} [connections] QueryConnectionsResponse connections - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConnectionsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryConnectionsResponse height - */ - - /** - * Constructs a new QueryConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionsResponse. - * @implements IQueryConnectionsResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionsResponse=} [properties] Properties to set - */ - function QueryConnectionsResponse(properties) { - this.connections = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionsResponse connections. - * @member {Array.} connections - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - */ - QueryConnectionsResponse.prototype.connections = $util.emptyArray; - - /** - * QueryConnectionsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - */ - QueryConnectionsResponse.prototype.pagination = null; - - /** - * QueryConnectionsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - */ - QueryConnectionsResponse.prototype.height = null; - - /** - * Encodes the specified QueryConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsResponse} message QueryConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connections != null && message.connections.length) - for (var i = 0; i < message.connections.length; ++i) - $root.ibc.core.connection.v1.IdentifiedConnection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsResponse} message QueryConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.connections && message.connections.length)) - message.connections = []; - message.connections.push($root.ibc.core.connection.v1.IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionsResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connections != null && message.hasOwnProperty("connections")) { - if (!Array.isArray(message.connections)) - return "connections: array expected"; - for (var i = 0; i < message.connections.length; ++i) { - var error = $root.ibc.core.connection.v1.IdentifiedConnection.verify(message.connections[i]); - if (error) - return "connections." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse - */ - QueryConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionsResponse) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionsResponse(); - if (object.connections) { - if (!Array.isArray(object.connections)) - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.connections: array expected"); - message.connections = []; - for (var i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.connections: object expected"); - message.connections[i] = $root.ibc.core.connection.v1.IdentifiedConnection.fromObject(object.connections[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionsResponse} message QueryConnectionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connections = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.connections && message.connections.length) { - object.connections = []; - for (var j = 0; j < message.connections.length; ++j) - object.connections[j] = $root.ibc.core.connection.v1.IdentifiedConnection.toObject(message.connections[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryConnectionsResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionsResponse; - })(); - - v1.QueryClientConnectionsRequest = (function() { - - /** - * Properties of a QueryClientConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryClientConnectionsRequest - * @property {string|null} [client_id] QueryClientConnectionsRequest client_id - */ - - /** - * Constructs a new QueryClientConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryClientConnectionsRequest. - * @implements IQueryClientConnectionsRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest=} [properties] Properties to set - */ - function QueryClientConnectionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientConnectionsRequest client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @instance - */ - QueryClientConnectionsRequest.prototype.client_id = ""; - - /** - * Encodes the specified QueryClientConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} message QueryClientConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - return writer; - }; - - /** - * Encodes the specified QueryClientConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} message QueryClientConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryClientConnectionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientConnectionsRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientConnectionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - return null; - }; - - /** - * Creates a QueryClientConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest - */ - QueryClientConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryClientConnectionsRequest) - return object; - var message = new $root.ibc.core.connection.v1.QueryClientConnectionsRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - return message; - }; - - /** - * Creates a plain object from a QueryClientConnectionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {ibc.core.connection.v1.QueryClientConnectionsRequest} message QueryClientConnectionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientConnectionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - return object; - }; - - /** - * Converts this QueryClientConnectionsRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientConnectionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientConnectionsRequest; - })(); - - v1.QueryClientConnectionsResponse = (function() { - - /** - * Properties of a QueryClientConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryClientConnectionsResponse - * @property {Array.|null} [connection_paths] QueryClientConnectionsResponse connection_paths - * @property {Uint8Array|null} [proof] QueryClientConnectionsResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryClientConnectionsResponse proof_height - */ - - /** - * Constructs a new QueryClientConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryClientConnectionsResponse. - * @implements IQueryClientConnectionsResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse=} [properties] Properties to set - */ - function QueryClientConnectionsResponse(properties) { - this.connection_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]]; - } - - /** - * QueryClientConnectionsResponse connection_paths. - * @member {Array.} connection_paths - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - */ - QueryClientConnectionsResponse.prototype.connection_paths = $util.emptyArray; - - /** - * QueryClientConnectionsResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - */ - QueryClientConnectionsResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryClientConnectionsResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - */ - QueryClientConnectionsResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryClientConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} message QueryClientConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_paths != null && message.connection_paths.length) - for (var i = 0; i < message.connection_paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_paths[i]); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} message QueryClientConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryClientConnectionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.connection_paths && message.connection_paths.length)) - message.connection_paths = []; - message.connection_paths.push(reader.string()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientConnectionsResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientConnectionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_paths != null && message.hasOwnProperty("connection_paths")) { - if (!Array.isArray(message.connection_paths)) - return "connection_paths: array expected"; - for (var i = 0; i < message.connection_paths.length; ++i) - if (!$util.isString(message.connection_paths[i])) - return "connection_paths: string[] expected"; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryClientConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse - */ - QueryClientConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryClientConnectionsResponse) - return object; - var message = new $root.ibc.core.connection.v1.QueryClientConnectionsResponse(); - if (object.connection_paths) { - if (!Array.isArray(object.connection_paths)) - throw TypeError(".ibc.core.connection.v1.QueryClientConnectionsResponse.connection_paths: array expected"); - message.connection_paths = []; - for (var i = 0; i < object.connection_paths.length; ++i) - message.connection_paths[i] = String(object.connection_paths[i]); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryClientConnectionsResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientConnectionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {ibc.core.connection.v1.QueryClientConnectionsResponse} message QueryClientConnectionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientConnectionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connection_paths = []; - if (options.defaults) { - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.connection_paths && message.connection_paths.length) { - object.connection_paths = []; - for (var j = 0; j < message.connection_paths.length; ++j) - object.connection_paths[j] = message.connection_paths[j]; - } - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryClientConnectionsResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientConnectionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientConnectionsResponse; - })(); - - v1.QueryConnectionClientStateRequest = (function() { - - /** - * Properties of a QueryConnectionClientStateRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionClientStateRequest - * @property {string|null} [connection_id] QueryConnectionClientStateRequest connection_id - */ - - /** - * Constructs a new QueryConnectionClientStateRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionClientStateRequest. - * @implements IQueryConnectionClientStateRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest=} [properties] Properties to set - */ - function QueryConnectionClientStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionClientStateRequest connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @instance - */ - QueryConnectionClientStateRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryConnectionClientStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} message QueryConnectionClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryConnectionClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} message QueryConnectionClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionClientStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionClientStateRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryConnectionClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest - */ - QueryConnectionClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionClientStateRequest) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionClientStateRequest(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryConnectionClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionClientStateRequest} message QueryConnectionClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionClientStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.connection_id = ""; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryConnectionClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionClientStateRequest; - })(); - - v1.QueryConnectionClientStateResponse = (function() { - - /** - * Properties of a QueryConnectionClientStateResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionClientStateResponse - * @property {ibc.core.client.v1.IIdentifiedClientState|null} [identified_client_state] QueryConnectionClientStateResponse identified_client_state - * @property {Uint8Array|null} [proof] QueryConnectionClientStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConnectionClientStateResponse proof_height - */ - - /** - * Constructs a new QueryConnectionClientStateResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionClientStateResponse. - * @implements IQueryConnectionClientStateResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse=} [properties] Properties to set - */ - function QueryConnectionClientStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionClientStateResponse identified_client_state. - * @member {ibc.core.client.v1.IIdentifiedClientState|null|undefined} identified_client_state - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - */ - QueryConnectionClientStateResponse.prototype.identified_client_state = null; - - /** - * QueryConnectionClientStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - */ - QueryConnectionClientStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConnectionClientStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - */ - QueryConnectionClientStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConnectionClientStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} message QueryConnectionClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identified_client_state != null && Object.hasOwnProperty.call(message, "identified_client_state")) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.identified_client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} message QueryConnectionClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionClientStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionClientStateResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) { - var error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.identified_client_state); - if (error) - return "identified_client_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse - */ - QueryConnectionClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionClientStateResponse) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionClientStateResponse(); - if (object.identified_client_state != null) { - if (typeof object.identified_client_state !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionClientStateResponse.identified_client_state: object expected"); - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.identified_client_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionClientStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionClientStateResponse} message QueryConnectionClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.identified_client_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) - object.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.identified_client_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConnectionClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionClientStateResponse; - })(); - - v1.QueryConnectionConsensusStateRequest = (function() { - - /** - * Properties of a QueryConnectionConsensusStateRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionConsensusStateRequest - * @property {string|null} [connection_id] QueryConnectionConsensusStateRequest connection_id - * @property {Long|null} [revision_number] QueryConnectionConsensusStateRequest revision_number - * @property {Long|null} [revision_height] QueryConnectionConsensusStateRequest revision_height - */ - - /** - * Constructs a new QueryConnectionConsensusStateRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionConsensusStateRequest. - * @implements IQueryConnectionConsensusStateRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest=} [properties] Properties to set - */ - function QueryConnectionConsensusStateRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionConsensusStateRequest connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - */ - QueryConnectionConsensusStateRequest.prototype.connection_id = ""; - - /** - * QueryConnectionConsensusStateRequest revision_number. - * @member {Long} revision_number - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - */ - QueryConnectionConsensusStateRequest.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryConnectionConsensusStateRequest revision_height. - * @member {Long} revision_height - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - */ - QueryConnectionConsensusStateRequest.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryConnectionConsensusStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified QueryConnectionConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.revision_number = reader.uint64(); - break; - case 3: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionConsensusStateRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryConnectionConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest - */ - QueryConnectionConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryConnectionConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionConsensusStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connection_id = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this QueryConnectionConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionConsensusStateRequest; - })(); - - v1.QueryConnectionConsensusStateResponse = (function() { - - /** - * Properties of a QueryConnectionConsensusStateResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionConsensusStateResponse - * @property {google.protobuf.IAny|null} [consensus_state] QueryConnectionConsensusStateResponse consensus_state - * @property {string|null} [client_id] QueryConnectionConsensusStateResponse client_id - * @property {Uint8Array|null} [proof] QueryConnectionConsensusStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConnectionConsensusStateResponse proof_height - */ - - /** - * Constructs a new QueryConnectionConsensusStateResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionConsensusStateResponse. - * @implements IQueryConnectionConsensusStateResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse=} [properties] Properties to set - */ - function QueryConnectionConsensusStateResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionConsensusStateResponse consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.consensus_state = null; - - /** - * QueryConnectionConsensusStateResponse client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.client_id = ""; - - /** - * QueryConnectionConsensusStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConnectionConsensusStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConnectionConsensusStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.client_id); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionConsensusStateResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse - */ - QueryConnectionConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse(); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionConsensusStateResponse.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionConsensusStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.consensus_state = null; - object.client_id = ""; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConnectionConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionConsensusStateResponse; - })(); - - v1.QueryConnectionParamsRequest = (function() { - - /** - * Properties of a QueryConnectionParamsRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionParamsRequest - */ - - /** - * Constructs a new QueryConnectionParamsRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionParamsRequest. - * @implements IQueryConnectionParamsRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest=} [properties] Properties to set - */ - function QueryConnectionParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryConnectionParamsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} message QueryConnectionParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionParamsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} message QueryConnectionParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionParamsRequest} QueryConnectionParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionParamsRequest} QueryConnectionParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionParamsRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryConnectionParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionParamsRequest} QueryConnectionParamsRequest - */ - QueryConnectionParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionParamsRequest) - return object; - return new $root.ibc.core.connection.v1.QueryConnectionParamsRequest(); - }; - - /** - * Creates a plain object from a QueryConnectionParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionParamsRequest} message QueryConnectionParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryConnectionParamsRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionParamsRequest; - })(); - - v1.QueryConnectionParamsResponse = (function() { - - /** - * Properties of a QueryConnectionParamsResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionParamsResponse - * @property {ibc.core.connection.v1.IParams|null} [params] QueryConnectionParamsResponse params - */ - - /** - * Constructs a new QueryConnectionParamsResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionParamsResponse. - * @implements IQueryConnectionParamsResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionParamsResponse=} [properties] Properties to set - */ - function QueryConnectionParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionParamsResponse params. - * @member {ibc.core.connection.v1.IParams|null|undefined} params - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @instance - */ - QueryConnectionParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryConnectionParamsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsResponse} message QueryConnectionParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.connection.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionParamsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsResponse} message QueryConnectionParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionParamsResponse} QueryConnectionParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.core.connection.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionParamsResponse} QueryConnectionParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionParamsResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.core.connection.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionParamsResponse} QueryConnectionParamsResponse - */ - QueryConnectionParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionParamsResponse) - return object; - var message = new $root.ibc.core.connection.v1.QueryConnectionParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionParamsResponse.params: object expected"); - message.params = $root.ibc.core.connection.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionParamsResponse} message QueryConnectionParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.connection.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryConnectionParamsResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionParamsResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.connection.v1 - * @interface IGenesisState - * @property {Array.|null} [connections] GenesisState connections - * @property {Array.|null} [client_connection_paths] GenesisState client_connection_paths - * @property {Long|null} [next_connection_sequence] GenesisState next_connection_sequence - * @property {ibc.core.connection.v1.IParams|null} [params] GenesisState params - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.connection.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.connections = []; - this.client_connection_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]]; - } - - /** - * GenesisState connections. - * @member {Array.} connections - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.connections = $util.emptyArray; - - /** - * GenesisState client_connection_paths. - * @member {Array.} client_connection_paths - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.client_connection_paths = $util.emptyArray; - - /** - * GenesisState next_connection_sequence. - * @member {Long} next_connection_sequence - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.next_connection_sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * GenesisState params. - * @member {ibc.core.connection.v1.IParams|null|undefined} params - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {ibc.core.connection.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connections != null && message.connections.length) - for (var i = 0; i < message.connections.length; ++i) - $root.ibc.core.connection.v1.IdentifiedConnection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.client_connection_paths != null && message.client_connection_paths.length) - for (var i = 0; i < message.client_connection_paths.length; ++i) - $root.ibc.core.connection.v1.ConnectionPaths.encode(message.client_connection_paths[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.next_connection_sequence != null && Object.hasOwnProperty.call(message, "next_connection_sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.next_connection_sequence); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.connection.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {ibc.core.connection.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.connections && message.connections.length)) - message.connections = []; - message.connections.push($root.ibc.core.connection.v1.IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.client_connection_paths && message.client_connection_paths.length)) - message.client_connection_paths = []; - message.client_connection_paths.push($root.ibc.core.connection.v1.ConnectionPaths.decode(reader, reader.uint32())); - break; - case 3: - message.next_connection_sequence = reader.uint64(); - break; - case 4: - message.params = $root.ibc.core.connection.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connections != null && message.hasOwnProperty("connections")) { - if (!Array.isArray(message.connections)) - return "connections: array expected"; - for (var i = 0; i < message.connections.length; ++i) { - var error = $root.ibc.core.connection.v1.IdentifiedConnection.verify(message.connections[i]); - if (error) - return "connections." + error; - } - } - if (message.client_connection_paths != null && message.hasOwnProperty("client_connection_paths")) { - if (!Array.isArray(message.client_connection_paths)) - return "client_connection_paths: array expected"; - for (var i = 0; i < message.client_connection_paths.length; ++i) { - var error = $root.ibc.core.connection.v1.ConnectionPaths.verify(message.client_connection_paths[i]); - if (error) - return "client_connection_paths." + error; - } - } - if (message.next_connection_sequence != null && message.hasOwnProperty("next_connection_sequence")) - if (!$util.isInteger(message.next_connection_sequence) && !(message.next_connection_sequence && $util.isInteger(message.next_connection_sequence.low) && $util.isInteger(message.next_connection_sequence.high))) - return "next_connection_sequence: integer|Long expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.core.connection.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.GenesisState) - return object; - var message = new $root.ibc.core.connection.v1.GenesisState(); - if (object.connections) { - if (!Array.isArray(object.connections)) - throw TypeError(".ibc.core.connection.v1.GenesisState.connections: array expected"); - message.connections = []; - for (var i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") - throw TypeError(".ibc.core.connection.v1.GenesisState.connections: object expected"); - message.connections[i] = $root.ibc.core.connection.v1.IdentifiedConnection.fromObject(object.connections[i]); - } - } - if (object.client_connection_paths) { - if (!Array.isArray(object.client_connection_paths)) - throw TypeError(".ibc.core.connection.v1.GenesisState.client_connection_paths: array expected"); - message.client_connection_paths = []; - for (var i = 0; i < object.client_connection_paths.length; ++i) { - if (typeof object.client_connection_paths[i] !== "object") - throw TypeError(".ibc.core.connection.v1.GenesisState.client_connection_paths: object expected"); - message.client_connection_paths[i] = $root.ibc.core.connection.v1.ConnectionPaths.fromObject(object.client_connection_paths[i]); - } - } - if (object.next_connection_sequence != null) - if ($util.Long) - (message.next_connection_sequence = $util.Long.fromValue(object.next_connection_sequence)).unsigned = true; - else if (typeof object.next_connection_sequence === "string") - message.next_connection_sequence = parseInt(object.next_connection_sequence, 10); - else if (typeof object.next_connection_sequence === "number") - message.next_connection_sequence = object.next_connection_sequence; - else if (typeof object.next_connection_sequence === "object") - message.next_connection_sequence = new $util.LongBits(object.next_connection_sequence.low >>> 0, object.next_connection_sequence.high >>> 0).toNumber(true); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.connection.v1.GenesisState.params: object expected"); - message.params = $root.ibc.core.connection.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {ibc.core.connection.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.connections = []; - object.client_connection_paths = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.next_connection_sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_connection_sequence = options.longs === String ? "0" : 0; - object.params = null; - } - if (message.connections && message.connections.length) { - object.connections = []; - for (var j = 0; j < message.connections.length; ++j) - object.connections[j] = $root.ibc.core.connection.v1.IdentifiedConnection.toObject(message.connections[j], options); - } - if (message.client_connection_paths && message.client_connection_paths.length) { - object.client_connection_paths = []; - for (var j = 0; j < message.client_connection_paths.length; ++j) - object.client_connection_paths[j] = $root.ibc.core.connection.v1.ConnectionPaths.toObject(message.client_connection_paths[j], options); - } - if (message.next_connection_sequence != null && message.hasOwnProperty("next_connection_sequence")) - if (typeof message.next_connection_sequence === "number") - object.next_connection_sequence = options.longs === String ? String(message.next_connection_sequence) : message.next_connection_sequence; - else - object.next_connection_sequence = options.longs === String ? $util.Long.prototype.toString.call(message.next_connection_sequence) : options.longs === Number ? new $util.LongBits(message.next_connection_sequence.low >>> 0, message.next_connection_sequence.high >>> 0).toNumber(true) : message.next_connection_sequence; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.connection.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return v1; - })(); - - return connection; - })(); - - core.types = (function() { - - /** - * Namespace types. - * @memberof ibc.core - * @namespace - */ - var types = {}; - - types.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.types - * @namespace - */ - var v1 = {}; - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.types.v1 - * @interface IGenesisState - * @property {ibc.core.client.v1.IGenesisState|null} [client_genesis] GenesisState client_genesis - * @property {ibc.core.connection.v1.IGenesisState|null} [connection_genesis] GenesisState connection_genesis - * @property {ibc.core.channel.v1.IGenesisState|null} [channel_genesis] GenesisState channel_genesis - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.types.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.types.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState client_genesis. - * @member {ibc.core.client.v1.IGenesisState|null|undefined} client_genesis - * @memberof ibc.core.types.v1.GenesisState - * @instance - */ - GenesisState.prototype.client_genesis = null; - - /** - * GenesisState connection_genesis. - * @member {ibc.core.connection.v1.IGenesisState|null|undefined} connection_genesis - * @memberof ibc.core.types.v1.GenesisState - * @instance - */ - GenesisState.prototype.connection_genesis = null; - - /** - * GenesisState channel_genesis. - * @member {ibc.core.channel.v1.IGenesisState|null|undefined} channel_genesis - * @memberof ibc.core.types.v1.GenesisState - * @instance - */ - GenesisState.prototype.channel_genesis = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {ibc.core.types.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_genesis != null && Object.hasOwnProperty.call(message, "client_genesis")) - $root.ibc.core.client.v1.GenesisState.encode(message.client_genesis, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.connection_genesis != null && Object.hasOwnProperty.call(message, "connection_genesis")) - $root.ibc.core.connection.v1.GenesisState.encode(message.connection_genesis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.channel_genesis != null && Object.hasOwnProperty.call(message, "channel_genesis")) - $root.ibc.core.channel.v1.GenesisState.encode(message.channel_genesis, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {ibc.core.types.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.types.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.types.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_genesis = $root.ibc.core.client.v1.GenesisState.decode(reader, reader.uint32()); - break; - case 2: - message.connection_genesis = $root.ibc.core.connection.v1.GenesisState.decode(reader, reader.uint32()); - break; - case 3: - message.channel_genesis = $root.ibc.core.channel.v1.GenesisState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.types.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_genesis != null && message.hasOwnProperty("client_genesis")) { - var error = $root.ibc.core.client.v1.GenesisState.verify(message.client_genesis); - if (error) - return "client_genesis." + error; - } - if (message.connection_genesis != null && message.hasOwnProperty("connection_genesis")) { - var error = $root.ibc.core.connection.v1.GenesisState.verify(message.connection_genesis); - if (error) - return "connection_genesis." + error; - } - if (message.channel_genesis != null && message.hasOwnProperty("channel_genesis")) { - var error = $root.ibc.core.channel.v1.GenesisState.verify(message.channel_genesis); - if (error) - return "channel_genesis." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.types.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.types.v1.GenesisState) - return object; - var message = new $root.ibc.core.types.v1.GenesisState(); - if (object.client_genesis != null) { - if (typeof object.client_genesis !== "object") - throw TypeError(".ibc.core.types.v1.GenesisState.client_genesis: object expected"); - message.client_genesis = $root.ibc.core.client.v1.GenesisState.fromObject(object.client_genesis); - } - if (object.connection_genesis != null) { - if (typeof object.connection_genesis !== "object") - throw TypeError(".ibc.core.types.v1.GenesisState.connection_genesis: object expected"); - message.connection_genesis = $root.ibc.core.connection.v1.GenesisState.fromObject(object.connection_genesis); - } - if (object.channel_genesis != null) { - if (typeof object.channel_genesis !== "object") - throw TypeError(".ibc.core.types.v1.GenesisState.channel_genesis: object expected"); - message.channel_genesis = $root.ibc.core.channel.v1.GenesisState.fromObject(object.channel_genesis); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {ibc.core.types.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_genesis = null; - object.connection_genesis = null; - object.channel_genesis = null; - } - if (message.client_genesis != null && message.hasOwnProperty("client_genesis")) - object.client_genesis = $root.ibc.core.client.v1.GenesisState.toObject(message.client_genesis, options); - if (message.connection_genesis != null && message.hasOwnProperty("connection_genesis")) - object.connection_genesis = $root.ibc.core.connection.v1.GenesisState.toObject(message.connection_genesis, options); - if (message.channel_genesis != null && message.hasOwnProperty("channel_genesis")) - object.channel_genesis = $root.ibc.core.channel.v1.GenesisState.toObject(message.channel_genesis, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.types.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return v1; - })(); - - return types; - })(); - - return core; - })(); - - ibc.lightclients = (function() { - - /** - * Namespace lightclients. - * @memberof ibc - * @namespace - */ - var lightclients = {}; - - lightclients.localhost = (function() { - - /** - * Namespace localhost. - * @memberof ibc.lightclients - * @namespace - */ - var localhost = {}; - - localhost.v2 = (function() { - - /** - * Namespace v2. - * @memberof ibc.lightclients.localhost - * @namespace - */ - var v2 = {}; - - v2.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.localhost.v2 - * @interface IClientState - * @property {ibc.core.client.v1.IHeight|null} [latest_height] ClientState latest_height - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.localhost.v2 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.localhost.v2.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState latest_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} latest_height - * @memberof ibc.lightclients.localhost.v2.ClientState - * @instance - */ - ClientState.prototype.latest_height = null; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.localhost.v2.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {ibc.lightclients.localhost.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latest_height != null && Object.hasOwnProperty.call(message, "latest_height")) - $root.ibc.core.client.v1.Height.encode(message.latest_height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.localhost.v2.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {ibc.lightclients.localhost.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.localhost.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.localhost.v2.ClientState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.latest_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.localhost.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.latest_height); - if (error) - return "latest_height." + error; - } - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.localhost.v2.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.localhost.v2.ClientState) - return object; - var message = new $root.ibc.lightclients.localhost.v2.ClientState(); - if (object.latest_height != null) { - if (typeof object.latest_height !== "object") - throw TypeError(".ibc.lightclients.localhost.v2.ClientState.latest_height: object expected"); - message.latest_height = $root.ibc.core.client.v1.Height.fromObject(object.latest_height); - } - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {ibc.lightclients.localhost.v2.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.latest_height = null; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - object.latest_height = $root.ibc.core.client.v1.Height.toObject(message.latest_height, options); - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.localhost.v2.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - return v2; - })(); - - return localhost; - })(); - - lightclients.solomachine = (function() { - - /** - * Namespace solomachine. - * @memberof ibc.lightclients - * @namespace - */ - var solomachine = {}; - - solomachine.v2 = (function() { - - /** - * Namespace v2. - * @memberof ibc.lightclients.solomachine - * @namespace - */ - var v2 = {}; - - v2.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IClientState - * @property {Long|null} [sequence] ClientState sequence - * @property {boolean|null} [is_frozen] ClientState is_frozen - * @property {ibc.lightclients.solomachine.v2.IConsensusState|null} [consensus_state] ClientState consensus_state - * @property {boolean|null} [allow_update_after_proposal] ClientState allow_update_after_proposal - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.solomachine.v2.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ClientState is_frozen. - * @member {boolean} is_frozen - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.is_frozen = false; - - /** - * ClientState consensus_state. - * @member {ibc.lightclients.solomachine.v2.IConsensusState|null|undefined} consensus_state - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.consensus_state = null; - - /** - * ClientState allow_update_after_proposal. - * @member {boolean} allow_update_after_proposal - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.allow_update_after_proposal = false; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {ibc.lightclients.solomachine.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.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.is_frozen != null && Object.hasOwnProperty.call(message, "is_frozen")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_frozen); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.ibc.lightclients.solomachine.v2.ConsensusState.encode(message.consensus_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.allow_update_after_proposal != null && Object.hasOwnProperty.call(message, "allow_update_after_proposal")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allow_update_after_proposal); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {ibc.lightclients.solomachine.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ClientState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.is_frozen = reader.bool(); - break; - case 3: - message.consensus_state = $root.ibc.lightclients.solomachine.v2.ConsensusState.decode(reader, reader.uint32()); - break; - case 4: - message.allow_update_after_proposal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.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.is_frozen != null && message.hasOwnProperty("is_frozen")) - if (typeof message.is_frozen !== "boolean") - return "is_frozen: boolean expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.ibc.lightclients.solomachine.v2.ConsensusState.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.allow_update_after_proposal != null && message.hasOwnProperty("allow_update_after_proposal")) - if (typeof message.allow_update_after_proposal !== "boolean") - return "allow_update_after_proposal: boolean expected"; - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ClientState) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.ClientState(); - 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.is_frozen != null) - message.is_frozen = Boolean(object.is_frozen); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ClientState.consensus_state: object expected"); - message.consensus_state = $root.ibc.lightclients.solomachine.v2.ConsensusState.fromObject(object.consensus_state); - } - if (object.allow_update_after_proposal != null) - message.allow_update_after_proposal = Boolean(object.allow_update_after_proposal); - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {ibc.lightclients.solomachine.v2.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.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.is_frozen = false; - object.consensus_state = null; - object.allow_update_after_proposal = false; - } - 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.is_frozen != null && message.hasOwnProperty("is_frozen")) - object.is_frozen = message.is_frozen; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.ibc.lightclients.solomachine.v2.ConsensusState.toObject(message.consensus_state, options); - if (message.allow_update_after_proposal != null && message.hasOwnProperty("allow_update_after_proposal")) - object.allow_update_after_proposal = message.allow_update_after_proposal; - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - v2.ConsensusState = (function() { - - /** - * Properties of a ConsensusState. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IConsensusState - * @property {google.protobuf.IAny|null} [public_key] ConsensusState public_key - * @property {string|null} [diversifier] ConsensusState diversifier - * @property {Long|null} [timestamp] ConsensusState timestamp - */ - - /** - * Constructs a new ConsensusState. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ConsensusState. - * @implements IConsensusState - * @constructor - * @param {ibc.lightclients.solomachine.v2.IConsensusState=} [properties] Properties to set - */ - function ConsensusState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusState public_key. - * @member {google.protobuf.IAny|null|undefined} public_key - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - */ - ConsensusState.prototype.public_key = null; - - /** - * ConsensusState diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - */ - ConsensusState.prototype.diversifier = ""; - - /** - * ConsensusState timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - */ - ConsensusState.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.public_key != null && Object.hasOwnProperty.call(message, "public_key")) - $root.google.protobuf.Any.encode(message.public_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.diversifier); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ConsensusState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.diversifier = reader.string(); - break; - case 3: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.public_key != null && message.hasOwnProperty("public_key")) { - var error = $root.google.protobuf.Any.verify(message.public_key); - if (error) - return "public_key." + error; - } - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ConsensusState} ConsensusState - */ - ConsensusState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ConsensusState) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.ConsensusState(); - if (object.public_key != null) { - if (typeof object.public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ConsensusState.public_key: object expected"); - message.public_key = $root.google.protobuf.Any.fromObject(object.public_key); - } - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v2.ConsensusState} message ConsensusState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.public_key = null; - object.diversifier = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.public_key != null && message.hasOwnProperty("public_key")) - object.public_key = $root.google.protobuf.Any.toObject(message.public_key, options); - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this ConsensusState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - * @returns {Object.} JSON object - */ - ConsensusState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusState; - })(); - - v2.Header = (function() { - - /** - * Properties of a Header. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IHeader - * @property {Long|null} [sequence] Header sequence - * @property {Long|null} [timestamp] Header timestamp - * @property {Uint8Array|null} [signature] Header signature - * @property {google.protobuf.IAny|null} [new_public_key] Header new_public_key - * @property {string|null} [new_diversifier] Header new_diversifier - */ - - /** - * Constructs a new Header. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {ibc.lightclients.solomachine.v2.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 sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Header timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Header signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.signature = $util.newBuffer([]); - - /** - * Header new_public_key. - * @member {google.protobuf.IAny|null|undefined} new_public_key - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.new_public_key = null; - - /** - * Header new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.new_diversifier = ""; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.solomachine.v2.Header.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {ibc.lightclients.solomachine.v2.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.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature); - if (message.new_public_key != null && Object.hasOwnProperty.call(message, "new_public_key")) - $root.google.protobuf.Any.encode(message.new_public_key, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {ibc.lightclients.solomachine.v2.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 ibc.lightclients.solomachine.v2.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.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.ibc.lightclients.solomachine.v2.Header(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.signature = reader.bytes(); - break; - case 4: - message.new_public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 5: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.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 ibc.lightclients.solomachine.v2.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.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) { - var error = $root.google.protobuf.Any.verify(message.new_public_key); - if (error) - return "new_public_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.Header) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.Header(); - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.new_public_key != null) { - if (typeof object.new_public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.Header.new_public_key: object expected"); - message.new_public_key = $root.google.protobuf.Any.fromObject(object.new_public_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {ibc.lightclients.solomachine.v2.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) { - 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 ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.new_public_key = null; - object.new_diversifier = ""; - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) - object.new_public_key = $root.google.protobuf.Any.toObject(message.new_public_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - v2.Misbehaviour = (function() { - - /** - * Properties of a Misbehaviour. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IMisbehaviour - * @property {string|null} [client_id] Misbehaviour client_id - * @property {Long|null} [sequence] Misbehaviour sequence - * @property {ibc.lightclients.solomachine.v2.ISignatureAndData|null} [signature_one] Misbehaviour signature_one - * @property {ibc.lightclients.solomachine.v2.ISignatureAndData|null} [signature_two] Misbehaviour signature_two - */ - - /** - * Constructs a new Misbehaviour. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a Misbehaviour. - * @implements IMisbehaviour - * @constructor - * @param {ibc.lightclients.solomachine.v2.IMisbehaviour=} [properties] Properties to set - */ - function Misbehaviour(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Misbehaviour client_id. - * @member {string} client_id - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.client_id = ""; - - /** - * Misbehaviour sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Misbehaviour signature_one. - * @member {ibc.lightclients.solomachine.v2.ISignatureAndData|null|undefined} signature_one - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_one = null; - - /** - * Misbehaviour signature_two. - * @member {ibc.lightclients.solomachine.v2.ISignatureAndData|null|undefined} signature_two - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_two = null; - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.solomachine.v2.Misbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v2.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.sequence); - if (message.signature_one != null && Object.hasOwnProperty.call(message, "signature_one")) - $root.ibc.lightclients.solomachine.v2.SignatureAndData.encode(message.signature_one, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signature_two != null && Object.hasOwnProperty.call(message, "signature_two")) - $root.ibc.lightclients.solomachine.v2.SignatureAndData.encode(message.signature_two, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.Misbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v2.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.Misbehaviour(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.sequence = reader.uint64(); - break; - case 3: - message.signature_one = $root.ibc.lightclients.solomachine.v2.SignatureAndData.decode(reader, reader.uint32()); - break; - case 4: - message.signature_two = $root.ibc.lightclients.solomachine.v2.SignatureAndData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Misbehaviour message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Misbehaviour.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string 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.signature_one != null && message.hasOwnProperty("signature_one")) { - var error = $root.ibc.lightclients.solomachine.v2.SignatureAndData.verify(message.signature_one); - if (error) - return "signature_one." + error; - } - if (message.signature_two != null && message.hasOwnProperty("signature_two")) { - var error = $root.ibc.lightclients.solomachine.v2.SignatureAndData.verify(message.signature_two); - if (error) - return "signature_two." + error; - } - return null; - }; - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.Misbehaviour} Misbehaviour - */ - Misbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.Misbehaviour) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.Misbehaviour(); - if (object.client_id != null) - message.client_id = String(object.client_id); - 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.signature_one != null) { - if (typeof object.signature_one !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.Misbehaviour.signature_one: object expected"); - message.signature_one = $root.ibc.lightclients.solomachine.v2.SignatureAndData.fromObject(object.signature_one); - } - if (object.signature_two != null) { - if (typeof object.signature_two !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.Misbehaviour.signature_two: object expected"); - message.signature_two = $root.ibc.lightclients.solomachine.v2.SignatureAndData.fromObject(object.signature_two); - } - return message; - }; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v2.Misbehaviour} message Misbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Misbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - 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.signature_one = null; - object.signature_two = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - 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.signature_one != null && message.hasOwnProperty("signature_one")) - object.signature_one = $root.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(message.signature_one, options); - if (message.signature_two != null && message.hasOwnProperty("signature_two")) - object.signature_two = $root.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(message.signature_two, options); - return object; - }; - - /** - * Converts this Misbehaviour to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - * @returns {Object.} JSON object - */ - Misbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Misbehaviour; - })(); - - v2.SignatureAndData = (function() { - - /** - * Properties of a SignatureAndData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface ISignatureAndData - * @property {Uint8Array|null} [signature] SignatureAndData signature - * @property {ibc.lightclients.solomachine.v2.DataType|null} [data_type] SignatureAndData data_type - * @property {Uint8Array|null} [data] SignatureAndData data - * @property {Long|null} [timestamp] SignatureAndData timestamp - */ - - /** - * Constructs a new SignatureAndData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a SignatureAndData. - * @implements ISignatureAndData - * @constructor - * @param {ibc.lightclients.solomachine.v2.ISignatureAndData=} [properties] Properties to set - */ - function SignatureAndData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignatureAndData signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.signature = $util.newBuffer([]); - - /** - * SignatureAndData data_type. - * @member {ibc.lightclients.solomachine.v2.DataType} data_type - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.data_type = 0; - - /** - * SignatureAndData data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.data = $util.newBuffer([]); - - /** - * SignatureAndData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified SignatureAndData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignatureAndData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v2.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature); - if (message.data_type != null && Object.hasOwnProperty.call(message, "data_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.data_type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified SignatureAndData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignatureAndData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v2.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.SignatureAndData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature = reader.bytes(); - break; - case 2: - message.data_type = reader.int32(); - break; - case 3: - message.data = reader.bytes(); - break; - case 4: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignatureAndData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignatureAndData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.data_type != null && message.hasOwnProperty("data_type")) - switch (message.data_type) { - default: - return "data_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a SignatureAndData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.SignatureAndData} SignatureAndData - */ - SignatureAndData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.SignatureAndData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.SignatureAndData(); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - switch (object.data_type) { - case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": - case 0: - message.data_type = 0; - break; - case "DATA_TYPE_CLIENT_STATE": - case 1: - message.data_type = 1; - break; - case "DATA_TYPE_CONSENSUS_STATE": - case 2: - message.data_type = 2; - break; - case "DATA_TYPE_CONNECTION_STATE": - case 3: - message.data_type = 3; - break; - case "DATA_TYPE_CHANNEL_STATE": - case 4: - message.data_type = 4; - break; - case "DATA_TYPE_PACKET_COMMITMENT": - case 5: - message.data_type = 5; - break; - case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": - case 6: - message.data_type = 6; - break; - case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": - case 7: - message.data_type = 7; - break; - case "DATA_TYPE_NEXT_SEQUENCE_RECV": - case 8: - message.data_type = 8; - break; - case "DATA_TYPE_HEADER": - case 9: - message.data_type = 9; - break; - } - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a SignatureAndData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v2.SignatureAndData} message SignatureAndData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignatureAndData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.data_type = options.enums === String ? "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" : 0; - 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.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.data_type != null && message.hasOwnProperty("data_type")) - object.data_type = options.enums === String ? $root.ibc.lightclients.solomachine.v2.DataType[message.data_type] : message.data_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; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this SignatureAndData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - * @returns {Object.} JSON object - */ - SignatureAndData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignatureAndData; - })(); - - v2.TimestampedSignatureData = (function() { - - /** - * Properties of a TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface ITimestampedSignatureData - * @property {Uint8Array|null} [signature_data] TimestampedSignatureData signature_data - * @property {Long|null} [timestamp] TimestampedSignatureData timestamp - */ - - /** - * Constructs a new TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a TimestampedSignatureData. - * @implements ITimestampedSignatureData - * @constructor - * @param {ibc.lightclients.solomachine.v2.ITimestampedSignatureData=} [properties] Properties to set - */ - function TimestampedSignatureData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimestampedSignatureData signature_data. - * @member {Uint8Array} signature_data - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.signature_data = $util.newBuffer([]); - - /** - * TimestampedSignatureData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified TimestampedSignatureData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.TimestampedSignatureData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v2.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature_data != null && Object.hasOwnProperty.call(message, "signature_data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature_data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified TimestampedSignatureData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.TimestampedSignatureData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v2.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.TimestampedSignatureData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature_data = reader.bytes(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimestampedSignatureData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimestampedSignatureData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - if (!(message.signature_data && typeof message.signature_data.length === "number" || $util.isString(message.signature_data))) - return "signature_data: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a TimestampedSignatureData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.TimestampedSignatureData} TimestampedSignatureData - */ - TimestampedSignatureData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.TimestampedSignatureData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.TimestampedSignatureData(); - if (object.signature_data != null) - if (typeof object.signature_data === "string") - $util.base64.decode(object.signature_data, message.signature_data = $util.newBuffer($util.base64.length(object.signature_data)), 0); - else if (object.signature_data.length) - message.signature_data = object.signature_data; - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a TimestampedSignatureData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v2.TimestampedSignatureData} message TimestampedSignatureData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimestampedSignatureData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature_data = ""; - else { - object.signature_data = []; - if (options.bytes !== Array) - object.signature_data = $util.newBuffer(object.signature_data); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - object.signature_data = options.bytes === String ? $util.base64.encode(message.signature_data, 0, message.signature_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature_data) : message.signature_data; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this TimestampedSignatureData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @instance - * @returns {Object.} JSON object - */ - TimestampedSignatureData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TimestampedSignatureData; - })(); - - v2.SignBytes = (function() { - - /** - * Properties of a SignBytes. - * @memberof ibc.lightclients.solomachine.v2 - * @interface ISignBytes - * @property {Long|null} [sequence] SignBytes sequence - * @property {Long|null} [timestamp] SignBytes timestamp - * @property {string|null} [diversifier] SignBytes diversifier - * @property {ibc.lightclients.solomachine.v2.DataType|null} [data_type] SignBytes data_type - * @property {Uint8Array|null} [data] SignBytes data - */ - - /** - * Constructs a new SignBytes. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a SignBytes. - * @implements ISignBytes - * @constructor - * @param {ibc.lightclients.solomachine.v2.ISignBytes=} [properties] Properties to set - */ - function SignBytes(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignBytes sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.diversifier = ""; - - /** - * SignBytes data_type. - * @member {ibc.lightclients.solomachine.v2.DataType} data_type - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.data_type = 0; - - /** - * SignBytes data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified SignBytes message. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignBytes.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v2.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.diversifier); - if (message.data_type != null && Object.hasOwnProperty.call(message, "data_type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.data_type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified SignBytes message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignBytes.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v2.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.SignBytes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.diversifier = reader.string(); - break; - case 4: - message.data_type = reader.int32(); - break; - case 5: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignBytes message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignBytes.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.data_type != null && message.hasOwnProperty("data_type")) - switch (message.data_type) { - default: - return "data_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - 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 SignBytes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.SignBytes} SignBytes - */ - SignBytes.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.SignBytes) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.SignBytes(); - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - switch (object.data_type) { - case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": - case 0: - message.data_type = 0; - break; - case "DATA_TYPE_CLIENT_STATE": - case 1: - message.data_type = 1; - break; - case "DATA_TYPE_CONSENSUS_STATE": - case 2: - message.data_type = 2; - break; - case "DATA_TYPE_CONNECTION_STATE": - case 3: - message.data_type = 3; - break; - case "DATA_TYPE_CHANNEL_STATE": - case 4: - message.data_type = 4; - break; - case "DATA_TYPE_PACKET_COMMITMENT": - case 5: - message.data_type = 5; - break; - case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": - case 6: - message.data_type = 6; - break; - case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": - case 7: - message.data_type = 7; - break; - case "DATA_TYPE_NEXT_SEQUENCE_RECV": - case 8: - message.data_type = 8; - break; - case "DATA_TYPE_HEADER": - case 9: - message.data_type = 9; - break; - } - 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 SignBytes message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v2.SignBytes} message SignBytes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignBytes.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; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.diversifier = ""; - object.data_type = options.enums === String ? "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" : 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.data_type != null && message.hasOwnProperty("data_type")) - object.data_type = options.enums === String ? $root.ibc.lightclients.solomachine.v2.DataType[message.data_type] : message.data_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 SignBytes to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - * @returns {Object.} JSON object - */ - SignBytes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignBytes; - })(); - - /** - * DataType enum. - * @name ibc.lightclients.solomachine.v2.DataType - * @enum {number} - * @property {number} DATA_TYPE_UNINITIALIZED_UNSPECIFIED=0 DATA_TYPE_UNINITIALIZED_UNSPECIFIED value - * @property {number} DATA_TYPE_CLIENT_STATE=1 DATA_TYPE_CLIENT_STATE value - * @property {number} DATA_TYPE_CONSENSUS_STATE=2 DATA_TYPE_CONSENSUS_STATE value - * @property {number} DATA_TYPE_CONNECTION_STATE=3 DATA_TYPE_CONNECTION_STATE value - * @property {number} DATA_TYPE_CHANNEL_STATE=4 DATA_TYPE_CHANNEL_STATE value - * @property {number} DATA_TYPE_PACKET_COMMITMENT=5 DATA_TYPE_PACKET_COMMITMENT value - * @property {number} DATA_TYPE_PACKET_ACKNOWLEDGEMENT=6 DATA_TYPE_PACKET_ACKNOWLEDGEMENT value - * @property {number} DATA_TYPE_PACKET_RECEIPT_ABSENCE=7 DATA_TYPE_PACKET_RECEIPT_ABSENCE value - * @property {number} DATA_TYPE_NEXT_SEQUENCE_RECV=8 DATA_TYPE_NEXT_SEQUENCE_RECV value - * @property {number} DATA_TYPE_HEADER=9 DATA_TYPE_HEADER value - */ - v2.DataType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_TYPE_UNINITIALIZED_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_TYPE_CLIENT_STATE"] = 1; - values[valuesById[2] = "DATA_TYPE_CONSENSUS_STATE"] = 2; - values[valuesById[3] = "DATA_TYPE_CONNECTION_STATE"] = 3; - values[valuesById[4] = "DATA_TYPE_CHANNEL_STATE"] = 4; - values[valuesById[5] = "DATA_TYPE_PACKET_COMMITMENT"] = 5; - values[valuesById[6] = "DATA_TYPE_PACKET_ACKNOWLEDGEMENT"] = 6; - values[valuesById[7] = "DATA_TYPE_PACKET_RECEIPT_ABSENCE"] = 7; - values[valuesById[8] = "DATA_TYPE_NEXT_SEQUENCE_RECV"] = 8; - values[valuesById[9] = "DATA_TYPE_HEADER"] = 9; - return values; - })(); - - v2.HeaderData = (function() { - - /** - * Properties of a HeaderData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IHeaderData - * @property {google.protobuf.IAny|null} [new_pub_key] HeaderData new_pub_key - * @property {string|null} [new_diversifier] HeaderData new_diversifier - */ - - /** - * Constructs a new HeaderData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a HeaderData. - * @implements IHeaderData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IHeaderData=} [properties] Properties to set - */ - function HeaderData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HeaderData new_pub_key. - * @member {google.protobuf.IAny|null|undefined} new_pub_key - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @instance - */ - HeaderData.prototype.new_pub_key = null; - - /** - * HeaderData new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @instance - */ - HeaderData.prototype.new_diversifier = ""; - - /** - * Encodes the specified HeaderData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.HeaderData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v2.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.new_pub_key != null && Object.hasOwnProperty.call(message, "new_pub_key")) - $root.google.protobuf.Any.encode(message.new_pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified HeaderData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.HeaderData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v2.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.HeaderData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_pub_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HeaderData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HeaderData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) { - var error = $root.google.protobuf.Any.verify(message.new_pub_key); - if (error) - return "new_pub_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a HeaderData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.HeaderData} HeaderData - */ - HeaderData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.HeaderData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.HeaderData(); - if (object.new_pub_key != null) { - if (typeof object.new_pub_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.HeaderData.new_pub_key: object expected"); - message.new_pub_key = $root.google.protobuf.Any.fromObject(object.new_pub_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a HeaderData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v2.HeaderData} message HeaderData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HeaderData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.new_pub_key = null; - object.new_diversifier = ""; - } - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) - object.new_pub_key = $root.google.protobuf.Any.toObject(message.new_pub_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this HeaderData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @instance - * @returns {Object.} JSON object - */ - HeaderData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HeaderData; - })(); - - v2.ClientStateData = (function() { - - /** - * Properties of a ClientStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IClientStateData - * @property {Uint8Array|null} [path] ClientStateData path - * @property {google.protobuf.IAny|null} [client_state] ClientStateData client_state - */ - - /** - * Constructs a new ClientStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ClientStateData. - * @implements IClientStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IClientStateData=} [properties] Properties to set - */ - function ClientStateData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @instance - */ - ClientStateData.prototype.path = $util.newBuffer([]); - - /** - * ClientStateData client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @instance - */ - ClientStateData.prototype.client_state = null; - - /** - * Encodes the specified ClientStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IClientStateData} message ClientStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IClientStateData} message ClientStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ClientStateData} ClientStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ClientStateData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ClientStateData} ClientStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - return null; - }; - - /** - * Creates a ClientStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ClientStateData} ClientStateData - */ - ClientStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ClientStateData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.ClientStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ClientStateData.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - return message; - }; - - /** - * Creates a plain object from a ClientStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ClientStateData} message ClientStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.client_state = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - return object; - }; - - /** - * Converts this ClientStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @instance - * @returns {Object.} JSON object - */ - ClientStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientStateData; - })(); - - v2.ConsensusStateData = (function() { - - /** - * Properties of a ConsensusStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IConsensusStateData - * @property {Uint8Array|null} [path] ConsensusStateData path - * @property {google.protobuf.IAny|null} [consensus_state] ConsensusStateData consensus_state - */ - - /** - * Constructs a new ConsensusStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ConsensusStateData. - * @implements IConsensusStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IConsensusStateData=} [properties] Properties to set - */ - function ConsensusStateData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @instance - */ - ConsensusStateData.prototype.path = $util.newBuffer([]); - - /** - * ConsensusStateData consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @instance - */ - ConsensusStateData.prototype.consensus_state = null; - - /** - * Encodes the specified ConsensusStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusStateData} message ConsensusStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusStateData} message ConsensusStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ConsensusStateData} ConsensusStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ConsensusStateData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ConsensusStateData} ConsensusStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ConsensusStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ConsensusStateData} ConsensusStateData - */ - ConsensusStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ConsensusStateData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.ConsensusStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ConsensusStateData.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ConsensusStateData} message ConsensusStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.consensus_state = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ConsensusStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @instance - * @returns {Object.} JSON object - */ - ConsensusStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusStateData; - })(); - - v2.ConnectionStateData = (function() { - - /** - * Properties of a ConnectionStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IConnectionStateData - * @property {Uint8Array|null} [path] ConnectionStateData path - * @property {ibc.core.connection.v1.IConnectionEnd|null} [connection] ConnectionStateData connection - */ - - /** - * Constructs a new ConnectionStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ConnectionStateData. - * @implements IConnectionStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IConnectionStateData=} [properties] Properties to set - */ - function ConnectionStateData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConnectionStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @instance - */ - ConnectionStateData.prototype.path = $util.newBuffer([]); - - /** - * ConnectionStateData connection. - * @member {ibc.core.connection.v1.IConnectionEnd|null|undefined} connection - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @instance - */ - ConnectionStateData.prototype.connection = null; - - /** - * Encodes the specified ConnectionStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConnectionStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConnectionStateData} message ConnectionStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - $root.ibc.core.connection.v1.ConnectionEnd.encode(message.connection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConnectionStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConnectionStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConnectionStateData} message ConnectionStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectionStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ConnectionStateData} ConnectionStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ConnectionStateData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ConnectionStateData} ConnectionStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.connection != null && message.hasOwnProperty("connection")) { - var error = $root.ibc.core.connection.v1.ConnectionEnd.verify(message.connection); - if (error) - return "connection." + error; - } - return null; - }; - - /** - * Creates a ConnectionStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ConnectionStateData} ConnectionStateData - */ - ConnectionStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ConnectionStateData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.ConnectionStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.connection != null) { - if (typeof object.connection !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ConnectionStateData.connection: object expected"); - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.fromObject(object.connection); - } - return message; - }; - - /** - * Creates a plain object from a ConnectionStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ConnectionStateData} message ConnectionStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.connection = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = $root.ibc.core.connection.v1.ConnectionEnd.toObject(message.connection, options); - return object; - }; - - /** - * Converts this ConnectionStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @instance - * @returns {Object.} JSON object - */ - ConnectionStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConnectionStateData; - })(); - - v2.ChannelStateData = (function() { - - /** - * Properties of a ChannelStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IChannelStateData - * @property {Uint8Array|null} [path] ChannelStateData path - * @property {ibc.core.channel.v1.IChannel|null} [channel] ChannelStateData channel - */ - - /** - * Constructs a new ChannelStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ChannelStateData. - * @implements IChannelStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IChannelStateData=} [properties] Properties to set - */ - function ChannelStateData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChannelStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @instance - */ - ChannelStateData.prototype.path = $util.newBuffer([]); - - /** - * ChannelStateData channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @instance - */ - ChannelStateData.prototype.channel = null; - - /** - * Encodes the specified ChannelStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ChannelStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IChannelStateData} message ChannelStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChannelStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ChannelStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ChannelStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IChannelStateData} message ChannelStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChannelStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChannelStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ChannelStateData} ChannelStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChannelStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ChannelStateData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChannelStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ChannelStateData} ChannelStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChannelStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChannelStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChannelStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - return null; - }; - - /** - * Creates a ChannelStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ChannelStateData} ChannelStateData - */ - ChannelStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ChannelStateData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.ChannelStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ChannelStateData.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - return message; - }; - - /** - * Creates a plain object from a ChannelStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ChannelStateData} message ChannelStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChannelStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.channel = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - return object; - }; - - /** - * Converts this ChannelStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @instance - * @returns {Object.} JSON object - */ - ChannelStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ChannelStateData; - })(); - - v2.PacketCommitmentData = (function() { - - /** - * Properties of a PacketCommitmentData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IPacketCommitmentData - * @property {Uint8Array|null} [path] PacketCommitmentData path - * @property {Uint8Array|null} [commitment] PacketCommitmentData commitment - */ - - /** - * Constructs a new PacketCommitmentData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a PacketCommitmentData. - * @implements IPacketCommitmentData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IPacketCommitmentData=} [properties] Properties to set - */ - function PacketCommitmentData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketCommitmentData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @instance - */ - PacketCommitmentData.prototype.path = $util.newBuffer([]); - - /** - * PacketCommitmentData commitment. - * @member {Uint8Array} commitment - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @instance - */ - PacketCommitmentData.prototype.commitment = $util.newBuffer([]); - - /** - * Encodes the specified PacketCommitmentData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketCommitmentData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketCommitmentData} message PacketCommitmentData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketCommitmentData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.commitment); - return writer; - }; - - /** - * Encodes the specified PacketCommitmentData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketCommitmentData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketCommitmentData} message PacketCommitmentData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketCommitmentData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketCommitmentData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.PacketCommitmentData} PacketCommitmentData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketCommitmentData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.PacketCommitmentData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.commitment = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketCommitmentData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.PacketCommitmentData} PacketCommitmentData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketCommitmentData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketCommitmentData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketCommitmentData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.commitment != null && message.hasOwnProperty("commitment")) - if (!(message.commitment && typeof message.commitment.length === "number" || $util.isString(message.commitment))) - return "commitment: buffer expected"; - return null; - }; - - /** - * Creates a PacketCommitmentData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.PacketCommitmentData} PacketCommitmentData - */ - PacketCommitmentData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.PacketCommitmentData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.PacketCommitmentData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.commitment != null) - if (typeof object.commitment === "string") - $util.base64.decode(object.commitment, message.commitment = $util.newBuffer($util.base64.length(object.commitment)), 0); - else if (object.commitment.length) - message.commitment = object.commitment; - return message; - }; - - /** - * Creates a plain object from a PacketCommitmentData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {ibc.lightclients.solomachine.v2.PacketCommitmentData} message PacketCommitmentData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketCommitmentData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.commitment = ""; - else { - object.commitment = []; - if (options.bytes !== Array) - object.commitment = $util.newBuffer(object.commitment); - } - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.commitment != null && message.hasOwnProperty("commitment")) - object.commitment = options.bytes === String ? $util.base64.encode(message.commitment, 0, message.commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.commitment) : message.commitment; - return object; - }; - - /** - * Converts this PacketCommitmentData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @instance - * @returns {Object.} JSON object - */ - PacketCommitmentData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketCommitmentData; - })(); - - v2.PacketAcknowledgementData = (function() { - - /** - * Properties of a PacketAcknowledgementData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IPacketAcknowledgementData - * @property {Uint8Array|null} [path] PacketAcknowledgementData path - * @property {Uint8Array|null} [acknowledgement] PacketAcknowledgementData acknowledgement - */ - - /** - * Constructs a new PacketAcknowledgementData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a PacketAcknowledgementData. - * @implements IPacketAcknowledgementData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IPacketAcknowledgementData=} [properties] Properties to set - */ - function PacketAcknowledgementData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketAcknowledgementData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @instance - */ - PacketAcknowledgementData.prototype.path = $util.newBuffer([]); - - /** - * PacketAcknowledgementData acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @instance - */ - PacketAcknowledgementData.prototype.acknowledgement = $util.newBuffer([]); - - /** - * Encodes the specified PacketAcknowledgementData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketAcknowledgementData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketAcknowledgementData} message PacketAcknowledgementData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketAcknowledgementData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acknowledgement); - return writer; - }; - - /** - * Encodes the specified PacketAcknowledgementData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketAcknowledgementData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketAcknowledgementData} message PacketAcknowledgementData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketAcknowledgementData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketAcknowledgementData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} PacketAcknowledgementData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketAcknowledgementData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.PacketAcknowledgementData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketAcknowledgementData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} PacketAcknowledgementData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketAcknowledgementData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketAcknowledgementData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketAcknowledgementData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) - if (!(message.acknowledgement && typeof message.acknowledgement.length === "number" || $util.isString(message.acknowledgement))) - return "acknowledgement: buffer expected"; - return null; - }; - - /** - * Creates a PacketAcknowledgementData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} PacketAcknowledgementData - */ - PacketAcknowledgementData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.PacketAcknowledgementData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.PacketAcknowledgementData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - 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; - return message; - }; - - /** - * Creates a plain object from a PacketAcknowledgementData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} message PacketAcknowledgementData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketAcknowledgementData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.acknowledgement = ""; - else { - object.acknowledgement = []; - if (options.bytes !== Array) - object.acknowledgement = $util.newBuffer(object.acknowledgement); - } - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - 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; - return object; - }; - - /** - * Converts this PacketAcknowledgementData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @instance - * @returns {Object.} JSON object - */ - PacketAcknowledgementData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketAcknowledgementData; - })(); - - v2.PacketReceiptAbsenceData = (function() { - - /** - * Properties of a PacketReceiptAbsenceData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IPacketReceiptAbsenceData - * @property {Uint8Array|null} [path] PacketReceiptAbsenceData path - */ - - /** - * Constructs a new PacketReceiptAbsenceData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a PacketReceiptAbsenceData. - * @implements IPacketReceiptAbsenceData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData=} [properties] Properties to set - */ - function PacketReceiptAbsenceData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketReceiptAbsenceData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @instance - */ - PacketReceiptAbsenceData.prototype.path = $util.newBuffer([]); - - /** - * Encodes the specified PacketReceiptAbsenceData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData} message PacketReceiptAbsenceData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketReceiptAbsenceData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - return writer; - }; - - /** - * Encodes the specified PacketReceiptAbsenceData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData} message PacketReceiptAbsenceData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketReceiptAbsenceData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketReceiptAbsenceData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} PacketReceiptAbsenceData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketReceiptAbsenceData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketReceiptAbsenceData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} PacketReceiptAbsenceData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketReceiptAbsenceData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketReceiptAbsenceData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketReceiptAbsenceData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - return null; - }; - - /** - * Creates a PacketReceiptAbsenceData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} PacketReceiptAbsenceData - */ - PacketReceiptAbsenceData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - return message; - }; - - /** - * Creates a plain object from a PacketReceiptAbsenceData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} message PacketReceiptAbsenceData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketReceiptAbsenceData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - return object; - }; - - /** - * Converts this PacketReceiptAbsenceData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @instance - * @returns {Object.} JSON object - */ - PacketReceiptAbsenceData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketReceiptAbsenceData; - })(); - - v2.NextSequenceRecvData = (function() { - - /** - * Properties of a NextSequenceRecvData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface INextSequenceRecvData - * @property {Uint8Array|null} [path] NextSequenceRecvData path - * @property {Long|null} [next_seq_recv] NextSequenceRecvData next_seq_recv - */ - - /** - * Constructs a new NextSequenceRecvData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a NextSequenceRecvData. - * @implements INextSequenceRecvData - * @constructor - * @param {ibc.lightclients.solomachine.v2.INextSequenceRecvData=} [properties] Properties to set - */ - function NextSequenceRecvData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NextSequenceRecvData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @instance - */ - NextSequenceRecvData.prototype.path = $util.newBuffer([]); - - /** - * NextSequenceRecvData next_seq_recv. - * @member {Long} next_seq_recv - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @instance - */ - NextSequenceRecvData.prototype.next_seq_recv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified NextSequenceRecvData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.NextSequenceRecvData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {ibc.lightclients.solomachine.v2.INextSequenceRecvData} message NextSequenceRecvData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NextSequenceRecvData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.next_seq_recv != null && Object.hasOwnProperty.call(message, "next_seq_recv")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.next_seq_recv); - return writer; - }; - - /** - * Encodes the specified NextSequenceRecvData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.NextSequenceRecvData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {ibc.lightclients.solomachine.v2.INextSequenceRecvData} message NextSequenceRecvData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NextSequenceRecvData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NextSequenceRecvData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.NextSequenceRecvData} NextSequenceRecvData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NextSequenceRecvData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.NextSequenceRecvData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.next_seq_recv = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NextSequenceRecvData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.NextSequenceRecvData} NextSequenceRecvData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NextSequenceRecvData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NextSequenceRecvData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NextSequenceRecvData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.next_seq_recv != null && message.hasOwnProperty("next_seq_recv")) - if (!$util.isInteger(message.next_seq_recv) && !(message.next_seq_recv && $util.isInteger(message.next_seq_recv.low) && $util.isInteger(message.next_seq_recv.high))) - return "next_seq_recv: integer|Long expected"; - return null; - }; - - /** - * Creates a NextSequenceRecvData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.NextSequenceRecvData} NextSequenceRecvData - */ - NextSequenceRecvData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.NextSequenceRecvData) - return object; - var message = new $root.ibc.lightclients.solomachine.v2.NextSequenceRecvData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.next_seq_recv != null) - if ($util.Long) - (message.next_seq_recv = $util.Long.fromValue(object.next_seq_recv)).unsigned = true; - else if (typeof object.next_seq_recv === "string") - message.next_seq_recv = parseInt(object.next_seq_recv, 10); - else if (typeof object.next_seq_recv === "number") - message.next_seq_recv = object.next_seq_recv; - else if (typeof object.next_seq_recv === "object") - message.next_seq_recv = new $util.LongBits(object.next_seq_recv.low >>> 0, object.next_seq_recv.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a NextSequenceRecvData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {ibc.lightclients.solomachine.v2.NextSequenceRecvData} message NextSequenceRecvData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NextSequenceRecvData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.next_seq_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_seq_recv = options.longs === String ? "0" : 0; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.next_seq_recv != null && message.hasOwnProperty("next_seq_recv")) - if (typeof message.next_seq_recv === "number") - object.next_seq_recv = options.longs === String ? String(message.next_seq_recv) : message.next_seq_recv; - else - object.next_seq_recv = options.longs === String ? $util.Long.prototype.toString.call(message.next_seq_recv) : options.longs === Number ? new $util.LongBits(message.next_seq_recv.low >>> 0, message.next_seq_recv.high >>> 0).toNumber(true) : message.next_seq_recv; - return object; - }; - - /** - * Converts this NextSequenceRecvData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @instance - * @returns {Object.} JSON object - */ - NextSequenceRecvData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NextSequenceRecvData; - })(); - - return v2; - })(); - - solomachine.v3 = (function() { - - /** - * Namespace v3. - * @memberof ibc.lightclients.solomachine - * @namespace - */ - var v3 = {}; - - v3.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IClientState - * @property {Long|null} [sequence] ClientState sequence - * @property {boolean|null} [is_frozen] ClientState is_frozen - * @property {ibc.lightclients.solomachine.v3.IConsensusState|null} [consensus_state] ClientState consensus_state - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.solomachine.v3.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - */ - ClientState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ClientState is_frozen. - * @member {boolean} is_frozen - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - */ - ClientState.prototype.is_frozen = false; - - /** - * ClientState consensus_state. - * @member {ibc.lightclients.solomachine.v3.IConsensusState|null|undefined} consensus_state - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - */ - ClientState.prototype.consensus_state = null; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.solomachine.v3.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {ibc.lightclients.solomachine.v3.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.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.is_frozen != null && Object.hasOwnProperty.call(message, "is_frozen")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_frozen); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.ibc.lightclients.solomachine.v3.ConsensusState.encode(message.consensus_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {ibc.lightclients.solomachine.v3.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.ClientState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.is_frozen = reader.bool(); - break; - case 3: - message.consensus_state = $root.ibc.lightclients.solomachine.v3.ConsensusState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.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.is_frozen != null && message.hasOwnProperty("is_frozen")) - if (typeof message.is_frozen !== "boolean") - return "is_frozen: boolean expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.ibc.lightclients.solomachine.v3.ConsensusState.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.ClientState) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.ClientState(); - 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.is_frozen != null) - message.is_frozen = Boolean(object.is_frozen); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.ClientState.consensus_state: object expected"); - message.consensus_state = $root.ibc.lightclients.solomachine.v3.ConsensusState.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {ibc.lightclients.solomachine.v3.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.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.is_frozen = false; - object.consensus_state = null; - } - 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.is_frozen != null && message.hasOwnProperty("is_frozen")) - object.is_frozen = message.is_frozen; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.ibc.lightclients.solomachine.v3.ConsensusState.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - v3.ConsensusState = (function() { - - /** - * Properties of a ConsensusState. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IConsensusState - * @property {google.protobuf.IAny|null} [public_key] ConsensusState public_key - * @property {string|null} [diversifier] ConsensusState diversifier - * @property {Long|null} [timestamp] ConsensusState timestamp - */ - - /** - * Constructs a new ConsensusState. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a ConsensusState. - * @implements IConsensusState - * @constructor - * @param {ibc.lightclients.solomachine.v3.IConsensusState=} [properties] Properties to set - */ - function ConsensusState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusState public_key. - * @member {google.protobuf.IAny|null|undefined} public_key - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - */ - ConsensusState.prototype.public_key = null; - - /** - * ConsensusState diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - */ - ConsensusState.prototype.diversifier = ""; - - /** - * ConsensusState timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - */ - ConsensusState.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.solomachine.v3.ConsensusState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v3.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.public_key != null && Object.hasOwnProperty.call(message, "public_key")) - $root.google.protobuf.Any.encode(message.public_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.diversifier); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.ConsensusState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v3.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.ConsensusState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.diversifier = reader.string(); - break; - case 3: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.public_key != null && message.hasOwnProperty("public_key")) { - var error = $root.google.protobuf.Any.verify(message.public_key); - if (error) - return "public_key." + error; - } - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.ConsensusState} ConsensusState - */ - ConsensusState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.ConsensusState) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.ConsensusState(); - if (object.public_key != null) { - if (typeof object.public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.ConsensusState.public_key: object expected"); - message.public_key = $root.google.protobuf.Any.fromObject(object.public_key); - } - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v3.ConsensusState} message ConsensusState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.public_key = null; - object.diversifier = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.public_key != null && message.hasOwnProperty("public_key")) - object.public_key = $root.google.protobuf.Any.toObject(message.public_key, options); - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this ConsensusState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - * @returns {Object.} JSON object - */ - ConsensusState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusState; - })(); - - v3.Header = (function() { - - /** - * Properties of a Header. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IHeader - * @property {Long|null} [timestamp] Header timestamp - * @property {Uint8Array|null} [signature] Header signature - * @property {google.protobuf.IAny|null} [new_public_key] Header new_public_key - * @property {string|null} [new_diversifier] Header new_diversifier - */ - - /** - * Constructs a new Header. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {ibc.lightclients.solomachine.v3.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 timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Header signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.signature = $util.newBuffer([]); - - /** - * Header new_public_key. - * @member {google.protobuf.IAny|null|undefined} new_public_key - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.new_public_key = null; - - /** - * Header new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.new_diversifier = ""; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.solomachine.v3.Header.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {ibc.lightclients.solomachine.v3.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - if (message.new_public_key != null && Object.hasOwnProperty.call(message, "new_public_key")) - $root.google.protobuf.Any.encode(message.new_public_key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {ibc.lightclients.solomachine.v3.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 ibc.lightclients.solomachine.v3.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.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.ibc.lightclients.solomachine.v3.Header(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = reader.uint64(); - break; - case 2: - message.signature = reader.bytes(); - break; - case 3: - message.new_public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 4: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.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 ibc.lightclients.solomachine.v3.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) { - var error = $root.google.protobuf.Any.verify(message.new_public_key); - if (error) - return "new_public_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.Header) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.Header(); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.new_public_key != null) { - if (typeof object.new_public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.Header.new_public_key: object expected"); - message.new_public_key = $root.google.protobuf.Any.fromObject(object.new_public_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {ibc.lightclients.solomachine.v3.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) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.new_public_key = null; - object.new_diversifier = ""; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) - object.new_public_key = $root.google.protobuf.Any.toObject(message.new_public_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - v3.Misbehaviour = (function() { - - /** - * Properties of a Misbehaviour. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IMisbehaviour - * @property {Long|null} [sequence] Misbehaviour sequence - * @property {ibc.lightclients.solomachine.v3.ISignatureAndData|null} [signature_one] Misbehaviour signature_one - * @property {ibc.lightclients.solomachine.v3.ISignatureAndData|null} [signature_two] Misbehaviour signature_two - */ - - /** - * Constructs a new Misbehaviour. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a Misbehaviour. - * @implements IMisbehaviour - * @constructor - * @param {ibc.lightclients.solomachine.v3.IMisbehaviour=} [properties] Properties to set - */ - function Misbehaviour(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Misbehaviour sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - */ - Misbehaviour.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Misbehaviour signature_one. - * @member {ibc.lightclients.solomachine.v3.ISignatureAndData|null|undefined} signature_one - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_one = null; - - /** - * Misbehaviour signature_two. - * @member {ibc.lightclients.solomachine.v3.ISignatureAndData|null|undefined} signature_two - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_two = null; - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.solomachine.v3.Misbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v3.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.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.signature_one != null && Object.hasOwnProperty.call(message, "signature_one")) - $root.ibc.lightclients.solomachine.v3.SignatureAndData.encode(message.signature_one, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signature_two != null && Object.hasOwnProperty.call(message, "signature_two")) - $root.ibc.lightclients.solomachine.v3.SignatureAndData.encode(message.signature_two, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.Misbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v3.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.Misbehaviour(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.signature_one = $root.ibc.lightclients.solomachine.v3.SignatureAndData.decode(reader, reader.uint32()); - break; - case 3: - message.signature_two = $root.ibc.lightclients.solomachine.v3.SignatureAndData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Misbehaviour message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Misbehaviour.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.signature_one != null && message.hasOwnProperty("signature_one")) { - var error = $root.ibc.lightclients.solomachine.v3.SignatureAndData.verify(message.signature_one); - if (error) - return "signature_one." + error; - } - if (message.signature_two != null && message.hasOwnProperty("signature_two")) { - var error = $root.ibc.lightclients.solomachine.v3.SignatureAndData.verify(message.signature_two); - if (error) - return "signature_two." + error; - } - return null; - }; - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.Misbehaviour} Misbehaviour - */ - Misbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.Misbehaviour) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.Misbehaviour(); - 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.signature_one != null) { - if (typeof object.signature_one !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.Misbehaviour.signature_one: object expected"); - message.signature_one = $root.ibc.lightclients.solomachine.v3.SignatureAndData.fromObject(object.signature_one); - } - if (object.signature_two != null) { - if (typeof object.signature_two !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.Misbehaviour.signature_two: object expected"); - message.signature_two = $root.ibc.lightclients.solomachine.v3.SignatureAndData.fromObject(object.signature_two); - } - return message; - }; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v3.Misbehaviour} message Misbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Misbehaviour.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.signature_one = null; - object.signature_two = null; - } - 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.signature_one != null && message.hasOwnProperty("signature_one")) - object.signature_one = $root.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(message.signature_one, options); - if (message.signature_two != null && message.hasOwnProperty("signature_two")) - object.signature_two = $root.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(message.signature_two, options); - return object; - }; - - /** - * Converts this Misbehaviour to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - * @returns {Object.} JSON object - */ - Misbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Misbehaviour; - })(); - - v3.SignatureAndData = (function() { - - /** - * Properties of a SignatureAndData. - * @memberof ibc.lightclients.solomachine.v3 - * @interface ISignatureAndData - * @property {Uint8Array|null} [signature] SignatureAndData signature - * @property {Uint8Array|null} [path] SignatureAndData path - * @property {Uint8Array|null} [data] SignatureAndData data - * @property {Long|null} [timestamp] SignatureAndData timestamp - */ - - /** - * Constructs a new SignatureAndData. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a SignatureAndData. - * @implements ISignatureAndData - * @constructor - * @param {ibc.lightclients.solomachine.v3.ISignatureAndData=} [properties] Properties to set - */ - function SignatureAndData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignatureAndData signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.signature = $util.newBuffer([]); - - /** - * SignatureAndData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.path = $util.newBuffer([]); - - /** - * SignatureAndData data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.data = $util.newBuffer([]); - - /** - * SignatureAndData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified SignatureAndData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignatureAndData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v3.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.path); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified SignatureAndData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignatureAndData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v3.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.SignatureAndData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature = reader.bytes(); - break; - case 2: - message.path = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - case 4: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignatureAndData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignatureAndData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: 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"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a SignatureAndData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.SignatureAndData} SignatureAndData - */ - SignatureAndData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.SignatureAndData) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.SignatureAndData(); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a SignatureAndData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v3.SignatureAndData} message SignatureAndData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignatureAndData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - 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.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this SignatureAndData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - * @returns {Object.} JSON object - */ - SignatureAndData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignatureAndData; - })(); - - v3.TimestampedSignatureData = (function() { - - /** - * Properties of a TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v3 - * @interface ITimestampedSignatureData - * @property {Uint8Array|null} [signature_data] TimestampedSignatureData signature_data - * @property {Long|null} [timestamp] TimestampedSignatureData timestamp - */ - - /** - * Constructs a new TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a TimestampedSignatureData. - * @implements ITimestampedSignatureData - * @constructor - * @param {ibc.lightclients.solomachine.v3.ITimestampedSignatureData=} [properties] Properties to set - */ - function TimestampedSignatureData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimestampedSignatureData signature_data. - * @member {Uint8Array} signature_data - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.signature_data = $util.newBuffer([]); - - /** - * TimestampedSignatureData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified TimestampedSignatureData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.TimestampedSignatureData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v3.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature_data != null && Object.hasOwnProperty.call(message, "signature_data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature_data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified TimestampedSignatureData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.TimestampedSignatureData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v3.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.TimestampedSignatureData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature_data = reader.bytes(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimestampedSignatureData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimestampedSignatureData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - if (!(message.signature_data && typeof message.signature_data.length === "number" || $util.isString(message.signature_data))) - return "signature_data: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a TimestampedSignatureData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.TimestampedSignatureData} TimestampedSignatureData - */ - TimestampedSignatureData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.TimestampedSignatureData) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.TimestampedSignatureData(); - if (object.signature_data != null) - if (typeof object.signature_data === "string") - $util.base64.decode(object.signature_data, message.signature_data = $util.newBuffer($util.base64.length(object.signature_data)), 0); - else if (object.signature_data.length) - message.signature_data = object.signature_data; - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a TimestampedSignatureData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v3.TimestampedSignatureData} message TimestampedSignatureData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimestampedSignatureData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature_data = ""; - else { - object.signature_data = []; - if (options.bytes !== Array) - object.signature_data = $util.newBuffer(object.signature_data); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - object.signature_data = options.bytes === String ? $util.base64.encode(message.signature_data, 0, message.signature_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature_data) : message.signature_data; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this TimestampedSignatureData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @instance - * @returns {Object.} JSON object - */ - TimestampedSignatureData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TimestampedSignatureData; - })(); - - v3.SignBytes = (function() { - - /** - * Properties of a SignBytes. - * @memberof ibc.lightclients.solomachine.v3 - * @interface ISignBytes - * @property {Long|null} [sequence] SignBytes sequence - * @property {Long|null} [timestamp] SignBytes timestamp - * @property {string|null} [diversifier] SignBytes diversifier - * @property {Uint8Array|null} [path] SignBytes path - * @property {Uint8Array|null} [data] SignBytes data - */ - - /** - * Constructs a new SignBytes. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a SignBytes. - * @implements ISignBytes - * @constructor - * @param {ibc.lightclients.solomachine.v3.ISignBytes=} [properties] Properties to set - */ - function SignBytes(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignBytes sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.diversifier = ""; - - /** - * SignBytes path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.path = $util.newBuffer([]); - - /** - * SignBytes data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified SignBytes message. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignBytes.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v3.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.diversifier); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.path); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified SignBytes message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignBytes.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v3.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.SignBytes(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.diversifier = reader.string(); - break; - case 4: - message.path = reader.bytes(); - break; - case 5: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignBytes message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignBytes.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: 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 SignBytes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.SignBytes} SignBytes - */ - SignBytes.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.SignBytes) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.SignBytes(); - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - 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 SignBytes message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v3.SignBytes} message SignBytes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignBytes.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; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.diversifier = ""; - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - 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 SignBytes to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - * @returns {Object.} JSON object - */ - SignBytes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignBytes; - })(); - - v3.HeaderData = (function() { - - /** - * Properties of a HeaderData. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IHeaderData - * @property {google.protobuf.IAny|null} [new_pub_key] HeaderData new_pub_key - * @property {string|null} [new_diversifier] HeaderData new_diversifier - */ - - /** - * Constructs a new HeaderData. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a HeaderData. - * @implements IHeaderData - * @constructor - * @param {ibc.lightclients.solomachine.v3.IHeaderData=} [properties] Properties to set - */ - function HeaderData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HeaderData new_pub_key. - * @member {google.protobuf.IAny|null|undefined} new_pub_key - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @instance - */ - HeaderData.prototype.new_pub_key = null; - - /** - * HeaderData new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @instance - */ - HeaderData.prototype.new_diversifier = ""; - - /** - * Encodes the specified HeaderData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.HeaderData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v3.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.new_pub_key != null && Object.hasOwnProperty.call(message, "new_pub_key")) - $root.google.protobuf.Any.encode(message.new_pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified HeaderData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.HeaderData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v3.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.HeaderData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_pub_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HeaderData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HeaderData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) { - var error = $root.google.protobuf.Any.verify(message.new_pub_key); - if (error) - return "new_pub_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a HeaderData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.HeaderData} HeaderData - */ - HeaderData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.HeaderData) - return object; - var message = new $root.ibc.lightclients.solomachine.v3.HeaderData(); - if (object.new_pub_key != null) { - if (typeof object.new_pub_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.HeaderData.new_pub_key: object expected"); - message.new_pub_key = $root.google.protobuf.Any.fromObject(object.new_pub_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a HeaderData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v3.HeaderData} message HeaderData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HeaderData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.new_pub_key = null; - object.new_diversifier = ""; - } - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) - object.new_pub_key = $root.google.protobuf.Any.toObject(message.new_pub_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this HeaderData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @instance - * @returns {Object.} JSON object - */ - HeaderData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HeaderData; - })(); - - return v3; - })(); - - return solomachine; - })(); - - lightclients.tendermint = (function() { - - /** - * Namespace tendermint. - * @memberof ibc.lightclients - * @namespace - */ - var tendermint = {}; - - tendermint.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.lightclients.tendermint - * @namespace - */ - var v1 = {}; - - v1.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IClientState - * @property {string|null} [chain_id] ClientState chain_id - * @property {ibc.lightclients.tendermint.v1.IFraction|null} [trust_level] ClientState trust_level - * @property {google.protobuf.IDuration|null} [trusting_period] ClientState trusting_period - * @property {google.protobuf.IDuration|null} [unbonding_period] ClientState unbonding_period - * @property {google.protobuf.IDuration|null} [max_clock_drift] ClientState max_clock_drift - * @property {ibc.core.client.v1.IHeight|null} [frozen_height] ClientState frozen_height - * @property {ibc.core.client.v1.IHeight|null} [latest_height] ClientState latest_height - * @property {Array.|null} [proof_specs] ClientState proof_specs - * @property {Array.|null} [upgrade_path] ClientState upgrade_path - * @property {boolean|null} [allow_update_after_expiry] ClientState allow_update_after_expiry - * @property {boolean|null} [allow_update_after_misbehaviour] ClientState allow_update_after_misbehaviour - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.tendermint.v1.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - this.proof_specs = []; - this.upgrade_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]]; - } - - /** - * ClientState chain_id. - * @member {string} chain_id - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.chain_id = ""; - - /** - * ClientState trust_level. - * @member {ibc.lightclients.tendermint.v1.IFraction|null|undefined} trust_level - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.trust_level = null; - - /** - * ClientState trusting_period. - * @member {google.protobuf.IDuration|null|undefined} trusting_period - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.trusting_period = null; - - /** - * ClientState unbonding_period. - * @member {google.protobuf.IDuration|null|undefined} unbonding_period - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.unbonding_period = null; - - /** - * ClientState max_clock_drift. - * @member {google.protobuf.IDuration|null|undefined} max_clock_drift - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.max_clock_drift = null; - - /** - * ClientState frozen_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} frozen_height - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.frozen_height = null; - - /** - * ClientState latest_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} latest_height - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.latest_height = null; - - /** - * ClientState proof_specs. - * @member {Array.} proof_specs - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.proof_specs = $util.emptyArray; - - /** - * ClientState upgrade_path. - * @member {Array.} upgrade_path - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.upgrade_path = $util.emptyArray; - - /** - * ClientState allow_update_after_expiry. - * @member {boolean} allow_update_after_expiry - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.allow_update_after_expiry = false; - - /** - * ClientState allow_update_after_misbehaviour. - * @member {boolean} allow_update_after_misbehaviour - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.allow_update_after_misbehaviour = false; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.tendermint.v1.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {ibc.lightclients.tendermint.v1.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.chain_id != null && Object.hasOwnProperty.call(message, "chain_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.chain_id); - if (message.trust_level != null && Object.hasOwnProperty.call(message, "trust_level")) - $root.ibc.lightclients.tendermint.v1.Fraction.encode(message.trust_level, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trusting_period != null && Object.hasOwnProperty.call(message, "trusting_period")) - $root.google.protobuf.Duration.encode(message.trusting_period, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.unbonding_period != null && Object.hasOwnProperty.call(message, "unbonding_period")) - $root.google.protobuf.Duration.encode(message.unbonding_period, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.max_clock_drift != null && Object.hasOwnProperty.call(message, "max_clock_drift")) - $root.google.protobuf.Duration.encode(message.max_clock_drift, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.frozen_height != null && Object.hasOwnProperty.call(message, "frozen_height")) - $root.ibc.core.client.v1.Height.encode(message.frozen_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.latest_height != null && Object.hasOwnProperty.call(message, "latest_height")) - $root.ibc.core.client.v1.Height.encode(message.latest_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.proof_specs != null && message.proof_specs.length) - for (var i = 0; i < message.proof_specs.length; ++i) - $root.cosmos.ics23.v1.ProofSpec.encode(message.proof_specs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.upgrade_path != null && message.upgrade_path.length) - for (var i = 0; i < message.upgrade_path.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.upgrade_path[i]); - if (message.allow_update_after_expiry != null && Object.hasOwnProperty.call(message, "allow_update_after_expiry")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.allow_update_after_expiry); - if (message.allow_update_after_misbehaviour != null && Object.hasOwnProperty.call(message, "allow_update_after_misbehaviour")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.allow_update_after_misbehaviour); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {ibc.lightclients.tendermint.v1.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.ClientState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chain_id = reader.string(); - break; - case 2: - message.trust_level = $root.ibc.lightclients.tendermint.v1.Fraction.decode(reader, reader.uint32()); - break; - case 3: - message.trusting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.unbonding_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.max_clock_drift = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.frozen_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.latest_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - if (!(message.proof_specs && message.proof_specs.length)) - message.proof_specs = []; - message.proof_specs.push($root.cosmos.ics23.v1.ProofSpec.decode(reader, reader.uint32())); - break; - case 9: - if (!(message.upgrade_path && message.upgrade_path.length)) - message.upgrade_path = []; - message.upgrade_path.push(reader.string()); - break; - case 10: - message.allow_update_after_expiry = reader.bool(); - break; - case 11: - message.allow_update_after_misbehaviour = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - if (!$util.isString(message.chain_id)) - return "chain_id: string expected"; - if (message.trust_level != null && message.hasOwnProperty("trust_level")) { - var error = $root.ibc.lightclients.tendermint.v1.Fraction.verify(message.trust_level); - if (error) - return "trust_level." + error; - } - if (message.trusting_period != null && message.hasOwnProperty("trusting_period")) { - var error = $root.google.protobuf.Duration.verify(message.trusting_period); - if (error) - return "trusting_period." + error; - } - if (message.unbonding_period != null && message.hasOwnProperty("unbonding_period")) { - var error = $root.google.protobuf.Duration.verify(message.unbonding_period); - if (error) - return "unbonding_period." + error; - } - if (message.max_clock_drift != null && message.hasOwnProperty("max_clock_drift")) { - var error = $root.google.protobuf.Duration.verify(message.max_clock_drift); - if (error) - return "max_clock_drift." + error; - } - if (message.frozen_height != null && message.hasOwnProperty("frozen_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.frozen_height); - if (error) - return "frozen_height." + error; - } - if (message.latest_height != null && message.hasOwnProperty("latest_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.latest_height); - if (error) - return "latest_height." + error; - } - if (message.proof_specs != null && message.hasOwnProperty("proof_specs")) { - if (!Array.isArray(message.proof_specs)) - return "proof_specs: array expected"; - for (var i = 0; i < message.proof_specs.length; ++i) { - var error = $root.cosmos.ics23.v1.ProofSpec.verify(message.proof_specs[i]); - if (error) - return "proof_specs." + error; - } - } - if (message.upgrade_path != null && message.hasOwnProperty("upgrade_path")) { - if (!Array.isArray(message.upgrade_path)) - return "upgrade_path: array expected"; - for (var i = 0; i < message.upgrade_path.length; ++i) - if (!$util.isString(message.upgrade_path[i])) - return "upgrade_path: string[] expected"; - } - if (message.allow_update_after_expiry != null && message.hasOwnProperty("allow_update_after_expiry")) - if (typeof message.allow_update_after_expiry !== "boolean") - return "allow_update_after_expiry: boolean expected"; - if (message.allow_update_after_misbehaviour != null && message.hasOwnProperty("allow_update_after_misbehaviour")) - if (typeof message.allow_update_after_misbehaviour !== "boolean") - return "allow_update_after_misbehaviour: boolean expected"; - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.ClientState) - return object; - var message = new $root.ibc.lightclients.tendermint.v1.ClientState(); - if (object.chain_id != null) - message.chain_id = String(object.chain_id); - if (object.trust_level != null) { - if (typeof object.trust_level !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.trust_level: object expected"); - message.trust_level = $root.ibc.lightclients.tendermint.v1.Fraction.fromObject(object.trust_level); - } - if (object.trusting_period != null) { - if (typeof object.trusting_period !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.trusting_period: object expected"); - message.trusting_period = $root.google.protobuf.Duration.fromObject(object.trusting_period); - } - if (object.unbonding_period != null) { - if (typeof object.unbonding_period !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.unbonding_period: object expected"); - message.unbonding_period = $root.google.protobuf.Duration.fromObject(object.unbonding_period); - } - if (object.max_clock_drift != null) { - if (typeof object.max_clock_drift !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.max_clock_drift: object expected"); - message.max_clock_drift = $root.google.protobuf.Duration.fromObject(object.max_clock_drift); - } - if (object.frozen_height != null) { - if (typeof object.frozen_height !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.frozen_height: object expected"); - message.frozen_height = $root.ibc.core.client.v1.Height.fromObject(object.frozen_height); - } - if (object.latest_height != null) { - if (typeof object.latest_height !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.latest_height: object expected"); - message.latest_height = $root.ibc.core.client.v1.Height.fromObject(object.latest_height); - } - if (object.proof_specs) { - if (!Array.isArray(object.proof_specs)) - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.proof_specs: array expected"); - message.proof_specs = []; - for (var i = 0; i < object.proof_specs.length; ++i) { - if (typeof object.proof_specs[i] !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.proof_specs: object expected"); - message.proof_specs[i] = $root.cosmos.ics23.v1.ProofSpec.fromObject(object.proof_specs[i]); - } - } - if (object.upgrade_path) { - if (!Array.isArray(object.upgrade_path)) - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.upgrade_path: array expected"); - message.upgrade_path = []; - for (var i = 0; i < object.upgrade_path.length; ++i) - message.upgrade_path[i] = String(object.upgrade_path[i]); - } - if (object.allow_update_after_expiry != null) - message.allow_update_after_expiry = Boolean(object.allow_update_after_expiry); - if (object.allow_update_after_misbehaviour != null) - message.allow_update_after_misbehaviour = Boolean(object.allow_update_after_misbehaviour); - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {ibc.lightclients.tendermint.v1.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.proof_specs = []; - object.upgrade_path = []; - } - if (options.defaults) { - object.chain_id = ""; - object.trust_level = null; - object.trusting_period = null; - object.unbonding_period = null; - object.max_clock_drift = null; - object.frozen_height = null; - object.latest_height = null; - object.allow_update_after_expiry = false; - object.allow_update_after_misbehaviour = false; - } - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - object.chain_id = message.chain_id; - if (message.trust_level != null && message.hasOwnProperty("trust_level")) - object.trust_level = $root.ibc.lightclients.tendermint.v1.Fraction.toObject(message.trust_level, options); - if (message.trusting_period != null && message.hasOwnProperty("trusting_period")) - object.trusting_period = $root.google.protobuf.Duration.toObject(message.trusting_period, options); - if (message.unbonding_period != null && message.hasOwnProperty("unbonding_period")) - object.unbonding_period = $root.google.protobuf.Duration.toObject(message.unbonding_period, options); - if (message.max_clock_drift != null && message.hasOwnProperty("max_clock_drift")) - object.max_clock_drift = $root.google.protobuf.Duration.toObject(message.max_clock_drift, options); - if (message.frozen_height != null && message.hasOwnProperty("frozen_height")) - object.frozen_height = $root.ibc.core.client.v1.Height.toObject(message.frozen_height, options); - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - object.latest_height = $root.ibc.core.client.v1.Height.toObject(message.latest_height, options); - if (message.proof_specs && message.proof_specs.length) { - object.proof_specs = []; - for (var j = 0; j < message.proof_specs.length; ++j) - object.proof_specs[j] = $root.cosmos.ics23.v1.ProofSpec.toObject(message.proof_specs[j], options); - } - if (message.upgrade_path && message.upgrade_path.length) { - object.upgrade_path = []; - for (var j = 0; j < message.upgrade_path.length; ++j) - object.upgrade_path[j] = message.upgrade_path[j]; - } - if (message.allow_update_after_expiry != null && message.hasOwnProperty("allow_update_after_expiry")) - object.allow_update_after_expiry = message.allow_update_after_expiry; - if (message.allow_update_after_misbehaviour != null && message.hasOwnProperty("allow_update_after_misbehaviour")) - object.allow_update_after_misbehaviour = message.allow_update_after_misbehaviour; - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - v1.ConsensusState = (function() { - - /** - * Properties of a ConsensusState. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IConsensusState - * @property {google.protobuf.ITimestamp|null} [timestamp] ConsensusState timestamp - * @property {ibc.core.commitment.v1.IMerkleRoot|null} [root] ConsensusState root - * @property {Uint8Array|null} [next_validators_hash] ConsensusState next_validators_hash - */ - - /** - * Constructs a new ConsensusState. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a ConsensusState. - * @implements IConsensusState - * @constructor - * @param {ibc.lightclients.tendermint.v1.IConsensusState=} [properties] Properties to set - */ - function ConsensusState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusState timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - */ - ConsensusState.prototype.timestamp = null; - - /** - * ConsensusState root. - * @member {ibc.core.commitment.v1.IMerkleRoot|null|undefined} root - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - */ - ConsensusState.prototype.root = null; - - /** - * ConsensusState next_validators_hash. - * @member {Uint8Array} next_validators_hash - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - */ - ConsensusState.prototype.next_validators_hash = $util.newBuffer([]); - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.tendermint.v1.ConsensusState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {ibc.lightclients.tendermint.v1.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.root != null && Object.hasOwnProperty.call(message, "root")) - $root.ibc.core.commitment.v1.MerkleRoot.encode(message.root, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.next_validators_hash != null && Object.hasOwnProperty.call(message, "next_validators_hash")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.next_validators_hash); - return writer; - }; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.ConsensusState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {ibc.lightclients.tendermint.v1.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.ConsensusState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.root = $root.ibc.core.commitment.v1.MerkleRoot.decode(reader, reader.uint32()); - break; - case 3: - message.next_validators_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusState message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.root != null && message.hasOwnProperty("root")) { - var error = $root.ibc.core.commitment.v1.MerkleRoot.verify(message.root); - if (error) - return "root." + error; - } - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - if (!(message.next_validators_hash && typeof message.next_validators_hash.length === "number" || $util.isString(message.next_validators_hash))) - return "next_validators_hash: buffer expected"; - return null; - }; - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.ConsensusState} ConsensusState - */ - ConsensusState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.ConsensusState) - return object; - var message = new $root.ibc.lightclients.tendermint.v1.ConsensusState(); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ConsensusState.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.root != null) { - if (typeof object.root !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ConsensusState.root: object expected"); - message.root = $root.ibc.core.commitment.v1.MerkleRoot.fromObject(object.root); - } - if (object.next_validators_hash != null) - if (typeof object.next_validators_hash === "string") - $util.base64.decode(object.next_validators_hash, message.next_validators_hash = $util.newBuffer($util.base64.length(object.next_validators_hash)), 0); - else if (object.next_validators_hash.length) - message.next_validators_hash = object.next_validators_hash; - return message; - }; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {ibc.lightclients.tendermint.v1.ConsensusState} message ConsensusState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.timestamp = null; - object.root = null; - if (options.bytes === String) - object.next_validators_hash = ""; - else { - object.next_validators_hash = []; - if (options.bytes !== Array) - object.next_validators_hash = $util.newBuffer(object.next_validators_hash); - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.root != null && message.hasOwnProperty("root")) - object.root = $root.ibc.core.commitment.v1.MerkleRoot.toObject(message.root, options); - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - object.next_validators_hash = options.bytes === String ? $util.base64.encode(message.next_validators_hash, 0, message.next_validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_validators_hash) : message.next_validators_hash; - return object; - }; - - /** - * Converts this ConsensusState to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - * @returns {Object.} JSON object - */ - ConsensusState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusState; - })(); - - v1.Misbehaviour = (function() { - - /** - * Properties of a Misbehaviour. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IMisbehaviour - * @property {string|null} [client_id] Misbehaviour client_id - * @property {ibc.lightclients.tendermint.v1.IHeader|null} [header_1] Misbehaviour header_1 - * @property {ibc.lightclients.tendermint.v1.IHeader|null} [header_2] Misbehaviour header_2 - */ - - /** - * Constructs a new Misbehaviour. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a Misbehaviour. - * @implements IMisbehaviour - * @constructor - * @param {ibc.lightclients.tendermint.v1.IMisbehaviour=} [properties] Properties to set - */ - function Misbehaviour(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Misbehaviour client_id. - * @member {string} client_id - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - */ - Misbehaviour.prototype.client_id = ""; - - /** - * Misbehaviour header_1. - * @member {ibc.lightclients.tendermint.v1.IHeader|null|undefined} header_1 - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - */ - Misbehaviour.prototype.header_1 = null; - - /** - * Misbehaviour header_2. - * @member {ibc.lightclients.tendermint.v1.IHeader|null|undefined} header_2 - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - */ - Misbehaviour.prototype.header_2 = null; - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Misbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {ibc.lightclients.tendermint.v1.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.header_1 != null && Object.hasOwnProperty.call(message, "header_1")) - $root.ibc.lightclients.tendermint.v1.Header.encode(message.header_1, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.header_2 != null && Object.hasOwnProperty.call(message, "header_2")) - $root.ibc.lightclients.tendermint.v1.Header.encode(message.header_2, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Misbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {ibc.lightclients.tendermint.v1.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.Misbehaviour(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.header_1 = $root.ibc.lightclients.tendermint.v1.Header.decode(reader, reader.uint32()); - break; - case 3: - message.header_2 = $root.ibc.lightclients.tendermint.v1.Header.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Misbehaviour message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Misbehaviour.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.header_1 != null && message.hasOwnProperty("header_1")) { - var error = $root.ibc.lightclients.tendermint.v1.Header.verify(message.header_1); - if (error) - return "header_1." + error; - } - if (message.header_2 != null && message.hasOwnProperty("header_2")) { - var error = $root.ibc.lightclients.tendermint.v1.Header.verify(message.header_2); - if (error) - return "header_2." + error; - } - return null; - }; - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.Misbehaviour} Misbehaviour - */ - Misbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.Misbehaviour) - return object; - var message = new $root.ibc.lightclients.tendermint.v1.Misbehaviour(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.header_1 != null) { - if (typeof object.header_1 !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Misbehaviour.header_1: object expected"); - message.header_1 = $root.ibc.lightclients.tendermint.v1.Header.fromObject(object.header_1); - } - if (object.header_2 != null) { - if (typeof object.header_2 !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Misbehaviour.header_2: object expected"); - message.header_2 = $root.ibc.lightclients.tendermint.v1.Header.fromObject(object.header_2); - } - return message; - }; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {ibc.lightclients.tendermint.v1.Misbehaviour} message Misbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Misbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.header_1 = null; - object.header_2 = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.header_1 != null && message.hasOwnProperty("header_1")) - object.header_1 = $root.ibc.lightclients.tendermint.v1.Header.toObject(message.header_1, options); - if (message.header_2 != null && message.hasOwnProperty("header_2")) - object.header_2 = $root.ibc.lightclients.tendermint.v1.Header.toObject(message.header_2, options); - return object; - }; - - /** - * Converts this Misbehaviour to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - * @returns {Object.} JSON object - */ - Misbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Misbehaviour; - })(); - - v1.Header = (function() { - - /** - * Properties of a Header. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IHeader - * @property {tendermint.types.ISignedHeader|null} [signed_header] Header signed_header - * @property {tendermint.types.IValidatorSet|null} [validator_set] Header validator_set - * @property {ibc.core.client.v1.IHeight|null} [trusted_height] Header trusted_height - * @property {tendermint.types.IValidatorSet|null} [trusted_validators] Header trusted_validators - */ - - /** - * Constructs a new Header. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {ibc.lightclients.tendermint.v1.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 signed_header. - * @member {tendermint.types.ISignedHeader|null|undefined} signed_header - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.signed_header = null; - - /** - * Header validator_set. - * @member {tendermint.types.IValidatorSet|null|undefined} validator_set - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.validator_set = null; - - /** - * Header trusted_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} trusted_height - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.trusted_height = null; - - /** - * Header trusted_validators. - * @member {tendermint.types.IValidatorSet|null|undefined} trusted_validators - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.trusted_validators = null; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Header.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {ibc.lightclients.tendermint.v1.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.signed_header != null && Object.hasOwnProperty.call(message, "signed_header")) - $root.tendermint.types.SignedHeader.encode(message.signed_header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validator_set != null && Object.hasOwnProperty.call(message, "validator_set")) - $root.tendermint.types.ValidatorSet.encode(message.validator_set, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trusted_height != null && Object.hasOwnProperty.call(message, "trusted_height")) - $root.ibc.core.client.v1.Height.encode(message.trusted_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.trusted_validators != null && Object.hasOwnProperty.call(message, "trusted_validators")) - $root.tendermint.types.ValidatorSet.encode(message.trusted_validators, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {ibc.lightclients.tendermint.v1.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 ibc.lightclients.tendermint.v1.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.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.ibc.lightclients.tendermint.v1.Header(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - case 3: - message.trusted_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.trusted_validators = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.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 ibc.lightclients.tendermint.v1.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.signed_header != null && message.hasOwnProperty("signed_header")) { - var error = $root.tendermint.types.SignedHeader.verify(message.signed_header); - if (error) - return "signed_header." + error; - } - if (message.validator_set != null && message.hasOwnProperty("validator_set")) { - var error = $root.tendermint.types.ValidatorSet.verify(message.validator_set); - if (error) - return "validator_set." + error; - } - if (message.trusted_height != null && message.hasOwnProperty("trusted_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.trusted_height); - if (error) - return "trusted_height." + error; - } - if (message.trusted_validators != null && message.hasOwnProperty("trusted_validators")) { - var error = $root.tendermint.types.ValidatorSet.verify(message.trusted_validators); - if (error) - return "trusted_validators." + error; - } - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.Header) - return object; - var message = new $root.ibc.lightclients.tendermint.v1.Header(); - if (object.signed_header != null) { - if (typeof object.signed_header !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.signed_header: object expected"); - message.signed_header = $root.tendermint.types.SignedHeader.fromObject(object.signed_header); - } - if (object.validator_set != null) { - if (typeof object.validator_set !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.validator_set: object expected"); - message.validator_set = $root.tendermint.types.ValidatorSet.fromObject(object.validator_set); - } - if (object.trusted_height != null) { - if (typeof object.trusted_height !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.trusted_height: object expected"); - message.trusted_height = $root.ibc.core.client.v1.Height.fromObject(object.trusted_height); - } - if (object.trusted_validators != null) { - if (typeof object.trusted_validators !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.trusted_validators: object expected"); - message.trusted_validators = $root.tendermint.types.ValidatorSet.fromObject(object.trusted_validators); - } - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {ibc.lightclients.tendermint.v1.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.signed_header = null; - object.validator_set = null; - object.trusted_height = null; - object.trusted_validators = null; - } - if (message.signed_header != null && message.hasOwnProperty("signed_header")) - object.signed_header = $root.tendermint.types.SignedHeader.toObject(message.signed_header, options); - if (message.validator_set != null && message.hasOwnProperty("validator_set")) - object.validator_set = $root.tendermint.types.ValidatorSet.toObject(message.validator_set, options); - if (message.trusted_height != null && message.hasOwnProperty("trusted_height")) - object.trusted_height = $root.ibc.core.client.v1.Height.toObject(message.trusted_height, options); - if (message.trusted_validators != null && message.hasOwnProperty("trusted_validators")) - object.trusted_validators = $root.tendermint.types.ValidatorSet.toObject(message.trusted_validators, options); - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - v1.Fraction = (function() { - - /** - * Properties of a Fraction. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IFraction - * @property {Long|null} [numerator] Fraction numerator - * @property {Long|null} [denominator] Fraction denominator - */ - - /** - * Constructs a new Fraction. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a Fraction. - * @implements IFraction - * @constructor - * @param {ibc.lightclients.tendermint.v1.IFraction=} [properties] Properties to set - */ - function Fraction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Fraction numerator. - * @member {Long} numerator - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @instance - */ - Fraction.prototype.numerator = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Fraction denominator. - * @member {Long} denominator - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @instance - */ - Fraction.prototype.denominator = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Fraction message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Fraction.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {ibc.lightclients.tendermint.v1.IFraction} message Fraction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fraction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.numerator); - if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.denominator); - return writer; - }; - - /** - * Encodes the specified Fraction message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Fraction.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {ibc.lightclients.tendermint.v1.IFraction} message Fraction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fraction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Fraction message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.Fraction} Fraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fraction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.Fraction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numerator = reader.uint64(); - break; - case 2: - message.denominator = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fraction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.Fraction} Fraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fraction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Fraction message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Fraction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numerator != null && message.hasOwnProperty("numerator")) - if (!$util.isInteger(message.numerator) && !(message.numerator && $util.isInteger(message.numerator.low) && $util.isInteger(message.numerator.high))) - return "numerator: integer|Long expected"; - if (message.denominator != null && message.hasOwnProperty("denominator")) - if (!$util.isInteger(message.denominator) && !(message.denominator && $util.isInteger(message.denominator.low) && $util.isInteger(message.denominator.high))) - return "denominator: integer|Long expected"; - return null; - }; - - /** - * Creates a Fraction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.Fraction} Fraction - */ - Fraction.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.Fraction) - return object; - var message = new $root.ibc.lightclients.tendermint.v1.Fraction(); - if (object.numerator != null) - if ($util.Long) - (message.numerator = $util.Long.fromValue(object.numerator)).unsigned = true; - else if (typeof object.numerator === "string") - message.numerator = parseInt(object.numerator, 10); - else if (typeof object.numerator === "number") - message.numerator = object.numerator; - else if (typeof object.numerator === "object") - message.numerator = new $util.LongBits(object.numerator.low >>> 0, object.numerator.high >>> 0).toNumber(true); - if (object.denominator != null) - if ($util.Long) - (message.denominator = $util.Long.fromValue(object.denominator)).unsigned = true; - else if (typeof object.denominator === "string") - message.denominator = parseInt(object.denominator, 10); - else if (typeof object.denominator === "number") - message.denominator = object.denominator; - else if (typeof object.denominator === "object") - message.denominator = new $util.LongBits(object.denominator.low >>> 0, object.denominator.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Fraction message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {ibc.lightclients.tendermint.v1.Fraction} message Fraction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fraction.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.numerator = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numerator = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.denominator = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.denominator = options.longs === String ? "0" : 0; - } - if (message.numerator != null && message.hasOwnProperty("numerator")) - if (typeof message.numerator === "number") - object.numerator = options.longs === String ? String(message.numerator) : message.numerator; - else - object.numerator = options.longs === String ? $util.Long.prototype.toString.call(message.numerator) : options.longs === Number ? new $util.LongBits(message.numerator.low >>> 0, message.numerator.high >>> 0).toNumber(true) : message.numerator; - if (message.denominator != null && message.hasOwnProperty("denominator")) - if (typeof message.denominator === "number") - object.denominator = options.longs === String ? String(message.denominator) : message.denominator; - else - object.denominator = options.longs === String ? $util.Long.prototype.toString.call(message.denominator) : options.longs === Number ? new $util.LongBits(message.denominator.low >>> 0, message.denominator.high >>> 0).toNumber(true) : message.denominator; - return object; - }; - - /** - * Converts this Fraction to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @instance - * @returns {Object.} JSON object - */ - Fraction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Fraction; - })(); - - return v1; - })(); - - return tendermint; - })(); - - return lightclients; - })(); - - return ibc; - })(); - - $root.tendermint = (function() { - - /** - * Namespace tendermint. - * @exports tendermint - * @namespace - */ - var tendermint = {}; - - tendermint.types = (function() { - - /** - * Namespace types. - * @memberof tendermint - * @namespace - */ - var types = {}; - - types.ValidatorSet = (function() { - - /** - * Properties of a ValidatorSet. - * @memberof tendermint.types - * @interface IValidatorSet - * @property {Array.|null} [validators] ValidatorSet validators - * @property {tendermint.types.IValidator|null} [proposer] ValidatorSet proposer - * @property {Long|null} [total_voting_power] ValidatorSet total_voting_power - */ - - /** - * Constructs a new ValidatorSet. - * @memberof tendermint.types - * @classdesc Represents a ValidatorSet. - * @implements IValidatorSet - * @constructor - * @param {tendermint.types.IValidatorSet=} [properties] Properties to set - */ - function ValidatorSet(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]]; - } - - /** - * ValidatorSet validators. - * @member {Array.} validators - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.validators = $util.emptyArray; - - /** - * ValidatorSet proposer. - * @member {tendermint.types.IValidator|null|undefined} proposer - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.proposer = null; - - /** - * ValidatorSet total_voting_power. - * @member {Long} total_voting_power - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.total_voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @function encode - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validators != null && message.validators.length) - for (var i = 0; i < message.validators.length; ++i) - $root.tendermint.types.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - $root.tendermint.types.Validator.encode(message.proposer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.total_voting_power != null && Object.hasOwnProperty.call(message, "total_voting_power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.total_voting_power); - return writer; - }; - - /** - * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.ValidatorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.ValidatorSet} ValidatorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSet.decode = 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.types.ValidatorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = $root.tendermint.types.Validator.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.ValidatorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.ValidatorSet} ValidatorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorSet message. - * @function verify - * @memberof tendermint.types.ValidatorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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.types.Validator.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - if (message.proposer != null && message.hasOwnProperty("proposer")) { - var error = $root.tendermint.types.Validator.verify(message.proposer); - if (error) - return "proposer." + error; - } - if (message.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (!$util.isInteger(message.total_voting_power) && !(message.total_voting_power && $util.isInteger(message.total_voting_power.low) && $util.isInteger(message.total_voting_power.high))) - return "total_voting_power: integer|Long expected"; - return null; - }; - - /** - * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.ValidatorSet - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.ValidatorSet} ValidatorSet - */ - ValidatorSet.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.ValidatorSet) - return object; - var message = new $root.tendermint.types.ValidatorSet(); - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.types.ValidatorSet.validators: array expected"); - message.validators = []; - for (var i = 0; i < object.validators.length; ++i) { - if (typeof object.validators[i] !== "object") - throw TypeError(".tendermint.types.ValidatorSet.validators: object expected"); - message.validators[i] = $root.tendermint.types.Validator.fromObject(object.validators[i]); - } - } - if (object.proposer != null) { - if (typeof object.proposer !== "object") - throw TypeError(".tendermint.types.ValidatorSet.proposer: object expected"); - message.proposer = $root.tendermint.types.Validator.fromObject(object.proposer); - } - if (object.total_voting_power != null) - if ($util.Long) - (message.total_voting_power = $util.Long.fromValue(object.total_voting_power)).unsigned = false; - else if (typeof object.total_voting_power === "string") - message.total_voting_power = parseInt(object.total_voting_power, 10); - else if (typeof object.total_voting_power === "number") - message.total_voting_power = object.total_voting_power; - else if (typeof object.total_voting_power === "object") - message.total_voting_power = new $util.LongBits(object.total_voting_power.low >>> 0, object.total_voting_power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.ValidatorSet} message ValidatorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validators = []; - if (options.defaults) { - object.proposer = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.total_voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total_voting_power = options.longs === String ? "0" : 0; - } - if (message.validators && message.validators.length) { - object.validators = []; - for (var j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.types.Validator.toObject(message.validators[j], options); - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = $root.tendermint.types.Validator.toObject(message.proposer, options); - if (message.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (typeof message.total_voting_power === "number") - object.total_voting_power = options.longs === String ? String(message.total_voting_power) : message.total_voting_power; - else - object.total_voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.total_voting_power) : options.longs === Number ? new $util.LongBits(message.total_voting_power.low >>> 0, message.total_voting_power.high >>> 0).toNumber() : message.total_voting_power; - return object; - }; - - /** - * Converts this ValidatorSet to JSON. - * @function toJSON - * @memberof tendermint.types.ValidatorSet - * @instance - * @returns {Object.} JSON object - */ - ValidatorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValidatorSet; - })(); - - types.Validator = (function() { - - /** - * Properties of a Validator. - * @memberof tendermint.types - * @interface IValidator - * @property {Uint8Array|null} [address] Validator address - * @property {tendermint.crypto.IPublicKey|null} [pub_key] Validator pub_key - * @property {Long|null} [voting_power] Validator voting_power - * @property {Long|null} [proposer_priority] Validator proposer_priority - */ - - /** - * Constructs a new Validator. - * @memberof tendermint.types - * @classdesc Represents a Validator. - * @implements IValidator - * @constructor - * @param {tendermint.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.types.Validator - * @instance - */ - Validator.prototype.address = $util.newBuffer([]); - - /** - * Validator pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.pub_key = null; - - /** - * Validator voting_power. - * @member {Long} voting_power - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Validator proposer_priority. - * @member {Long} proposer_priority - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.proposer_priority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Validator - * @static - * @param {tendermint.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.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.voting_power != null && Object.hasOwnProperty.call(message, "voting_power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.voting_power); - if (message.proposer_priority != null && Object.hasOwnProperty.call(message, "proposer_priority")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposer_priority); - return writer; - }; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Validator - * @static - * @param {tendermint.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.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.Validator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pub_key = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = reader.int64(); - break; - case 4: - message.proposer_priority = 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.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.pub_key != null && message.hasOwnProperty("pub_key")) { - var error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (!$util.isInteger(message.voting_power) && !(message.voting_power && $util.isInteger(message.voting_power.low) && $util.isInteger(message.voting_power.high))) - return "voting_power: integer|Long expected"; - if (message.proposer_priority != null && message.hasOwnProperty("proposer_priority")) - if (!$util.isInteger(message.proposer_priority) && !(message.proposer_priority && $util.isInteger(message.proposer_priority.low) && $util.isInteger(message.proposer_priority.high))) - return "proposer_priority: 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.types.Validator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Validator} Validator - */ - Validator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Validator) - return object; - var message = new $root.tendermint.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.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.types.Validator.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - if (object.voting_power != null) - if ($util.Long) - (message.voting_power = $util.Long.fromValue(object.voting_power)).unsigned = false; - else if (typeof object.voting_power === "string") - message.voting_power = parseInt(object.voting_power, 10); - else if (typeof object.voting_power === "number") - message.voting_power = object.voting_power; - else if (typeof object.voting_power === "object") - message.voting_power = new $util.LongBits(object.voting_power.low >>> 0, object.voting_power.high >>> 0).toNumber(); - if (object.proposer_priority != null) - if ($util.Long) - (message.proposer_priority = $util.Long.fromValue(object.proposer_priority)).unsigned = false; - else if (typeof object.proposer_priority === "string") - message.proposer_priority = parseInt(object.proposer_priority, 10); - else if (typeof object.proposer_priority === "number") - message.proposer_priority = object.proposer_priority; - else if (typeof object.proposer_priority === "object") - message.proposer_priority = new $util.LongBits(object.proposer_priority.low >>> 0, object.proposer_priority.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.types.Validator - * @static - * @param {tendermint.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); - } - object.pub_key = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.voting_power = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.proposer_priority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposer_priority = 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.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, options); - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (typeof message.voting_power === "number") - object.voting_power = options.longs === String ? String(message.voting_power) : message.voting_power; - else - object.voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.voting_power) : options.longs === Number ? new $util.LongBits(message.voting_power.low >>> 0, message.voting_power.high >>> 0).toNumber() : message.voting_power; - if (message.proposer_priority != null && message.hasOwnProperty("proposer_priority")) - if (typeof message.proposer_priority === "number") - object.proposer_priority = options.longs === String ? String(message.proposer_priority) : message.proposer_priority; - else - object.proposer_priority = options.longs === String ? $util.Long.prototype.toString.call(message.proposer_priority) : options.longs === Number ? new $util.LongBits(message.proposer_priority.low >>> 0, message.proposer_priority.high >>> 0).toNumber() : message.proposer_priority; - return object; - }; - - /** - * Converts this Validator to JSON. - * @function toJSON - * @memberof tendermint.types.Validator - * @instance - * @returns {Object.} JSON object - */ - Validator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Validator; - })(); - - types.SimpleValidator = (function() { - - /** - * Properties of a SimpleValidator. - * @memberof tendermint.types - * @interface ISimpleValidator - * @property {tendermint.crypto.IPublicKey|null} [pub_key] SimpleValidator pub_key - * @property {Long|null} [voting_power] SimpleValidator voting_power - */ - - /** - * Constructs a new SimpleValidator. - * @memberof tendermint.types - * @classdesc Represents a SimpleValidator. - * @implements ISimpleValidator - * @constructor - * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set - */ - function SimpleValidator(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimpleValidator pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.types.SimpleValidator - * @instance - */ - SimpleValidator.prototype.pub_key = null; - - /** - * SimpleValidator voting_power. - * @member {Long} voting_power - * @memberof tendermint.types.SimpleValidator - * @instance - */ - SimpleValidator.prototype.voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @function encode - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleValidator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.voting_power != null && Object.hasOwnProperty.call(message, "voting_power")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.voting_power); - return writer; - }; - - /** - * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleValidator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.SimpleValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.SimpleValidator} SimpleValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleValidator.decode = 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.types.SimpleValidator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.voting_power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.SimpleValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.SimpleValidator} SimpleValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleValidator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimpleValidator message. - * @function verify - * @memberof tendermint.types.SimpleValidator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimpleValidator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) { - var error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (!$util.isInteger(message.voting_power) && !(message.voting_power && $util.isInteger(message.voting_power.low) && $util.isInteger(message.voting_power.high))) - return "voting_power: integer|Long expected"; - return null; - }; - - /** - * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.SimpleValidator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.SimpleValidator} SimpleValidator - */ - SimpleValidator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.SimpleValidator) - return object; - var message = new $root.tendermint.types.SimpleValidator(); - if (object.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.types.SimpleValidator.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - if (object.voting_power != null) - if ($util.Long) - (message.voting_power = $util.Long.fromValue(object.voting_power)).unsigned = false; - else if (typeof object.voting_power === "string") - message.voting_power = parseInt(object.voting_power, 10); - else if (typeof object.voting_power === "number") - message.voting_power = object.voting_power; - else if (typeof object.voting_power === "object") - message.voting_power = new $util.LongBits(object.voting_power.low >>> 0, object.voting_power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.SimpleValidator} message SimpleValidator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimpleValidator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pub_key = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.voting_power = options.longs === String ? "0" : 0; - } - if (message.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, options); - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (typeof message.voting_power === "number") - object.voting_power = options.longs === String ? String(message.voting_power) : message.voting_power; - else - object.voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.voting_power) : options.longs === Number ? new $util.LongBits(message.voting_power.low >>> 0, message.voting_power.high >>> 0).toNumber() : message.voting_power; - return object; - }; - - /** - * Converts this SimpleValidator to JSON. - * @function toJSON - * @memberof tendermint.types.SimpleValidator - * @instance - * @returns {Object.} JSON object - */ - SimpleValidator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SimpleValidator; - })(); - - /** - * BlockIDFlag enum. - * @name tendermint.types.BlockIDFlag - * @enum {number} - * @property {number} BLOCK_ID_FLAG_UNKNOWN=0 BLOCK_ID_FLAG_UNKNOWN value - * @property {number} BLOCK_ID_FLAG_ABSENT=1 BLOCK_ID_FLAG_ABSENT value - * @property {number} BLOCK_ID_FLAG_COMMIT=2 BLOCK_ID_FLAG_COMMIT value - * @property {number} BLOCK_ID_FLAG_NIL=3 BLOCK_ID_FLAG_NIL value - */ - types.BlockIDFlag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BLOCK_ID_FLAG_UNKNOWN"] = 0; - values[valuesById[1] = "BLOCK_ID_FLAG_ABSENT"] = 1; - values[valuesById[2] = "BLOCK_ID_FLAG_COMMIT"] = 2; - values[valuesById[3] = "BLOCK_ID_FLAG_NIL"] = 3; - return values; - })(); - - /** - * SignedMsgType enum. - * @name tendermint.types.SignedMsgType - * @enum {number} - * @property {number} SIGNED_MSG_TYPE_UNKNOWN=0 SIGNED_MSG_TYPE_UNKNOWN value - * @property {number} SIGNED_MSG_TYPE_PREVOTE=1 SIGNED_MSG_TYPE_PREVOTE value - * @property {number} SIGNED_MSG_TYPE_PRECOMMIT=2 SIGNED_MSG_TYPE_PRECOMMIT value - * @property {number} SIGNED_MSG_TYPE_PROPOSAL=32 SIGNED_MSG_TYPE_PROPOSAL value - */ - types.SignedMsgType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SIGNED_MSG_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "SIGNED_MSG_TYPE_PREVOTE"] = 1; - values[valuesById[2] = "SIGNED_MSG_TYPE_PRECOMMIT"] = 2; - values[valuesById[32] = "SIGNED_MSG_TYPE_PROPOSAL"] = 32; - return values; - })(); - - types.PartSetHeader = (function() { - - /** - * Properties of a PartSetHeader. - * @memberof tendermint.types - * @interface IPartSetHeader - * @property {number|null} [total] PartSetHeader total - * @property {Uint8Array|null} [hash] PartSetHeader hash - */ - - /** - * Constructs a new PartSetHeader. - * @memberof tendermint.types - * @classdesc Represents a PartSetHeader. - * @implements IPartSetHeader - * @constructor - * @param {tendermint.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.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.total = 0; - - /** - * PartSetHeader hash. - * @member {Uint8Array} hash - * @memberof tendermint.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.hash = $util.newBuffer([]); - - /** - * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.types.PartSetHeader - * @static - * @param {tendermint.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).uint32(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.types.PartSetHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.PartSetHeader - * @static - * @param {tendermint.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.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.PartSetHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - 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.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.types.PartSetHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.PartSetHeader} PartSetHeader - */ - PartSetHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.PartSetHeader) - return object; - var message = new $root.tendermint.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.types.PartSetHeader - * @static - * @param {tendermint.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.types.PartSetHeader - * @instance - * @returns {Object.} JSON object - */ - PartSetHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PartSetHeader; - })(); - - types.Part = (function() { - - /** - * Properties of a Part. - * @memberof tendermint.types - * @interface IPart - * @property {number|null} [index] Part index - * @property {Uint8Array|null} [bytes] Part bytes - * @property {tendermint.crypto.IProof|null} [proof] Part proof - */ - - /** - * Constructs a new Part. - * @memberof tendermint.types - * @classdesc Represents a Part. - * @implements IPart - * @constructor - * @param {tendermint.types.IPart=} [properties] Properties to set - */ - function Part(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Part index. - * @member {number} index - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.index = 0; - - /** - * Part bytes. - * @member {Uint8Array} bytes - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.bytes = $util.newBuffer([]); - - /** - * Part proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.proof = null; - - /** - * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.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).uint32(message.index); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytes); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Part message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decode = 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.types.Part(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Part message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Part message. - * @function verify - * @memberof tendermint.types.Part - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Part.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)) - return "index: integer expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (!(message.bytes && typeof message.bytes.length === "number" || $util.isString(message.bytes))) - return "bytes: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Part - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Part} Part - */ - Part.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Part) - return object; - var message = new $root.tendermint.types.Part(); - if (object.index != null) - message.index = object.index >>> 0; - if (object.bytes != null) - if (typeof object.bytes === "string") - $util.base64.decode(object.bytes, message.bytes = $util.newBuffer($util.base64.length(object.bytes)), 0); - else if (object.bytes.length) - message.bytes = object.bytes; - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.types.Part.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.Part} message Part - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Part.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.index = 0; - if (options.bytes === String) - object.bytes = ""; - else { - object.bytes = []; - if (options.bytes !== Array) - object.bytes = $util.newBuffer(object.bytes); - } - object.proof = null; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.bytes != null && message.hasOwnProperty("bytes")) - object.bytes = options.bytes === String ? $util.base64.encode(message.bytes, 0, message.bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytes) : message.bytes; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this Part to JSON. - * @function toJSON - * @memberof tendermint.types.Part - * @instance - * @returns {Object.} JSON object - */ - Part.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Part; - })(); - - types.BlockID = (function() { - - /** - * Properties of a BlockID. - * @memberof tendermint.types - * @interface IBlockID - * @property {Uint8Array|null} [hash] BlockID hash - * @property {tendermint.types.IPartSetHeader|null} [part_set_header] BlockID part_set_header - */ - - /** - * Constructs a new BlockID. - * @memberof tendermint.types - * @classdesc Represents a BlockID. - * @implements IBlockID - * @constructor - * @param {tendermint.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.types.BlockID - * @instance - */ - BlockID.prototype.hash = $util.newBuffer([]); - - /** - * BlockID part_set_header. - * @member {tendermint.types.IPartSetHeader|null|undefined} part_set_header - * @memberof tendermint.types.BlockID - * @instance - */ - BlockID.prototype.part_set_header = null; - - /** - * Encodes the specified BlockID message. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.part_set_header != null && Object.hasOwnProperty.call(message, "part_set_header")) - $root.tendermint.types.PartSetHeader.encode(message.part_set_header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.BlockID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.part_set_header = $root.tendermint.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.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.part_set_header != null && message.hasOwnProperty("part_set_header")) { - var error = $root.tendermint.types.PartSetHeader.verify(message.part_set_header); - if (error) - return "part_set_header." + error; - } - return null; - }; - - /** - * Creates a BlockID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.BlockID - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockID} BlockID - */ - BlockID.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockID) - return object; - var message = new $root.tendermint.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.part_set_header != null) { - if (typeof object.part_set_header !== "object") - throw TypeError(".tendermint.types.BlockID.part_set_header: object expected"); - message.part_set_header = $root.tendermint.types.PartSetHeader.fromObject(object.part_set_header); - } - return message; - }; - - /** - * Creates a plain object from a BlockID message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.part_set_header = 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.part_set_header != null && message.hasOwnProperty("part_set_header")) - object.part_set_header = $root.tendermint.types.PartSetHeader.toObject(message.part_set_header, options); - return object; - }; - - /** - * Converts this BlockID to JSON. - * @function toJSON - * @memberof tendermint.types.BlockID - * @instance - * @returns {Object.} JSON object - */ - BlockID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockID; - })(); - - types.Header = (function() { - - /** - * Properties of a Header. - * @memberof tendermint.types - * @interface IHeader - * @property {tendermint.version.IConsensus|null} [version] Header version - * @property {string|null} [chain_id] Header chain_id - * @property {Long|null} [height] Header height - * @property {google.protobuf.ITimestamp|null} [time] Header time - * @property {tendermint.types.IBlockID|null} [last_block_id] Header last_block_id - * @property {Uint8Array|null} [last_commit_hash] Header last_commit_hash - * @property {Uint8Array|null} [data_hash] Header data_hash - * @property {Uint8Array|null} [validators_hash] Header validators_hash - * @property {Uint8Array|null} [next_validators_hash] Header next_validators_hash - * @property {Uint8Array|null} [consensus_hash] Header consensus_hash - * @property {Uint8Array|null} [app_hash] Header app_hash - * @property {Uint8Array|null} [last_results_hash] Header last_results_hash - * @property {Uint8Array|null} [evidence_hash] Header evidence_hash - * @property {Uint8Array|null} [proposer_address] Header proposer_address - */ - - /** - * Constructs a new Header. - * @memberof tendermint.types - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {tendermint.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.version.IConsensus|null|undefined} version - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.version = null; - - /** - * Header chain_id. - * @member {string} chain_id - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.chain_id = ""; - - /** - * Header height. - * @member {Long} height - * @memberof tendermint.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.types.Header - * @instance - */ - Header.prototype.time = null; - - /** - * Header last_block_id. - * @member {tendermint.types.IBlockID|null|undefined} last_block_id - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_block_id = null; - - /** - * Header last_commit_hash. - * @member {Uint8Array} last_commit_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_commit_hash = $util.newBuffer([]); - - /** - * Header data_hash. - * @member {Uint8Array} data_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.data_hash = $util.newBuffer([]); - - /** - * Header validators_hash. - * @member {Uint8Array} validators_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.validators_hash = $util.newBuffer([]); - - /** - * Header next_validators_hash. - * @member {Uint8Array} next_validators_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.next_validators_hash = $util.newBuffer([]); - - /** - * Header consensus_hash. - * @member {Uint8Array} consensus_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.consensus_hash = $util.newBuffer([]); - - /** - * Header app_hash. - * @member {Uint8Array} app_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.app_hash = $util.newBuffer([]); - - /** - * Header last_results_hash. - * @member {Uint8Array} last_results_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_results_hash = $util.newBuffer([]); - - /** - * Header evidence_hash. - * @member {Uint8Array} evidence_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.evidence_hash = $util.newBuffer([]); - - /** - * Header proposer_address. - * @member {Uint8Array} proposer_address - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.proposer_address = $util.newBuffer([]); - - /** - * Encodes the specified Header message. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.version.Consensus.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.chain_id != null && Object.hasOwnProperty.call(message, "chain_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.chain_id); - 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.last_block_id != null && Object.hasOwnProperty.call(message, "last_block_id")) - $root.tendermint.types.BlockID.encode(message.last_block_id, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.last_commit_hash != null && Object.hasOwnProperty.call(message, "last_commit_hash")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.last_commit_hash); - if (message.data_hash != null && Object.hasOwnProperty.call(message, "data_hash")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.data_hash); - if (message.validators_hash != null && Object.hasOwnProperty.call(message, "validators_hash")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validators_hash); - if (message.next_validators_hash != null && Object.hasOwnProperty.call(message, "next_validators_hash")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.next_validators_hash); - if (message.consensus_hash != null && Object.hasOwnProperty.call(message, "consensus_hash")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensus_hash); - if (message.app_hash != null && Object.hasOwnProperty.call(message, "app_hash")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.app_hash); - if (message.last_results_hash != null && Object.hasOwnProperty.call(message, "last_results_hash")) - writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.last_results_hash); - if (message.evidence_hash != null && Object.hasOwnProperty.call(message, "evidence_hash")) - writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidence_hash); - if (message.proposer_address != null && Object.hasOwnProperty.call(message, "proposer_address")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposer_address); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.Header(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = $root.tendermint.version.Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chain_id = 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.last_block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.last_commit_hash = reader.bytes(); - break; - case 7: - message.data_hash = reader.bytes(); - break; - case 8: - message.validators_hash = reader.bytes(); - break; - case 9: - message.next_validators_hash = reader.bytes(); - break; - case 10: - message.consensus_hash = reader.bytes(); - break; - case 11: - message.app_hash = reader.bytes(); - break; - case 12: - message.last_results_hash = reader.bytes(); - break; - case 13: - message.evidence_hash = reader.bytes(); - break; - case 14: - message.proposer_address = 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.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.version.Consensus.verify(message.version); - if (error) - return "version." + error; - } - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - if (!$util.isString(message.chain_id)) - return "chain_id: 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.last_block_id != null && message.hasOwnProperty("last_block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.last_block_id); - if (error) - return "last_block_id." + error; - } - if (message.last_commit_hash != null && message.hasOwnProperty("last_commit_hash")) - if (!(message.last_commit_hash && typeof message.last_commit_hash.length === "number" || $util.isString(message.last_commit_hash))) - return "last_commit_hash: buffer expected"; - if (message.data_hash != null && message.hasOwnProperty("data_hash")) - if (!(message.data_hash && typeof message.data_hash.length === "number" || $util.isString(message.data_hash))) - return "data_hash: buffer expected"; - if (message.validators_hash != null && message.hasOwnProperty("validators_hash")) - if (!(message.validators_hash && typeof message.validators_hash.length === "number" || $util.isString(message.validators_hash))) - return "validators_hash: buffer expected"; - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - if (!(message.next_validators_hash && typeof message.next_validators_hash.length === "number" || $util.isString(message.next_validators_hash))) - return "next_validators_hash: buffer expected"; - if (message.consensus_hash != null && message.hasOwnProperty("consensus_hash")) - if (!(message.consensus_hash && typeof message.consensus_hash.length === "number" || $util.isString(message.consensus_hash))) - return "consensus_hash: buffer expected"; - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - if (!(message.app_hash && typeof message.app_hash.length === "number" || $util.isString(message.app_hash))) - return "app_hash: buffer expected"; - if (message.last_results_hash != null && message.hasOwnProperty("last_results_hash")) - if (!(message.last_results_hash && typeof message.last_results_hash.length === "number" || $util.isString(message.last_results_hash))) - return "last_results_hash: buffer expected"; - if (message.evidence_hash != null && message.hasOwnProperty("evidence_hash")) - if (!(message.evidence_hash && typeof message.evidence_hash.length === "number" || $util.isString(message.evidence_hash))) - return "evidence_hash: buffer expected"; - if (message.proposer_address != null && message.hasOwnProperty("proposer_address")) - if (!(message.proposer_address && typeof message.proposer_address.length === "number" || $util.isString(message.proposer_address))) - return "proposer_address: buffer expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Header - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Header) - return object; - var message = new $root.tendermint.types.Header(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".tendermint.types.Header.version: object expected"); - message.version = $root.tendermint.version.Consensus.fromObject(object.version); - } - if (object.chain_id != null) - message.chain_id = String(object.chain_id); - 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.types.Header.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.last_block_id != null) { - if (typeof object.last_block_id !== "object") - throw TypeError(".tendermint.types.Header.last_block_id: object expected"); - message.last_block_id = $root.tendermint.types.BlockID.fromObject(object.last_block_id); - } - if (object.last_commit_hash != null) - if (typeof object.last_commit_hash === "string") - $util.base64.decode(object.last_commit_hash, message.last_commit_hash = $util.newBuffer($util.base64.length(object.last_commit_hash)), 0); - else if (object.last_commit_hash.length) - message.last_commit_hash = object.last_commit_hash; - if (object.data_hash != null) - if (typeof object.data_hash === "string") - $util.base64.decode(object.data_hash, message.data_hash = $util.newBuffer($util.base64.length(object.data_hash)), 0); - else if (object.data_hash.length) - message.data_hash = object.data_hash; - if (object.validators_hash != null) - if (typeof object.validators_hash === "string") - $util.base64.decode(object.validators_hash, message.validators_hash = $util.newBuffer($util.base64.length(object.validators_hash)), 0); - else if (object.validators_hash.length) - message.validators_hash = object.validators_hash; - if (object.next_validators_hash != null) - if (typeof object.next_validators_hash === "string") - $util.base64.decode(object.next_validators_hash, message.next_validators_hash = $util.newBuffer($util.base64.length(object.next_validators_hash)), 0); - else if (object.next_validators_hash.length) - message.next_validators_hash = object.next_validators_hash; - if (object.consensus_hash != null) - if (typeof object.consensus_hash === "string") - $util.base64.decode(object.consensus_hash, message.consensus_hash = $util.newBuffer($util.base64.length(object.consensus_hash)), 0); - else if (object.consensus_hash.length) - message.consensus_hash = object.consensus_hash; - if (object.app_hash != null) - if (typeof object.app_hash === "string") - $util.base64.decode(object.app_hash, message.app_hash = $util.newBuffer($util.base64.length(object.app_hash)), 0); - else if (object.app_hash.length) - message.app_hash = object.app_hash; - if (object.last_results_hash != null) - if (typeof object.last_results_hash === "string") - $util.base64.decode(object.last_results_hash, message.last_results_hash = $util.newBuffer($util.base64.length(object.last_results_hash)), 0); - else if (object.last_results_hash.length) - message.last_results_hash = object.last_results_hash; - if (object.evidence_hash != null) - if (typeof object.evidence_hash === "string") - $util.base64.decode(object.evidence_hash, message.evidence_hash = $util.newBuffer($util.base64.length(object.evidence_hash)), 0); - else if (object.evidence_hash.length) - message.evidence_hash = object.evidence_hash; - if (object.proposer_address != null) - if (typeof object.proposer_address === "string") - $util.base64.decode(object.proposer_address, message.proposer_address = $util.newBuffer($util.base64.length(object.proposer_address)), 0); - else if (object.proposer_address.length) - message.proposer_address = object.proposer_address; - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.chain_id = ""; - 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.last_block_id = null; - if (options.bytes === String) - object.last_commit_hash = ""; - else { - object.last_commit_hash = []; - if (options.bytes !== Array) - object.last_commit_hash = $util.newBuffer(object.last_commit_hash); - } - if (options.bytes === String) - object.data_hash = ""; - else { - object.data_hash = []; - if (options.bytes !== Array) - object.data_hash = $util.newBuffer(object.data_hash); - } - if (options.bytes === String) - object.validators_hash = ""; - else { - object.validators_hash = []; - if (options.bytes !== Array) - object.validators_hash = $util.newBuffer(object.validators_hash); - } - if (options.bytes === String) - object.next_validators_hash = ""; - else { - object.next_validators_hash = []; - if (options.bytes !== Array) - object.next_validators_hash = $util.newBuffer(object.next_validators_hash); - } - if (options.bytes === String) - object.consensus_hash = ""; - else { - object.consensus_hash = []; - if (options.bytes !== Array) - object.consensus_hash = $util.newBuffer(object.consensus_hash); - } - if (options.bytes === String) - object.app_hash = ""; - else { - object.app_hash = []; - if (options.bytes !== Array) - object.app_hash = $util.newBuffer(object.app_hash); - } - if (options.bytes === String) - object.last_results_hash = ""; - else { - object.last_results_hash = []; - if (options.bytes !== Array) - object.last_results_hash = $util.newBuffer(object.last_results_hash); - } - if (options.bytes === String) - object.evidence_hash = ""; - else { - object.evidence_hash = []; - if (options.bytes !== Array) - object.evidence_hash = $util.newBuffer(object.evidence_hash); - } - if (options.bytes === String) - object.proposer_address = ""; - else { - object.proposer_address = []; - if (options.bytes !== Array) - object.proposer_address = $util.newBuffer(object.proposer_address); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.tendermint.version.Consensus.toObject(message.version, options); - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - object.chain_id = message.chain_id; - 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.last_block_id != null && message.hasOwnProperty("last_block_id")) - object.last_block_id = $root.tendermint.types.BlockID.toObject(message.last_block_id, options); - if (message.last_commit_hash != null && message.hasOwnProperty("last_commit_hash")) - object.last_commit_hash = options.bytes === String ? $util.base64.encode(message.last_commit_hash, 0, message.last_commit_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_commit_hash) : message.last_commit_hash; - if (message.data_hash != null && message.hasOwnProperty("data_hash")) - object.data_hash = options.bytes === String ? $util.base64.encode(message.data_hash, 0, message.data_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.data_hash) : message.data_hash; - if (message.validators_hash != null && message.hasOwnProperty("validators_hash")) - object.validators_hash = options.bytes === String ? $util.base64.encode(message.validators_hash, 0, message.validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validators_hash) : message.validators_hash; - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - object.next_validators_hash = options.bytes === String ? $util.base64.encode(message.next_validators_hash, 0, message.next_validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_validators_hash) : message.next_validators_hash; - if (message.consensus_hash != null && message.hasOwnProperty("consensus_hash")) - object.consensus_hash = options.bytes === String ? $util.base64.encode(message.consensus_hash, 0, message.consensus_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensus_hash) : message.consensus_hash; - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - object.app_hash = options.bytes === String ? $util.base64.encode(message.app_hash, 0, message.app_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_hash) : message.app_hash; - if (message.last_results_hash != null && message.hasOwnProperty("last_results_hash")) - object.last_results_hash = options.bytes === String ? $util.base64.encode(message.last_results_hash, 0, message.last_results_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_results_hash) : message.last_results_hash; - if (message.evidence_hash != null && message.hasOwnProperty("evidence_hash")) - object.evidence_hash = options.bytes === String ? $util.base64.encode(message.evidence_hash, 0, message.evidence_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidence_hash) : message.evidence_hash; - if (message.proposer_address != null && message.hasOwnProperty("proposer_address")) - object.proposer_address = options.bytes === String ? $util.base64.encode(message.proposer_address, 0, message.proposer_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposer_address) : message.proposer_address; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof tendermint.types.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - types.Data = (function() { - - /** - * Properties of a Data. - * @memberof tendermint.types - * @interface IData - * @property {Array.|null} [txs] Data txs - */ - - /** - * Constructs a new Data. - * @memberof tendermint.types - * @classdesc Represents a Data. - * @implements IData - * @constructor - * @param {tendermint.types.IData=} [properties] Properties to set - */ - function Data(properties) { - this.txs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Data txs. - * @member {Array.} txs - * @memberof tendermint.types.Data - * @instance - */ - Data.prototype.txs = $util.emptyArray; - - /** - * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.IData} message Data message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Data.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.txs != null && message.txs.length) - for (var i = 0; i < message.txs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txs[i]); - return writer; - }; - - /** - * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.IData} message Data message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Data.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Data message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Data - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Data} Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Data.decode = 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.types.Data(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.txs && message.txs.length)) - message.txs = []; - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Data message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Data - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Data} Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Data.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Data message. - * @function verify - * @memberof tendermint.types.Data - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Data.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.txs != null && message.hasOwnProperty("txs")) { - if (!Array.isArray(message.txs)) - return "txs: array expected"; - for (var i = 0; i < message.txs.length; ++i) - if (!(message.txs[i] && typeof message.txs[i].length === "number" || $util.isString(message.txs[i]))) - return "txs: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Data message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Data - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Data} Data - */ - Data.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Data) - return object; - var message = new $root.tendermint.types.Data(); - if (object.txs) { - if (!Array.isArray(object.txs)) - throw TypeError(".tendermint.types.Data.txs: array expected"); - message.txs = []; - for (var i = 0; i < object.txs.length; ++i) - if (typeof object.txs[i] === "string") - $util.base64.decode(object.txs[i], message.txs[i] = $util.newBuffer($util.base64.length(object.txs[i])), 0); - else if (object.txs[i].length) - message.txs[i] = object.txs[i]; - } - return message; - }; - - /** - * Creates a plain object from a Data message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.Data} message Data - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Data.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.txs = []; - if (message.txs && message.txs.length) { - object.txs = []; - for (var j = 0; j < message.txs.length; ++j) - object.txs[j] = options.bytes === String ? $util.base64.encode(message.txs[j], 0, message.txs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.txs[j]) : message.txs[j]; - } - return object; - }; - - /** - * Converts this Data to JSON. - * @function toJSON - * @memberof tendermint.types.Data - * @instance - * @returns {Object.} JSON object - */ - Data.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Data; - })(); - - types.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof tendermint.types - * @interface IVote - * @property {tendermint.types.SignedMsgType|null} [type] Vote type - * @property {Long|null} [height] Vote height - * @property {number|null} [round] Vote round - * @property {tendermint.types.IBlockID|null} [block_id] Vote block_id - * @property {google.protobuf.ITimestamp|null} [timestamp] Vote timestamp - * @property {Uint8Array|null} [validator_address] Vote validator_address - * @property {number|null} [validator_index] Vote validator_index - * @property {Uint8Array|null} [signature] Vote signature - */ - - /** - * Constructs a new Vote. - * @memberof tendermint.types - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {tendermint.types.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 type. - * @member {tendermint.types.SignedMsgType} type - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.type = 0; - - /** - * Vote height. - * @member {Long} height - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Vote round. - * @member {number} round - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.round = 0; - - /** - * Vote block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.block_id = null; - - /** - * Vote timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.timestamp = null; - - /** - * Vote validator_address. - * @member {Uint8Array} validator_address - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.validator_address = $util.newBuffer([]); - - /** - * Vote validator_index. - * @member {number} validator_index - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.validator_index = 0; - - /** - * Vote signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.validator_address != null && Object.hasOwnProperty.call(message, "validator_address")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.validator_address); - if (message.validator_index != null && Object.hasOwnProperty.call(message, "validator_index")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.validator_index); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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 tendermint.types.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.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.tendermint.types.Vote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.validator_address = reader.bytes(); - break; - case 7: - message.validator_index = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Vote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.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 tendermint.types.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 32: - break; - } - 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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - if (!(message.validator_address && typeof message.validator_address.length === "number" || $util.isString(message.validator_address))) - return "validator_address: buffer expected"; - if (message.validator_index != null && message.hasOwnProperty("validator_index")) - if (!$util.isInteger(message.validator_index)) - return "validator_index: integer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Vote - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Vote) - return object; - var message = new $root.tendermint.types.Vote(); - switch (object.type) { - case "SIGNED_MSG_TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "SIGNED_MSG_TYPE_PREVOTE": - case 1: - message.type = 1; - break; - case "SIGNED_MSG_TYPE_PRECOMMIT": - case 2: - message.type = 2; - break; - case "SIGNED_MSG_TYPE_PROPOSAL": - case 32: - message.type = 32; - break; - } - 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.round != null) - message.round = object.round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Vote.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.Vote.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.validator_address != null) - if (typeof object.validator_address === "string") - $util.base64.decode(object.validator_address, message.validator_address = $util.newBuffer($util.base64.length(object.validator_address)), 0); - else if (object.validator_address.length) - message.validator_address = object.validator_address; - if (object.validator_index != null) - message.validator_index = object.validator_index | 0; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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) { - object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; - 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.round = 0; - object.block_id = null; - object.timestamp = null; - if (options.bytes === String) - object.validator_address = ""; - else { - object.validator_address = []; - if (options.bytes !== Array) - object.validator_address = $util.newBuffer(object.validator_address); - } - object.validator_index = 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - object.validator_address = options.bytes === String ? $util.base64.encode(message.validator_address, 0, message.validator_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.validator_address) : message.validator_address; - if (message.validator_index != null && message.hasOwnProperty("validator_index")) - object.validator_index = message.validator_index; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof tendermint.types.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - types.Commit = (function() { - - /** - * Properties of a Commit. - * @memberof tendermint.types - * @interface ICommit - * @property {Long|null} [height] Commit height - * @property {number|null} [round] Commit round - * @property {tendermint.types.IBlockID|null} [block_id] Commit block_id - * @property {Array.|null} [signatures] Commit signatures - */ - - /** - * Constructs a new Commit. - * @memberof tendermint.types - * @classdesc Represents a Commit. - * @implements ICommit - * @constructor - * @param {tendermint.types.ICommit=} [properties] Properties to set - */ - function Commit(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]]; - } - - /** - * Commit height. - * @member {Long} height - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Commit round. - * @member {number} round - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.round = 0; - - /** - * Commit block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.block_id = null; - - /** - * Commit signatures. - * @member {Array.} signatures - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.signatures = $util.emptyArray; - - /** - * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.ICommit} message Commit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commit.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.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - $root.tendermint.types.CommitSig.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.ICommit} message Commit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Commit message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Commit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Commit} Commit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commit.decode = 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.types.Commit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.tendermint.types.CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Commit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Commit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Commit} Commit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Commit message. - * @function verify - * @memberof tendermint.types.Commit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Commit.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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + 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) { - var error = $root.tendermint.types.CommitSig.verify(message.signatures[i]); - if (error) - return "signatures." + error; - } - } - return null; - }; - - /** - * Creates a Commit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Commit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Commit} Commit - */ - Commit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Commit) - return object; - var message = new $root.tendermint.types.Commit(); - 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.round != null) - message.round = object.round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Commit.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".tendermint.types.Commit.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".tendermint.types.Commit.signatures: object expected"); - message.signatures[i] = $root.tendermint.types.CommitSig.fromObject(object.signatures[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Commit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.Commit} message Commit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Commit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.signatures = []; - 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.round = 0; - object.block_id = null; - } - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.tendermint.types.CommitSig.toObject(message.signatures[j], options); - } - return object; - }; - - /** - * Converts this Commit to JSON. - * @function toJSON - * @memberof tendermint.types.Commit - * @instance - * @returns {Object.} JSON object - */ - Commit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Commit; - })(); - - types.CommitSig = (function() { - - /** - * Properties of a CommitSig. - * @memberof tendermint.types - * @interface ICommitSig - * @property {tendermint.types.BlockIDFlag|null} [block_id_flag] CommitSig block_id_flag - * @property {Uint8Array|null} [validator_address] CommitSig validator_address - * @property {google.protobuf.ITimestamp|null} [timestamp] CommitSig timestamp - * @property {Uint8Array|null} [signature] CommitSig signature - */ - - /** - * Constructs a new CommitSig. - * @memberof tendermint.types - * @classdesc Represents a CommitSig. - * @implements ICommitSig - * @constructor - * @param {tendermint.types.ICommitSig=} [properties] Properties to set - */ - function CommitSig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitSig block_id_flag. - * @member {tendermint.types.BlockIDFlag} block_id_flag - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.block_id_flag = 0; - - /** - * CommitSig validator_address. - * @member {Uint8Array} validator_address - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.validator_address = $util.newBuffer([]); - - /** - * CommitSig timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.timestamp = null; - - /** - * CommitSig signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @function encode - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_id_flag != null && Object.hasOwnProperty.call(message, "block_id_flag")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.block_id_flag); - if (message.validator_address != null && Object.hasOwnProperty.call(message, "validator_address")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validator_address); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitSig message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.CommitSig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.CommitSig} CommitSig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSig.decode = 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.types.CommitSig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id_flag = reader.int32(); - break; - case 2: - message.validator_address = reader.bytes(); - break; - case 3: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitSig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.CommitSig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.CommitSig} CommitSig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitSig message. - * @function verify - * @memberof tendermint.types.CommitSig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitSig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_id_flag != null && message.hasOwnProperty("block_id_flag")) - switch (message.block_id_flag) { - default: - return "block_id_flag: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - if (!(message.validator_address && typeof message.validator_address.length === "number" || $util.isString(message.validator_address))) - return "validator_address: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.CommitSig - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.CommitSig} CommitSig - */ - CommitSig.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.CommitSig) - return object; - var message = new $root.tendermint.types.CommitSig(); - switch (object.block_id_flag) { - case "BLOCK_ID_FLAG_UNKNOWN": - case 0: - message.block_id_flag = 0; - break; - case "BLOCK_ID_FLAG_ABSENT": - case 1: - message.block_id_flag = 1; - break; - case "BLOCK_ID_FLAG_COMMIT": - case 2: - message.block_id_flag = 2; - break; - case "BLOCK_ID_FLAG_NIL": - case 3: - message.block_id_flag = 3; - break; - } - if (object.validator_address != null) - if (typeof object.validator_address === "string") - $util.base64.decode(object.validator_address, message.validator_address = $util.newBuffer($util.base64.length(object.validator_address)), 0); - else if (object.validator_address.length) - message.validator_address = object.validator_address; - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.CommitSig.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a CommitSig message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.CommitSig} message CommitSig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitSig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.block_id_flag = options.enums === String ? "BLOCK_ID_FLAG_UNKNOWN" : 0; - if (options.bytes === String) - object.validator_address = ""; - else { - object.validator_address = []; - if (options.bytes !== Array) - object.validator_address = $util.newBuffer(object.validator_address); - } - object.timestamp = null; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.block_id_flag != null && message.hasOwnProperty("block_id_flag")) - object.block_id_flag = options.enums === String ? $root.tendermint.types.BlockIDFlag[message.block_id_flag] : message.block_id_flag; - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - object.validator_address = options.bytes === String ? $util.base64.encode(message.validator_address, 0, message.validator_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.validator_address) : message.validator_address; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this CommitSig to JSON. - * @function toJSON - * @memberof tendermint.types.CommitSig - * @instance - * @returns {Object.} JSON object - */ - CommitSig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitSig; - })(); - - types.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof tendermint.types - * @interface IProposal - * @property {tendermint.types.SignedMsgType|null} [type] Proposal type - * @property {Long|null} [height] Proposal height - * @property {number|null} [round] Proposal round - * @property {number|null} [pol_round] Proposal pol_round - * @property {tendermint.types.IBlockID|null} [block_id] Proposal block_id - * @property {google.protobuf.ITimestamp|null} [timestamp] Proposal timestamp - * @property {Uint8Array|null} [signature] Proposal signature - */ - - /** - * Constructs a new Proposal. - * @memberof tendermint.types - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {tendermint.types.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - if (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 type. - * @member {tendermint.types.SignedMsgType} type - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.type = 0; - - /** - * Proposal height. - * @member {Long} height - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proposal round. - * @member {number} round - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.round = 0; - - /** - * Proposal pol_round. - * @member {number} pol_round - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.pol_round = 0; - - /** - * Proposal block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.block_id = null; - - /** - * Proposal timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.timestamp = null; - - /** - * Proposal signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); - if (message.pol_round != null && Object.hasOwnProperty.call(message, "pol_round")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pol_round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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 tendermint.types.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.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.tendermint.types.Proposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.pol_round = reader.int32(); - break; - case 5: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Proposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.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 tendermint.types.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 32: - break; - } - 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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.pol_round != null && message.hasOwnProperty("pol_round")) - if (!$util.isInteger(message.pol_round)) - return "pol_round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Proposal - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Proposal) - return object; - var message = new $root.tendermint.types.Proposal(); - switch (object.type) { - case "SIGNED_MSG_TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "SIGNED_MSG_TYPE_PREVOTE": - case 1: - message.type = 1; - break; - case "SIGNED_MSG_TYPE_PRECOMMIT": - case 2: - message.type = 2; - break; - case "SIGNED_MSG_TYPE_PROPOSAL": - case 32: - message.type = 32; - break; - } - 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.round != null) - message.round = object.round | 0; - if (object.pol_round != null) - message.pol_round = object.pol_round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Proposal.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.Proposal.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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.defaults) { - object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; - 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.round = 0; - object.pol_round = 0; - object.block_id = null; - object.timestamp = null; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.pol_round != null && message.hasOwnProperty("pol_round")) - object.pol_round = message.pol_round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof tendermint.types.Proposal - * @instance - * @returns {Object.} JSON object - */ - Proposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Proposal; - })(); - - types.SignedHeader = (function() { - - /** - * Properties of a SignedHeader. - * @memberof tendermint.types - * @interface ISignedHeader - * @property {tendermint.types.IHeader|null} [header] SignedHeader header - * @property {tendermint.types.ICommit|null} [commit] SignedHeader commit - */ - - /** - * Constructs a new SignedHeader. - * @memberof tendermint.types - * @classdesc Represents a SignedHeader. - * @implements ISignedHeader - * @constructor - * @param {tendermint.types.ISignedHeader=} [properties] Properties to set - */ - function SignedHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignedHeader header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.types.SignedHeader - * @instance - */ - SignedHeader.prototype.header = null; - - /** - * SignedHeader commit. - * @member {tendermint.types.ICommit|null|undefined} commit - * @memberof tendermint.types.SignedHeader - * @instance - */ - SignedHeader.prototype.commit = null; - - /** - * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignedHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.types.Commit.encode(message.commit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignedHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignedHeader message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.SignedHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.SignedHeader} SignedHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignedHeader.decode = 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.types.SignedHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignedHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.SignedHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.SignedHeader} SignedHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignedHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignedHeader message. - * @function verify - * @memberof tendermint.types.SignedHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignedHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.tendermint.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - var error = $root.tendermint.types.Commit.verify(message.commit); - if (error) - return "commit." + error; - } - return null; - }; - - /** - * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.SignedHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.SignedHeader} SignedHeader - */ - SignedHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.SignedHeader) - return object; - var message = new $root.tendermint.types.SignedHeader(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.types.SignedHeader.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.types.SignedHeader.commit: object expected"); - message.commit = $root.tendermint.types.Commit.fromObject(object.commit); - } - return message; - }; - - /** - * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.SignedHeader} message SignedHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignedHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.header = null; - object.commit = null; - } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.types.Header.toObject(message.header, options); - if (message.commit != null && message.hasOwnProperty("commit")) - object.commit = $root.tendermint.types.Commit.toObject(message.commit, options); - return object; - }; - - /** - * Converts this SignedHeader to JSON. - * @function toJSON - * @memberof tendermint.types.SignedHeader - * @instance - * @returns {Object.} JSON object - */ - SignedHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignedHeader; - })(); - - types.LightBlock = (function() { - - /** - * Properties of a LightBlock. - * @memberof tendermint.types - * @interface ILightBlock - * @property {tendermint.types.ISignedHeader|null} [signed_header] LightBlock signed_header - * @property {tendermint.types.IValidatorSet|null} [validator_set] LightBlock validator_set - */ - - /** - * Constructs a new LightBlock. - * @memberof tendermint.types - * @classdesc Represents a LightBlock. - * @implements ILightBlock - * @constructor - * @param {tendermint.types.ILightBlock=} [properties] Properties to set - */ - function LightBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LightBlock signed_header. - * @member {tendermint.types.ISignedHeader|null|undefined} signed_header - * @memberof tendermint.types.LightBlock - * @instance - */ - LightBlock.prototype.signed_header = null; - - /** - * LightBlock validator_set. - * @member {tendermint.types.IValidatorSet|null|undefined} validator_set - * @memberof tendermint.types.LightBlock - * @instance - */ - LightBlock.prototype.validator_set = null; - - /** - * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LightBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signed_header != null && Object.hasOwnProperty.call(message, "signed_header")) - $root.tendermint.types.SignedHeader.encode(message.signed_header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validator_set != null && Object.hasOwnProperty.call(message, "validator_set")) - $root.tendermint.types.ValidatorSet.encode(message.validator_set, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LightBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LightBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.LightBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.LightBlock} LightBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LightBlock.decode = 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.types.LightBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LightBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.LightBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.LightBlock} LightBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LightBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LightBlock message. - * @function verify - * @memberof tendermint.types.LightBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LightBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signed_header != null && message.hasOwnProperty("signed_header")) { - var error = $root.tendermint.types.SignedHeader.verify(message.signed_header); - if (error) - return "signed_header." + error; - } - if (message.validator_set != null && message.hasOwnProperty("validator_set")) { - var error = $root.tendermint.types.ValidatorSet.verify(message.validator_set); - if (error) - return "validator_set." + error; - } - return null; - }; - - /** - * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.LightBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.LightBlock} LightBlock - */ - LightBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.LightBlock) - return object; - var message = new $root.tendermint.types.LightBlock(); - if (object.signed_header != null) { - if (typeof object.signed_header !== "object") - throw TypeError(".tendermint.types.LightBlock.signed_header: object expected"); - message.signed_header = $root.tendermint.types.SignedHeader.fromObject(object.signed_header); - } - if (object.validator_set != null) { - if (typeof object.validator_set !== "object") - throw TypeError(".tendermint.types.LightBlock.validator_set: object expected"); - message.validator_set = $root.tendermint.types.ValidatorSet.fromObject(object.validator_set); - } - return message; - }; - - /** - * Creates a plain object from a LightBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.LightBlock} message LightBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LightBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.signed_header = null; - object.validator_set = null; - } - if (message.signed_header != null && message.hasOwnProperty("signed_header")) - object.signed_header = $root.tendermint.types.SignedHeader.toObject(message.signed_header, options); - if (message.validator_set != null && message.hasOwnProperty("validator_set")) - object.validator_set = $root.tendermint.types.ValidatorSet.toObject(message.validator_set, options); - return object; - }; - - /** - * Converts this LightBlock to JSON. - * @function toJSON - * @memberof tendermint.types.LightBlock - * @instance - * @returns {Object.} JSON object - */ - LightBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LightBlock; - })(); - - types.BlockMeta = (function() { - - /** - * Properties of a BlockMeta. - * @memberof tendermint.types - * @interface IBlockMeta - * @property {tendermint.types.IBlockID|null} [block_id] BlockMeta block_id - * @property {Long|null} [block_size] BlockMeta block_size - * @property {tendermint.types.IHeader|null} [header] BlockMeta header - * @property {Long|null} [num_txs] BlockMeta num_txs - */ - - /** - * Constructs a new BlockMeta. - * @memberof tendermint.types - * @classdesc Represents a BlockMeta. - * @implements IBlockMeta - * @constructor - * @param {tendermint.types.IBlockMeta=} [properties] Properties to set - */ - function BlockMeta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlockMeta block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.block_id = null; - - /** - * BlockMeta block_size. - * @member {Long} block_size - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockMeta header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.header = null; - - /** - * BlockMeta num_txs. - * @member {Long} num_txs - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.num_txs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockMeta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.block_size != null && Object.hasOwnProperty.call(message, "block_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.block_size); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.num_txs != null && Object.hasOwnProperty.call(message, "num_txs")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.num_txs); - return writer; - }; - - /** - * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockMeta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlockMeta message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.BlockMeta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.BlockMeta} BlockMeta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockMeta.decode = 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.types.BlockMeta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block_size = reader.int64(); - break; - case 3: - message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); - break; - case 4: - message.num_txs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlockMeta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.BlockMeta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.BlockMeta} BlockMeta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockMeta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlockMeta message. - * @function verify - * @memberof tendermint.types.BlockMeta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlockMeta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (!$util.isInteger(message.block_size) && !(message.block_size && $util.isInteger(message.block_size.low) && $util.isInteger(message.block_size.high))) - return "block_size: integer|Long expected"; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.tendermint.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.num_txs != null && message.hasOwnProperty("num_txs")) - if (!$util.isInteger(message.num_txs) && !(message.num_txs && $util.isInteger(message.num_txs.low) && $util.isInteger(message.num_txs.high))) - return "num_txs: integer|Long expected"; - return null; - }; - - /** - * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.BlockMeta - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockMeta} BlockMeta - */ - BlockMeta.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockMeta) - return object; - var message = new $root.tendermint.types.BlockMeta(); - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.BlockMeta.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.block_size != null) - if ($util.Long) - (message.block_size = $util.Long.fromValue(object.block_size)).unsigned = false; - else if (typeof object.block_size === "string") - message.block_size = parseInt(object.block_size, 10); - else if (typeof object.block_size === "number") - message.block_size = object.block_size; - else if (typeof object.block_size === "object") - message.block_size = new $util.LongBits(object.block_size.low >>> 0, object.block_size.high >>> 0).toNumber(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.types.BlockMeta.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.num_txs != null) - if ($util.Long) - (message.num_txs = $util.Long.fromValue(object.num_txs)).unsigned = false; - else if (typeof object.num_txs === "string") - message.num_txs = parseInt(object.num_txs, 10); - else if (typeof object.num_txs === "number") - message.num_txs = object.num_txs; - else if (typeof object.num_txs === "object") - message.num_txs = new $util.LongBits(object.num_txs.low >>> 0, object.num_txs.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.BlockMeta} message BlockMeta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockMeta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.block_id = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_size = options.longs === String ? "0" : 0; - object.header = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.num_txs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.num_txs = options.longs === String ? "0" : 0; - } - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (typeof message.block_size === "number") - object.block_size = options.longs === String ? String(message.block_size) : message.block_size; - else - object.block_size = options.longs === String ? $util.Long.prototype.toString.call(message.block_size) : options.longs === Number ? new $util.LongBits(message.block_size.low >>> 0, message.block_size.high >>> 0).toNumber() : message.block_size; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.types.Header.toObject(message.header, options); - if (message.num_txs != null && message.hasOwnProperty("num_txs")) - if (typeof message.num_txs === "number") - object.num_txs = options.longs === String ? String(message.num_txs) : message.num_txs; - else - object.num_txs = options.longs === String ? $util.Long.prototype.toString.call(message.num_txs) : options.longs === Number ? new $util.LongBits(message.num_txs.low >>> 0, message.num_txs.high >>> 0).toNumber() : message.num_txs; - return object; - }; - - /** - * Converts this BlockMeta to JSON. - * @function toJSON - * @memberof tendermint.types.BlockMeta - * @instance - * @returns {Object.} JSON object - */ - BlockMeta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockMeta; - })(); - - types.TxProof = (function() { - - /** - * Properties of a TxProof. - * @memberof tendermint.types - * @interface ITxProof - * @property {Uint8Array|null} [root_hash] TxProof root_hash - * @property {Uint8Array|null} [data] TxProof data - * @property {tendermint.crypto.IProof|null} [proof] TxProof proof - */ - - /** - * Constructs a new TxProof. - * @memberof tendermint.types - * @classdesc Represents a TxProof. - * @implements ITxProof - * @constructor - * @param {tendermint.types.ITxProof=} [properties] Properties to set - */ - function TxProof(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxProof root_hash. - * @member {Uint8Array} root_hash - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.root_hash = $util.newBuffer([]); - - /** - * TxProof data. - * @member {Uint8Array} data - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.data = $util.newBuffer([]); - - /** - * TxProof proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.proof = null; - - /** - * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @function encode - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.root_hash != null && Object.hasOwnProperty.call(message, "root_hash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.root_hash); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxProof message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.TxProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.TxProof} TxProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxProof.decode = 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.types.TxProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.root_hash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.TxProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.TxProof} TxProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxProof message. - * @function verify - * @memberof tendermint.types.TxProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.root_hash != null && message.hasOwnProperty("root_hash")) - if (!(message.root_hash && typeof message.root_hash.length === "number" || $util.isString(message.root_hash))) - return "root_hash: 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"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a TxProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.TxProof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.TxProof} TxProof - */ - TxProof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.TxProof) - return object; - var message = new $root.tendermint.types.TxProof(); - if (object.root_hash != null) - if (typeof object.root_hash === "string") - $util.base64.decode(object.root_hash, message.root_hash = $util.newBuffer($util.base64.length(object.root_hash)), 0); - else if (object.root_hash.length) - message.root_hash = object.root_hash; - 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.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.types.TxProof.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a TxProof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.TxProof} message TxProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.root_hash = ""; - else { - object.root_hash = []; - if (options.bytes !== Array) - object.root_hash = $util.newBuffer(object.root_hash); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.proof = null; - } - if (message.root_hash != null && message.hasOwnProperty("root_hash")) - object.root_hash = options.bytes === String ? $util.base64.encode(message.root_hash, 0, message.root_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.root_hash) : message.root_hash; - 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.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this TxProof to JSON. - * @function toJSON - * @memberof tendermint.types.TxProof - * @instance - * @returns {Object.} JSON object - */ - TxProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxProof; - })(); - - return types; - })(); - - tendermint.crypto = (function() { - - /** - * Namespace crypto. - * @memberof tendermint - * @namespace - */ - var crypto = {}; - - crypto.PublicKey = (function() { - - /** - * Properties of a PublicKey. - * @memberof tendermint.crypto - * @interface IPublicKey - * @property {Uint8Array|null} [ed25519] PublicKey ed25519 - * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 - */ - - /** - * Constructs a new PublicKey. - * @memberof tendermint.crypto - * @classdesc Represents a PublicKey. - * @implements IPublicKey - * @constructor - * @param {tendermint.crypto.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 ed25519. - * @member {Uint8Array|null|undefined} ed25519 - * @memberof tendermint.crypto.PublicKey - * @instance - */ - PublicKey.prototype.ed25519 = null; - - /** - * PublicKey secp256k1. - * @member {Uint8Array|null|undefined} secp256k1 - * @memberof tendermint.crypto.PublicKey - * @instance - */ - PublicKey.prototype.secp256k1 = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PublicKey sum. - * @member {"ed25519"|"secp256k1"|undefined} sum - * @memberof tendermint.crypto.PublicKey - * @instance - */ - Object.defineProperty(PublicKey.prototype, "sum", { - get: $util.oneOfGetter($oneOfFields = ["ed25519", "secp256k1"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ed25519); - if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.secp256k1); - return writer; - }; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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 tendermint.crypto.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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.tendermint.crypto.PublicKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublicKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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 tendermint.crypto.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.ed25519 != null && message.hasOwnProperty("ed25519")) { - properties.sum = 1; - if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) - return "ed25519: buffer expected"; - } - if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) - return "secp256k1: buffer expected"; - } - return null; - }; - - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.PublicKey - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.PublicKey} PublicKey - */ - PublicKey.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.PublicKey) - return object; - var message = new $root.tendermint.crypto.PublicKey(); - 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.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; - return message; - }; - - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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.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.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"; - } - return object; - }; - - /** - * Converts this PublicKey to JSON. - * @function toJSON - * @memberof tendermint.crypto.PublicKey - * @instance - * @returns {Object.} JSON object - */ - PublicKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PublicKey; - })(); - - crypto.Proof = (function() { - - /** - * Properties of a Proof. - * @memberof tendermint.crypto - * @interface IProof - * @property {Long|null} [total] Proof total - * @property {Long|null} [index] Proof index - * @property {Uint8Array|null} [leaf_hash] Proof leaf_hash - * @property {Array.|null} [aunts] Proof aunts - */ - - /** - * Constructs a new Proof. - * @memberof tendermint.crypto - * @classdesc Represents a Proof. - * @implements IProof - * @constructor - * @param {tendermint.crypto.IProof=} [properties] Properties to set - */ - function Proof(properties) { - this.aunts = []; - if (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 total. - * @member {Long} total - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.total = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proof index. - * @member {Long} index - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proof leaf_hash. - * @member {Uint8Array} leaf_hash - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.leaf_hash = $util.newBuffer([]); - - /** - * Proof aunts. - * @member {Array.} aunts - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.aunts = $util.emptyArray; - - /** - * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.total); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.index); - if (message.leaf_hash != null && Object.hasOwnProperty.call(message, "leaf_hash")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.leaf_hash); - if (message.aunts != null && message.aunts.length) - for (var i = 0; i < message.aunts.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.aunts[i]); - return writer; - }; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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.Proof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.int64(); - break; - case 2: - message.index = reader.int64(); - break; - case 3: - message.leaf_hash = reader.bytes(); - break; - case 4: - if (!(message.aunts && message.aunts.length)) - message.aunts = []; - message.aunts.push(reader.bytes()); - 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.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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.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.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - 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.leaf_hash != null && message.hasOwnProperty("leaf_hash")) - if (!(message.leaf_hash && typeof message.leaf_hash.length === "number" || $util.isString(message.leaf_hash))) - return "leaf_hash: buffer expected"; - if (message.aunts != null && message.hasOwnProperty("aunts")) { - if (!Array.isArray(message.aunts)) - return "aunts: array expected"; - for (var i = 0; i < message.aunts.length; ++i) - if (!(message.aunts[i] && typeof message.aunts[i].length === "number" || $util.isString(message.aunts[i]))) - return "aunts: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Proof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.Proof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.Proof} Proof - */ - Proof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.Proof) - return object; - var message = new $root.tendermint.crypto.Proof(); - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = false; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(); - 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.leaf_hash != null) - if (typeof object.leaf_hash === "string") - $util.base64.decode(object.leaf_hash, message.leaf_hash = $util.newBuffer($util.base64.length(object.leaf_hash)), 0); - else if (object.leaf_hash.length) - message.leaf_hash = object.leaf_hash; - if (object.aunts) { - if (!Array.isArray(object.aunts)) - throw TypeError(".tendermint.crypto.Proof.aunts: array expected"); - message.aunts = []; - for (var i = 0; i < object.aunts.length; ++i) - if (typeof object.aunts[i] === "string") - $util.base64.decode(object.aunts[i], message.aunts[i] = $util.newBuffer($util.base64.length(object.aunts[i])), 0); - else if (object.aunts[i].length) - message.aunts[i] = object.aunts[i]; - } - return message; - }; - - /** - * Creates a plain object from a Proof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.aunts = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - 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.leaf_hash = ""; - else { - object.leaf_hash = []; - if (options.bytes !== Array) - object.leaf_hash = $util.newBuffer(object.leaf_hash); - } - } - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total; - 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.leaf_hash != null && message.hasOwnProperty("leaf_hash")) - object.leaf_hash = options.bytes === String ? $util.base64.encode(message.leaf_hash, 0, message.leaf_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.leaf_hash) : message.leaf_hash; - if (message.aunts && message.aunts.length) { - object.aunts = []; - for (var j = 0; j < message.aunts.length; ++j) - object.aunts[j] = options.bytes === String ? $util.base64.encode(message.aunts[j], 0, message.aunts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.aunts[j]) : message.aunts[j]; - } - return object; - }; - - /** - * Converts this Proof to JSON. - * @function toJSON - * @memberof tendermint.crypto.Proof - * @instance - * @returns {Object.} JSON object - */ - Proof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Proof; - })(); - - crypto.ValueOp = (function() { - - /** - * Properties of a ValueOp. - * @memberof tendermint.crypto - * @interface IValueOp - * @property {Uint8Array|null} [key] ValueOp key - * @property {tendermint.crypto.IProof|null} [proof] ValueOp proof - */ - - /** - * Constructs a new ValueOp. - * @memberof tendermint.crypto - * @classdesc Represents a ValueOp. - * @implements IValueOp - * @constructor - * @param {tendermint.crypto.IValueOp=} [properties] Properties to set - */ - function ValueOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValueOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.ValueOp - * @instance - */ - ValueOp.prototype.key = $util.newBuffer([]); - - /** - * ValueOp proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.crypto.ValueOp - * @instance - */ - ValueOp.prototype.proof = null; - - /** - * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueOp.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.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValueOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.ValueOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.ValueOp} ValueOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueOp.decode = 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.ValueOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValueOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.ValueOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.ValueOp} ValueOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValueOp message. - * @function verify - * @memberof tendermint.crypto.ValueOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValueOp.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.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.ValueOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ValueOp} ValueOp - */ - ValueOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ValueOp) - return object; - var message = new $root.tendermint.crypto.ValueOp(); - 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.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.crypto.ValueOp.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a ValueOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.ValueOp} message ValueOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValueOp.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); - } - object.proof = null; - } - 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.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this ValueOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.ValueOp - * @instance - * @returns {Object.} JSON object - */ - ValueOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValueOp; - })(); - - crypto.DominoOp = (function() { - - /** - * Properties of a DominoOp. - * @memberof tendermint.crypto - * @interface IDominoOp - * @property {string|null} [key] DominoOp key - * @property {string|null} [input] DominoOp input - * @property {string|null} [output] DominoOp output - */ - - /** - * Constructs a new DominoOp. - * @memberof tendermint.crypto - * @classdesc Represents a DominoOp. - * @implements IDominoOp - * @constructor - * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set - */ - function DominoOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DominoOp key. - * @member {string} key - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.key = ""; - - /** - * DominoOp input. - * @member {string} input - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.input = ""; - - /** - * DominoOp output. - * @member {string} output - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.output = ""; - - /** - * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DominoOp.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.input != null && Object.hasOwnProperty.call(message, "input")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input); - if (message.output != null && Object.hasOwnProperty.call(message, "output")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output); - return writer; - }; - - /** - * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DominoOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DominoOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.DominoOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.DominoOp} DominoOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DominoOp.decode = 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.DominoOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DominoOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.DominoOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.DominoOp} DominoOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DominoOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DominoOp message. - * @function verify - * @memberof tendermint.crypto.DominoOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DominoOp.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.input != null && message.hasOwnProperty("input")) - if (!$util.isString(message.input)) - return "input: string expected"; - if (message.output != null && message.hasOwnProperty("output")) - if (!$util.isString(message.output)) - return "output: string expected"; - return null; - }; - - /** - * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.DominoOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.DominoOp} DominoOp - */ - DominoOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.DominoOp) - return object; - var message = new $root.tendermint.crypto.DominoOp(); - if (object.key != null) - message.key = String(object.key); - if (object.input != null) - message.input = String(object.input); - if (object.output != null) - message.output = String(object.output); - return message; - }; - - /** - * Creates a plain object from a DominoOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.DominoOp} message DominoOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DominoOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.input = ""; - object.output = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.input != null && message.hasOwnProperty("input")) - object.input = message.input; - if (message.output != null && message.hasOwnProperty("output")) - object.output = message.output; - return object; - }; - - /** - * Converts this DominoOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.DominoOp - * @instance - * @returns {Object.} JSON object - */ - DominoOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DominoOp; - })(); - - crypto.ProofOp = (function() { - - /** - * Properties of a ProofOp. - * @memberof tendermint.crypto - * @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 - * @classdesc Represents a ProofOp. - * @implements IProofOp - * @constructor - * @param {tendermint.crypto.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.ProofOp - * @instance - */ - ProofOp.prototype.type = ""; - - /** - * ProofOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.key = $util.newBuffer([]); - - /** - * ProofOp data. - * @member {Uint8Array} data - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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.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.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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.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.ProofOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ProofOp} ProofOp - */ - ProofOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ProofOp) - return object; - var message = new $root.tendermint.crypto.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.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp - * @instance - * @returns {Object.} JSON object - */ - ProofOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofOp; - })(); - - crypto.ProofOps = (function() { - - /** - * Properties of a ProofOps. - * @memberof tendermint.crypto - * @interface IProofOps - * @property {Array.|null} [ops] ProofOps ops - */ - - /** - * Constructs a new ProofOps. - * @memberof tendermint.crypto - * @classdesc Represents a ProofOps. - * @implements IProofOps - * @constructor - * @param {tendermint.crypto.IProofOps=} [properties] Properties to set - */ - function ProofOps(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]]; - } - - /** - * ProofOps ops. - * @member {Array.} ops - * @memberof tendermint.crypto.ProofOps - * @instance - */ - ProofOps.prototype.ops = $util.emptyArray; - - /** - * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOps.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.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOps.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProofOps message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.ProofOps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.ProofOps} ProofOps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOps.decode = 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.ProofOps(); - 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.ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProofOps message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.ProofOps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.ProofOps} ProofOps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOps.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProofOps message. - * @function verify - * @memberof tendermint.crypto.ProofOps - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProofOps.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.ProofOp.verify(message.ops[i]); - if (error) - return "ops." + error; - } - } - return null; - }; - - /** - * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.ProofOps - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ProofOps} ProofOps - */ - ProofOps.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ProofOps) - return object; - var message = new $root.tendermint.crypto.ProofOps(); - if (object.ops) { - if (!Array.isArray(object.ops)) - throw TypeError(".tendermint.crypto.ProofOps.ops: array expected"); - message.ops = []; - for (var i = 0; i < object.ops.length; ++i) { - if (typeof object.ops[i] !== "object") - throw TypeError(".tendermint.crypto.ProofOps.ops: object expected"); - message.ops[i] = $root.tendermint.crypto.ProofOp.fromObject(object.ops[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ProofOps message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.ProofOps} message ProofOps - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofOps.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.ProofOp.toObject(message.ops[j], options); - } - return object; - }; - - /** - * Converts this ProofOps to JSON. - * @function toJSON - * @memberof tendermint.crypto.ProofOps - * @instance - * @returns {Object.} JSON object - */ - ProofOps.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofOps; - })(); - - return crypto; - })(); - - tendermint.version = (function() { - - /** - * Namespace version. - * @memberof tendermint - * @namespace - */ - var version = {}; - - version.App = (function() { - - /** - * Properties of an App. - * @memberof tendermint.version - * @interface IApp - * @property {Long|null} [protocol] App protocol - * @property {string|null} [software] App software - */ - - /** - * Constructs a new App. - * @memberof tendermint.version - * @classdesc Represents an App. - * @implements IApp - * @constructor - * @param {tendermint.version.IApp=} [properties] Properties to set - */ - function App(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * App protocol. - * @member {Long} protocol - * @memberof tendermint.version.App - * @instance - */ - App.prototype.protocol = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * App software. - * @member {string} software - * @memberof tendermint.version.App - * @instance - */ - App.prototype.software = ""; - - /** - * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @function encode - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.IApp} message App message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - App.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.protocol); - if (message.software != null && Object.hasOwnProperty.call(message, "software")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.software); - return writer; - }; - - /** - * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.IApp} message App message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - App.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an App message from the specified reader or buffer. - * @function decode - * @memberof tendermint.version.App - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.version.App} App - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - App.decode = 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.version.App(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = reader.uint64(); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an App message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.version.App - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.version.App} App - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - App.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an App message. - * @function verify - * @memberof tendermint.version.App - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - App.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isInteger(message.protocol) && !(message.protocol && $util.isInteger(message.protocol.low) && $util.isInteger(message.protocol.high))) - return "protocol: integer|Long expected"; - if (message.software != null && message.hasOwnProperty("software")) - if (!$util.isString(message.software)) - return "software: string expected"; - return null; - }; - - /** - * Creates an App message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.version.App - * @static - * @param {Object.} object Plain object - * @returns {tendermint.version.App} App - */ - App.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.version.App) - return object; - var message = new $root.tendermint.version.App(); - if (object.protocol != null) - if ($util.Long) - (message.protocol = $util.Long.fromValue(object.protocol)).unsigned = true; - else if (typeof object.protocol === "string") - message.protocol = parseInt(object.protocol, 10); - else if (typeof object.protocol === "number") - message.protocol = object.protocol; - else if (typeof object.protocol === "object") - message.protocol = new $util.LongBits(object.protocol.low >>> 0, object.protocol.high >>> 0).toNumber(true); - if (object.software != null) - message.software = String(object.software); - return message; - }; - - /** - * Creates a plain object from an App message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.App} message App - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - App.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.protocol = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.protocol = options.longs === String ? "0" : 0; - object.software = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (typeof message.protocol === "number") - object.protocol = options.longs === String ? String(message.protocol) : message.protocol; - else - object.protocol = options.longs === String ? $util.Long.prototype.toString.call(message.protocol) : options.longs === Number ? new $util.LongBits(message.protocol.low >>> 0, message.protocol.high >>> 0).toNumber(true) : message.protocol; - if (message.software != null && message.hasOwnProperty("software")) - object.software = message.software; - return object; - }; - - /** - * Converts this App to JSON. - * @function toJSON - * @memberof tendermint.version.App - * @instance - * @returns {Object.} JSON object - */ - App.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return App; - })(); - - version.Consensus = (function() { - - /** - * Properties of a Consensus. - * @memberof tendermint.version - * @interface IConsensus - * @property {Long|null} [block] Consensus block - * @property {Long|null} [app] Consensus app - */ - - /** - * Constructs a new Consensus. - * @memberof tendermint.version - * @classdesc Represents a Consensus. - * @implements IConsensus - * @constructor - * @param {tendermint.version.IConsensus=} [properties] Properties to set - */ - function Consensus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Consensus block. - * @member {Long} block - * @memberof tendermint.version.Consensus - * @instance - */ - Consensus.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Consensus app. - * @member {Long} app - * @memberof tendermint.version.Consensus - * @instance - */ - Consensus.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @function encode - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consensus.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 Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consensus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Consensus message from the specified reader or buffer. - * @function decode - * @memberof tendermint.version.Consensus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.version.Consensus} Consensus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consensus.decode = 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.version.Consensus(); - 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 Consensus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.version.Consensus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.version.Consensus} Consensus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consensus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Consensus message. - * @function verify - * @memberof tendermint.version.Consensus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Consensus.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 Consensus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.version.Consensus - * @static - * @param {Object.} object Plain object - * @returns {tendermint.version.Consensus} Consensus - */ - Consensus.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.version.Consensus) - return object; - var message = new $root.tendermint.version.Consensus(); - 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 Consensus message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.Consensus} message Consensus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Consensus.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 Consensus to JSON. - * @function toJSON - * @memberof tendermint.version.Consensus - * @instance - * @returns {Object.} JSON object - */ - Consensus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Consensus; - })(); - - return version; - })(); - - return tendermint; - })(); - - return $root; -}); diff --git a/src/generated/ibc/proto.d.ts b/src/generated/ibc/proto.d.ts deleted file mode 100644 index e841ada2..00000000 --- a/src/generated/ibc/proto.d.ts +++ /dev/null @@ -1,35614 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Namespace cosmos. */ -export namespace cosmos { - - /** Namespace adminmodule. */ - namespace adminmodule { - - /** Namespace adminmodule. */ - namespace adminmodule { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls DeleteAdmin. - * @param request MsgDeleteAdmin message or plain object - * @param callback Node-style callback called with the error, if any, and MsgDeleteAdminResponse - */ - public deleteAdmin(request: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin, callback: cosmos.adminmodule.adminmodule.Msg.DeleteAdminCallback): void; - - /** - * Calls DeleteAdmin. - * @param request MsgDeleteAdmin message or plain object - * @returns Promise - */ - public deleteAdmin(request: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin): Promise; - - /** - * Calls AddAdmin. - * @param request MsgAddAdmin message or plain object - * @param callback Node-style callback called with the error, if any, and MsgAddAdminResponse - */ - public addAdmin(request: cosmos.adminmodule.adminmodule.IMsgAddAdmin, callback: cosmos.adminmodule.adminmodule.Msg.AddAdminCallback): void; - - /** - * Calls AddAdmin. - * @param request MsgAddAdmin message or plain object - * @returns Promise - */ - public addAdmin(request: cosmos.adminmodule.adminmodule.IMsgAddAdmin): Promise; - - /** - * Calls SubmitProposal. - * @param request MsgSubmitProposal message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse - */ - public submitProposal(request: cosmos.adminmodule.adminmodule.IMsgSubmitProposal, callback: cosmos.adminmodule.adminmodule.Msg.SubmitProposalCallback): void; - - /** - * Calls SubmitProposal. - * @param request MsgSubmitProposal message or plain object - * @returns Promise - */ - public submitProposal(request: cosmos.adminmodule.adminmodule.IMsgSubmitProposal): Promise; - - /** - * Calls SubmitProposalLegacy. - * @param request MsgSubmitProposalLegacy message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitProposalLegacyResponse - */ - public submitProposalLegacy(request: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy, callback: cosmos.adminmodule.adminmodule.Msg.SubmitProposalLegacyCallback): void; - - /** - * Calls SubmitProposalLegacy. - * @param request MsgSubmitProposalLegacy message or plain object - * @returns Promise - */ - public submitProposalLegacy(request: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#deleteAdmin}. - * @param error Error, if any - * @param [response] MsgDeleteAdminResponse - */ - type DeleteAdminCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#addAdmin}. - * @param error Error, if any - * @param [response] MsgAddAdminResponse - */ - type AddAdminCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgAddAdminResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposal}. - * @param error Error, if any - * @param [response] MsgSubmitProposalResponse - */ - type SubmitProposalCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposalLegacy}. - * @param error Error, if any - * @param [response] MsgSubmitProposalLegacyResponse - */ - type SubmitProposalLegacyCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse) => void; - } - - /** Properties of a MsgDeleteAdmin. */ - interface IMsgDeleteAdmin { - - /** MsgDeleteAdmin creator */ - creator?: (string|null); - - /** MsgDeleteAdmin admin */ - admin?: (string|null); - } - - /** Represents a MsgDeleteAdmin. */ - class MsgDeleteAdmin implements IMsgDeleteAdmin { - - /** - * Constructs a new MsgDeleteAdmin. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin); - - /** MsgDeleteAdmin creator. */ - public creator: string; - - /** MsgDeleteAdmin admin. */ - public admin: string; - - /** - * Encodes the specified MsgDeleteAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @param message MsgDeleteAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgDeleteAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @param message MsgDeleteAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgDeleteAdmin; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgDeleteAdmin; - - /** - * Verifies a MsgDeleteAdmin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgDeleteAdmin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDeleteAdmin - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgDeleteAdmin; - - /** - * Creates a plain object from a MsgDeleteAdmin message. Also converts values to other types if specified. - * @param message MsgDeleteAdmin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgDeleteAdmin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgDeleteAdmin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgDeleteAdminResponse. */ - interface IMsgDeleteAdminResponse { - } - - /** Represents a MsgDeleteAdminResponse. */ - class MsgDeleteAdminResponse implements IMsgDeleteAdminResponse { - - /** - * Constructs a new MsgDeleteAdminResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse); - - /** - * Encodes the specified MsgDeleteAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @param message MsgDeleteAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgDeleteAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @param message MsgDeleteAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse; - - /** - * Verifies a MsgDeleteAdminResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgDeleteAdminResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDeleteAdminResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse; - - /** - * Creates a plain object from a MsgDeleteAdminResponse message. Also converts values to other types if specified. - * @param message MsgDeleteAdminResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgDeleteAdminResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAddAdmin. */ - interface IMsgAddAdmin { - - /** MsgAddAdmin creator */ - creator?: (string|null); - - /** MsgAddAdmin admin */ - admin?: (string|null); - } - - /** Represents a MsgAddAdmin. */ - class MsgAddAdmin implements IMsgAddAdmin { - - /** - * Constructs a new MsgAddAdmin. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgAddAdmin); - - /** MsgAddAdmin creator. */ - public creator: string; - - /** MsgAddAdmin admin. */ - public admin: string; - - /** - * Encodes the specified MsgAddAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @param message MsgAddAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgAddAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAddAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @param message MsgAddAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgAddAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgAddAdmin; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgAddAdmin; - - /** - * Verifies a MsgAddAdmin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAddAdmin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAddAdmin - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgAddAdmin; - - /** - * Creates a plain object from a MsgAddAdmin message. Also converts values to other types if specified. - * @param message MsgAddAdmin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgAddAdmin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAddAdmin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAddAdminResponse. */ - interface IMsgAddAdminResponse { - } - - /** Represents a MsgAddAdminResponse. */ - class MsgAddAdminResponse implements IMsgAddAdminResponse { - - /** - * Constructs a new MsgAddAdminResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgAddAdminResponse); - - /** - * Encodes the specified MsgAddAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @param message MsgAddAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgAddAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAddAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @param message MsgAddAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgAddAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgAddAdminResponse; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgAddAdminResponse; - - /** - * Verifies a MsgAddAdminResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAddAdminResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAddAdminResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgAddAdminResponse; - - /** - * Creates a plain object from a MsgAddAdminResponse message. Also converts values to other types if specified. - * @param message MsgAddAdminResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgAddAdminResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAddAdminResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitProposalLegacy. */ - interface IMsgSubmitProposalLegacy { - - /** MsgSubmitProposalLegacy content */ - content?: (google.protobuf.IAny|null); - - /** MsgSubmitProposalLegacy proposer */ - proposer?: (string|null); - } - - /** Represents a MsgSubmitProposalLegacy. */ - class MsgSubmitProposalLegacy implements IMsgSubmitProposalLegacy { - - /** - * Constructs a new MsgSubmitProposalLegacy. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy); - - /** MsgSubmitProposalLegacy content. */ - public content?: (google.protobuf.IAny|null); - - /** MsgSubmitProposalLegacy proposer. */ - public proposer: string; - - /** - * Encodes the specified MsgSubmitProposalLegacy message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.verify|verify} messages. - * @param message MsgSubmitProposalLegacy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposalLegacy message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.verify|verify} messages. - * @param message MsgSubmitProposalLegacy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitProposalLegacy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitProposalLegacy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy; - - /** - * Decodes a MsgSubmitProposalLegacy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitProposalLegacy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy; - - /** - * Verifies a MsgSubmitProposalLegacy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitProposalLegacy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitProposalLegacy - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy; - - /** - * Creates a plain object from a MsgSubmitProposalLegacy message. Also converts values to other types if specified. - * @param message MsgSubmitProposalLegacy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposalLegacy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitProposalLegacyResponse. */ - interface IMsgSubmitProposalLegacyResponse { - - /** MsgSubmitProposalLegacyResponse proposal_id */ - proposal_id?: (Long|null); - } - - /** Represents a MsgSubmitProposalLegacyResponse. */ - class MsgSubmitProposalLegacyResponse implements IMsgSubmitProposalLegacyResponse { - - /** - * Constructs a new MsgSubmitProposalLegacyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse); - - /** MsgSubmitProposalLegacyResponse proposal_id. */ - public proposal_id: Long; - - /** - * Encodes the specified MsgSubmitProposalLegacyResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse.verify|verify} messages. - * @param message MsgSubmitProposalLegacyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposalLegacyResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse.verify|verify} messages. - * @param message MsgSubmitProposalLegacyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitProposalLegacyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitProposalLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse; - - /** - * Decodes a MsgSubmitProposalLegacyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitProposalLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse; - - /** - * Verifies a MsgSubmitProposalLegacyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitProposalLegacyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitProposalLegacyResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse; - - /** - * Creates a plain object from a MsgSubmitProposalLegacyResponse message. Also converts values to other types if specified. - * @param message MsgSubmitProposalLegacyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposalLegacyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitProposal. */ - interface IMsgSubmitProposal { - - /** MsgSubmitProposal messages */ - messages?: (google.protobuf.IAny[]|null); - - /** MsgSubmitProposal proposer */ - proposer?: (string|null); - } - - /** Represents a MsgSubmitProposal. */ - class MsgSubmitProposal implements IMsgSubmitProposal { - - /** - * Constructs a new MsgSubmitProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgSubmitProposal); - - /** MsgSubmitProposal messages. */ - public messages: google.protobuf.IAny[]; - - /** MsgSubmitProposal proposer. */ - public proposer: string; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitProposalResponse. */ - interface IMsgSubmitProposalResponse { - - /** MsgSubmitProposalResponse proposal_id */ - proposal_id?: (Long|null); - } - - /** Represents a MsgSubmitProposalResponse. */ - class MsgSubmitProposalResponse implements IMsgSubmitProposalResponse { - - /** - * Constructs a new MsgSubmitProposalResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse); - - /** MsgSubmitProposalResponse proposal_id. */ - public proposal_id: Long; - - /** - * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @param message MsgSubmitProposalResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @param message MsgSubmitProposalResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse; - - /** - * Verifies a MsgSubmitProposalResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitProposalResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse; - - /** - * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. - * @param message MsgSubmitProposalResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposalResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Admins. - * @param request QueryAdminsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryAdminsResponse - */ - public admins(request: cosmos.adminmodule.adminmodule.IQueryAdminsRequest, callback: cosmos.adminmodule.adminmodule.Query.AdminsCallback): void; - - /** - * Calls Admins. - * @param request QueryAdminsRequest message or plain object - * @returns Promise - */ - public admins(request: cosmos.adminmodule.adminmodule.IQueryAdminsRequest): Promise; - - /** - * Calls ArchivedProposals. - * @param request QueryArchivedProposalsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryArchivedProposalsResponse - */ - public archivedProposals(request: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest, callback: cosmos.adminmodule.adminmodule.Query.ArchivedProposalsCallback): void; - - /** - * Calls ArchivedProposals. - * @param request QueryArchivedProposalsRequest message or plain object - * @returns Promise - */ - public archivedProposals(request: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest): Promise; - - /** - * Calls ArchivedProposalsLegacy. - * @param request QueryArchivedProposalsLegacyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryArchivedProposalsLegacyResponse - */ - public archivedProposalsLegacy(request: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest, callback: cosmos.adminmodule.adminmodule.Query.ArchivedProposalsLegacyCallback): void; - - /** - * Calls ArchivedProposalsLegacy. - * @param request QueryArchivedProposalsLegacyRequest message or plain object - * @returns Promise - */ - public archivedProposalsLegacy(request: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#admins}. - * @param error Error, if any - * @param [response] QueryAdminsResponse - */ - type AdminsCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.QueryAdminsResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposals}. - * @param error Error, if any - * @param [response] QueryArchivedProposalsResponse - */ - type ArchivedProposalsCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse) => void; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposalsLegacy}. - * @param error Error, if any - * @param [response] QueryArchivedProposalsLegacyResponse - */ - type ArchivedProposalsLegacyCallback = (error: (Error|null), response?: cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse) => void; - } - - /** Properties of a QueryAdminsRequest. */ - interface IQueryAdminsRequest { - } - - /** Represents a QueryAdminsRequest. */ - class QueryAdminsRequest implements IQueryAdminsRequest { - - /** - * Constructs a new QueryAdminsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryAdminsRequest); - - /** - * Encodes the specified QueryAdminsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @param message QueryAdminsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryAdminsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAdminsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @param message QueryAdminsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryAdminsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryAdminsRequest; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryAdminsRequest; - - /** - * Verifies a QueryAdminsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAdminsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAdminsRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryAdminsRequest; - - /** - * Creates a plain object from a QueryAdminsRequest message. Also converts values to other types if specified. - * @param message QueryAdminsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryAdminsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAdminsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryAdminsResponse. */ - interface IQueryAdminsResponse { - - /** QueryAdminsResponse admins */ - admins?: (string[]|null); - } - - /** Represents a QueryAdminsResponse. */ - class QueryAdminsResponse implements IQueryAdminsResponse { - - /** - * Constructs a new QueryAdminsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryAdminsResponse); - - /** QueryAdminsResponse admins. */ - public admins: string[]; - - /** - * Encodes the specified QueryAdminsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @param message QueryAdminsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryAdminsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAdminsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @param message QueryAdminsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryAdminsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryAdminsResponse; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryAdminsResponse; - - /** - * Verifies a QueryAdminsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAdminsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAdminsResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryAdminsResponse; - - /** - * Creates a plain object from a QueryAdminsResponse message. Also converts values to other types if specified. - * @param message QueryAdminsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryAdminsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAdminsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryArchivedProposalsRequest. */ - interface IQueryArchivedProposalsRequest { - } - - /** Represents a QueryArchivedProposalsRequest. */ - class QueryArchivedProposalsRequest implements IQueryArchivedProposalsRequest { - - /** - * Constructs a new QueryArchivedProposalsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest); - - /** - * Encodes the specified QueryArchivedProposalsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @param message QueryArchivedProposalsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryArchivedProposalsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @param message QueryArchivedProposalsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest; - - /** - * Verifies a QueryArchivedProposalsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryArchivedProposalsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryArchivedProposalsRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest; - - /** - * Creates a plain object from a QueryArchivedProposalsRequest message. Also converts values to other types if specified. - * @param message QueryArchivedProposalsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryArchivedProposalsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryArchivedProposalsLegacyRequest. */ - interface IQueryArchivedProposalsLegacyRequest { - } - - /** Represents a QueryArchivedProposalsLegacyRequest. */ - class QueryArchivedProposalsLegacyRequest implements IQueryArchivedProposalsLegacyRequest { - - /** - * Constructs a new QueryArchivedProposalsLegacyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest); - - /** - * Encodes the specified QueryArchivedProposalsLegacyRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest.verify|verify} messages. - * @param message QueryArchivedProposalsLegacyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryArchivedProposalsLegacyRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest.verify|verify} messages. - * @param message QueryArchivedProposalsLegacyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryArchivedProposalsLegacyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryArchivedProposalsLegacyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest; - - /** - * Decodes a QueryArchivedProposalsLegacyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryArchivedProposalsLegacyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest; - - /** - * Verifies a QueryArchivedProposalsLegacyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryArchivedProposalsLegacyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryArchivedProposalsLegacyRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest; - - /** - * Creates a plain object from a QueryArchivedProposalsLegacyRequest message. Also converts values to other types if specified. - * @param message QueryArchivedProposalsLegacyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryArchivedProposalsLegacyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryProposalsResponse. */ - interface IQueryProposalsResponse { - - /** QueryProposalsResponse proposals */ - proposals?: (cosmos.gov.v1.IProposal[]|null); - } - - /** Represents a QueryProposalsResponse. */ - class QueryProposalsResponse implements IQueryProposalsResponse { - - /** - * Constructs a new QueryProposalsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryProposalsResponse); - - /** QueryProposalsResponse proposals. */ - public proposals: cosmos.gov.v1.IProposal[]; - - /** - * Encodes the specified QueryProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryProposalsResponse.verify|verify} messages. - * @param message QueryProposalsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryProposalsResponse.verify|verify} messages. - * @param message QueryProposalsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryProposalsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryProposalsResponse; - - /** - * Decodes a QueryProposalsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryProposalsResponse; - - /** - * Verifies a QueryProposalsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryProposalsResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryProposalsResponse; - - /** - * Creates a plain object from a QueryProposalsResponse message. Also converts values to other types if specified. - * @param message QueryProposalsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryProposalsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryProposalsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryArchivedProposalsResponse. */ - interface IQueryArchivedProposalsResponse { - - /** QueryArchivedProposalsResponse proposals */ - proposals?: (cosmos.gov.v1.IProposal[]|null); - } - - /** Represents a QueryArchivedProposalsResponse. */ - class QueryArchivedProposalsResponse implements IQueryArchivedProposalsResponse { - - /** - * Constructs a new QueryArchivedProposalsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse); - - /** QueryArchivedProposalsResponse proposals. */ - public proposals: cosmos.gov.v1.IProposal[]; - - /** - * Encodes the specified QueryArchivedProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @param message QueryArchivedProposalsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryArchivedProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @param message QueryArchivedProposalsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse; - - /** - * Verifies a QueryArchivedProposalsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryArchivedProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryArchivedProposalsResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse; - - /** - * Creates a plain object from a QueryArchivedProposalsResponse message. Also converts values to other types if specified. - * @param message QueryArchivedProposalsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryArchivedProposalsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryArchivedProposalsLegacyResponse. */ - interface IQueryArchivedProposalsLegacyResponse { - - /** QueryArchivedProposalsLegacyResponse proposalsLegacy */ - proposalsLegacy?: (cosmos.gov.v1beta1.IProposal[]|null); - } - - /** Represents a QueryArchivedProposalsLegacyResponse. */ - class QueryArchivedProposalsLegacyResponse implements IQueryArchivedProposalsLegacyResponse { - - /** - * Constructs a new QueryArchivedProposalsLegacyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse); - - /** QueryArchivedProposalsLegacyResponse proposalsLegacy. */ - public proposalsLegacy: cosmos.gov.v1beta1.IProposal[]; - - /** - * Encodes the specified QueryArchivedProposalsLegacyResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.verify|verify} messages. - * @param message QueryArchivedProposalsLegacyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryArchivedProposalsLegacyResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.verify|verify} messages. - * @param message QueryArchivedProposalsLegacyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryArchivedProposalsLegacyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryArchivedProposalsLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse; - - /** - * Decodes a QueryArchivedProposalsLegacyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryArchivedProposalsLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse; - - /** - * Verifies a QueryArchivedProposalsLegacyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryArchivedProposalsLegacyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryArchivedProposalsLegacyResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse; - - /** - * Creates a plain object from a QueryArchivedProposalsLegacyResponse message. Also converts values to other types if specified. - * @param message QueryArchivedProposalsLegacyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryArchivedProposalsLegacyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState admins */ - admins?: (string[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.adminmodule.adminmodule.IGenesisState); - - /** GenesisState admins. */ - public admins: string[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.adminmodule.adminmodule.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.adminmodule.adminmodule.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.adminmodule.adminmodule.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.adminmodule.adminmodule.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): cosmos.adminmodule.adminmodule.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.adminmodule.adminmodule.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace gov. */ - namespace gov { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** 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 WeightedVoteOption. */ - interface IWeightedVoteOption { - - /** WeightedVoteOption option */ - option?: (cosmos.gov.v1beta1.VoteOption|null); - - /** WeightedVoteOption weight */ - weight?: (string|null); - } - - /** Represents a WeightedVoteOption. */ - class WeightedVoteOption implements IWeightedVoteOption { - - /** - * Constructs a new WeightedVoteOption. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IWeightedVoteOption); - - /** WeightedVoteOption option. */ - public option: cosmos.gov.v1beta1.VoteOption; - - /** WeightedVoteOption weight. */ - public weight: string; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @param message WeightedVoteOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.IWeightedVoteOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @param message WeightedVoteOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.IWeightedVoteOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.WeightedVoteOption; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.WeightedVoteOption; - - /** - * Verifies a WeightedVoteOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeightedVoteOption - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.WeightedVoteOption; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @param message WeightedVoteOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.WeightedVoteOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeightedVoteOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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.gov.v1beta1.ITextProposal); - - /** TextProposal title. */ - public title: string; - - /** TextProposal description. */ - public description: string; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.ITextProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 proposal_id */ - proposal_id?: (Long|null); - - /** Deposit depositor */ - depositor?: (string|null); - - /** Deposit amount */ - amount?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a Deposit. */ - class Deposit implements IDeposit { - - /** - * Constructs a new Deposit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IDeposit); - - /** Deposit proposal_id. */ - public proposal_id: Long; - - /** Deposit depositor. */ - public depositor: string; - - /** Deposit amount. */ - public amount: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 proposal_id */ - proposal_id?: (Long|null); - - /** Proposal content */ - content?: (google.protobuf.IAny|null); - - /** Proposal status */ - status?: (cosmos.gov.v1beta1.ProposalStatus|null); - - /** Proposal final_tally_result */ - final_tally_result?: (cosmos.gov.v1beta1.ITallyResult|null); - - /** Proposal submit_time */ - submit_time?: (google.protobuf.ITimestamp|null); - - /** Proposal deposit_end_time */ - deposit_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal total_deposit */ - total_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Proposal voting_start_time */ - voting_start_time?: (google.protobuf.ITimestamp|null); - - /** Proposal voting_end_time */ - voting_end_time?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - - /** - * Constructs a new Proposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IProposal); - - /** Proposal proposal_id. */ - public proposal_id: Long; - - /** Proposal content. */ - public content?: (google.protobuf.IAny|null); - - /** Proposal status. */ - public status: cosmos.gov.v1beta1.ProposalStatus; - - /** Proposal final_tally_result. */ - public final_tally_result?: (cosmos.gov.v1beta1.ITallyResult|null); - - /** Proposal submit_time. */ - public submit_time?: (google.protobuf.ITimestamp|null); - - /** Proposal deposit_end_time. */ - public deposit_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal total_deposit. */ - public total_deposit: cosmos.base.v1beta1.ICoin[]; - - /** Proposal voting_start_time. */ - public voting_start_time?: (google.protobuf.ITimestamp|null); - - /** Proposal voting_end_time. */ - public voting_end_time?: (google.protobuf.ITimestamp|null); - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 no_with_veto */ - no_with_veto?: (string|null); - } - - /** Represents a TallyResult. */ - class TallyResult implements ITallyResult { - - /** - * Constructs a new TallyResult. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.ITallyResult); - - /** TallyResult yes. */ - public yes: string; - - /** TallyResult abstain. */ - public abstain: string; - - /** TallyResult no. */ - public no: string; - - /** TallyResult no_with_veto. */ - public no_with_veto: string; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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 proposal_id */ - proposal_id?: (Long|null); - - /** Vote voter */ - voter?: (string|null); - - /** Vote option */ - option?: (cosmos.gov.v1beta1.VoteOption|null); - - /** Vote options */ - options?: (cosmos.gov.v1beta1.IWeightedVoteOption[]|null); - } - - /** Represents a Vote. */ - class Vote implements IVote { - - /** - * Constructs a new Vote. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IVote); - - /** Vote proposal_id. */ - public proposal_id: Long; - - /** Vote voter. */ - public voter: string; - - /** Vote option. */ - public option: cosmos.gov.v1beta1.VoteOption; - - /** Vote options. */ - public options: cosmos.gov.v1beta1.IWeightedVoteOption[]; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DepositParams. */ - interface IDepositParams { - - /** DepositParams min_deposit */ - min_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** DepositParams max_deposit_period */ - max_deposit_period?: (google.protobuf.IDuration|null); - } - - /** Represents a DepositParams. */ - class DepositParams implements IDepositParams { - - /** - * Constructs a new DepositParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IDepositParams); - - /** DepositParams min_deposit. */ - public min_deposit: cosmos.base.v1beta1.ICoin[]; - - /** DepositParams max_deposit_period. */ - public max_deposit_period?: (google.protobuf.IDuration|null); - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @param message DepositParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.IDepositParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @param message DepositParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.IDepositParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.DepositParams; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.DepositParams; - - /** - * Verifies a DepositParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DepositParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.DepositParams; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @param message DepositParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.DepositParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DepositParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VotingParams. */ - interface IVotingParams { - - /** VotingParams voting_period */ - voting_period?: (google.protobuf.IDuration|null); - } - - /** Represents a VotingParams. */ - class VotingParams implements IVotingParams { - - /** - * Constructs a new VotingParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.IVotingParams); - - /** VotingParams voting_period. */ - public voting_period?: (google.protobuf.IDuration|null); - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @param message VotingParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.IVotingParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @param message VotingParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.IVotingParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.VotingParams; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.VotingParams; - - /** - * Verifies a VotingParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VotingParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.VotingParams; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @param message VotingParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.VotingParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VotingParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TallyParams. */ - interface ITallyParams { - - /** TallyParams quorum */ - quorum?: (Uint8Array|null); - - /** TallyParams threshold */ - threshold?: (Uint8Array|null); - - /** TallyParams veto_threshold */ - veto_threshold?: (Uint8Array|null); - } - - /** Represents a TallyParams. */ - class TallyParams implements ITallyParams { - - /** - * Constructs a new TallyParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1beta1.ITallyParams); - - /** TallyParams quorum. */ - public quorum: Uint8Array; - - /** TallyParams threshold. */ - public threshold: Uint8Array; - - /** TallyParams veto_threshold. */ - public veto_threshold: Uint8Array; - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @param message TallyParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1beta1.ITallyParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @param message TallyParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1beta1.ITallyParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1beta1.TallyParams; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1beta1.TallyParams; - - /** - * Verifies a TallyParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TallyParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1beta1.TallyParams; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @param message TallyParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1beta1.TallyParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TallyParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace v1. */ - namespace v1 { - - /** 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 WeightedVoteOption. */ - interface IWeightedVoteOption { - - /** WeightedVoteOption option */ - option?: (cosmos.gov.v1.VoteOption|null); - - /** WeightedVoteOption weight */ - weight?: (string|null); - } - - /** Represents a WeightedVoteOption. */ - class WeightedVoteOption implements IWeightedVoteOption { - - /** - * Constructs a new WeightedVoteOption. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IWeightedVoteOption); - - /** WeightedVoteOption option. */ - public option: cosmos.gov.v1.VoteOption; - - /** WeightedVoteOption weight. */ - public weight: string; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1.WeightedVoteOption.verify|verify} messages. - * @param message WeightedVoteOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1.IWeightedVoteOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1.WeightedVoteOption.verify|verify} messages. - * @param message WeightedVoteOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1.IWeightedVoteOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1.WeightedVoteOption; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1.WeightedVoteOption; - - /** - * Verifies a WeightedVoteOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WeightedVoteOption - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1.WeightedVoteOption; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @param message WeightedVoteOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1.WeightedVoteOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WeightedVoteOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Deposit. */ - interface IDeposit { - - /** Deposit proposal_id */ - proposal_id?: (Long|null); - - /** Deposit depositor */ - depositor?: (string|null); - - /** Deposit amount */ - amount?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a Deposit. */ - class Deposit implements IDeposit { - - /** - * Constructs a new Deposit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IDeposit); - - /** Deposit proposal_id. */ - public proposal_id: Long; - - /** Deposit depositor. */ - public depositor: string; - - /** Deposit amount. */ - public amount: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.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.gov.v1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.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.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.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.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.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.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 id */ - id?: (Long|null); - - /** Proposal messages */ - messages?: (google.protobuf.IAny[]|null); - - /** Proposal status */ - status?: (cosmos.gov.v1.ProposalStatus|null); - - /** Proposal final_tally_result */ - final_tally_result?: (cosmos.gov.v1.ITallyResult|null); - - /** Proposal submit_time */ - submit_time?: (google.protobuf.ITimestamp|null); - - /** Proposal deposit_end_time */ - deposit_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal total_deposit */ - total_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Proposal voting_start_time */ - voting_start_time?: (google.protobuf.ITimestamp|null); - - /** Proposal voting_end_time */ - voting_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal metadata */ - metadata?: (string|null); - - /** Proposal title */ - title?: (string|null); - - /** Proposal summary */ - summary?: (string|null); - - /** Proposal proposer */ - proposer?: (string|null); - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - - /** - * Constructs a new Proposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IProposal); - - /** Proposal id. */ - public id: Long; - - /** Proposal messages. */ - public messages: google.protobuf.IAny[]; - - /** Proposal status. */ - public status: cosmos.gov.v1.ProposalStatus; - - /** Proposal final_tally_result. */ - public final_tally_result?: (cosmos.gov.v1.ITallyResult|null); - - /** Proposal submit_time. */ - public submit_time?: (google.protobuf.ITimestamp|null); - - /** Proposal deposit_end_time. */ - public deposit_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal total_deposit. */ - public total_deposit: cosmos.base.v1beta1.ICoin[]; - - /** Proposal voting_start_time. */ - public voting_start_time?: (google.protobuf.ITimestamp|null); - - /** Proposal voting_end_time. */ - public voting_end_time?: (google.protobuf.ITimestamp|null); - - /** Proposal metadata. */ - public metadata: string; - - /** Proposal title. */ - public title: string; - - /** Proposal summary. */ - public summary: string; - - /** Proposal proposer. */ - public proposer: string; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.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.gov.v1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.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.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.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.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.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.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_count */ - yes_count?: (string|null); - - /** TallyResult abstain_count */ - abstain_count?: (string|null); - - /** TallyResult no_count */ - no_count?: (string|null); - - /** TallyResult no_with_veto_count */ - no_with_veto_count?: (string|null); - } - - /** Represents a TallyResult. */ - class TallyResult implements ITallyResult { - - /** - * Constructs a new TallyResult. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.ITallyResult); - - /** TallyResult yes_count. */ - public yes_count: string; - - /** TallyResult abstain_count. */ - public abstain_count: string; - - /** TallyResult no_count. */ - public no_count: string; - - /** TallyResult no_with_veto_count. */ - public no_with_veto_count: string; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.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.gov.v1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.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.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.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.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.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.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 proposal_id */ - proposal_id?: (Long|null); - - /** Vote voter */ - voter?: (string|null); - - /** Vote options */ - options?: (cosmos.gov.v1.IWeightedVoteOption[]|null); - - /** Vote metadata */ - metadata?: (string|null); - } - - /** Represents a Vote. */ - class Vote implements IVote { - - /** - * Constructs a new Vote. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IVote); - - /** Vote proposal_id. */ - public proposal_id: Long; - - /** Vote voter. */ - public voter: string; - - /** Vote options. */ - public options: cosmos.gov.v1.IWeightedVoteOption[]; - - /** Vote metadata. */ - public metadata: string; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.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.gov.v1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.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.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.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.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.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.gov.v1.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DepositParams. */ - interface IDepositParams { - - /** DepositParams min_deposit */ - min_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** DepositParams max_deposit_period */ - max_deposit_period?: (google.protobuf.IDuration|null); - } - - /** Represents a DepositParams. */ - class DepositParams implements IDepositParams { - - /** - * Constructs a new DepositParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IDepositParams); - - /** DepositParams min_deposit. */ - public min_deposit: cosmos.base.v1beta1.ICoin[]; - - /** DepositParams max_deposit_period. */ - public max_deposit_period?: (google.protobuf.IDuration|null); - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1.DepositParams.verify|verify} messages. - * @param message DepositParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1.IDepositParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.DepositParams.verify|verify} messages. - * @param message DepositParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1.IDepositParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1.DepositParams; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1.DepositParams; - - /** - * Verifies a DepositParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DepositParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1.DepositParams; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @param message DepositParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1.DepositParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DepositParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VotingParams. */ - interface IVotingParams { - - /** VotingParams voting_period */ - voting_period?: (google.protobuf.IDuration|null); - } - - /** Represents a VotingParams. */ - class VotingParams implements IVotingParams { - - /** - * Constructs a new VotingParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IVotingParams); - - /** VotingParams voting_period. */ - public voting_period?: (google.protobuf.IDuration|null); - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1.VotingParams.verify|verify} messages. - * @param message VotingParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1.IVotingParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.VotingParams.verify|verify} messages. - * @param message VotingParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1.IVotingParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1.VotingParams; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1.VotingParams; - - /** - * Verifies a VotingParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VotingParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1.VotingParams; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @param message VotingParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1.VotingParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VotingParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TallyParams. */ - interface ITallyParams { - - /** TallyParams quorum */ - quorum?: (string|null); - - /** TallyParams threshold */ - threshold?: (string|null); - - /** TallyParams veto_threshold */ - veto_threshold?: (string|null); - } - - /** Represents a TallyParams. */ - class TallyParams implements ITallyParams { - - /** - * Constructs a new TallyParams. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.ITallyParams); - - /** TallyParams quorum. */ - public quorum: string; - - /** TallyParams threshold. */ - public threshold: string; - - /** TallyParams veto_threshold. */ - public veto_threshold: string; - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1.TallyParams.verify|verify} messages. - * @param message TallyParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.gov.v1.ITallyParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.TallyParams.verify|verify} messages. - * @param message TallyParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.gov.v1.ITallyParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.gov.v1.TallyParams; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.gov.v1.TallyParams; - - /** - * Verifies a TallyParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TallyParams - */ - public static fromObject(object: { [k: string]: any }): cosmos.gov.v1.TallyParams; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @param message TallyParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.gov.v1.TallyParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TallyParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params min_deposit */ - min_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Params max_deposit_period */ - max_deposit_period?: (google.protobuf.IDuration|null); - - /** Params voting_period */ - voting_period?: (google.protobuf.IDuration|null); - - /** Params quorum */ - quorum?: (string|null); - - /** Params threshold */ - threshold?: (string|null); - - /** Params veto_threshold */ - veto_threshold?: (string|null); - - /** Params min_initial_deposit_ratio */ - min_initial_deposit_ratio?: (string|null); - - /** Params burn_vote_quorum */ - burn_vote_quorum?: (boolean|null); - - /** Params burn_proposal_deposit_prevote */ - burn_proposal_deposit_prevote?: (boolean|null); - - /** Params burn_vote_veto */ - burn_vote_veto?: (boolean|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.gov.v1.IParams); - - /** Params min_deposit. */ - public min_deposit: cosmos.base.v1beta1.ICoin[]; - - /** Params max_deposit_period. */ - public max_deposit_period?: (google.protobuf.IDuration|null); - - /** Params voting_period. */ - public voting_period?: (google.protobuf.IDuration|null); - - /** Params quorum. */ - public quorum: string; - - /** Params threshold. */ - public threshold: string; - - /** Params veto_threshold. */ - public veto_threshold: string; - - /** Params min_initial_deposit_ratio. */ - public min_initial_deposit_ratio: string; - - /** Params burn_vote_quorum. */ - public burn_vote_quorum: boolean; - - /** Params burn_proposal_deposit_prevote. */ - public burn_proposal_deposit_prevote: boolean; - - /** Params burn_vote_veto. */ - public burn_vote_veto: boolean; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.gov.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.gov.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.gov.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.gov.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.gov.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.gov.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.gov.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.gov.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace base. */ - namespace base { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** 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.base.v1beta1.ICoin); - - /** Coin denom. */ - public denom: string; - - /** Coin amount. */ - public amount: string; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecCoin); - - /** DecCoin denom. */ - public denom: string; - - /** DecCoin amount. */ - public amount: string; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IIntProto); - - /** IntProto int. */ - public int: string; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecProto); - - /** DecProto dec. */ - public dec: string; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DecProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace query. */ - namespace query { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a PageRequest. */ - interface IPageRequest { - - /** PageRequest key */ - key?: (Uint8Array|null); - - /** PageRequest offset */ - offset?: (Long|null); - - /** PageRequest limit */ - limit?: (Long|null); - - /** PageRequest count_total */ - count_total?: (boolean|null); - - /** PageRequest reverse */ - reverse?: (boolean|null); - } - - /** Represents a PageRequest. */ - class PageRequest implements IPageRequest { - - /** - * Constructs a new PageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.base.query.v1beta1.IPageRequest); - - /** PageRequest key. */ - public key: Uint8Array; - - /** PageRequest offset. */ - public offset: Long; - - /** PageRequest limit. */ - public limit: Long; - - /** PageRequest count_total. */ - public count_total: boolean; - - /** PageRequest reverse. */ - public reverse: boolean; - - /** - * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @param message PageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.base.query.v1beta1.IPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @param message PageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.base.query.v1beta1.IPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.base.query.v1beta1.PageRequest; - - /** - * Decodes a PageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.base.query.v1beta1.PageRequest; - - /** - * Verifies a PageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PageRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.base.query.v1beta1.PageRequest; - - /** - * Creates a plain object from a PageRequest message. Also converts values to other types if specified. - * @param message PageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.base.query.v1beta1.PageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PageResponse. */ - interface IPageResponse { - - /** PageResponse next_key */ - next_key?: (Uint8Array|null); - - /** PageResponse total */ - total?: (Long|null); - } - - /** Represents a PageResponse. */ - class PageResponse implements IPageResponse { - - /** - * Constructs a new PageResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.base.query.v1beta1.IPageResponse); - - /** PageResponse next_key. */ - public next_key: Uint8Array; - - /** PageResponse total. */ - public total: Long; - - /** - * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @param message PageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.base.query.v1beta1.IPageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @param message PageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.base.query.v1beta1.IPageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PageResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.base.query.v1beta1.PageResponse; - - /** - * Decodes a PageResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.base.query.v1beta1.PageResponse; - - /** - * Verifies a PageResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PageResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.base.query.v1beta1.PageResponse; - - /** - * Creates a plain object from a PageResponse message. Also converts values to other types if specified. - * @param message PageResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.base.query.v1beta1.PageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PageResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace upgrade. */ - namespace upgrade { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a Plan. */ - interface IPlan { - - /** Plan name */ - name?: (string|null); - - /** Plan time */ - time?: (google.protobuf.ITimestamp|null); - - /** Plan height */ - height?: (Long|null); - - /** Plan info */ - info?: (string|null); - - /** Plan upgraded_client_state */ - upgraded_client_state?: (google.protobuf.IAny|null); - } - - /** Represents a Plan. */ - class Plan implements IPlan { - - /** - * Constructs a new Plan. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.upgrade.v1beta1.IPlan); - - /** Plan name. */ - public name: string; - - /** Plan time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Plan height. */ - public height: Long; - - /** Plan info. */ - public info: string; - - /** Plan upgraded_client_state. */ - public upgraded_client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.IPlan|null); - } - - /** Represents a SoftwareUpgradeProposal. */ - class SoftwareUpgradeProposal implements ISoftwareUpgradeProposal { - - /** - * Constructs a new SoftwareUpgradeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal); - - /** SoftwareUpgradeProposal title. */ - public title: string; - - /** SoftwareUpgradeProposal description. */ - public description: string; - - /** SoftwareUpgradeProposal plan. */ - public plan?: (cosmos.upgrade.v1beta1.IPlan|null); - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.ISoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.ICancelSoftwareUpgradeProposal); - - /** CancelSoftwareUpgradeProposal title. */ - public title: string; - - /** CancelSoftwareUpgradeProposal description. */ - public description: string; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.ICancelSoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelSoftwareUpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ModuleVersion. */ - interface IModuleVersion { - - /** ModuleVersion name */ - name?: (string|null); - - /** ModuleVersion version */ - version?: (Long|null); - } - - /** Represents a ModuleVersion. */ - class ModuleVersion implements IModuleVersion { - - /** - * Constructs a new ModuleVersion. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.upgrade.v1beta1.IModuleVersion); - - /** ModuleVersion name. */ - public name: string; - - /** ModuleVersion version. */ - public version: Long; - - /** - * Encodes the specified ModuleVersion message. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @param message ModuleVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.upgrade.v1beta1.IModuleVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModuleVersion message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @param message ModuleVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.upgrade.v1beta1.IModuleVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.upgrade.v1beta1.ModuleVersion; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.upgrade.v1beta1.ModuleVersion; - - /** - * Verifies a ModuleVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModuleVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModuleVersion - */ - public static fromObject(object: { [k: string]: any }): cosmos.upgrade.v1beta1.ModuleVersion; - - /** - * Creates a plain object from a ModuleVersion message. Also converts values to other types if specified. - * @param message ModuleVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.upgrade.v1beta1.ModuleVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModuleVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace auth. */ - namespace auth { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a BaseAccount. */ - interface IBaseAccount { - - /** BaseAccount address */ - address?: (string|null); - - /** BaseAccount pub_key */ - pub_key?: (google.protobuf.IAny|null); - - /** BaseAccount account_number */ - account_number?: (Long|null); - - /** BaseAccount sequence */ - sequence?: (Long|null); - } - - /** Represents a BaseAccount. */ - class BaseAccount implements IBaseAccount { - - /** - * Constructs a new BaseAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.auth.v1beta1.IBaseAccount); - - /** BaseAccount address. */ - public address: string; - - /** BaseAccount pub_key. */ - public pub_key?: (google.protobuf.IAny|null); - - /** BaseAccount account_number. */ - public account_number: Long; - - /** BaseAccount sequence. */ - public sequence: Long; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos.auth.v1beta1.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.auth.v1beta1.IBaseAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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 base_account */ - base_account?: (cosmos.auth.v1beta1.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.auth.v1beta1.IModuleAccount); - - /** ModuleAccount base_account. */ - public base_account?: (cosmos.auth.v1beta1.IBaseAccount|null); - - /** ModuleAccount name. */ - public name: string; - - /** ModuleAccount permissions. */ - public permissions: string[]; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos.auth.v1beta1.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.auth.v1beta1.IModuleAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.ModuleAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModuleAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ModuleCredential. */ - interface IModuleCredential { - - /** ModuleCredential module_name */ - module_name?: (string|null); - - /** ModuleCredential derivation_keys */ - derivation_keys?: (Uint8Array[]|null); - } - - /** Represents a ModuleCredential. */ - class ModuleCredential implements IModuleCredential { - - /** - * Constructs a new ModuleCredential. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.auth.v1beta1.IModuleCredential); - - /** ModuleCredential module_name. */ - public module_name: string; - - /** ModuleCredential derivation_keys. */ - public derivation_keys: Uint8Array[]; - - /** - * Encodes the specified ModuleCredential message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleCredential.verify|verify} messages. - * @param message ModuleCredential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.auth.v1beta1.IModuleCredential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModuleCredential message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.ModuleCredential.verify|verify} messages. - * @param message ModuleCredential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.auth.v1beta1.IModuleCredential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModuleCredential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModuleCredential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.auth.v1beta1.ModuleCredential; - - /** - * Decodes a ModuleCredential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModuleCredential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.auth.v1beta1.ModuleCredential; - - /** - * Verifies a ModuleCredential message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModuleCredential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModuleCredential - */ - public static fromObject(object: { [k: string]: any }): cosmos.auth.v1beta1.ModuleCredential; - - /** - * Creates a plain object from a ModuleCredential message. Also converts values to other types if specified. - * @param message ModuleCredential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.auth.v1beta1.ModuleCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModuleCredential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params max_memo_characters */ - max_memo_characters?: (Long|null); - - /** Params tx_sig_limit */ - tx_sig_limit?: (Long|null); - - /** Params tx_size_cost_per_byte */ - tx_size_cost_per_byte?: (Long|null); - - /** Params sig_verify_cost_ed25519 */ - sig_verify_cost_ed25519?: (Long|null); - - /** Params sig_verify_cost_secp256k1 */ - sig_verify_cost_secp256k1?: (Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.auth.v1beta1.IParams); - - /** Params max_memo_characters. */ - public max_memo_characters: Long; - - /** Params tx_sig_limit. */ - public tx_sig_limit: Long; - - /** Params tx_size_cost_per_byte. */ - public tx_size_cost_per_byte: Long; - - /** Params sig_verify_cost_ed25519. */ - public sig_verify_cost_ed25519: Long; - - /** Params sig_verify_cost_secp256k1. */ - public sig_verify_cost_secp256k1: Long; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.auth.v1beta1.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.auth.v1beta1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.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.auth.v1beta1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace ics23. */ - namespace ics23 { - - /** Namespace v1. */ - namespace v1 { - - /** HashOp enum. */ - enum HashOp { - NO_HASH = 0, - SHA256 = 1, - SHA512 = 2, - KECCAK = 3, - RIPEMD160 = 4, - BITCOIN = 5, - SHA512_256 = 6 - } - - /** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - */ - enum LengthOp { - NO_PREFIX = 0, - VAR_PROTO = 1, - VAR_RLP = 2, - FIXED32_BIG = 3, - FIXED32_LITTLE = 4, - FIXED64_BIG = 5, - FIXED64_LITTLE = 6, - REQUIRE_32_BYTES = 7, - REQUIRE_64_BYTES = 8 - } - - /** Properties of an ExistenceProof. */ - interface IExistenceProof { - - /** ExistenceProof key */ - key?: (Uint8Array|null); - - /** ExistenceProof value */ - value?: (Uint8Array|null); - - /** ExistenceProof leaf */ - leaf?: (cosmos.ics23.v1.ILeafOp|null); - - /** ExistenceProof path */ - path?: (cosmos.ics23.v1.IInnerOp[]|null); - } - - /** - * ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - */ - class ExistenceProof implements IExistenceProof { - - /** - * Constructs a new ExistenceProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.IExistenceProof); - - /** ExistenceProof key. */ - public key: Uint8Array; - - /** ExistenceProof value. */ - public value: Uint8Array; - - /** ExistenceProof leaf. */ - public leaf?: (cosmos.ics23.v1.ILeafOp|null); - - /** ExistenceProof path. */ - public path: cosmos.ics23.v1.IInnerOp[]; - - /** - * Encodes the specified ExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.ExistenceProof.verify|verify} messages. - * @param message ExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.IExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.ExistenceProof.verify|verify} messages. - * @param message ExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.IExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExistenceProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.ExistenceProof; - - /** - * Decodes an ExistenceProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.ExistenceProof; - - /** - * Verifies an ExistenceProof message. - * @param message Plain 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 ExistenceProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExistenceProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.ExistenceProof; - - /** - * Creates a plain object from an ExistenceProof message. Also converts values to other types if specified. - * @param message ExistenceProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.ExistenceProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExistenceProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NonExistenceProof. */ - interface INonExistenceProof { - - /** NonExistenceProof key */ - key?: (Uint8Array|null); - - /** NonExistenceProof left */ - left?: (cosmos.ics23.v1.IExistenceProof|null); - - /** NonExistenceProof right */ - right?: (cosmos.ics23.v1.IExistenceProof|null); - } - - /** Represents a NonExistenceProof. */ - class NonExistenceProof implements INonExistenceProof { - - /** - * Constructs a new NonExistenceProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.INonExistenceProof); - - /** NonExistenceProof key. */ - public key: Uint8Array; - - /** NonExistenceProof left. */ - public left?: (cosmos.ics23.v1.IExistenceProof|null); - - /** NonExistenceProof right. */ - public right?: (cosmos.ics23.v1.IExistenceProof|null); - - /** - * Encodes the specified NonExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.NonExistenceProof.verify|verify} messages. - * @param message NonExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.INonExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NonExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.NonExistenceProof.verify|verify} messages. - * @param message NonExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.INonExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NonExistenceProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.NonExistenceProof; - - /** - * Decodes a NonExistenceProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.NonExistenceProof; - - /** - * Verifies a NonExistenceProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NonExistenceProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NonExistenceProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.NonExistenceProof; - - /** - * Creates a plain object from a NonExistenceProof message. Also converts values to other types if specified. - * @param message NonExistenceProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.NonExistenceProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NonExistenceProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitmentProof. */ - interface ICommitmentProof { - - /** CommitmentProof exist */ - exist?: (cosmos.ics23.v1.IExistenceProof|null); - - /** CommitmentProof nonexist */ - nonexist?: (cosmos.ics23.v1.INonExistenceProof|null); - - /** CommitmentProof batch */ - batch?: (cosmos.ics23.v1.IBatchProof|null); - - /** CommitmentProof compressed */ - compressed?: (cosmos.ics23.v1.ICompressedBatchProof|null); - } - - /** Represents a CommitmentProof. */ - class CommitmentProof implements ICommitmentProof { - - /** - * Constructs a new CommitmentProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.ICommitmentProof); - - /** CommitmentProof exist. */ - public exist?: (cosmos.ics23.v1.IExistenceProof|null); - - /** CommitmentProof nonexist. */ - public nonexist?: (cosmos.ics23.v1.INonExistenceProof|null); - - /** CommitmentProof batch. */ - public batch?: (cosmos.ics23.v1.IBatchProof|null); - - /** CommitmentProof compressed. */ - public compressed?: (cosmos.ics23.v1.ICompressedBatchProof|null); - - /** CommitmentProof proof. */ - public proof?: ("exist"|"nonexist"|"batch"|"compressed"); - - /** - * Encodes the specified CommitmentProof message. Does not implicitly {@link cosmos.ics23.v1.CommitmentProof.verify|verify} messages. - * @param message CommitmentProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.ICommitmentProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitmentProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CommitmentProof.verify|verify} messages. - * @param message CommitmentProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.ICommitmentProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitmentProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitmentProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.CommitmentProof; - - /** - * Decodes a CommitmentProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitmentProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.CommitmentProof; - - /** - * Verifies a CommitmentProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitmentProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitmentProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.CommitmentProof; - - /** - * Creates a plain object from a CommitmentProof message. Also converts values to other types if specified. - * @param message CommitmentProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.CommitmentProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitmentProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LeafOp. */ - interface ILeafOp { - - /** LeafOp hash */ - hash?: (cosmos.ics23.v1.HashOp|null); - - /** LeafOp prehash_key */ - prehash_key?: (cosmos.ics23.v1.HashOp|null); - - /** LeafOp prehash_value */ - prehash_value?: (cosmos.ics23.v1.HashOp|null); - - /** LeafOp length */ - length?: (cosmos.ics23.v1.LengthOp|null); - - /** LeafOp prefix */ - prefix?: (Uint8Array|null); - } - - /** - * LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - */ - class LeafOp implements ILeafOp { - - /** - * Constructs a new LeafOp. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.ILeafOp); - - /** LeafOp hash. */ - public hash: cosmos.ics23.v1.HashOp; - - /** LeafOp prehash_key. */ - public prehash_key: cosmos.ics23.v1.HashOp; - - /** LeafOp prehash_value. */ - public prehash_value: cosmos.ics23.v1.HashOp; - - /** LeafOp length. */ - public length: cosmos.ics23.v1.LengthOp; - - /** LeafOp prefix. */ - public prefix: Uint8Array; - - /** - * Encodes the specified LeafOp message. Does not implicitly {@link cosmos.ics23.v1.LeafOp.verify|verify} messages. - * @param message LeafOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.ILeafOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LeafOp message, length delimited. Does not implicitly {@link cosmos.ics23.v1.LeafOp.verify|verify} messages. - * @param message LeafOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.ILeafOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LeafOp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LeafOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.LeafOp; - - /** - * Decodes a LeafOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LeafOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.LeafOp; - - /** - * Verifies a LeafOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LeafOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LeafOp - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.LeafOp; - - /** - * Creates a plain object from a LeafOp message. Also converts values to other types if specified. - * @param message LeafOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.LeafOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LeafOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InnerOp. */ - interface IInnerOp { - - /** InnerOp hash */ - hash?: (cosmos.ics23.v1.HashOp|null); - - /** InnerOp prefix */ - prefix?: (Uint8Array|null); - - /** InnerOp suffix */ - suffix?: (Uint8Array|null); - } - - /** - * InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - */ - class InnerOp implements IInnerOp { - - /** - * Constructs a new InnerOp. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.IInnerOp); - - /** InnerOp hash. */ - public hash: cosmos.ics23.v1.HashOp; - - /** InnerOp prefix. */ - public prefix: Uint8Array; - - /** InnerOp suffix. */ - public suffix: Uint8Array; - - /** - * Encodes the specified InnerOp message. Does not implicitly {@link cosmos.ics23.v1.InnerOp.verify|verify} messages. - * @param message InnerOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.IInnerOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InnerOp message, length delimited. Does not implicitly {@link cosmos.ics23.v1.InnerOp.verify|verify} messages. - * @param message InnerOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.IInnerOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InnerOp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InnerOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.InnerOp; - - /** - * Decodes an InnerOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InnerOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.InnerOp; - - /** - * Verifies an InnerOp message. - * @param message Plain 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 InnerOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InnerOp - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.InnerOp; - - /** - * Creates a plain object from an InnerOp message. Also converts values to other types if specified. - * @param message InnerOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.InnerOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InnerOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProofSpec. */ - interface IProofSpec { - - /** ProofSpec leaf_spec */ - leaf_spec?: (cosmos.ics23.v1.ILeafOp|null); - - /** ProofSpec inner_spec */ - inner_spec?: (cosmos.ics23.v1.IInnerSpec|null); - - /** ProofSpec max_depth */ - max_depth?: (number|null); - - /** ProofSpec min_depth */ - min_depth?: (number|null); - } - - /** - * ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - */ - class ProofSpec implements IProofSpec { - - /** - * Constructs a new ProofSpec. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.IProofSpec); - - /** ProofSpec leaf_spec. */ - public leaf_spec?: (cosmos.ics23.v1.ILeafOp|null); - - /** ProofSpec inner_spec. */ - public inner_spec?: (cosmos.ics23.v1.IInnerSpec|null); - - /** ProofSpec max_depth. */ - public max_depth: number; - - /** ProofSpec min_depth. */ - public min_depth: number; - - /** - * Encodes the specified ProofSpec message. Does not implicitly {@link cosmos.ics23.v1.ProofSpec.verify|verify} messages. - * @param message ProofSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.IProofSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProofSpec message, length delimited. Does not implicitly {@link cosmos.ics23.v1.ProofSpec.verify|verify} messages. - * @param message ProofSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.IProofSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProofSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProofSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.ProofSpec; - - /** - * Decodes a ProofSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProofSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.ProofSpec; - - /** - * Verifies a ProofSpec message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProofSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProofSpec - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.ProofSpec; - - /** - * Creates a plain object from a ProofSpec message. Also converts values to other types if specified. - * @param message ProofSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.ProofSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProofSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InnerSpec. */ - interface IInnerSpec { - - /** InnerSpec child_order */ - child_order?: (number[]|null); - - /** InnerSpec child_size */ - child_size?: (number|null); - - /** InnerSpec min_prefix_length */ - min_prefix_length?: (number|null); - - /** InnerSpec max_prefix_length */ - max_prefix_length?: (number|null); - - /** InnerSpec empty_child */ - empty_child?: (Uint8Array|null); - - /** InnerSpec hash */ - hash?: (cosmos.ics23.v1.HashOp|null); - } - - /** Represents an InnerSpec. */ - class InnerSpec implements IInnerSpec { - - /** - * Constructs a new InnerSpec. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.IInnerSpec); - - /** InnerSpec child_order. */ - public child_order: number[]; - - /** InnerSpec child_size. */ - public child_size: number; - - /** InnerSpec min_prefix_length. */ - public min_prefix_length: number; - - /** InnerSpec max_prefix_length. */ - public max_prefix_length: number; - - /** InnerSpec empty_child. */ - public empty_child: Uint8Array; - - /** InnerSpec hash. */ - public hash: cosmos.ics23.v1.HashOp; - - /** - * Encodes the specified InnerSpec message. Does not implicitly {@link cosmos.ics23.v1.InnerSpec.verify|verify} messages. - * @param message InnerSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.IInnerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InnerSpec message, length delimited. Does not implicitly {@link cosmos.ics23.v1.InnerSpec.verify|verify} messages. - * @param message InnerSpec message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.IInnerSpec, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InnerSpec message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InnerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.InnerSpec; - - /** - * Decodes an InnerSpec message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InnerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.InnerSpec; - - /** - * Verifies an InnerSpec message. - * @param message Plain 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 InnerSpec message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InnerSpec - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.InnerSpec; - - /** - * Creates a plain object from an InnerSpec message. Also converts values to other types if specified. - * @param message InnerSpec - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.InnerSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InnerSpec to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BatchProof. */ - interface IBatchProof { - - /** BatchProof entries */ - entries?: (cosmos.ics23.v1.IBatchEntry[]|null); - } - - /** Represents a BatchProof. */ - class BatchProof implements IBatchProof { - - /** - * Constructs a new BatchProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.IBatchProof); - - /** BatchProof entries. */ - public entries: cosmos.ics23.v1.IBatchEntry[]; - - /** - * Encodes the specified BatchProof message. Does not implicitly {@link cosmos.ics23.v1.BatchProof.verify|verify} messages. - * @param message BatchProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.IBatchProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.BatchProof.verify|verify} messages. - * @param message BatchProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.IBatchProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.BatchProof; - - /** - * Decodes a BatchProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.BatchProof; - - /** - * Verifies a BatchProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.BatchProof; - - /** - * Creates a plain object from a BatchProof message. Also converts values to other types if specified. - * @param message BatchProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.BatchProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BatchEntry. */ - interface IBatchEntry { - - /** BatchEntry exist */ - exist?: (cosmos.ics23.v1.IExistenceProof|null); - - /** BatchEntry nonexist */ - nonexist?: (cosmos.ics23.v1.INonExistenceProof|null); - } - - /** Represents a BatchEntry. */ - class BatchEntry implements IBatchEntry { - - /** - * Constructs a new BatchEntry. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.IBatchEntry); - - /** BatchEntry exist. */ - public exist?: (cosmos.ics23.v1.IExistenceProof|null); - - /** BatchEntry nonexist. */ - public nonexist?: (cosmos.ics23.v1.INonExistenceProof|null); - - /** BatchEntry proof. */ - public proof?: ("exist"|"nonexist"); - - /** - * Encodes the specified BatchEntry message. Does not implicitly {@link cosmos.ics23.v1.BatchEntry.verify|verify} messages. - * @param message BatchEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.IBatchEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BatchEntry message, length delimited. Does not implicitly {@link cosmos.ics23.v1.BatchEntry.verify|verify} messages. - * @param message BatchEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.IBatchEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BatchEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.BatchEntry; - - /** - * Decodes a BatchEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.BatchEntry; - - /** - * Verifies a BatchEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BatchEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BatchEntry - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.BatchEntry; - - /** - * Creates a plain object from a BatchEntry message. Also converts values to other types if specified. - * @param message BatchEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.BatchEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BatchEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CompressedBatchProof. */ - interface ICompressedBatchProof { - - /** CompressedBatchProof entries */ - entries?: (cosmos.ics23.v1.ICompressedBatchEntry[]|null); - - /** CompressedBatchProof lookup_inners */ - lookup_inners?: (cosmos.ics23.v1.IInnerOp[]|null); - } - - /** Represents a CompressedBatchProof. */ - class CompressedBatchProof implements ICompressedBatchProof { - - /** - * Constructs a new CompressedBatchProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.ICompressedBatchProof); - - /** CompressedBatchProof entries. */ - public entries: cosmos.ics23.v1.ICompressedBatchEntry[]; - - /** CompressedBatchProof lookup_inners. */ - public lookup_inners: cosmos.ics23.v1.IInnerOp[]; - - /** - * Encodes the specified CompressedBatchProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchProof.verify|verify} messages. - * @param message CompressedBatchProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.ICompressedBatchProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompressedBatchProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchProof.verify|verify} messages. - * @param message CompressedBatchProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.ICompressedBatchProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompressedBatchProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompressedBatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.CompressedBatchProof; - - /** - * Decodes a CompressedBatchProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompressedBatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.CompressedBatchProof; - - /** - * Verifies a CompressedBatchProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompressedBatchProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompressedBatchProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.CompressedBatchProof; - - /** - * Creates a plain object from a CompressedBatchProof message. Also converts values to other types if specified. - * @param message CompressedBatchProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.CompressedBatchProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompressedBatchProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CompressedBatchEntry. */ - interface ICompressedBatchEntry { - - /** CompressedBatchEntry exist */ - exist?: (cosmos.ics23.v1.ICompressedExistenceProof|null); - - /** CompressedBatchEntry nonexist */ - nonexist?: (cosmos.ics23.v1.ICompressedNonExistenceProof|null); - } - - /** Represents a CompressedBatchEntry. */ - class CompressedBatchEntry implements ICompressedBatchEntry { - - /** - * Constructs a new CompressedBatchEntry. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.ICompressedBatchEntry); - - /** CompressedBatchEntry exist. */ - public exist?: (cosmos.ics23.v1.ICompressedExistenceProof|null); - - /** CompressedBatchEntry nonexist. */ - public nonexist?: (cosmos.ics23.v1.ICompressedNonExistenceProof|null); - - /** CompressedBatchEntry proof. */ - public proof?: ("exist"|"nonexist"); - - /** - * Encodes the specified CompressedBatchEntry message. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchEntry.verify|verify} messages. - * @param message CompressedBatchEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.ICompressedBatchEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompressedBatchEntry message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchEntry.verify|verify} messages. - * @param message CompressedBatchEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.ICompressedBatchEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompressedBatchEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompressedBatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.CompressedBatchEntry; - - /** - * Decodes a CompressedBatchEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompressedBatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.CompressedBatchEntry; - - /** - * Verifies a CompressedBatchEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompressedBatchEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompressedBatchEntry - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.CompressedBatchEntry; - - /** - * Creates a plain object from a CompressedBatchEntry message. Also converts values to other types if specified. - * @param message CompressedBatchEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.CompressedBatchEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompressedBatchEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CompressedExistenceProof. */ - interface ICompressedExistenceProof { - - /** CompressedExistenceProof key */ - key?: (Uint8Array|null); - - /** CompressedExistenceProof value */ - value?: (Uint8Array|null); - - /** CompressedExistenceProof leaf */ - leaf?: (cosmos.ics23.v1.ILeafOp|null); - - /** CompressedExistenceProof path */ - path?: (number[]|null); - } - - /** Represents a CompressedExistenceProof. */ - class CompressedExistenceProof implements ICompressedExistenceProof { - - /** - * Constructs a new CompressedExistenceProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.ICompressedExistenceProof); - - /** CompressedExistenceProof key. */ - public key: Uint8Array; - - /** CompressedExistenceProof value. */ - public value: Uint8Array; - - /** CompressedExistenceProof leaf. */ - public leaf?: (cosmos.ics23.v1.ILeafOp|null); - - /** CompressedExistenceProof path. */ - public path: number[]; - - /** - * Encodes the specified CompressedExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedExistenceProof.verify|verify} messages. - * @param message CompressedExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.ICompressedExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompressedExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedExistenceProof.verify|verify} messages. - * @param message CompressedExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.ICompressedExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompressedExistenceProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompressedExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.CompressedExistenceProof; - - /** - * Decodes a CompressedExistenceProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompressedExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.CompressedExistenceProof; - - /** - * Verifies a CompressedExistenceProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompressedExistenceProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompressedExistenceProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.CompressedExistenceProof; - - /** - * Creates a plain object from a CompressedExistenceProof message. Also converts values to other types if specified. - * @param message CompressedExistenceProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.CompressedExistenceProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompressedExistenceProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CompressedNonExistenceProof. */ - interface ICompressedNonExistenceProof { - - /** CompressedNonExistenceProof key */ - key?: (Uint8Array|null); - - /** CompressedNonExistenceProof left */ - left?: (cosmos.ics23.v1.ICompressedExistenceProof|null); - - /** CompressedNonExistenceProof right */ - right?: (cosmos.ics23.v1.ICompressedExistenceProof|null); - } - - /** Represents a CompressedNonExistenceProof. */ - class CompressedNonExistenceProof implements ICompressedNonExistenceProof { - - /** - * Constructs a new CompressedNonExistenceProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.ics23.v1.ICompressedNonExistenceProof); - - /** CompressedNonExistenceProof key. */ - public key: Uint8Array; - - /** CompressedNonExistenceProof left. */ - public left?: (cosmos.ics23.v1.ICompressedExistenceProof|null); - - /** CompressedNonExistenceProof right. */ - public right?: (cosmos.ics23.v1.ICompressedExistenceProof|null); - - /** - * Encodes the specified CompressedNonExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedNonExistenceProof.verify|verify} messages. - * @param message CompressedNonExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.ics23.v1.ICompressedNonExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompressedNonExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedNonExistenceProof.verify|verify} messages. - * @param message CompressedNonExistenceProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.ics23.v1.ICompressedNonExistenceProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CompressedNonExistenceProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CompressedNonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.ics23.v1.CompressedNonExistenceProof; - - /** - * Decodes a CompressedNonExistenceProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CompressedNonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.ics23.v1.CompressedNonExistenceProof; - - /** - * Verifies a CompressedNonExistenceProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompressedNonExistenceProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompressedNonExistenceProof - */ - public static fromObject(object: { [k: string]: any }): cosmos.ics23.v1.CompressedNonExistenceProof; - - /** - * Creates a plain object from a CompressedNonExistenceProof message. Also converts values to other types if specified. - * @param message CompressedNonExistenceProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.ics23.v1.CompressedNonExistenceProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompressedNonExistenceProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } -} - -/** Namespace cosmos_proto. */ -export namespace cosmos_proto { - - /** Properties of an InterfaceDescriptor. */ - interface IInterfaceDescriptor { - - /** InterfaceDescriptor name */ - name?: (string|null); - - /** InterfaceDescriptor description */ - description?: (string|null); - } - - /** Represents an InterfaceDescriptor. */ - class InterfaceDescriptor implements IInterfaceDescriptor { - - /** - * Constructs a new InterfaceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IInterfaceDescriptor); - - /** InterfaceDescriptor name. */ - public name: string; - - /** InterfaceDescriptor description. */ - public description: string; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.InterfaceDescriptor; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.InterfaceDescriptor; - - /** - * Verifies an InterfaceDescriptor message. - * @param message Plain 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 InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterfaceDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.InterfaceDescriptor; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @param message InterfaceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.InterfaceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ScalarDescriptor. */ - interface IScalarDescriptor { - - /** ScalarDescriptor name */ - name?: (string|null); - - /** ScalarDescriptor description */ - description?: (string|null); - - /** ScalarDescriptor field_type */ - field_type?: (cosmos_proto.ScalarType[]|null); - } - - /** Represents a ScalarDescriptor. */ - class ScalarDescriptor implements IScalarDescriptor { - - /** - * Constructs a new ScalarDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IScalarDescriptor); - - /** ScalarDescriptor name. */ - public name: string; - - /** ScalarDescriptor description. */ - public description: string; - - /** ScalarDescriptor field_type. */ - public field_type: cosmos_proto.ScalarType[]; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.ScalarDescriptor; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.ScalarDescriptor; - - /** - * Verifies a ScalarDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScalarDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.ScalarDescriptor; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @param message ScalarDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.ScalarDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScalarDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** ScalarType enum. */ - enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0, - SCALAR_TYPE_STRING = 1, - SCALAR_TYPE_BYTES = 2 - } -} - -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** 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[]; - - /** - * 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 public_dependency */ - public_dependency?: (number[]|null); - - /** FileDescriptorProto weak_dependency */ - weak_dependency?: (number[]|null); - - /** FileDescriptorProto message_type */ - message_type?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enum_type */ - enum_type?: (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 source_code_info */ - source_code_info?: (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 public_dependency. */ - public public_dependency: number[]; - - /** FileDescriptorProto weak_dependency. */ - public weak_dependency: number[]; - - /** FileDescriptorProto message_type. */ - public message_type: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enum_type. */ - public enum_type: 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 source_code_info. */ - public source_code_info?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * 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 nested_type */ - nested_type?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enum_type */ - enum_type?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extension_range */ - extension_range?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneof_decl */ - oneof_decl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range */ - reserved_range?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reserved_name */ - reserved_name?: (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 nested_type. */ - public nested_type: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enum_type. */ - public enum_type: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extension_range. */ - public extension_range: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneof_decl. */ - public oneof_decl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range. */ - public reserved_range: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reserved_name. */ - public reserved_name: string[]; - - /** - * 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; - - /** - * 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; - - /** - * 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 type_name */ - type_name?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto default_value */ - default_value?: (string|null); - - /** FieldDescriptorProto oneof_index */ - oneof_index?: (number|null); - - /** FieldDescriptorProto json_name */ - json_name?: (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 type_name. */ - public type_name: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto default_value. */ - public default_value: string; - - /** FieldDescriptorProto oneof_index. */ - public oneof_index: number; - - /** FieldDescriptorProto json_name. */ - public json_name: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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 input_type */ - input_type?: (string|null); - - /** MethodDescriptorProto output_type */ - output_type?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming */ - client_streaming?: (boolean|null); - - /** MethodDescriptorProto server_streaming */ - server_streaming?: (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 input_type. */ - public input_type: string; - - /** MethodDescriptorProto output_type. */ - public output_type: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming. */ - public client_streaming: boolean; - - /** MethodDescriptorProto server_streaming. */ - public server_streaming: boolean; - - /** - * 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 java_package */ - java_package?: (string|null); - - /** FileOptions java_outer_classname */ - java_outer_classname?: (string|null); - - /** FileOptions java_multiple_files */ - java_multiple_files?: (boolean|null); - - /** FileOptions java_generate_equals_and_hash */ - java_generate_equals_and_hash?: (boolean|null); - - /** FileOptions java_string_check_utf8 */ - java_string_check_utf8?: (boolean|null); - - /** FileOptions optimize_for */ - optimize_for?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions go_package */ - go_package?: (string|null); - - /** FileOptions cc_generic_services */ - cc_generic_services?: (boolean|null); - - /** FileOptions java_generic_services */ - java_generic_services?: (boolean|null); - - /** FileOptions py_generic_services */ - py_generic_services?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions cc_enable_arenas */ - cc_enable_arenas?: (boolean|null); - - /** FileOptions objc_class_prefix */ - objc_class_prefix?: (string|null); - - /** FileOptions csharp_namespace */ - csharp_namespace?: (string|null); - - /** FileOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .gogoproto.goproto_getters_all */ - ".gogoproto.goproto_getters_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_prefix_all */ - ".gogoproto.goproto_enum_prefix_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_stringer_all */ - ".gogoproto.goproto_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.verbose_equal_all */ - ".gogoproto.verbose_equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.face_all */ - ".gogoproto.face_all"?: (boolean|null); - - /** FileOptions .gogoproto.gostring_all */ - ".gogoproto.gostring_all"?: (boolean|null); - - /** FileOptions .gogoproto.populate_all */ - ".gogoproto.populate_all"?: (boolean|null); - - /** FileOptions .gogoproto.stringer_all */ - ".gogoproto.stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.onlyone_all */ - ".gogoproto.onlyone_all"?: (boolean|null); - - /** FileOptions .gogoproto.equal_all */ - ".gogoproto.equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.description_all */ - ".gogoproto.description_all"?: (boolean|null); - - /** FileOptions .gogoproto.testgen_all */ - ".gogoproto.testgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.benchgen_all */ - ".gogoproto.benchgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.marshaler_all */ - ".gogoproto.marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unmarshaler_all */ - ".gogoproto.unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.stable_marshaler_all */ - ".gogoproto.stable_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.sizer_all */ - ".gogoproto.sizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_stringer_all */ - ".gogoproto.goproto_enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.enum_stringer_all */ - ".gogoproto.enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_marshaler_all */ - ".gogoproto.unsafe_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_unmarshaler_all */ - ".gogoproto.unsafe_unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_extensions_map_all */ - ".gogoproto.goproto_extensions_map_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unrecognized_all */ - ".gogoproto.goproto_unrecognized_all"?: (boolean|null); - - /** FileOptions .gogoproto.gogoproto_import */ - ".gogoproto.gogoproto_import"?: (boolean|null); - - /** FileOptions .gogoproto.protosizer_all */ - ".gogoproto.protosizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.compare_all */ - ".gogoproto.compare_all"?: (boolean|null); - - /** FileOptions .gogoproto.typedecl_all */ - ".gogoproto.typedecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.enumdecl_all */ - ".gogoproto.enumdecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_registration */ - ".gogoproto.goproto_registration"?: (boolean|null); - - /** FileOptions .gogoproto.messagename_all */ - ".gogoproto.messagename_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_sizecache_all */ - ".gogoproto.goproto_sizecache_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unkeyed_all */ - ".gogoproto.goproto_unkeyed_all"?: (boolean|null); - - /** FileOptions .cosmos_proto.declare_interface */ - ".cosmos_proto.declare_interface"?: (cosmos_proto.IInterfaceDescriptor[]|null); - - /** FileOptions .cosmos_proto.declare_scalar */ - ".cosmos_proto.declare_scalar"?: (cosmos_proto.IScalarDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions java_package. */ - public java_package: string; - - /** FileOptions java_outer_classname. */ - public java_outer_classname: string; - - /** FileOptions java_multiple_files. */ - public java_multiple_files: boolean; - - /** FileOptions java_generate_equals_and_hash. */ - public java_generate_equals_and_hash: boolean; - - /** FileOptions java_string_check_utf8. */ - public java_string_check_utf8: boolean; - - /** FileOptions optimize_for. */ - public optimize_for: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions go_package. */ - public go_package: string; - - /** FileOptions cc_generic_services. */ - public cc_generic_services: boolean; - - /** FileOptions java_generic_services. */ - public java_generic_services: boolean; - - /** FileOptions py_generic_services. */ - public py_generic_services: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions cc_enable_arenas. */ - public cc_enable_arenas: boolean; - - /** FileOptions objc_class_prefix. */ - public objc_class_prefix: string; - - /** FileOptions csharp_namespace. */ - public csharp_namespace: string; - - /** FileOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 message_set_wire_format */ - message_set_wire_format?: (boolean|null); - - /** MessageOptions no_standard_descriptor_accessor */ - no_standard_descriptor_accessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions map_entry */ - map_entry?: (boolean|null); - - /** MessageOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .gogoproto.goproto_getters */ - ".gogoproto.goproto_getters"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_stringer */ - ".gogoproto.goproto_stringer"?: (boolean|null); - - /** MessageOptions .gogoproto.verbose_equal */ - ".gogoproto.verbose_equal"?: (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.stable_marshaler */ - ".gogoproto.stable_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.sizer */ - ".gogoproto.sizer"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_marshaler */ - ".gogoproto.unsafe_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_unmarshaler */ - ".gogoproto.unsafe_unmarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_extensions_map */ - ".gogoproto.goproto_extensions_map"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unrecognized */ - ".gogoproto.goproto_unrecognized"?: (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.goproto_sizecache */ - ".gogoproto.goproto_sizecache"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unkeyed */ - ".gogoproto.goproto_unkeyed"?: (boolean|null); - - /** MessageOptions .cosmos_proto.implements_interface */ - ".cosmos_proto.implements_interface"?: (string[]|null); - - /** MessageOptions .amino.name */ - ".amino.name"?: (string|null); - - /** MessageOptions .amino.message_encoding */ - ".amino.message_encoding"?: (string|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions message_set_wire_format. */ - public message_set_wire_format: boolean; - - /** MessageOptions no_standard_descriptor_accessor. */ - public no_standard_descriptor_accessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions map_entry. */ - public map_entry: boolean; - - /** MessageOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|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); - - /** FieldOptions .cosmos_proto.accepts_interface */ - ".cosmos_proto.accepts_interface"?: (string|null); - - /** FieldOptions .cosmos_proto.scalar */ - ".cosmos_proto.scalar"?: (string|null); - - /** FieldOptions .amino.encoding */ - ".amino.encoding"?: (string|null); - - /** FieldOptions .amino.field_name */ - ".amino.field_name"?: (string|null); - - /** FieldOptions .amino.dont_omitempty */ - ".amino.dont_omitempty"?: (boolean|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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 allow_alias */ - allow_alias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumOptions .gogoproto.goproto_enum_prefix */ - ".gogoproto.goproto_enum_prefix"?: (boolean|null); - - /** EnumOptions .gogoproto.goproto_enum_stringer */ - ".gogoproto.goproto_enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_stringer */ - ".gogoproto.enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_customname */ - ".gogoproto.enum_customname"?: (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 allow_alias. */ - public allow_alias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumValueOptions .gogoproto.enumvalue_customname */ - ".gogoproto.enumvalue_customname"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 identifier_value */ - identifier_value?: (string|null); - - /** UninterpretedOption positive_int_value */ - positive_int_value?: (Long|null); - - /** UninterpretedOption negative_int_value */ - negative_int_value?: (Long|null); - - /** UninterpretedOption double_value */ - double_value?: (number|null); - - /** UninterpretedOption string_value */ - string_value?: (Uint8Array|null); - - /** UninterpretedOption aggregate_value */ - aggregate_value?: (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 identifier_value. */ - public identifier_value: string; - - /** UninterpretedOption positive_int_value. */ - public positive_int_value: Long; - - /** UninterpretedOption negative_int_value. */ - public negative_int_value: Long; - - /** UninterpretedOption double_value. */ - public double_value: number; - - /** UninterpretedOption string_value. */ - public string_value: Uint8Array; - - /** UninterpretedOption aggregate_value. */ - public aggregate_value: string; - - /** - * 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 name_part */ - name_part: string; - - /** NamePart is_extension */ - is_extension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart name_part. */ - public name_part: string; - - /** NamePart is_extension. */ - public is_extension: boolean; - - /** - * 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[]; - - /** - * 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 leading_comments */ - leading_comments?: (string|null); - - /** Location trailing_comments */ - trailing_comments?: (string|null); - - /** Location leading_detached_comments */ - leading_detached_comments?: (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 leading_comments. */ - public leading_comments: string; - - /** Location trailing_comments. */ - public trailing_comments: string; - - /** Location leading_detached_comments. */ - public leading_detached_comments: string[]; - - /** - * 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[]; - - /** - * 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 source_file */ - source_file?: (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 source_file. */ - public source_file: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * 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 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; - - /** - * 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 Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (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: Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * 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?: (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: Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * 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 }; - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fully_decode_reserved_expansion */ - fully_decode_reserved_expansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fully_decode_reserved_expansion. */ - public fully_decode_reserved_expansion: boolean; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is 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.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the 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.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule response_body */ - response_body?: (string|null); - - /** HttpRule additional_bindings */ - additional_bindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule response_body. */ - public response_body: string; - - /** HttpRule additional_bindings. */ - public additional_bindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is 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.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the 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.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is 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.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the 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.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} - -/** Namespace ibc. */ -export namespace ibc { - - /** Namespace applications. */ - namespace applications { - - /** Namespace fee. */ - namespace fee { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls RegisterPayee. - * @param request MsgRegisterPayee message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRegisterPayeeResponse - */ - public registerPayee(request: ibc.applications.fee.v1.IMsgRegisterPayee, callback: ibc.applications.fee.v1.Msg.RegisterPayeeCallback): void; - - /** - * Calls RegisterPayee. - * @param request MsgRegisterPayee message or plain object - * @returns Promise - */ - public registerPayee(request: ibc.applications.fee.v1.IMsgRegisterPayee): Promise; - - /** - * Calls RegisterCounterpartyPayee. - * @param request MsgRegisterCounterpartyPayee message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRegisterCounterpartyPayeeResponse - */ - public registerCounterpartyPayee(request: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee, callback: ibc.applications.fee.v1.Msg.RegisterCounterpartyPayeeCallback): void; - - /** - * Calls RegisterCounterpartyPayee. - * @param request MsgRegisterCounterpartyPayee message or plain object - * @returns Promise - */ - public registerCounterpartyPayee(request: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee): Promise; - - /** - * Calls PayPacketFee. - * @param request MsgPayPacketFee message or plain object - * @param callback Node-style callback called with the error, if any, and MsgPayPacketFeeResponse - */ - public payPacketFee(request: ibc.applications.fee.v1.IMsgPayPacketFee, callback: ibc.applications.fee.v1.Msg.PayPacketFeeCallback): void; - - /** - * Calls PayPacketFee. - * @param request MsgPayPacketFee message or plain object - * @returns Promise - */ - public payPacketFee(request: ibc.applications.fee.v1.IMsgPayPacketFee): Promise; - - /** - * Calls PayPacketFeeAsync. - * @param request MsgPayPacketFeeAsync message or plain object - * @param callback Node-style callback called with the error, if any, and MsgPayPacketFeeAsyncResponse - */ - public payPacketFeeAsync(request: ibc.applications.fee.v1.IMsgPayPacketFeeAsync, callback: ibc.applications.fee.v1.Msg.PayPacketFeeAsyncCallback): void; - - /** - * Calls PayPacketFeeAsync. - * @param request MsgPayPacketFeeAsync message or plain object - * @returns Promise - */ - public payPacketFeeAsync(request: ibc.applications.fee.v1.IMsgPayPacketFeeAsync): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#registerPayee}. - * @param error Error, if any - * @param [response] MsgRegisterPayeeResponse - */ - type RegisterPayeeCallback = (error: (Error|null), response?: ibc.applications.fee.v1.MsgRegisterPayeeResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#registerCounterpartyPayee}. - * @param error Error, if any - * @param [response] MsgRegisterCounterpartyPayeeResponse - */ - type RegisterCounterpartyPayeeCallback = (error: (Error|null), response?: ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#payPacketFee}. - * @param error Error, if any - * @param [response] MsgPayPacketFeeResponse - */ - type PayPacketFeeCallback = (error: (Error|null), response?: ibc.applications.fee.v1.MsgPayPacketFeeResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#payPacketFeeAsync}. - * @param error Error, if any - * @param [response] MsgPayPacketFeeAsyncResponse - */ - type PayPacketFeeAsyncCallback = (error: (Error|null), response?: ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse) => void; - } - - /** Properties of a MsgRegisterPayee. */ - interface IMsgRegisterPayee { - - /** MsgRegisterPayee port_id */ - port_id?: (string|null); - - /** MsgRegisterPayee channel_id */ - channel_id?: (string|null); - - /** MsgRegisterPayee relayer */ - relayer?: (string|null); - - /** MsgRegisterPayee payee */ - payee?: (string|null); - } - - /** Represents a MsgRegisterPayee. */ - class MsgRegisterPayee implements IMsgRegisterPayee { - - /** - * Constructs a new MsgRegisterPayee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgRegisterPayee); - - /** MsgRegisterPayee port_id. */ - public port_id: string; - - /** MsgRegisterPayee channel_id. */ - public channel_id: string; - - /** MsgRegisterPayee relayer. */ - public relayer: string; - - /** MsgRegisterPayee payee. */ - public payee: string; - - /** - * Encodes the specified MsgRegisterPayee message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayee.verify|verify} messages. - * @param message MsgRegisterPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgRegisterPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayee.verify|verify} messages. - * @param message MsgRegisterPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgRegisterPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterPayee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgRegisterPayee; - - /** - * Decodes a MsgRegisterPayee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgRegisterPayee; - - /** - * Verifies a MsgRegisterPayee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterPayee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterPayee - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgRegisterPayee; - - /** - * Creates a plain object from a MsgRegisterPayee message. Also converts values to other types if specified. - * @param message MsgRegisterPayee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgRegisterPayee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterPayee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRegisterPayeeResponse. */ - interface IMsgRegisterPayeeResponse { - } - - /** Represents a MsgRegisterPayeeResponse. */ - class MsgRegisterPayeeResponse implements IMsgRegisterPayeeResponse { - - /** - * Constructs a new MsgRegisterPayeeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgRegisterPayeeResponse); - - /** - * Encodes the specified MsgRegisterPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayeeResponse.verify|verify} messages. - * @param message MsgRegisterPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgRegisterPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayeeResponse.verify|verify} messages. - * @param message MsgRegisterPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgRegisterPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterPayeeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgRegisterPayeeResponse; - - /** - * Decodes a MsgRegisterPayeeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgRegisterPayeeResponse; - - /** - * Verifies a MsgRegisterPayeeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterPayeeResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgRegisterPayeeResponse; - - /** - * Creates a plain object from a MsgRegisterPayeeResponse message. Also converts values to other types if specified. - * @param message MsgRegisterPayeeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgRegisterPayeeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterPayeeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRegisterCounterpartyPayee. */ - interface IMsgRegisterCounterpartyPayee { - - /** MsgRegisterCounterpartyPayee port_id */ - port_id?: (string|null); - - /** MsgRegisterCounterpartyPayee channel_id */ - channel_id?: (string|null); - - /** MsgRegisterCounterpartyPayee relayer */ - relayer?: (string|null); - - /** MsgRegisterCounterpartyPayee counterparty_payee */ - counterparty_payee?: (string|null); - } - - /** Represents a MsgRegisterCounterpartyPayee. */ - class MsgRegisterCounterpartyPayee implements IMsgRegisterCounterpartyPayee { - - /** - * Constructs a new MsgRegisterCounterpartyPayee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee); - - /** MsgRegisterCounterpartyPayee port_id. */ - public port_id: string; - - /** MsgRegisterCounterpartyPayee channel_id. */ - public channel_id: string; - - /** MsgRegisterCounterpartyPayee relayer. */ - public relayer: string; - - /** MsgRegisterCounterpartyPayee counterparty_payee. */ - public counterparty_payee: string; - - /** - * Encodes the specified MsgRegisterCounterpartyPayee message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.verify|verify} messages. - * @param message MsgRegisterCounterpartyPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterCounterpartyPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.verify|verify} messages. - * @param message MsgRegisterCounterpartyPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterCounterpartyPayee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgRegisterCounterpartyPayee; - - /** - * Decodes a MsgRegisterCounterpartyPayee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgRegisterCounterpartyPayee; - - /** - * Verifies a MsgRegisterCounterpartyPayee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterCounterpartyPayee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterCounterpartyPayee - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgRegisterCounterpartyPayee; - - /** - * Creates a plain object from a MsgRegisterCounterpartyPayee message. Also converts values to other types if specified. - * @param message MsgRegisterCounterpartyPayee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgRegisterCounterpartyPayee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterCounterpartyPayee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRegisterCounterpartyPayeeResponse. */ - interface IMsgRegisterCounterpartyPayeeResponse { - } - - /** Represents a MsgRegisterCounterpartyPayeeResponse. */ - class MsgRegisterCounterpartyPayeeResponse implements IMsgRegisterCounterpartyPayeeResponse { - - /** - * Constructs a new MsgRegisterCounterpartyPayeeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse); - - /** - * Encodes the specified MsgRegisterCounterpartyPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.verify|verify} messages. - * @param message MsgRegisterCounterpartyPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterCounterpartyPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.verify|verify} messages. - * @param message MsgRegisterCounterpartyPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterCounterpartyPayeeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse; - - /** - * Decodes a MsgRegisterCounterpartyPayeeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse; - - /** - * Verifies a MsgRegisterCounterpartyPayeeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterCounterpartyPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterCounterpartyPayeeResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse; - - /** - * Creates a plain object from a MsgRegisterCounterpartyPayeeResponse message. Also converts values to other types if specified. - * @param message MsgRegisterCounterpartyPayeeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterCounterpartyPayeeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgPayPacketFee. */ - interface IMsgPayPacketFee { - - /** MsgPayPacketFee fee */ - fee?: (ibc.applications.fee.v1.IFee|null); - - /** MsgPayPacketFee source_port_id */ - source_port_id?: (string|null); - - /** MsgPayPacketFee source_channel_id */ - source_channel_id?: (string|null); - - /** MsgPayPacketFee signer */ - signer?: (string|null); - - /** MsgPayPacketFee relayers */ - relayers?: (string[]|null); - } - - /** Represents a MsgPayPacketFee. */ - class MsgPayPacketFee implements IMsgPayPacketFee { - - /** - * Constructs a new MsgPayPacketFee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgPayPacketFee); - - /** MsgPayPacketFee fee. */ - public fee?: (ibc.applications.fee.v1.IFee|null); - - /** MsgPayPacketFee source_port_id. */ - public source_port_id: string; - - /** MsgPayPacketFee source_channel_id. */ - public source_channel_id: string; - - /** MsgPayPacketFee signer. */ - public signer: string; - - /** MsgPayPacketFee relayers. */ - public relayers: string[]; - - /** - * Encodes the specified MsgPayPacketFee message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFee.verify|verify} messages. - * @param message MsgPayPacketFee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgPayPacketFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgPayPacketFee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFee.verify|verify} messages. - * @param message MsgPayPacketFee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgPayPacketFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgPayPacketFee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgPayPacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgPayPacketFee; - - /** - * Decodes a MsgPayPacketFee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgPayPacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgPayPacketFee; - - /** - * Verifies a MsgPayPacketFee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgPayPacketFee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgPayPacketFee - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgPayPacketFee; - - /** - * Creates a plain object from a MsgPayPacketFee message. Also converts values to other types if specified. - * @param message MsgPayPacketFee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgPayPacketFee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgPayPacketFee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgPayPacketFeeResponse. */ - interface IMsgPayPacketFeeResponse { - } - - /** Represents a MsgPayPacketFeeResponse. */ - class MsgPayPacketFeeResponse implements IMsgPayPacketFeeResponse { - - /** - * Constructs a new MsgPayPacketFeeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgPayPacketFeeResponse); - - /** - * Encodes the specified MsgPayPacketFeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeResponse.verify|verify} messages. - * @param message MsgPayPacketFeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgPayPacketFeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgPayPacketFeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeResponse.verify|verify} messages. - * @param message MsgPayPacketFeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgPayPacketFeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgPayPacketFeeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgPayPacketFeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgPayPacketFeeResponse; - - /** - * Decodes a MsgPayPacketFeeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgPayPacketFeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgPayPacketFeeResponse; - - /** - * Verifies a MsgPayPacketFeeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgPayPacketFeeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgPayPacketFeeResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgPayPacketFeeResponse; - - /** - * Creates a plain object from a MsgPayPacketFeeResponse message. Also converts values to other types if specified. - * @param message MsgPayPacketFeeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgPayPacketFeeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgPayPacketFeeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgPayPacketFeeAsync. */ - interface IMsgPayPacketFeeAsync { - - /** MsgPayPacketFeeAsync packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** MsgPayPacketFeeAsync packet_fee */ - packet_fee?: (ibc.applications.fee.v1.IPacketFee|null); - } - - /** Represents a MsgPayPacketFeeAsync. */ - class MsgPayPacketFeeAsync implements IMsgPayPacketFeeAsync { - - /** - * Constructs a new MsgPayPacketFeeAsync. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgPayPacketFeeAsync); - - /** MsgPayPacketFeeAsync packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** MsgPayPacketFeeAsync packet_fee. */ - public packet_fee?: (ibc.applications.fee.v1.IPacketFee|null); - - /** - * Encodes the specified MsgPayPacketFeeAsync message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsync.verify|verify} messages. - * @param message MsgPayPacketFeeAsync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgPayPacketFeeAsync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgPayPacketFeeAsync message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsync.verify|verify} messages. - * @param message MsgPayPacketFeeAsync message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgPayPacketFeeAsync, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgPayPacketFeeAsync message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgPayPacketFeeAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgPayPacketFeeAsync; - - /** - * Decodes a MsgPayPacketFeeAsync message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgPayPacketFeeAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgPayPacketFeeAsync; - - /** - * Verifies a MsgPayPacketFeeAsync message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgPayPacketFeeAsync message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgPayPacketFeeAsync - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgPayPacketFeeAsync; - - /** - * Creates a plain object from a MsgPayPacketFeeAsync message. Also converts values to other types if specified. - * @param message MsgPayPacketFeeAsync - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgPayPacketFeeAsync, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgPayPacketFeeAsync to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgPayPacketFeeAsyncResponse. */ - interface IMsgPayPacketFeeAsyncResponse { - } - - /** Represents a MsgPayPacketFeeAsyncResponse. */ - class MsgPayPacketFeeAsyncResponse implements IMsgPayPacketFeeAsyncResponse { - - /** - * Constructs a new MsgPayPacketFeeAsyncResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse); - - /** - * Encodes the specified MsgPayPacketFeeAsyncResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.verify|verify} messages. - * @param message MsgPayPacketFeeAsyncResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgPayPacketFeeAsyncResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.verify|verify} messages. - * @param message MsgPayPacketFeeAsyncResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgPayPacketFeeAsyncResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgPayPacketFeeAsyncResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse; - - /** - * Decodes a MsgPayPacketFeeAsyncResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgPayPacketFeeAsyncResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse; - - /** - * Verifies a MsgPayPacketFeeAsyncResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgPayPacketFeeAsyncResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgPayPacketFeeAsyncResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse; - - /** - * Creates a plain object from a MsgPayPacketFeeAsyncResponse message. Also converts values to other types if specified. - * @param message MsgPayPacketFeeAsyncResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgPayPacketFeeAsyncResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Fee. */ - interface IFee { - - /** Fee recv_fee */ - recv_fee?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Fee ack_fee */ - ack_fee?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Fee timeout_fee */ - timeout_fee?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a Fee. */ - class Fee implements IFee { - - /** - * Constructs a new Fee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IFee); - - /** Fee recv_fee. */ - public recv_fee: cosmos.base.v1beta1.ICoin[]; - - /** Fee ack_fee. */ - public ack_fee: cosmos.base.v1beta1.ICoin[]; - - /** Fee timeout_fee. */ - public timeout_fee: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Fee message. Does not implicitly {@link ibc.applications.fee.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: ibc.applications.fee.v1.IFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link ibc.applications.fee.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: ibc.applications.fee.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): ibc.applications.fee.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)): ibc.applications.fee.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 }): ibc.applications.fee.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: ibc.applications.fee.v1.Fee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Fee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketFee. */ - interface IPacketFee { - - /** PacketFee fee */ - fee?: (ibc.applications.fee.v1.IFee|null); - - /** PacketFee refund_address */ - refund_address?: (string|null); - - /** PacketFee relayers */ - relayers?: (string[]|null); - } - - /** Represents a PacketFee. */ - class PacketFee implements IPacketFee { - - /** - * Constructs a new PacketFee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IPacketFee); - - /** PacketFee fee. */ - public fee?: (ibc.applications.fee.v1.IFee|null); - - /** PacketFee refund_address. */ - public refund_address: string; - - /** PacketFee relayers. */ - public relayers: string[]; - - /** - * Encodes the specified PacketFee message. Does not implicitly {@link ibc.applications.fee.v1.PacketFee.verify|verify} messages. - * @param message PacketFee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IPacketFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketFee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.PacketFee.verify|verify} messages. - * @param message PacketFee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IPacketFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketFee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.PacketFee; - - /** - * Decodes a PacketFee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.PacketFee; - - /** - * Verifies a PacketFee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketFee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketFee - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.PacketFee; - - /** - * Creates a plain object from a PacketFee message. Also converts values to other types if specified. - * @param message PacketFee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.PacketFee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketFee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketFees. */ - interface IPacketFees { - - /** PacketFees packet_fees */ - packet_fees?: (ibc.applications.fee.v1.IPacketFee[]|null); - } - - /** Represents a PacketFees. */ - class PacketFees implements IPacketFees { - - /** - * Constructs a new PacketFees. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IPacketFees); - - /** PacketFees packet_fees. */ - public packet_fees: ibc.applications.fee.v1.IPacketFee[]; - - /** - * Encodes the specified PacketFees message. Does not implicitly {@link ibc.applications.fee.v1.PacketFees.verify|verify} messages. - * @param message PacketFees message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IPacketFees, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketFees message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.PacketFees.verify|verify} messages. - * @param message PacketFees message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IPacketFees, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketFees message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.PacketFees; - - /** - * Decodes a PacketFees message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.PacketFees; - - /** - * Verifies a PacketFees message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketFees message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketFees - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.PacketFees; - - /** - * Creates a plain object from a PacketFees message. Also converts values to other types if specified. - * @param message PacketFees - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.PacketFees, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketFees to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IdentifiedPacketFees. */ - interface IIdentifiedPacketFees { - - /** IdentifiedPacketFees packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** IdentifiedPacketFees packet_fees */ - packet_fees?: (ibc.applications.fee.v1.IPacketFee[]|null); - } - - /** Represents an IdentifiedPacketFees. */ - class IdentifiedPacketFees implements IIdentifiedPacketFees { - - /** - * Constructs a new IdentifiedPacketFees. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IIdentifiedPacketFees); - - /** IdentifiedPacketFees packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** IdentifiedPacketFees packet_fees. */ - public packet_fees: ibc.applications.fee.v1.IPacketFee[]; - - /** - * Encodes the specified IdentifiedPacketFees message. Does not implicitly {@link ibc.applications.fee.v1.IdentifiedPacketFees.verify|verify} messages. - * @param message IdentifiedPacketFees message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IIdentifiedPacketFees, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedPacketFees message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.IdentifiedPacketFees.verify|verify} messages. - * @param message IdentifiedPacketFees message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IIdentifiedPacketFees, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedPacketFees message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedPacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.IdentifiedPacketFees; - - /** - * Decodes an IdentifiedPacketFees message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedPacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.IdentifiedPacketFees; - - /** - * Verifies an IdentifiedPacketFees message. - * @param message Plain 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 IdentifiedPacketFees message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedPacketFees - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.IdentifiedPacketFees; - - /** - * Creates a plain object from an IdentifiedPacketFees message. Also converts values to other types if specified. - * @param message IdentifiedPacketFees - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.IdentifiedPacketFees, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedPacketFees to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IncentivizedAcknowledgement. */ - interface IIncentivizedAcknowledgement { - - /** IncentivizedAcknowledgement app_acknowledgement */ - app_acknowledgement?: (Uint8Array|null); - - /** IncentivizedAcknowledgement forward_relayer_address */ - forward_relayer_address?: (string|null); - - /** IncentivizedAcknowledgement underlying_app_success */ - underlying_app_success?: (boolean|null); - } - - /** Represents an IncentivizedAcknowledgement. */ - class IncentivizedAcknowledgement implements IIncentivizedAcknowledgement { - - /** - * Constructs a new IncentivizedAcknowledgement. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IIncentivizedAcknowledgement); - - /** IncentivizedAcknowledgement app_acknowledgement. */ - public app_acknowledgement: Uint8Array; - - /** IncentivizedAcknowledgement forward_relayer_address. */ - public forward_relayer_address: string; - - /** IncentivizedAcknowledgement underlying_app_success. */ - public underlying_app_success: boolean; - - /** - * Encodes the specified IncentivizedAcknowledgement message. Does not implicitly {@link ibc.applications.fee.v1.IncentivizedAcknowledgement.verify|verify} messages. - * @param message IncentivizedAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IIncentivizedAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IncentivizedAcknowledgement message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.IncentivizedAcknowledgement.verify|verify} messages. - * @param message IncentivizedAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IIncentivizedAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IncentivizedAcknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IncentivizedAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.IncentivizedAcknowledgement; - - /** - * Decodes an IncentivizedAcknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IncentivizedAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.IncentivizedAcknowledgement; - - /** - * Verifies an IncentivizedAcknowledgement message. - * @param message Plain 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 IncentivizedAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IncentivizedAcknowledgement - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.IncentivizedAcknowledgement; - - /** - * Creates a plain object from an IncentivizedAcknowledgement message. Also converts values to other types if specified. - * @param message IncentivizedAcknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.IncentivizedAcknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IncentivizedAcknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls IncentivizedPackets. - * @param request QueryIncentivizedPacketsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryIncentivizedPacketsResponse - */ - public incentivizedPackets(request: ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest, callback: ibc.applications.fee.v1.Query.IncentivizedPacketsCallback): void; - - /** - * Calls IncentivizedPackets. - * @param request QueryIncentivizedPacketsRequest message or plain object - * @returns Promise - */ - public incentivizedPackets(request: ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest): Promise; - - /** - * Calls IncentivizedPacket. - * @param request QueryIncentivizedPacketRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryIncentivizedPacketResponse - */ - public incentivizedPacket(request: ibc.applications.fee.v1.IQueryIncentivizedPacketRequest, callback: ibc.applications.fee.v1.Query.IncentivizedPacketCallback): void; - - /** - * Calls IncentivizedPacket. - * @param request QueryIncentivizedPacketRequest message or plain object - * @returns Promise - */ - public incentivizedPacket(request: ibc.applications.fee.v1.IQueryIncentivizedPacketRequest): Promise; - - /** - * Calls IncentivizedPacketsForChannel. - * @param request QueryIncentivizedPacketsForChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryIncentivizedPacketsForChannelResponse - */ - public incentivizedPacketsForChannel(request: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest, callback: ibc.applications.fee.v1.Query.IncentivizedPacketsForChannelCallback): void; - - /** - * Calls IncentivizedPacketsForChannel. - * @param request QueryIncentivizedPacketsForChannelRequest message or plain object - * @returns Promise - */ - public incentivizedPacketsForChannel(request: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest): Promise; - - /** - * Calls TotalRecvFees. - * @param request QueryTotalRecvFeesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalRecvFeesResponse - */ - public totalRecvFees(request: ibc.applications.fee.v1.IQueryTotalRecvFeesRequest, callback: ibc.applications.fee.v1.Query.TotalRecvFeesCallback): void; - - /** - * Calls TotalRecvFees. - * @param request QueryTotalRecvFeesRequest message or plain object - * @returns Promise - */ - public totalRecvFees(request: ibc.applications.fee.v1.IQueryTotalRecvFeesRequest): Promise; - - /** - * Calls TotalAckFees. - * @param request QueryTotalAckFeesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalAckFeesResponse - */ - public totalAckFees(request: ibc.applications.fee.v1.IQueryTotalAckFeesRequest, callback: ibc.applications.fee.v1.Query.TotalAckFeesCallback): void; - - /** - * Calls TotalAckFees. - * @param request QueryTotalAckFeesRequest message or plain object - * @returns Promise - */ - public totalAckFees(request: ibc.applications.fee.v1.IQueryTotalAckFeesRequest): Promise; - - /** - * Calls TotalTimeoutFees. - * @param request QueryTotalTimeoutFeesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalTimeoutFeesResponse - */ - public totalTimeoutFees(request: ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest, callback: ibc.applications.fee.v1.Query.TotalTimeoutFeesCallback): void; - - /** - * Calls TotalTimeoutFees. - * @param request QueryTotalTimeoutFeesRequest message or plain object - * @returns Promise - */ - public totalTimeoutFees(request: ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest): Promise; - - /** - * Calls Payee. - * @param request QueryPayeeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryPayeeResponse - */ - public payee(request: ibc.applications.fee.v1.IQueryPayeeRequest, callback: ibc.applications.fee.v1.Query.PayeeCallback): void; - - /** - * Calls Payee. - * @param request QueryPayeeRequest message or plain object - * @returns Promise - */ - public payee(request: ibc.applications.fee.v1.IQueryPayeeRequest): Promise; - - /** - * Calls CounterpartyPayee. - * @param request QueryCounterpartyPayeeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryCounterpartyPayeeResponse - */ - public counterpartyPayee(request: ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest, callback: ibc.applications.fee.v1.Query.CounterpartyPayeeCallback): void; - - /** - * Calls CounterpartyPayee. - * @param request QueryCounterpartyPayeeRequest message or plain object - * @returns Promise - */ - public counterpartyPayee(request: ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest): Promise; - - /** - * Calls FeeEnabledChannels. - * @param request QueryFeeEnabledChannelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryFeeEnabledChannelsResponse - */ - public feeEnabledChannels(request: ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest, callback: ibc.applications.fee.v1.Query.FeeEnabledChannelsCallback): void; - - /** - * Calls FeeEnabledChannels. - * @param request QueryFeeEnabledChannelsRequest message or plain object - * @returns Promise - */ - public feeEnabledChannels(request: ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest): Promise; - - /** - * Calls FeeEnabledChannel. - * @param request QueryFeeEnabledChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryFeeEnabledChannelResponse - */ - public feeEnabledChannel(request: ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest, callback: ibc.applications.fee.v1.Query.FeeEnabledChannelCallback): void; - - /** - * Calls FeeEnabledChannel. - * @param request QueryFeeEnabledChannelRequest message or plain object - * @returns Promise - */ - public feeEnabledChannel(request: ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPackets}. - * @param error Error, if any - * @param [response] QueryIncentivizedPacketsResponse - */ - type IncentivizedPacketsCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPacket}. - * @param error Error, if any - * @param [response] QueryIncentivizedPacketResponse - */ - type IncentivizedPacketCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryIncentivizedPacketResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPacketsForChannel}. - * @param error Error, if any - * @param [response] QueryIncentivizedPacketsForChannelResponse - */ - type IncentivizedPacketsForChannelCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalRecvFees}. - * @param error Error, if any - * @param [response] QueryTotalRecvFeesResponse - */ - type TotalRecvFeesCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryTotalRecvFeesResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalAckFees}. - * @param error Error, if any - * @param [response] QueryTotalAckFeesResponse - */ - type TotalAckFeesCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryTotalAckFeesResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalTimeoutFees}. - * @param error Error, if any - * @param [response] QueryTotalTimeoutFeesResponse - */ - type TotalTimeoutFeesCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#payee}. - * @param error Error, if any - * @param [response] QueryPayeeResponse - */ - type PayeeCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryPayeeResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#counterpartyPayee}. - * @param error Error, if any - * @param [response] QueryCounterpartyPayeeResponse - */ - type CounterpartyPayeeCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryCounterpartyPayeeResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#feeEnabledChannels}. - * @param error Error, if any - * @param [response] QueryFeeEnabledChannelsResponse - */ - type FeeEnabledChannelsCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse) => void; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#feeEnabledChannel}. - * @param error Error, if any - * @param [response] QueryFeeEnabledChannelResponse - */ - type FeeEnabledChannelCallback = (error: (Error|null), response?: ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) => void; - } - - /** Properties of a QueryIncentivizedPacketsRequest. */ - interface IQueryIncentivizedPacketsRequest { - - /** QueryIncentivizedPacketsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryIncentivizedPacketsRequest query_height */ - query_height?: (Long|null); - } - - /** Represents a QueryIncentivizedPacketsRequest. */ - class QueryIncentivizedPacketsRequest implements IQueryIncentivizedPacketsRequest { - - /** - * Constructs a new QueryIncentivizedPacketsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest); - - /** QueryIncentivizedPacketsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryIncentivizedPacketsRequest query_height. */ - public query_height: Long; - - /** - * Encodes the specified QueryIncentivizedPacketsRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.verify|verify} messages. - * @param message QueryIncentivizedPacketsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryIncentivizedPacketsRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.verify|verify} messages. - * @param message QueryIncentivizedPacketsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryIncentivizedPacketsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryIncentivizedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryIncentivizedPacketsRequest; - - /** - * Decodes a QueryIncentivizedPacketsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryIncentivizedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryIncentivizedPacketsRequest; - - /** - * Verifies a QueryIncentivizedPacketsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryIncentivizedPacketsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryIncentivizedPacketsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryIncentivizedPacketsRequest; - - /** - * Creates a plain object from a QueryIncentivizedPacketsRequest message. Also converts values to other types if specified. - * @param message QueryIncentivizedPacketsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryIncentivizedPacketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryIncentivizedPacketsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryIncentivizedPacketsResponse. */ - interface IQueryIncentivizedPacketsResponse { - - /** QueryIncentivizedPacketsResponse incentivized_packets */ - incentivized_packets?: (ibc.applications.fee.v1.IIdentifiedPacketFees[]|null); - } - - /** Represents a QueryIncentivizedPacketsResponse. */ - class QueryIncentivizedPacketsResponse implements IQueryIncentivizedPacketsResponse { - - /** - * Constructs a new QueryIncentivizedPacketsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse); - - /** QueryIncentivizedPacketsResponse incentivized_packets. */ - public incentivized_packets: ibc.applications.fee.v1.IIdentifiedPacketFees[]; - - /** - * Encodes the specified QueryIncentivizedPacketsResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.verify|verify} messages. - * @param message QueryIncentivizedPacketsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryIncentivizedPacketsResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.verify|verify} messages. - * @param message QueryIncentivizedPacketsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryIncentivizedPacketsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryIncentivizedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryIncentivizedPacketsResponse; - - /** - * Decodes a QueryIncentivizedPacketsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryIncentivizedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryIncentivizedPacketsResponse; - - /** - * Verifies a QueryIncentivizedPacketsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryIncentivizedPacketsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryIncentivizedPacketsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryIncentivizedPacketsResponse; - - /** - * Creates a plain object from a QueryIncentivizedPacketsResponse message. Also converts values to other types if specified. - * @param message QueryIncentivizedPacketsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryIncentivizedPacketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryIncentivizedPacketsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryIncentivizedPacketRequest. */ - interface IQueryIncentivizedPacketRequest { - - /** QueryIncentivizedPacketRequest packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** QueryIncentivizedPacketRequest query_height */ - query_height?: (Long|null); - } - - /** Represents a QueryIncentivizedPacketRequest. */ - class QueryIncentivizedPacketRequest implements IQueryIncentivizedPacketRequest { - - /** - * Constructs a new QueryIncentivizedPacketRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryIncentivizedPacketRequest); - - /** QueryIncentivizedPacketRequest packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** QueryIncentivizedPacketRequest query_height. */ - public query_height: Long; - - /** - * Encodes the specified QueryIncentivizedPacketRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketRequest.verify|verify} messages. - * @param message QueryIncentivizedPacketRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryIncentivizedPacketRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryIncentivizedPacketRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketRequest.verify|verify} messages. - * @param message QueryIncentivizedPacketRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryIncentivizedPacketRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryIncentivizedPacketRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryIncentivizedPacketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryIncentivizedPacketRequest; - - /** - * Decodes a QueryIncentivizedPacketRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryIncentivizedPacketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryIncentivizedPacketRequest; - - /** - * Verifies a QueryIncentivizedPacketRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryIncentivizedPacketRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryIncentivizedPacketRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryIncentivizedPacketRequest; - - /** - * Creates a plain object from a QueryIncentivizedPacketRequest message. Also converts values to other types if specified. - * @param message QueryIncentivizedPacketRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryIncentivizedPacketRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryIncentivizedPacketRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryIncentivizedPacketResponse. */ - interface IQueryIncentivizedPacketResponse { - - /** QueryIncentivizedPacketResponse incentivized_packet */ - incentivized_packet?: (ibc.applications.fee.v1.IIdentifiedPacketFees|null); - } - - /** Represents a QueryIncentivizedPacketResponse. */ - class QueryIncentivizedPacketResponse implements IQueryIncentivizedPacketResponse { - - /** - * Constructs a new QueryIncentivizedPacketResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryIncentivizedPacketResponse); - - /** QueryIncentivizedPacketResponse incentivized_packet. */ - public incentivized_packet?: (ibc.applications.fee.v1.IIdentifiedPacketFees|null); - - /** - * Encodes the specified QueryIncentivizedPacketResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketResponse.verify|verify} messages. - * @param message QueryIncentivizedPacketResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryIncentivizedPacketResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryIncentivizedPacketResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketResponse.verify|verify} messages. - * @param message QueryIncentivizedPacketResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryIncentivizedPacketResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryIncentivizedPacketResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryIncentivizedPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryIncentivizedPacketResponse; - - /** - * Decodes a QueryIncentivizedPacketResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryIncentivizedPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryIncentivizedPacketResponse; - - /** - * Verifies a QueryIncentivizedPacketResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryIncentivizedPacketResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryIncentivizedPacketResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryIncentivizedPacketResponse; - - /** - * Creates a plain object from a QueryIncentivizedPacketResponse message. Also converts values to other types if specified. - * @param message QueryIncentivizedPacketResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryIncentivizedPacketResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryIncentivizedPacketResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryIncentivizedPacketsForChannelRequest. */ - interface IQueryIncentivizedPacketsForChannelRequest { - - /** QueryIncentivizedPacketsForChannelRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryIncentivizedPacketsForChannelRequest port_id */ - port_id?: (string|null); - - /** QueryIncentivizedPacketsForChannelRequest channel_id */ - channel_id?: (string|null); - - /** QueryIncentivizedPacketsForChannelRequest query_height */ - query_height?: (Long|null); - } - - /** Represents a QueryIncentivizedPacketsForChannelRequest. */ - class QueryIncentivizedPacketsForChannelRequest implements IQueryIncentivizedPacketsForChannelRequest { - - /** - * Constructs a new QueryIncentivizedPacketsForChannelRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest); - - /** QueryIncentivizedPacketsForChannelRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryIncentivizedPacketsForChannelRequest port_id. */ - public port_id: string; - - /** QueryIncentivizedPacketsForChannelRequest channel_id. */ - public channel_id: string; - - /** QueryIncentivizedPacketsForChannelRequest query_height. */ - public query_height: Long; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.verify|verify} messages. - * @param message QueryIncentivizedPacketsForChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.verify|verify} messages. - * @param message QueryIncentivizedPacketsForChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryIncentivizedPacketsForChannelRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryIncentivizedPacketsForChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest; - - /** - * Decodes a QueryIncentivizedPacketsForChannelRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryIncentivizedPacketsForChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest; - - /** - * Verifies a QueryIncentivizedPacketsForChannelRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryIncentivizedPacketsForChannelRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryIncentivizedPacketsForChannelRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest; - - /** - * Creates a plain object from a QueryIncentivizedPacketsForChannelRequest message. Also converts values to other types if specified. - * @param message QueryIncentivizedPacketsForChannelRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryIncentivizedPacketsForChannelRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryIncentivizedPacketsForChannelResponse. */ - interface IQueryIncentivizedPacketsForChannelResponse { - - /** QueryIncentivizedPacketsForChannelResponse incentivized_packets */ - incentivized_packets?: (ibc.applications.fee.v1.IIdentifiedPacketFees[]|null); - } - - /** Represents a QueryIncentivizedPacketsForChannelResponse. */ - class QueryIncentivizedPacketsForChannelResponse implements IQueryIncentivizedPacketsForChannelResponse { - - /** - * Constructs a new QueryIncentivizedPacketsForChannelResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse); - - /** QueryIncentivizedPacketsForChannelResponse incentivized_packets. */ - public incentivized_packets: ibc.applications.fee.v1.IIdentifiedPacketFees[]; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.verify|verify} messages. - * @param message QueryIncentivizedPacketsForChannelResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.verify|verify} messages. - * @param message QueryIncentivizedPacketsForChannelResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryIncentivizedPacketsForChannelResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryIncentivizedPacketsForChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse; - - /** - * Decodes a QueryIncentivizedPacketsForChannelResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryIncentivizedPacketsForChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse; - - /** - * Verifies a QueryIncentivizedPacketsForChannelResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryIncentivizedPacketsForChannelResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryIncentivizedPacketsForChannelResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse; - - /** - * Creates a plain object from a QueryIncentivizedPacketsForChannelResponse message. Also converts values to other types if specified. - * @param message QueryIncentivizedPacketsForChannelResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryIncentivizedPacketsForChannelResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalRecvFeesRequest. */ - interface IQueryTotalRecvFeesRequest { - - /** QueryTotalRecvFeesRequest packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - } - - /** Represents a QueryTotalRecvFeesRequest. */ - class QueryTotalRecvFeesRequest implements IQueryTotalRecvFeesRequest { - - /** - * Constructs a new QueryTotalRecvFeesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryTotalRecvFeesRequest); - - /** QueryTotalRecvFeesRequest packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** - * Encodes the specified QueryTotalRecvFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesRequest.verify|verify} messages. - * @param message QueryTotalRecvFeesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryTotalRecvFeesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalRecvFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesRequest.verify|verify} messages. - * @param message QueryTotalRecvFeesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryTotalRecvFeesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalRecvFeesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalRecvFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryTotalRecvFeesRequest; - - /** - * Decodes a QueryTotalRecvFeesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalRecvFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryTotalRecvFeesRequest; - - /** - * Verifies a QueryTotalRecvFeesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalRecvFeesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalRecvFeesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryTotalRecvFeesRequest; - - /** - * Creates a plain object from a QueryTotalRecvFeesRequest message. Also converts values to other types if specified. - * @param message QueryTotalRecvFeesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryTotalRecvFeesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalRecvFeesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalRecvFeesResponse. */ - interface IQueryTotalRecvFeesResponse { - - /** QueryTotalRecvFeesResponse recv_fees */ - recv_fees?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a QueryTotalRecvFeesResponse. */ - class QueryTotalRecvFeesResponse implements IQueryTotalRecvFeesResponse { - - /** - * Constructs a new QueryTotalRecvFeesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryTotalRecvFeesResponse); - - /** QueryTotalRecvFeesResponse recv_fees. */ - public recv_fees: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified QueryTotalRecvFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesResponse.verify|verify} messages. - * @param message QueryTotalRecvFeesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryTotalRecvFeesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalRecvFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesResponse.verify|verify} messages. - * @param message QueryTotalRecvFeesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryTotalRecvFeesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalRecvFeesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalRecvFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryTotalRecvFeesResponse; - - /** - * Decodes a QueryTotalRecvFeesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalRecvFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryTotalRecvFeesResponse; - - /** - * Verifies a QueryTotalRecvFeesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalRecvFeesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalRecvFeesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryTotalRecvFeesResponse; - - /** - * Creates a plain object from a QueryTotalRecvFeesResponse message. Also converts values to other types if specified. - * @param message QueryTotalRecvFeesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryTotalRecvFeesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalRecvFeesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalAckFeesRequest. */ - interface IQueryTotalAckFeesRequest { - - /** QueryTotalAckFeesRequest packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - } - - /** Represents a QueryTotalAckFeesRequest. */ - class QueryTotalAckFeesRequest implements IQueryTotalAckFeesRequest { - - /** - * Constructs a new QueryTotalAckFeesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryTotalAckFeesRequest); - - /** QueryTotalAckFeesRequest packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** - * Encodes the specified QueryTotalAckFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesRequest.verify|verify} messages. - * @param message QueryTotalAckFeesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryTotalAckFeesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalAckFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesRequest.verify|verify} messages. - * @param message QueryTotalAckFeesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryTotalAckFeesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalAckFeesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalAckFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryTotalAckFeesRequest; - - /** - * Decodes a QueryTotalAckFeesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalAckFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryTotalAckFeesRequest; - - /** - * Verifies a QueryTotalAckFeesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalAckFeesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalAckFeesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryTotalAckFeesRequest; - - /** - * Creates a plain object from a QueryTotalAckFeesRequest message. Also converts values to other types if specified. - * @param message QueryTotalAckFeesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryTotalAckFeesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalAckFeesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalAckFeesResponse. */ - interface IQueryTotalAckFeesResponse { - - /** QueryTotalAckFeesResponse ack_fees */ - ack_fees?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a QueryTotalAckFeesResponse. */ - class QueryTotalAckFeesResponse implements IQueryTotalAckFeesResponse { - - /** - * Constructs a new QueryTotalAckFeesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryTotalAckFeesResponse); - - /** QueryTotalAckFeesResponse ack_fees. */ - public ack_fees: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified QueryTotalAckFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesResponse.verify|verify} messages. - * @param message QueryTotalAckFeesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryTotalAckFeesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalAckFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesResponse.verify|verify} messages. - * @param message QueryTotalAckFeesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryTotalAckFeesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalAckFeesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalAckFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryTotalAckFeesResponse; - - /** - * Decodes a QueryTotalAckFeesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalAckFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryTotalAckFeesResponse; - - /** - * Verifies a QueryTotalAckFeesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalAckFeesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalAckFeesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryTotalAckFeesResponse; - - /** - * Creates a plain object from a QueryTotalAckFeesResponse message. Also converts values to other types if specified. - * @param message QueryTotalAckFeesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryTotalAckFeesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalAckFeesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalTimeoutFeesRequest. */ - interface IQueryTotalTimeoutFeesRequest { - - /** QueryTotalTimeoutFeesRequest packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - } - - /** Represents a QueryTotalTimeoutFeesRequest. */ - class QueryTotalTimeoutFeesRequest implements IQueryTotalTimeoutFeesRequest { - - /** - * Constructs a new QueryTotalTimeoutFeesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest); - - /** QueryTotalTimeoutFeesRequest packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** - * Encodes the specified QueryTotalTimeoutFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.verify|verify} messages. - * @param message QueryTotalTimeoutFeesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalTimeoutFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.verify|verify} messages. - * @param message QueryTotalTimeoutFeesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalTimeoutFeesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalTimeoutFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest; - - /** - * Decodes a QueryTotalTimeoutFeesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalTimeoutFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest; - - /** - * Verifies a QueryTotalTimeoutFeesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalTimeoutFeesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalTimeoutFeesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest; - - /** - * Creates a plain object from a QueryTotalTimeoutFeesRequest message. Also converts values to other types if specified. - * @param message QueryTotalTimeoutFeesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalTimeoutFeesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalTimeoutFeesResponse. */ - interface IQueryTotalTimeoutFeesResponse { - - /** QueryTotalTimeoutFeesResponse timeout_fees */ - timeout_fees?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a QueryTotalTimeoutFeesResponse. */ - class QueryTotalTimeoutFeesResponse implements IQueryTotalTimeoutFeesResponse { - - /** - * Constructs a new QueryTotalTimeoutFeesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse); - - /** QueryTotalTimeoutFeesResponse timeout_fees. */ - public timeout_fees: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified QueryTotalTimeoutFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.verify|verify} messages. - * @param message QueryTotalTimeoutFeesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalTimeoutFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.verify|verify} messages. - * @param message QueryTotalTimeoutFeesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalTimeoutFeesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalTimeoutFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse; - - /** - * Decodes a QueryTotalTimeoutFeesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalTimeoutFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse; - - /** - * Verifies a QueryTotalTimeoutFeesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalTimeoutFeesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalTimeoutFeesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse; - - /** - * Creates a plain object from a QueryTotalTimeoutFeesResponse message. Also converts values to other types if specified. - * @param message QueryTotalTimeoutFeesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalTimeoutFeesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPayeeRequest. */ - interface IQueryPayeeRequest { - - /** QueryPayeeRequest channel_id */ - channel_id?: (string|null); - - /** QueryPayeeRequest relayer */ - relayer?: (string|null); - } - - /** Represents a QueryPayeeRequest. */ - class QueryPayeeRequest implements IQueryPayeeRequest { - - /** - * Constructs a new QueryPayeeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryPayeeRequest); - - /** QueryPayeeRequest channel_id. */ - public channel_id: string; - - /** QueryPayeeRequest relayer. */ - public relayer: string; - - /** - * Encodes the specified QueryPayeeRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeRequest.verify|verify} messages. - * @param message QueryPayeeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryPayeeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPayeeRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeRequest.verify|verify} messages. - * @param message QueryPayeeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryPayeeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPayeeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryPayeeRequest; - - /** - * Decodes a QueryPayeeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryPayeeRequest; - - /** - * Verifies a QueryPayeeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPayeeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPayeeRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryPayeeRequest; - - /** - * Creates a plain object from a QueryPayeeRequest message. Also converts values to other types if specified. - * @param message QueryPayeeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryPayeeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPayeeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPayeeResponse. */ - interface IQueryPayeeResponse { - - /** QueryPayeeResponse payee_address */ - payee_address?: (string|null); - } - - /** Represents a QueryPayeeResponse. */ - class QueryPayeeResponse implements IQueryPayeeResponse { - - /** - * Constructs a new QueryPayeeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryPayeeResponse); - - /** QueryPayeeResponse payee_address. */ - public payee_address: string; - - /** - * Encodes the specified QueryPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeResponse.verify|verify} messages. - * @param message QueryPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeResponse.verify|verify} messages. - * @param message QueryPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPayeeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryPayeeResponse; - - /** - * Decodes a QueryPayeeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryPayeeResponse; - - /** - * Verifies a QueryPayeeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPayeeResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryPayeeResponse; - - /** - * Creates a plain object from a QueryPayeeResponse message. Also converts values to other types if specified. - * @param message QueryPayeeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryPayeeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPayeeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryCounterpartyPayeeRequest. */ - interface IQueryCounterpartyPayeeRequest { - - /** QueryCounterpartyPayeeRequest channel_id */ - channel_id?: (string|null); - - /** QueryCounterpartyPayeeRequest relayer */ - relayer?: (string|null); - } - - /** Represents a QueryCounterpartyPayeeRequest. */ - class QueryCounterpartyPayeeRequest implements IQueryCounterpartyPayeeRequest { - - /** - * Constructs a new QueryCounterpartyPayeeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest); - - /** QueryCounterpartyPayeeRequest channel_id. */ - public channel_id: string; - - /** QueryCounterpartyPayeeRequest relayer. */ - public relayer: string; - - /** - * Encodes the specified QueryCounterpartyPayeeRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.verify|verify} messages. - * @param message QueryCounterpartyPayeeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryCounterpartyPayeeRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.verify|verify} messages. - * @param message QueryCounterpartyPayeeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryCounterpartyPayeeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryCounterpartyPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryCounterpartyPayeeRequest; - - /** - * Decodes a QueryCounterpartyPayeeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryCounterpartyPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryCounterpartyPayeeRequest; - - /** - * Verifies a QueryCounterpartyPayeeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryCounterpartyPayeeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryCounterpartyPayeeRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryCounterpartyPayeeRequest; - - /** - * Creates a plain object from a QueryCounterpartyPayeeRequest message. Also converts values to other types if specified. - * @param message QueryCounterpartyPayeeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryCounterpartyPayeeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryCounterpartyPayeeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryCounterpartyPayeeResponse. */ - interface IQueryCounterpartyPayeeResponse { - - /** QueryCounterpartyPayeeResponse counterparty_payee */ - counterparty_payee?: (string|null); - } - - /** Represents a QueryCounterpartyPayeeResponse. */ - class QueryCounterpartyPayeeResponse implements IQueryCounterpartyPayeeResponse { - - /** - * Constructs a new QueryCounterpartyPayeeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse); - - /** QueryCounterpartyPayeeResponse counterparty_payee. */ - public counterparty_payee: string; - - /** - * Encodes the specified QueryCounterpartyPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.verify|verify} messages. - * @param message QueryCounterpartyPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryCounterpartyPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.verify|verify} messages. - * @param message QueryCounterpartyPayeeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryCounterpartyPayeeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryCounterpartyPayeeResponse; - - /** - * Decodes a QueryCounterpartyPayeeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryCounterpartyPayeeResponse; - - /** - * Verifies a QueryCounterpartyPayeeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryCounterpartyPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryCounterpartyPayeeResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryCounterpartyPayeeResponse; - - /** - * Creates a plain object from a QueryCounterpartyPayeeResponse message. Also converts values to other types if specified. - * @param message QueryCounterpartyPayeeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryCounterpartyPayeeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryCounterpartyPayeeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryFeeEnabledChannelsRequest. */ - interface IQueryFeeEnabledChannelsRequest { - - /** QueryFeeEnabledChannelsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryFeeEnabledChannelsRequest query_height */ - query_height?: (Long|null); - } - - /** Represents a QueryFeeEnabledChannelsRequest. */ - class QueryFeeEnabledChannelsRequest implements IQueryFeeEnabledChannelsRequest { - - /** - * Constructs a new QueryFeeEnabledChannelsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest); - - /** QueryFeeEnabledChannelsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryFeeEnabledChannelsRequest query_height. */ - public query_height: Long; - - /** - * Encodes the specified QueryFeeEnabledChannelsRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.verify|verify} messages. - * @param message QueryFeeEnabledChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFeeEnabledChannelsRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.verify|verify} messages. - * @param message QueryFeeEnabledChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFeeEnabledChannelsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFeeEnabledChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest; - - /** - * Decodes a QueryFeeEnabledChannelsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFeeEnabledChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest; - - /** - * Verifies a QueryFeeEnabledChannelsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryFeeEnabledChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFeeEnabledChannelsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest; - - /** - * Creates a plain object from a QueryFeeEnabledChannelsRequest message. Also converts values to other types if specified. - * @param message QueryFeeEnabledChannelsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFeeEnabledChannelsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryFeeEnabledChannelsResponse. */ - interface IQueryFeeEnabledChannelsResponse { - - /** QueryFeeEnabledChannelsResponse fee_enabled_channels */ - fee_enabled_channels?: (ibc.applications.fee.v1.IFeeEnabledChannel[]|null); - } - - /** Represents a QueryFeeEnabledChannelsResponse. */ - class QueryFeeEnabledChannelsResponse implements IQueryFeeEnabledChannelsResponse { - - /** - * Constructs a new QueryFeeEnabledChannelsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse); - - /** QueryFeeEnabledChannelsResponse fee_enabled_channels. */ - public fee_enabled_channels: ibc.applications.fee.v1.IFeeEnabledChannel[]; - - /** - * Encodes the specified QueryFeeEnabledChannelsResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.verify|verify} messages. - * @param message QueryFeeEnabledChannelsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFeeEnabledChannelsResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.verify|verify} messages. - * @param message QueryFeeEnabledChannelsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFeeEnabledChannelsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFeeEnabledChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse; - - /** - * Decodes a QueryFeeEnabledChannelsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFeeEnabledChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse; - - /** - * Verifies a QueryFeeEnabledChannelsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryFeeEnabledChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFeeEnabledChannelsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse; - - /** - * Creates a plain object from a QueryFeeEnabledChannelsResponse message. Also converts values to other types if specified. - * @param message QueryFeeEnabledChannelsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFeeEnabledChannelsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryFeeEnabledChannelRequest. */ - interface IQueryFeeEnabledChannelRequest { - - /** QueryFeeEnabledChannelRequest port_id */ - port_id?: (string|null); - - /** QueryFeeEnabledChannelRequest channel_id */ - channel_id?: (string|null); - } - - /** Represents a QueryFeeEnabledChannelRequest. */ - class QueryFeeEnabledChannelRequest implements IQueryFeeEnabledChannelRequest { - - /** - * Constructs a new QueryFeeEnabledChannelRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest); - - /** QueryFeeEnabledChannelRequest port_id. */ - public port_id: string; - - /** QueryFeeEnabledChannelRequest channel_id. */ - public channel_id: string; - - /** - * Encodes the specified QueryFeeEnabledChannelRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.verify|verify} messages. - * @param message QueryFeeEnabledChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFeeEnabledChannelRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.verify|verify} messages. - * @param message QueryFeeEnabledChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFeeEnabledChannelRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFeeEnabledChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryFeeEnabledChannelRequest; - - /** - * Decodes a QueryFeeEnabledChannelRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFeeEnabledChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryFeeEnabledChannelRequest; - - /** - * Verifies a QueryFeeEnabledChannelRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryFeeEnabledChannelRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFeeEnabledChannelRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryFeeEnabledChannelRequest; - - /** - * Creates a plain object from a QueryFeeEnabledChannelRequest message. Also converts values to other types if specified. - * @param message QueryFeeEnabledChannelRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryFeeEnabledChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFeeEnabledChannelRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryFeeEnabledChannelResponse. */ - interface IQueryFeeEnabledChannelResponse { - - /** QueryFeeEnabledChannelResponse fee_enabled */ - fee_enabled?: (boolean|null); - } - - /** Represents a QueryFeeEnabledChannelResponse. */ - class QueryFeeEnabledChannelResponse implements IQueryFeeEnabledChannelResponse { - - /** - * Constructs a new QueryFeeEnabledChannelResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse); - - /** QueryFeeEnabledChannelResponse fee_enabled. */ - public fee_enabled: boolean; - - /** - * Encodes the specified QueryFeeEnabledChannelResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.verify|verify} messages. - * @param message QueryFeeEnabledChannelResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFeeEnabledChannelResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.verify|verify} messages. - * @param message QueryFeeEnabledChannelResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFeeEnabledChannelResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFeeEnabledChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.QueryFeeEnabledChannelResponse; - - /** - * Decodes a QueryFeeEnabledChannelResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFeeEnabledChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.QueryFeeEnabledChannelResponse; - - /** - * Verifies a QueryFeeEnabledChannelResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryFeeEnabledChannelResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFeeEnabledChannelResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.QueryFeeEnabledChannelResponse; - - /** - * Creates a plain object from a QueryFeeEnabledChannelResponse message. Also converts values to other types if specified. - * @param message QueryFeeEnabledChannelResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.QueryFeeEnabledChannelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFeeEnabledChannelResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState identified_fees */ - identified_fees?: (ibc.applications.fee.v1.IIdentifiedPacketFees[]|null); - - /** GenesisState fee_enabled_channels */ - fee_enabled_channels?: (ibc.applications.fee.v1.IFeeEnabledChannel[]|null); - - /** GenesisState registered_payees */ - registered_payees?: (ibc.applications.fee.v1.IRegisteredPayee[]|null); - - /** GenesisState registered_counterparty_payees */ - registered_counterparty_payees?: (ibc.applications.fee.v1.IRegisteredCounterpartyPayee[]|null); - - /** GenesisState forward_relayers */ - forward_relayers?: (ibc.applications.fee.v1.IForwardRelayerAddress[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IGenesisState); - - /** GenesisState identified_fees. */ - public identified_fees: ibc.applications.fee.v1.IIdentifiedPacketFees[]; - - /** GenesisState fee_enabled_channels. */ - public fee_enabled_channels: ibc.applications.fee.v1.IFeeEnabledChannel[]; - - /** GenesisState registered_payees. */ - public registered_payees: ibc.applications.fee.v1.IRegisteredPayee[]; - - /** GenesisState registered_counterparty_payees. */ - public registered_counterparty_payees: ibc.applications.fee.v1.IRegisteredCounterpartyPayee[]; - - /** GenesisState forward_relayers. */ - public forward_relayers: ibc.applications.fee.v1.IForwardRelayerAddress[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.fee.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FeeEnabledChannel. */ - interface IFeeEnabledChannel { - - /** FeeEnabledChannel port_id */ - port_id?: (string|null); - - /** FeeEnabledChannel channel_id */ - channel_id?: (string|null); - } - - /** Represents a FeeEnabledChannel. */ - class FeeEnabledChannel implements IFeeEnabledChannel { - - /** - * Constructs a new FeeEnabledChannel. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IFeeEnabledChannel); - - /** FeeEnabledChannel port_id. */ - public port_id: string; - - /** FeeEnabledChannel channel_id. */ - public channel_id: string; - - /** - * Encodes the specified FeeEnabledChannel message. Does not implicitly {@link ibc.applications.fee.v1.FeeEnabledChannel.verify|verify} messages. - * @param message FeeEnabledChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IFeeEnabledChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeeEnabledChannel message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.FeeEnabledChannel.verify|verify} messages. - * @param message FeeEnabledChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IFeeEnabledChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeeEnabledChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeeEnabledChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.FeeEnabledChannel; - - /** - * Decodes a FeeEnabledChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeeEnabledChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.FeeEnabledChannel; - - /** - * Verifies a FeeEnabledChannel message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeeEnabledChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeeEnabledChannel - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.FeeEnabledChannel; - - /** - * Creates a plain object from a FeeEnabledChannel message. Also converts values to other types if specified. - * @param message FeeEnabledChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.FeeEnabledChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeeEnabledChannel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RegisteredPayee. */ - interface IRegisteredPayee { - - /** RegisteredPayee channel_id */ - channel_id?: (string|null); - - /** RegisteredPayee relayer */ - relayer?: (string|null); - - /** RegisteredPayee payee */ - payee?: (string|null); - } - - /** Represents a RegisteredPayee. */ - class RegisteredPayee implements IRegisteredPayee { - - /** - * Constructs a new RegisteredPayee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IRegisteredPayee); - - /** RegisteredPayee channel_id. */ - public channel_id: string; - - /** RegisteredPayee relayer. */ - public relayer: string; - - /** RegisteredPayee payee. */ - public payee: string; - - /** - * Encodes the specified RegisteredPayee message. Does not implicitly {@link ibc.applications.fee.v1.RegisteredPayee.verify|verify} messages. - * @param message RegisteredPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IRegisteredPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisteredPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.RegisteredPayee.verify|verify} messages. - * @param message RegisteredPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IRegisteredPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisteredPayee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegisteredPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.RegisteredPayee; - - /** - * Decodes a RegisteredPayee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisteredPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.RegisteredPayee; - - /** - * Verifies a RegisteredPayee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RegisteredPayee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegisteredPayee - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.RegisteredPayee; - - /** - * Creates a plain object from a RegisteredPayee message. Also converts values to other types if specified. - * @param message RegisteredPayee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.RegisteredPayee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegisteredPayee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RegisteredCounterpartyPayee. */ - interface IRegisteredCounterpartyPayee { - - /** RegisteredCounterpartyPayee channel_id */ - channel_id?: (string|null); - - /** RegisteredCounterpartyPayee relayer */ - relayer?: (string|null); - - /** RegisteredCounterpartyPayee counterparty_payee */ - counterparty_payee?: (string|null); - } - - /** Represents a RegisteredCounterpartyPayee. */ - class RegisteredCounterpartyPayee implements IRegisteredCounterpartyPayee { - - /** - * Constructs a new RegisteredCounterpartyPayee. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IRegisteredCounterpartyPayee); - - /** RegisteredCounterpartyPayee channel_id. */ - public channel_id: string; - - /** RegisteredCounterpartyPayee relayer. */ - public relayer: string; - - /** RegisteredCounterpartyPayee counterparty_payee. */ - public counterparty_payee: string; - - /** - * Encodes the specified RegisteredCounterpartyPayee message. Does not implicitly {@link ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify|verify} messages. - * @param message RegisteredCounterpartyPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IRegisteredCounterpartyPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisteredCounterpartyPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify|verify} messages. - * @param message RegisteredCounterpartyPayee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IRegisteredCounterpartyPayee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisteredCounterpartyPayee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegisteredCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.RegisteredCounterpartyPayee; - - /** - * Decodes a RegisteredCounterpartyPayee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisteredCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.RegisteredCounterpartyPayee; - - /** - * Verifies a RegisteredCounterpartyPayee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RegisteredCounterpartyPayee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegisteredCounterpartyPayee - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.RegisteredCounterpartyPayee; - - /** - * Creates a plain object from a RegisteredCounterpartyPayee message. Also converts values to other types if specified. - * @param message RegisteredCounterpartyPayee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.RegisteredCounterpartyPayee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegisteredCounterpartyPayee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ForwardRelayerAddress. */ - interface IForwardRelayerAddress { - - /** ForwardRelayerAddress address */ - address?: (string|null); - - /** ForwardRelayerAddress packet_id */ - packet_id?: (ibc.core.channel.v1.IPacketId|null); - } - - /** Represents a ForwardRelayerAddress. */ - class ForwardRelayerAddress implements IForwardRelayerAddress { - - /** - * Constructs a new ForwardRelayerAddress. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IForwardRelayerAddress); - - /** ForwardRelayerAddress address. */ - public address: string; - - /** ForwardRelayerAddress packet_id. */ - public packet_id?: (ibc.core.channel.v1.IPacketId|null); - - /** - * Encodes the specified ForwardRelayerAddress message. Does not implicitly {@link ibc.applications.fee.v1.ForwardRelayerAddress.verify|verify} messages. - * @param message ForwardRelayerAddress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IForwardRelayerAddress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ForwardRelayerAddress message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.ForwardRelayerAddress.verify|verify} messages. - * @param message ForwardRelayerAddress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IForwardRelayerAddress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ForwardRelayerAddress message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ForwardRelayerAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.ForwardRelayerAddress; - - /** - * Decodes a ForwardRelayerAddress message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ForwardRelayerAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.ForwardRelayerAddress; - - /** - * Verifies a ForwardRelayerAddress message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ForwardRelayerAddress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ForwardRelayerAddress - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.ForwardRelayerAddress; - - /** - * Creates a plain object from a ForwardRelayerAddress message. Also converts values to other types if specified. - * @param message ForwardRelayerAddress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.ForwardRelayerAddress, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ForwardRelayerAddress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata fee_version */ - fee_version?: (string|null); - - /** Metadata app_version */ - app_version?: (string|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.fee.v1.IMetadata); - - /** Metadata fee_version. */ - public fee_version: string; - - /** Metadata app_version. */ - public app_version: string; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link ibc.applications.fee.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.fee.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.fee.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.fee.v1.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.fee.v1.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.fee.v1.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.fee.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace interchain_accounts. */ - namespace interchain_accounts { - - /** Namespace controller. */ - namespace controller { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls RegisterInterchainAccount. - * @param request MsgRegisterInterchainAccount message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRegisterInterchainAccountResponse - */ - public registerInterchainAccount(request: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount, callback: ibc.applications.interchain_accounts.controller.v1.Msg.RegisterInterchainAccountCallback): void; - - /** - * Calls RegisterInterchainAccount. - * @param request MsgRegisterInterchainAccount message or plain object - * @returns Promise - */ - public registerInterchainAccount(request: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount): Promise; - - /** - * Calls SendTx. - * @param request MsgSendTx message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSendTxResponse - */ - public sendTx(request: ibc.applications.interchain_accounts.controller.v1.IMsgSendTx, callback: ibc.applications.interchain_accounts.controller.v1.Msg.SendTxCallback): void; - - /** - * Calls SendTx. - * @param request MsgSendTx message or plain object - * @returns Promise - */ - public sendTx(request: ibc.applications.interchain_accounts.controller.v1.IMsgSendTx): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Msg#registerInterchainAccount}. - * @param error Error, if any - * @param [response] MsgRegisterInterchainAccountResponse - */ - type RegisterInterchainAccountCallback = (error: (Error|null), response?: ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse) => void; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Msg#sendTx}. - * @param error Error, if any - * @param [response] MsgSendTxResponse - */ - type SendTxCallback = (error: (Error|null), response?: ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse) => void; - } - - /** Properties of a MsgRegisterInterchainAccount. */ - interface IMsgRegisterInterchainAccount { - - /** MsgRegisterInterchainAccount owner */ - owner?: (string|null); - - /** MsgRegisterInterchainAccount connection_id */ - connection_id?: (string|null); - - /** MsgRegisterInterchainAccount version */ - version?: (string|null); - } - - /** Represents a MsgRegisterInterchainAccount. */ - class MsgRegisterInterchainAccount implements IMsgRegisterInterchainAccount { - - /** - * Constructs a new MsgRegisterInterchainAccount. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount); - - /** MsgRegisterInterchainAccount owner. */ - public owner: string; - - /** MsgRegisterInterchainAccount connection_id. */ - public connection_id: string; - - /** MsgRegisterInterchainAccount version. */ - public version: string; - - /** - * Encodes the specified MsgRegisterInterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @param message MsgRegisterInterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterInterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @param message MsgRegisterInterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount; - - /** - * Verifies a MsgRegisterInterchainAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterInterchainAccount - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount; - - /** - * Creates a plain object from a MsgRegisterInterchainAccount message. Also converts values to other types if specified. - * @param message MsgRegisterInterchainAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterInterchainAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRegisterInterchainAccountResponse. */ - interface IMsgRegisterInterchainAccountResponse { - - /** MsgRegisterInterchainAccountResponse channel_id */ - channel_id?: (string|null); - - /** MsgRegisterInterchainAccountResponse port_id */ - port_id?: (string|null); - } - - /** Represents a MsgRegisterInterchainAccountResponse. */ - class MsgRegisterInterchainAccountResponse implements IMsgRegisterInterchainAccountResponse { - - /** - * Constructs a new MsgRegisterInterchainAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse); - - /** MsgRegisterInterchainAccountResponse channel_id. */ - public channel_id: string; - - /** MsgRegisterInterchainAccountResponse port_id. */ - public port_id: string; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @param message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @param message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse; - - /** - * Verifies a MsgRegisterInterchainAccountResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterInterchainAccountResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse; - - /** - * Creates a plain object from a MsgRegisterInterchainAccountResponse message. Also converts values to other types if specified. - * @param message MsgRegisterInterchainAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterInterchainAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSendTx. */ - interface IMsgSendTx { - - /** MsgSendTx owner */ - owner?: (string|null); - - /** MsgSendTx connection_id */ - connection_id?: (string|null); - - /** MsgSendTx packet_data */ - packet_data?: (ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData|null); - - /** MsgSendTx relative_timeout */ - relative_timeout?: (Long|null); - } - - /** Represents a MsgSendTx. */ - class MsgSendTx implements IMsgSendTx { - - /** - * Constructs a new MsgSendTx. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IMsgSendTx); - - /** MsgSendTx owner. */ - public owner: string; - - /** MsgSendTx connection_id. */ - public connection_id: string; - - /** MsgSendTx packet_data. */ - public packet_data?: (ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData|null); - - /** MsgSendTx relative_timeout. */ - public relative_timeout: Long; - - /** - * Encodes the specified MsgSendTx message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTx.verify|verify} messages. - * @param message MsgSendTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IMsgSendTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSendTx message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTx.verify|verify} messages. - * @param message MsgSendTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IMsgSendTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSendTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSendTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.MsgSendTx; - - /** - * Decodes a MsgSendTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSendTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.MsgSendTx; - - /** - * Verifies a MsgSendTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSendTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSendTx - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.MsgSendTx; - - /** - * Creates a plain object from a MsgSendTx message. Also converts values to other types if specified. - * @param message MsgSendTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.MsgSendTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSendTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSendTxResponse. */ - interface IMsgSendTxResponse { - - /** MsgSendTxResponse sequence */ - sequence?: (Long|null); - } - - /** Represents a MsgSendTxResponse. */ - class MsgSendTxResponse implements IMsgSendTxResponse { - - /** - * Constructs a new MsgSendTxResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse); - - /** MsgSendTxResponse sequence. */ - public sequence: Long; - - /** - * Encodes the specified MsgSendTxResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.verify|verify} messages. - * @param message MsgSendTxResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSendTxResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.verify|verify} messages. - * @param message MsgSendTxResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSendTxResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSendTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse; - - /** - * Decodes a MsgSendTxResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSendTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse; - - /** - * Verifies a MsgSendTxResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSendTxResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSendTxResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse; - - /** - * Creates a plain object from a MsgSendTxResponse message. Also converts values to other types if specified. - * @param message MsgSendTxResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSendTxResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls InterchainAccount. - * @param request QueryInterchainAccountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryInterchainAccountResponse - */ - public interchainAccount(request: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest, callback: ibc.applications.interchain_accounts.controller.v1.Query.InterchainAccountCallback): void; - - /** - * Calls InterchainAccount. - * @param request QueryInterchainAccountRequest message or plain object - * @returns Promise - */ - public interchainAccount(request: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest): Promise; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest, callback: ibc.applications.interchain_accounts.controller.v1.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Query#interchainAccount}. - * @param error Error, if any - * @param [response] QueryInterchainAccountResponse - */ - type InterchainAccountCallback = (error: (Error|null), response?: ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse) => void; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse) => void; - } - - /** Properties of a QueryInterchainAccountRequest. */ - interface IQueryInterchainAccountRequest { - - /** QueryInterchainAccountRequest owner */ - owner?: (string|null); - - /** QueryInterchainAccountRequest connection_id */ - connection_id?: (string|null); - } - - /** Represents a QueryInterchainAccountRequest. */ - class QueryInterchainAccountRequest implements IQueryInterchainAccountRequest { - - /** - * Constructs a new QueryInterchainAccountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest); - - /** QueryInterchainAccountRequest owner. */ - public owner: string; - - /** QueryInterchainAccountRequest connection_id. */ - public connection_id: string; - - /** - * Encodes the specified QueryInterchainAccountRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.verify|verify} messages. - * @param message QueryInterchainAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryInterchainAccountRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.verify|verify} messages. - * @param message QueryInterchainAccountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryInterchainAccountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryInterchainAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest; - - /** - * Decodes a QueryInterchainAccountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryInterchainAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest; - - /** - * Verifies a QueryInterchainAccountRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryInterchainAccountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryInterchainAccountRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest; - - /** - * Creates a plain object from a QueryInterchainAccountRequest message. Also converts values to other types if specified. - * @param message QueryInterchainAccountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryInterchainAccountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryInterchainAccountResponse. */ - interface IQueryInterchainAccountResponse { - - /** QueryInterchainAccountResponse address */ - address?: (string|null); - } - - /** Represents a QueryInterchainAccountResponse. */ - class QueryInterchainAccountResponse implements IQueryInterchainAccountResponse { - - /** - * Constructs a new QueryInterchainAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse); - - /** QueryInterchainAccountResponse address. */ - public address: string; - - /** - * Encodes the specified QueryInterchainAccountResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.verify|verify} messages. - * @param message QueryInterchainAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryInterchainAccountResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.verify|verify} messages. - * @param message QueryInterchainAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryInterchainAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse; - - /** - * Decodes a QueryInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse; - - /** - * Verifies a QueryInterchainAccountResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryInterchainAccountResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse; - - /** - * Creates a plain object from a QueryInterchainAccountResponse message. Also converts values to other types if specified. - * @param message QueryInterchainAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryInterchainAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (ibc.applications.interchain_accounts.controller.v1.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (ibc.applications.interchain_accounts.controller.v1.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params controller_enabled */ - controller_enabled?: (boolean|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.controller.v1.IParams); - - /** Params controller_enabled. */ - public controller_enabled: boolean; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.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: ibc.applications.interchain_accounts.controller.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.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: ibc.applications.interchain_accounts.controller.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): ibc.applications.interchain_accounts.controller.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)): ibc.applications.interchain_accounts.controller.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 }): ibc.applications.interchain_accounts.controller.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: ibc.applications.interchain_accounts.controller.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace v1. */ - namespace v1 { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - TYPE_EXECUTE_TX = 1 - } - - /** Properties of an InterchainAccountPacketData. */ - interface IInterchainAccountPacketData { - - /** InterchainAccountPacketData type */ - type?: (ibc.applications.interchain_accounts.v1.Type|null); - - /** InterchainAccountPacketData data */ - data?: (Uint8Array|null); - - /** InterchainAccountPacketData memo */ - memo?: (string|null); - } - - /** Represents an InterchainAccountPacketData. */ - class InterchainAccountPacketData implements IInterchainAccountPacketData { - - /** - * Constructs a new InterchainAccountPacketData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData); - - /** InterchainAccountPacketData type. */ - public type: ibc.applications.interchain_accounts.v1.Type; - - /** InterchainAccountPacketData data. */ - public data: Uint8Array; - - /** InterchainAccountPacketData memo. */ - public memo: string; - - /** - * Encodes the specified InterchainAccountPacketData message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify|verify} messages. - * @param message InterchainAccountPacketData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InterchainAccountPacketData message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify|verify} messages. - * @param message InterchainAccountPacketData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InterchainAccountPacketData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterchainAccountPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.v1.InterchainAccountPacketData; - - /** - * Decodes an InterchainAccountPacketData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterchainAccountPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.v1.InterchainAccountPacketData; - - /** - * Verifies an InterchainAccountPacketData message. - * @param message Plain 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 InterchainAccountPacketData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterchainAccountPacketData - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.v1.InterchainAccountPacketData; - - /** - * Creates a plain object from an InterchainAccountPacketData message. Also converts values to other types if specified. - * @param message InterchainAccountPacketData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.v1.InterchainAccountPacketData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InterchainAccountPacketData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CosmosTx. */ - interface ICosmosTx { - - /** CosmosTx messages */ - messages?: (google.protobuf.IAny[]|null); - } - - /** Represents a CosmosTx. */ - class CosmosTx implements ICosmosTx { - - /** - * Constructs a new CosmosTx. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.v1.ICosmosTx); - - /** CosmosTx messages. */ - public messages: google.protobuf.IAny[]; - - /** - * Encodes the specified CosmosTx message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.CosmosTx.verify|verify} messages. - * @param message CosmosTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.v1.ICosmosTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CosmosTx message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.CosmosTx.verify|verify} messages. - * @param message CosmosTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.v1.ICosmosTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CosmosTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CosmosTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.v1.CosmosTx; - - /** - * Decodes a CosmosTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CosmosTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.v1.CosmosTx; - - /** - * Verifies a CosmosTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CosmosTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CosmosTx - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.v1.CosmosTx; - - /** - * Creates a plain object from a CosmosTx message. Also converts values to other types if specified. - * @param message CosmosTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.v1.CosmosTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CosmosTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an InterchainAccount. */ - interface IInterchainAccount { - - /** InterchainAccount base_account */ - base_account?: (cosmos.auth.v1beta1.IBaseAccount|null); - - /** InterchainAccount account_owner */ - account_owner?: (string|null); - } - - /** Represents an InterchainAccount. */ - class InterchainAccount implements IInterchainAccount { - - /** - * Constructs a new InterchainAccount. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.v1.IInterchainAccount); - - /** InterchainAccount base_account. */ - public base_account?: (cosmos.auth.v1beta1.IBaseAccount|null); - - /** InterchainAccount account_owner. */ - public account_owner: string; - - /** - * Encodes the specified InterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccount.verify|verify} messages. - * @param message InterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.v1.IInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccount.verify|verify} messages. - * @param message InterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.v1.IInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InterchainAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.v1.InterchainAccount; - - /** - * Decodes an InterchainAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.v1.InterchainAccount; - - /** - * Verifies an InterchainAccount message. - * @param message Plain 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 InterchainAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterchainAccount - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.v1.InterchainAccount; - - /** - * Creates a plain object from an InterchainAccount message. Also converts values to other types if specified. - * @param message InterchainAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.v1.InterchainAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InterchainAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata version */ - version?: (string|null); - - /** Metadata controller_connection_id */ - controller_connection_id?: (string|null); - - /** Metadata host_connection_id */ - host_connection_id?: (string|null); - - /** Metadata address */ - address?: (string|null); - - /** Metadata encoding */ - encoding?: (string|null); - - /** Metadata tx_type */ - tx_type?: (string|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.v1.IMetadata); - - /** Metadata version. */ - public version: string; - - /** Metadata controller_connection_id. */ - public controller_connection_id: string; - - /** Metadata host_connection_id. */ - public host_connection_id: string; - - /** Metadata address. */ - public address: string; - - /** Metadata encoding. */ - public encoding: string; - - /** Metadata tx_type. */ - public tx_type: string; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.v1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.v1.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.v1.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.v1.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.v1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace genesis. */ - namespace genesis { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState controller_genesis_state */ - controller_genesis_state?: (ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState|null); - - /** GenesisState host_genesis_state */ - host_genesis_state?: (ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.genesis.v1.IGenesisState); - - /** GenesisState controller_genesis_state. */ - public controller_genesis_state?: (ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState|null); - - /** GenesisState host_genesis_state. */ - public host_genesis_state?: (ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.genesis.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.genesis.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.genesis.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.genesis.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.genesis.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.genesis.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ControllerGenesisState. */ - interface IControllerGenesisState { - - /** ControllerGenesisState active_channels */ - active_channels?: (ibc.applications.interchain_accounts.genesis.v1.IActiveChannel[]|null); - - /** ControllerGenesisState interchain_accounts */ - interchain_accounts?: (ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount[]|null); - - /** ControllerGenesisState ports */ - ports?: (string[]|null); - - /** ControllerGenesisState params */ - params?: (ibc.applications.interchain_accounts.controller.v1.IParams|null); - } - - /** Represents a ControllerGenesisState. */ - class ControllerGenesisState implements IControllerGenesisState { - - /** - * Constructs a new ControllerGenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState); - - /** ControllerGenesisState active_channels. */ - public active_channels: ibc.applications.interchain_accounts.genesis.v1.IActiveChannel[]; - - /** ControllerGenesisState interchain_accounts. */ - public interchain_accounts: ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount[]; - - /** ControllerGenesisState ports. */ - public ports: string[]; - - /** ControllerGenesisState params. */ - public params?: (ibc.applications.interchain_accounts.controller.v1.IParams|null); - - /** - * Encodes the specified ControllerGenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify|verify} messages. - * @param message ControllerGenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ControllerGenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify|verify} messages. - * @param message ControllerGenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ControllerGenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ControllerGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState; - - /** - * Decodes a ControllerGenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ControllerGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState; - - /** - * Verifies a ControllerGenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ControllerGenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ControllerGenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState; - - /** - * Creates a plain object from a ControllerGenesisState message. Also converts values to other types if specified. - * @param message ControllerGenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ControllerGenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HostGenesisState. */ - interface IHostGenesisState { - - /** HostGenesisState active_channels */ - active_channels?: (ibc.applications.interchain_accounts.genesis.v1.IActiveChannel[]|null); - - /** HostGenesisState interchain_accounts */ - interchain_accounts?: (ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount[]|null); - - /** HostGenesisState port */ - port?: (string|null); - - /** HostGenesisState params */ - params?: (ibc.applications.interchain_accounts.host.v1.IParams|null); - } - - /** Represents a HostGenesisState. */ - class HostGenesisState implements IHostGenesisState { - - /** - * Constructs a new HostGenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState); - - /** HostGenesisState active_channels. */ - public active_channels: ibc.applications.interchain_accounts.genesis.v1.IActiveChannel[]; - - /** HostGenesisState interchain_accounts. */ - public interchain_accounts: ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount[]; - - /** HostGenesisState port. */ - public port: string; - - /** HostGenesisState params. */ - public params?: (ibc.applications.interchain_accounts.host.v1.IParams|null); - - /** - * Encodes the specified HostGenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify|verify} messages. - * @param message HostGenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HostGenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify|verify} messages. - * @param message HostGenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HostGenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HostGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.genesis.v1.HostGenesisState; - - /** - * Decodes a HostGenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HostGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.genesis.v1.HostGenesisState; - - /** - * Verifies a HostGenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HostGenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HostGenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.genesis.v1.HostGenesisState; - - /** - * Creates a plain object from a HostGenesisState message. Also converts values to other types if specified. - * @param message HostGenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.genesis.v1.HostGenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HostGenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ActiveChannel. */ - interface IActiveChannel { - - /** ActiveChannel connection_id */ - connection_id?: (string|null); - - /** ActiveChannel port_id */ - port_id?: (string|null); - - /** ActiveChannel channel_id */ - channel_id?: (string|null); - - /** ActiveChannel is_middleware_enabled */ - is_middleware_enabled?: (boolean|null); - } - - /** Represents an ActiveChannel. */ - class ActiveChannel implements IActiveChannel { - - /** - * Constructs a new ActiveChannel. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.genesis.v1.IActiveChannel); - - /** ActiveChannel connection_id. */ - public connection_id: string; - - /** ActiveChannel port_id. */ - public port_id: string; - - /** ActiveChannel channel_id. */ - public channel_id: string; - - /** ActiveChannel is_middleware_enabled. */ - public is_middleware_enabled: boolean; - - /** - * Encodes the specified ActiveChannel message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify|verify} messages. - * @param message ActiveChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.genesis.v1.IActiveChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ActiveChannel message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify|verify} messages. - * @param message ActiveChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.genesis.v1.IActiveChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ActiveChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ActiveChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.genesis.v1.ActiveChannel; - - /** - * Decodes an ActiveChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ActiveChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.genesis.v1.ActiveChannel; - - /** - * Verifies an ActiveChannel message. - * @param message Plain 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 ActiveChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ActiveChannel - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.genesis.v1.ActiveChannel; - - /** - * Creates a plain object from an ActiveChannel message. Also converts values to other types if specified. - * @param message ActiveChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.genesis.v1.ActiveChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ActiveChannel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RegisteredInterchainAccount. */ - interface IRegisteredInterchainAccount { - - /** RegisteredInterchainAccount connection_id */ - connection_id?: (string|null); - - /** RegisteredInterchainAccount port_id */ - port_id?: (string|null); - - /** RegisteredInterchainAccount account_address */ - account_address?: (string|null); - } - - /** Represents a RegisteredInterchainAccount. */ - class RegisteredInterchainAccount implements IRegisteredInterchainAccount { - - /** - * Constructs a new RegisteredInterchainAccount. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount); - - /** RegisteredInterchainAccount connection_id. */ - public connection_id: string; - - /** RegisteredInterchainAccount port_id. */ - public port_id: string; - - /** RegisteredInterchainAccount account_address. */ - public account_address: string; - - /** - * Encodes the specified RegisteredInterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify|verify} messages. - * @param message RegisteredInterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisteredInterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify|verify} messages. - * @param message RegisteredInterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisteredInterchainAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegisteredInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount; - - /** - * Decodes a RegisteredInterchainAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisteredInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount; - - /** - * Verifies a RegisteredInterchainAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RegisteredInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegisteredInterchainAccount - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount; - - /** - * Creates a plain object from a RegisteredInterchainAccount message. Also converts values to other types if specified. - * @param message RegisteredInterchainAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegisteredInterchainAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace host. */ - namespace host { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Params. */ - interface IParams { - - /** Params host_enabled */ - host_enabled?: (boolean|null); - - /** Params allow_messages */ - allow_messages?: (string[]|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.host.v1.IParams); - - /** Params host_enabled. */ - public host_enabled: boolean; - - /** Params allow_messages. */ - public allow_messages: string[]; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.interchain_accounts.host.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: ibc.applications.interchain_accounts.host.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.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: ibc.applications.interchain_accounts.host.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): ibc.applications.interchain_accounts.host.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)): ibc.applications.interchain_accounts.host.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 }): ibc.applications.interchain_accounts.host.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: ibc.applications.interchain_accounts.host.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest, callback: ibc.applications.interchain_accounts.host.v1.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.host.v1.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: ibc.applications.interchain_accounts.host.v1.QueryParamsResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.host.v1.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.host.v1.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.host.v1.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.host.v1.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (ibc.applications.interchain_accounts.host.v1.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (ibc.applications.interchain_accounts.host.v1.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.interchain_accounts.host.v1.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.interchain_accounts.host.v1.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.interchain_accounts.host.v1.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.interchain_accounts.host.v1.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace transfer. */ - namespace transfer { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls Transfer. - * @param request MsgTransfer message or plain object - * @param callback Node-style callback called with the error, if any, and MsgTransferResponse - */ - public transfer(request: ibc.applications.transfer.v1.IMsgTransfer, callback: ibc.applications.transfer.v1.Msg.TransferCallback): void; - - /** - * Calls Transfer. - * @param request MsgTransfer message or plain object - * @returns Promise - */ - public transfer(request: ibc.applications.transfer.v1.IMsgTransfer): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Msg#transfer}. - * @param error Error, if any - * @param [response] MsgTransferResponse - */ - type TransferCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.MsgTransferResponse) => void; - } - - /** Properties of a MsgTransfer. */ - interface IMsgTransfer { - - /** MsgTransfer source_port */ - source_port?: (string|null); - - /** MsgTransfer source_channel */ - source_channel?: (string|null); - - /** MsgTransfer token */ - token?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgTransfer sender */ - sender?: (string|null); - - /** MsgTransfer receiver */ - receiver?: (string|null); - - /** MsgTransfer timeout_height */ - timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTransfer timeout_timestamp */ - timeout_timestamp?: (Long|null); - - /** MsgTransfer memo */ - memo?: (string|null); - } - - /** Represents a MsgTransfer. */ - class MsgTransfer implements IMsgTransfer { - - /** - * Constructs a new MsgTransfer. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IMsgTransfer); - - /** MsgTransfer source_port. */ - public source_port: string; - - /** MsgTransfer source_channel. */ - public source_channel: string; - - /** MsgTransfer token. */ - public token?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgTransfer sender. */ - public sender: string; - - /** MsgTransfer receiver. */ - public receiver: string; - - /** MsgTransfer timeout_height. */ - public timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTransfer timeout_timestamp. */ - public timeout_timestamp: Long; - - /** MsgTransfer memo. */ - public memo: string; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link ibc.applications.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: ibc.applications.transfer.v1.IMsgTransfer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link ibc.applications.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: ibc.applications.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): ibc.applications.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)): ibc.applications.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 }): ibc.applications.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: ibc.applications.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 MsgTransferResponse. */ - interface IMsgTransferResponse { - - /** MsgTransferResponse sequence */ - sequence?: (Long|null); - } - - /** Represents a MsgTransferResponse. */ - class MsgTransferResponse implements IMsgTransferResponse { - - /** - * Constructs a new MsgTransferResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IMsgTransferResponse); - - /** MsgTransferResponse sequence. */ - public sequence: Long; - - /** - * Encodes the specified MsgTransferResponse message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. - * @param message MsgTransferResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IMsgTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. - * @param message MsgTransferResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IMsgTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.MsgTransferResponse; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.MsgTransferResponse; - - /** - * Verifies a MsgTransferResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTransferResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.MsgTransferResponse; - - /** - * Creates a plain object from a MsgTransferResponse message. Also converts values to other types if specified. - * @param message MsgTransferResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.MsgTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTransferResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DenomTrace. */ - interface IDenomTrace { - - /** DenomTrace path */ - path?: (string|null); - - /** DenomTrace base_denom */ - base_denom?: (string|null); - } - - /** Represents a DenomTrace. */ - class DenomTrace implements IDenomTrace { - - /** - * Constructs a new DenomTrace. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IDenomTrace); - - /** DenomTrace path. */ - public path: string; - - /** DenomTrace base_denom. */ - public base_denom: string; - - /** - * Encodes the specified DenomTrace message. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @param message DenomTrace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IDenomTrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DenomTrace message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @param message DenomTrace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IDenomTrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DenomTrace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.DenomTrace; - - /** - * Decodes a DenomTrace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.DenomTrace; - - /** - * Verifies a DenomTrace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DenomTrace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DenomTrace - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.DenomTrace; - - /** - * Creates a plain object from a DenomTrace message. Also converts values to other types if specified. - * @param message DenomTrace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.DenomTrace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DenomTrace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params send_enabled */ - send_enabled?: (boolean|null); - - /** Params receive_enabled */ - receive_enabled?: (boolean|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IParams); - - /** Params send_enabled. */ - public send_enabled: boolean; - - /** Params receive_enabled. */ - public receive_enabled: boolean; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.transfer.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: ibc.applications.transfer.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.transfer.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: ibc.applications.transfer.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): ibc.applications.transfer.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)): ibc.applications.transfer.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 }): ibc.applications.transfer.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: ibc.applications.transfer.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls DenomTrace. - * @param request QueryDenomTraceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - */ - public denomTrace(request: ibc.applications.transfer.v1.IQueryDenomTraceRequest, callback: ibc.applications.transfer.v1.Query.DenomTraceCallback): void; - - /** - * Calls DenomTrace. - * @param request QueryDenomTraceRequest message or plain object - * @returns Promise - */ - public denomTrace(request: ibc.applications.transfer.v1.IQueryDenomTraceRequest): Promise; - - /** - * Calls DenomTraces. - * @param request QueryDenomTracesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - */ - public denomTraces(request: ibc.applications.transfer.v1.IQueryDenomTracesRequest, callback: ibc.applications.transfer.v1.Query.DenomTracesCallback): void; - - /** - * Calls DenomTraces. - * @param request QueryDenomTracesRequest message or plain object - * @returns Promise - */ - public denomTraces(request: ibc.applications.transfer.v1.IQueryDenomTracesRequest): Promise; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: ibc.applications.transfer.v1.IQueryParamsRequest, callback: ibc.applications.transfer.v1.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: ibc.applications.transfer.v1.IQueryParamsRequest): Promise; - - /** - * Calls DenomHash. - * @param request QueryDenomHashRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomHashResponse - */ - public denomHash(request: ibc.applications.transfer.v1.IQueryDenomHashRequest, callback: ibc.applications.transfer.v1.Query.DenomHashCallback): void; - - /** - * Calls DenomHash. - * @param request QueryDenomHashRequest message or plain object - * @returns Promise - */ - public denomHash(request: ibc.applications.transfer.v1.IQueryDenomHashRequest): Promise; - - /** - * Calls EscrowAddress. - * @param request QueryEscrowAddressRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryEscrowAddressResponse - */ - public escrowAddress(request: ibc.applications.transfer.v1.IQueryEscrowAddressRequest, callback: ibc.applications.transfer.v1.Query.EscrowAddressCallback): void; - - /** - * Calls EscrowAddress. - * @param request QueryEscrowAddressRequest message or plain object - * @returns Promise - */ - public escrowAddress(request: ibc.applications.transfer.v1.IQueryEscrowAddressRequest): Promise; - - /** - * Calls TotalEscrowForDenom. - * @param request QueryTotalEscrowForDenomRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalEscrowForDenomResponse - */ - public totalEscrowForDenom(request: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest, callback: ibc.applications.transfer.v1.Query.TotalEscrowForDenomCallback): void; - - /** - * Calls TotalEscrowForDenom. - * @param request QueryTotalEscrowForDenomRequest message or plain object - * @returns Promise - */ - public totalEscrowForDenom(request: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTrace}. - * @param error Error, if any - * @param [response] QueryDenomTraceResponse - */ - type DenomTraceCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomTraceResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTraces}. - * @param error Error, if any - * @param [response] QueryDenomTracesResponse - */ - type DenomTracesCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomTracesResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryParamsResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomHash}. - * @param error Error, if any - * @param [response] QueryDenomHashResponse - */ - type DenomHashCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomHashResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#escrowAddress}. - * @param error Error, if any - * @param [response] QueryEscrowAddressResponse - */ - type EscrowAddressCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryEscrowAddressResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#totalEscrowForDenom}. - * @param error Error, if any - * @param [response] QueryTotalEscrowForDenomResponse - */ - type TotalEscrowForDenomCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse) => void; - } - - /** Properties of a QueryDenomTraceRequest. */ - interface IQueryDenomTraceRequest { - - /** QueryDenomTraceRequest hash */ - hash?: (string|null); - } - - /** Represents a QueryDenomTraceRequest. */ - class QueryDenomTraceRequest implements IQueryDenomTraceRequest { - - /** - * Constructs a new QueryDenomTraceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTraceRequest); - - /** QueryDenomTraceRequest hash. */ - public hash: string; - - /** - * Encodes the specified QueryDenomTraceRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @param message QueryDenomTraceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTraceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTraceRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @param message QueryDenomTraceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTraceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTraceRequest; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTraceRequest; - - /** - * Verifies a QueryDenomTraceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTraceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTraceRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTraceRequest; - - /** - * Creates a plain object from a QueryDenomTraceRequest message. Also converts values to other types if specified. - * @param message QueryDenomTraceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTraceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTraceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomTraceResponse. */ - interface IQueryDenomTraceResponse { - - /** QueryDenomTraceResponse denom_trace */ - denom_trace?: (ibc.applications.transfer.v1.IDenomTrace|null); - } - - /** Represents a QueryDenomTraceResponse. */ - class QueryDenomTraceResponse implements IQueryDenomTraceResponse { - - /** - * Constructs a new QueryDenomTraceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTraceResponse); - - /** QueryDenomTraceResponse denom_trace. */ - public denom_trace?: (ibc.applications.transfer.v1.IDenomTrace|null); - - /** - * Encodes the specified QueryDenomTraceResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @param message QueryDenomTraceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTraceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTraceResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @param message QueryDenomTraceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTraceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTraceResponse; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTraceResponse; - - /** - * Verifies a QueryDenomTraceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTraceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTraceResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTraceResponse; - - /** - * Creates a plain object from a QueryDenomTraceResponse message. Also converts values to other types if specified. - * @param message QueryDenomTraceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTraceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTraceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomTracesRequest. */ - interface IQueryDenomTracesRequest { - - /** QueryDenomTracesRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryDenomTracesRequest. */ - class QueryDenomTracesRequest implements IQueryDenomTracesRequest { - - /** - * Constructs a new QueryDenomTracesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTracesRequest); - - /** QueryDenomTracesRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryDenomTracesRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @param message QueryDenomTracesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTracesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTracesRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @param message QueryDenomTracesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTracesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTracesRequest; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTracesRequest; - - /** - * Verifies a QueryDenomTracesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTracesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTracesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTracesRequest; - - /** - * Creates a plain object from a QueryDenomTracesRequest message. Also converts values to other types if specified. - * @param message QueryDenomTracesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTracesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTracesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomTracesResponse. */ - interface IQueryDenomTracesResponse { - - /** QueryDenomTracesResponse denom_traces */ - denom_traces?: (ibc.applications.transfer.v1.IDenomTrace[]|null); - - /** QueryDenomTracesResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryDenomTracesResponse. */ - class QueryDenomTracesResponse implements IQueryDenomTracesResponse { - - /** - * Constructs a new QueryDenomTracesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTracesResponse); - - /** QueryDenomTracesResponse denom_traces. */ - public denom_traces: ibc.applications.transfer.v1.IDenomTrace[]; - - /** QueryDenomTracesResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryDenomTracesResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @param message QueryDenomTracesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTracesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTracesResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @param message QueryDenomTracesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTracesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTracesResponse; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTracesResponse; - - /** - * Verifies a QueryDenomTracesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTracesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTracesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTracesResponse; - - /** - * Creates a plain object from a QueryDenomTracesResponse message. Also converts values to other types if specified. - * @param message QueryDenomTracesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTracesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTracesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (ibc.applications.transfer.v1.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (ibc.applications.transfer.v1.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomHashRequest. */ - interface IQueryDenomHashRequest { - - /** QueryDenomHashRequest trace */ - trace?: (string|null); - } - - /** Represents a QueryDenomHashRequest. */ - class QueryDenomHashRequest implements IQueryDenomHashRequest { - - /** - * Constructs a new QueryDenomHashRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomHashRequest); - - /** QueryDenomHashRequest trace. */ - public trace: string; - - /** - * Encodes the specified QueryDenomHashRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @param message QueryDenomHashRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomHashRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomHashRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @param message QueryDenomHashRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomHashRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomHashRequest; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomHashRequest; - - /** - * Verifies a QueryDenomHashRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomHashRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomHashRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomHashRequest; - - /** - * Creates a plain object from a QueryDenomHashRequest message. Also converts values to other types if specified. - * @param message QueryDenomHashRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomHashRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomHashRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomHashResponse. */ - interface IQueryDenomHashResponse { - - /** QueryDenomHashResponse hash */ - hash?: (string|null); - } - - /** Represents a QueryDenomHashResponse. */ - class QueryDenomHashResponse implements IQueryDenomHashResponse { - - /** - * Constructs a new QueryDenomHashResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomHashResponse); - - /** QueryDenomHashResponse hash. */ - public hash: string; - - /** - * Encodes the specified QueryDenomHashResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @param message QueryDenomHashResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomHashResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomHashResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @param message QueryDenomHashResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomHashResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomHashResponse; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomHashResponse; - - /** - * Verifies a QueryDenomHashResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomHashResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomHashResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomHashResponse; - - /** - * Creates a plain object from a QueryDenomHashResponse message. Also converts values to other types if specified. - * @param message QueryDenomHashResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomHashResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomHashResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryEscrowAddressRequest. */ - interface IQueryEscrowAddressRequest { - - /** QueryEscrowAddressRequest port_id */ - port_id?: (string|null); - - /** QueryEscrowAddressRequest channel_id */ - channel_id?: (string|null); - } - - /** Represents a QueryEscrowAddressRequest. */ - class QueryEscrowAddressRequest implements IQueryEscrowAddressRequest { - - /** - * Constructs a new QueryEscrowAddressRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryEscrowAddressRequest); - - /** QueryEscrowAddressRequest port_id. */ - public port_id: string; - - /** QueryEscrowAddressRequest channel_id. */ - public channel_id: string; - - /** - * Encodes the specified QueryEscrowAddressRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @param message QueryEscrowAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryEscrowAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryEscrowAddressRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @param message QueryEscrowAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryEscrowAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryEscrowAddressRequest; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryEscrowAddressRequest; - - /** - * Verifies a QueryEscrowAddressRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryEscrowAddressRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryEscrowAddressRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryEscrowAddressRequest; - - /** - * Creates a plain object from a QueryEscrowAddressRequest message. Also converts values to other types if specified. - * @param message QueryEscrowAddressRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryEscrowAddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryEscrowAddressRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryEscrowAddressResponse. */ - interface IQueryEscrowAddressResponse { - - /** QueryEscrowAddressResponse escrow_address */ - escrow_address?: (string|null); - } - - /** Represents a QueryEscrowAddressResponse. */ - class QueryEscrowAddressResponse implements IQueryEscrowAddressResponse { - - /** - * Constructs a new QueryEscrowAddressResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryEscrowAddressResponse); - - /** QueryEscrowAddressResponse escrow_address. */ - public escrow_address: string; - - /** - * Encodes the specified QueryEscrowAddressResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @param message QueryEscrowAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryEscrowAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryEscrowAddressResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @param message QueryEscrowAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryEscrowAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryEscrowAddressResponse; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryEscrowAddressResponse; - - /** - * Verifies a QueryEscrowAddressResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryEscrowAddressResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryEscrowAddressResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryEscrowAddressResponse; - - /** - * Creates a plain object from a QueryEscrowAddressResponse message. Also converts values to other types if specified. - * @param message QueryEscrowAddressResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryEscrowAddressResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryEscrowAddressResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalEscrowForDenomRequest. */ - interface IQueryTotalEscrowForDenomRequest { - - /** QueryTotalEscrowForDenomRequest denom */ - denom?: (string|null); - } - - /** Represents a QueryTotalEscrowForDenomRequest. */ - class QueryTotalEscrowForDenomRequest implements IQueryTotalEscrowForDenomRequest { - - /** - * Constructs a new QueryTotalEscrowForDenomRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest); - - /** QueryTotalEscrowForDenomRequest denom. */ - public denom: string; - - /** - * Encodes the specified QueryTotalEscrowForDenomRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.verify|verify} messages. - * @param message QueryTotalEscrowForDenomRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalEscrowForDenomRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.verify|verify} messages. - * @param message QueryTotalEscrowForDenomRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalEscrowForDenomRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalEscrowForDenomRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest; - - /** - * Decodes a QueryTotalEscrowForDenomRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalEscrowForDenomRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest; - - /** - * Verifies a QueryTotalEscrowForDenomRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalEscrowForDenomRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalEscrowForDenomRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest; - - /** - * Creates a plain object from a QueryTotalEscrowForDenomRequest message. Also converts values to other types if specified. - * @param message QueryTotalEscrowForDenomRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalEscrowForDenomRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalEscrowForDenomResponse. */ - interface IQueryTotalEscrowForDenomResponse { - - /** QueryTotalEscrowForDenomResponse amount */ - amount?: (cosmos.base.v1beta1.ICoin|null); - } - - /** Represents a QueryTotalEscrowForDenomResponse. */ - class QueryTotalEscrowForDenomResponse implements IQueryTotalEscrowForDenomResponse { - - /** - * Constructs a new QueryTotalEscrowForDenomResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse); - - /** QueryTotalEscrowForDenomResponse amount. */ - public amount?: (cosmos.base.v1beta1.ICoin|null); - - /** - * Encodes the specified QueryTotalEscrowForDenomResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.verify|verify} messages. - * @param message QueryTotalEscrowForDenomResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalEscrowForDenomResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.verify|verify} messages. - * @param message QueryTotalEscrowForDenomResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalEscrowForDenomResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalEscrowForDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse; - - /** - * Decodes a QueryTotalEscrowForDenomResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalEscrowForDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse; - - /** - * Verifies a QueryTotalEscrowForDenomResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalEscrowForDenomResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalEscrowForDenomResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse; - - /** - * Creates a plain object from a QueryTotalEscrowForDenomResponse message. Also converts values to other types if specified. - * @param message QueryTotalEscrowForDenomResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalEscrowForDenomResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Allocation. */ - interface IAllocation { - - /** Allocation source_port */ - source_port?: (string|null); - - /** Allocation source_channel */ - source_channel?: (string|null); - - /** Allocation spend_limit */ - spend_limit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Allocation allow_list */ - allow_list?: (string[]|null); - } - - /** Represents an Allocation. */ - class Allocation implements IAllocation { - - /** - * Constructs a new Allocation. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IAllocation); - - /** Allocation source_port. */ - public source_port: string; - - /** Allocation source_channel. */ - public source_channel: string; - - /** Allocation spend_limit. */ - public spend_limit: cosmos.base.v1beta1.ICoin[]; - - /** Allocation allow_list. */ - public allow_list: string[]; - - /** - * Encodes the specified Allocation message. Does not implicitly {@link ibc.applications.transfer.v1.Allocation.verify|verify} messages. - * @param message Allocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IAllocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Allocation message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Allocation.verify|verify} messages. - * @param message Allocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IAllocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Allocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Allocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.Allocation; - - /** - * Decodes an Allocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Allocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.Allocation; - - /** - * Verifies an Allocation message. - * @param message Plain 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 Allocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Allocation - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.Allocation; - - /** - * Creates a plain object from an Allocation message. Also converts values to other types if specified. - * @param message Allocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.Allocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Allocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TransferAuthorization. */ - interface ITransferAuthorization { - - /** TransferAuthorization allocations */ - allocations?: (ibc.applications.transfer.v1.IAllocation[]|null); - } - - /** Represents a TransferAuthorization. */ - class TransferAuthorization implements ITransferAuthorization { - - /** - * Constructs a new TransferAuthorization. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.ITransferAuthorization); - - /** TransferAuthorization allocations. */ - public allocations: ibc.applications.transfer.v1.IAllocation[]; - - /** - * Encodes the specified TransferAuthorization message. Does not implicitly {@link ibc.applications.transfer.v1.TransferAuthorization.verify|verify} messages. - * @param message TransferAuthorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.ITransferAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TransferAuthorization message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.TransferAuthorization.verify|verify} messages. - * @param message TransferAuthorization message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.ITransferAuthorization, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TransferAuthorization message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TransferAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.TransferAuthorization; - - /** - * Decodes a TransferAuthorization message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TransferAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.TransferAuthorization; - - /** - * Verifies a TransferAuthorization message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TransferAuthorization message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TransferAuthorization - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.TransferAuthorization; - - /** - * Creates a plain object from a TransferAuthorization message. Also converts values to other types if specified. - * @param message TransferAuthorization - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.TransferAuthorization, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TransferAuthorization to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState port_id */ - port_id?: (string|null); - - /** GenesisState denom_traces */ - denom_traces?: (ibc.applications.transfer.v1.IDenomTrace[]|null); - - /** GenesisState params */ - params?: (ibc.applications.transfer.v1.IParams|null); - - /** GenesisState total_escrowed */ - total_escrowed?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IGenesisState); - - /** GenesisState port_id. */ - public port_id: string; - - /** GenesisState denom_traces. */ - public denom_traces: ibc.applications.transfer.v1.IDenomTrace[]; - - /** GenesisState params. */ - public params?: (ibc.applications.transfer.v1.IParams|null); - - /** GenesisState total_escrowed. */ - public total_escrowed: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace v2. */ - namespace v2 { - - /** Properties of a FungibleTokenPacketData. */ - interface IFungibleTokenPacketData { - - /** FungibleTokenPacketData denom */ - denom?: (string|null); - - /** FungibleTokenPacketData amount */ - amount?: (string|null); - - /** FungibleTokenPacketData sender */ - sender?: (string|null); - - /** FungibleTokenPacketData receiver */ - receiver?: (string|null); - - /** FungibleTokenPacketData memo */ - memo?: (string|null); - } - - /** Represents a FungibleTokenPacketData. */ - class FungibleTokenPacketData implements IFungibleTokenPacketData { - - /** - * Constructs a new FungibleTokenPacketData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v2.IFungibleTokenPacketData); - - /** FungibleTokenPacketData denom. */ - public denom: string; - - /** FungibleTokenPacketData amount. */ - public amount: string; - - /** FungibleTokenPacketData sender. */ - public sender: string; - - /** FungibleTokenPacketData receiver. */ - public receiver: string; - - /** FungibleTokenPacketData memo. */ - public memo: string; - - /** - * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link ibc.applications.transfer.v2.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: ibc.applications.transfer.v2.IFungibleTokenPacketData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link ibc.applications.transfer.v2.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: ibc.applications.transfer.v2.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): ibc.applications.transfer.v2.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)): ibc.applications.transfer.v2.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 }): ibc.applications.transfer.v2.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: ibc.applications.transfer.v2.FungibleTokenPacketData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FungibleTokenPacketData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace core. */ - namespace core { - - /** Namespace channel. */ - namespace channel { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Channel. */ - interface IChannel { - - /** Channel state */ - state?: (ibc.core.channel.v1.State|null); - - /** Channel ordering */ - ordering?: (ibc.core.channel.v1.Order|null); - - /** Channel counterparty */ - counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** Channel connection_hops */ - connection_hops?: (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?: ibc.core.channel.v1.IChannel); - - /** Channel state. */ - public state: ibc.core.channel.v1.State; - - /** Channel ordering. */ - public ordering: ibc.core.channel.v1.Order; - - /** Channel counterparty. */ - public counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** Channel connection_hops. */ - public connection_hops: string[]; - - /** Channel version. */ - public version: string; - - /** - * Encodes the specified Channel message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Channel message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.channel.v1.Channel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Channel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IdentifiedChannel. */ - interface IIdentifiedChannel { - - /** IdentifiedChannel state */ - state?: (ibc.core.channel.v1.State|null); - - /** IdentifiedChannel ordering */ - ordering?: (ibc.core.channel.v1.Order|null); - - /** IdentifiedChannel counterparty */ - counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** IdentifiedChannel connection_hops */ - connection_hops?: (string[]|null); - - /** IdentifiedChannel version */ - version?: (string|null); - - /** IdentifiedChannel port_id */ - port_id?: (string|null); - - /** IdentifiedChannel channel_id */ - channel_id?: (string|null); - } - - /** Represents an IdentifiedChannel. */ - class IdentifiedChannel implements IIdentifiedChannel { - - /** - * Constructs a new IdentifiedChannel. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IIdentifiedChannel); - - /** IdentifiedChannel state. */ - public state: ibc.core.channel.v1.State; - - /** IdentifiedChannel ordering. */ - public ordering: ibc.core.channel.v1.Order; - - /** IdentifiedChannel counterparty. */ - public counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** IdentifiedChannel connection_hops. */ - public connection_hops: string[]; - - /** IdentifiedChannel version. */ - public version: string; - - /** IdentifiedChannel port_id. */ - public port_id: string; - - /** IdentifiedChannel channel_id. */ - public channel_id: string; - - /** - * Encodes the specified IdentifiedChannel message. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @param message IdentifiedChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IIdentifiedChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedChannel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @param message IdentifiedChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IIdentifiedChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.IdentifiedChannel; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.IdentifiedChannel; - - /** - * Verifies an IdentifiedChannel message. - * @param message Plain 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 IdentifiedChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedChannel - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.IdentifiedChannel; - - /** - * Creates a plain object from an IdentifiedChannel message. Also converts values to other types if specified. - * @param message IdentifiedChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.IdentifiedChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedChannel 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 port_id */ - port_id?: (string|null); - - /** Counterparty channel_id */ - channel_id?: (string|null); - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - - /** - * Constructs a new Counterparty. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.ICounterparty); - - /** Counterparty port_id. */ - public port_id: string; - - /** Counterparty channel_id. */ - public channel_id: string; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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?: (Long|null); - - /** Packet source_port */ - source_port?: (string|null); - - /** Packet source_channel */ - source_channel?: (string|null); - - /** Packet destination_port */ - destination_port?: (string|null); - - /** Packet destination_channel */ - destination_channel?: (string|null); - - /** Packet data */ - data?: (Uint8Array|null); - - /** Packet timeout_height */ - timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** Packet timeout_timestamp */ - timeout_timestamp?: (Long|null); - } - - /** Represents a Packet. */ - class Packet implements IPacket { - - /** - * Constructs a new Packet. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacket); - - /** Packet sequence. */ - public sequence: Long; - - /** Packet source_port. */ - public source_port: string; - - /** Packet source_channel. */ - public source_channel: string; - - /** Packet destination_port. */ - public destination_port: string; - - /** Packet destination_channel. */ - public destination_channel: string; - - /** Packet data. */ - public data: Uint8Array; - - /** Packet timeout_height. */ - public timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** Packet timeout_timestamp. */ - public timeout_timestamp: Long; - - /** - * Encodes the specified Packet message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IPacket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.channel.v1.Packet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Packet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketState. */ - interface IPacketState { - - /** PacketState port_id */ - port_id?: (string|null); - - /** PacketState channel_id */ - channel_id?: (string|null); - - /** PacketState sequence */ - sequence?: (Long|null); - - /** PacketState data */ - data?: (Uint8Array|null); - } - - /** Represents a PacketState. */ - class PacketState implements IPacketState { - - /** - * Constructs a new PacketState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacketState); - - /** PacketState port_id. */ - public port_id: string; - - /** PacketState channel_id. */ - public channel_id: string; - - /** PacketState sequence. */ - public sequence: Long; - - /** PacketState data. */ - public data: Uint8Array; - - /** - * Encodes the specified PacketState message. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @param message PacketState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IPacketState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @param message PacketState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IPacketState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.PacketState; - - /** - * Decodes a PacketState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.PacketState; - - /** - * Verifies a PacketState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.PacketState; - - /** - * Creates a plain object from a PacketState message. Also converts values to other types if specified. - * @param message PacketState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.PacketState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketId. */ - interface IPacketId { - - /** PacketId port_id */ - port_id?: (string|null); - - /** PacketId channel_id */ - channel_id?: (string|null); - - /** PacketId sequence */ - sequence?: (Long|null); - } - - /** Represents a PacketId. */ - class PacketId implements IPacketId { - - /** - * Constructs a new PacketId. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacketId); - - /** PacketId port_id. */ - public port_id: string; - - /** PacketId channel_id. */ - public channel_id: string; - - /** PacketId sequence. */ - public sequence: Long; - - /** - * Encodes the specified PacketId message. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @param message PacketId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IPacketId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketId message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @param message PacketId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IPacketId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketId message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.PacketId; - - /** - * Decodes a PacketId message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.PacketId; - - /** - * Verifies a PacketId message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketId message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketId - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.PacketId; - - /** - * Creates a plain object from a PacketId message. Also converts values to other types if specified. - * @param message PacketId - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.PacketId, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketId to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Acknowledgement. */ - interface IAcknowledgement { - - /** Acknowledgement result */ - result?: (Uint8Array|null); - - /** Acknowledgement error */ - error?: (string|null); - } - - /** Represents an Acknowledgement. */ - class Acknowledgement implements IAcknowledgement { - - /** - * Constructs a new Acknowledgement. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IAcknowledgement); - - /** Acknowledgement result. */ - public result?: (Uint8Array|null); - - /** Acknowledgement error. */ - public error?: (string|null); - - /** Acknowledgement response. */ - public response?: ("result"|"error"); - - /** - * Encodes the specified Acknowledgement message. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @param message Acknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Acknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @param message Acknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.Acknowledgement; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.Acknowledgement; - - /** - * Verifies an Acknowledgement message. - * @param message Plain 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 Acknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Acknowledgement - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.Acknowledgement; - - /** - * Creates a plain object from an Acknowledgement message. Also converts values to other types if specified. - * @param message Acknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.Acknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Acknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls ChannelOpenInit. - * @param request MsgChannelOpenInit message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChannelOpenInitResponse - */ - public channelOpenInit(request: ibc.core.channel.v1.IMsgChannelOpenInit, callback: ibc.core.channel.v1.Msg.ChannelOpenInitCallback): void; - - /** - * Calls ChannelOpenInit. - * @param request MsgChannelOpenInit message or plain object - * @returns Promise - */ - public channelOpenInit(request: ibc.core.channel.v1.IMsgChannelOpenInit): Promise; - - /** - * Calls ChannelOpenTry. - * @param request MsgChannelOpenTry message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChannelOpenTryResponse - */ - public channelOpenTry(request: ibc.core.channel.v1.IMsgChannelOpenTry, callback: ibc.core.channel.v1.Msg.ChannelOpenTryCallback): void; - - /** - * Calls ChannelOpenTry. - * @param request MsgChannelOpenTry message or plain object - * @returns Promise - */ - public channelOpenTry(request: ibc.core.channel.v1.IMsgChannelOpenTry): Promise; - - /** - * Calls ChannelOpenAck. - * @param request MsgChannelOpenAck message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChannelOpenAckResponse - */ - public channelOpenAck(request: ibc.core.channel.v1.IMsgChannelOpenAck, callback: ibc.core.channel.v1.Msg.ChannelOpenAckCallback): void; - - /** - * Calls ChannelOpenAck. - * @param request MsgChannelOpenAck message or plain object - * @returns Promise - */ - public channelOpenAck(request: ibc.core.channel.v1.IMsgChannelOpenAck): Promise; - - /** - * Calls ChannelOpenConfirm. - * @param request MsgChannelOpenConfirm message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChannelOpenConfirmResponse - */ - public channelOpenConfirm(request: ibc.core.channel.v1.IMsgChannelOpenConfirm, callback: ibc.core.channel.v1.Msg.ChannelOpenConfirmCallback): void; - - /** - * Calls ChannelOpenConfirm. - * @param request MsgChannelOpenConfirm message or plain object - * @returns Promise - */ - public channelOpenConfirm(request: ibc.core.channel.v1.IMsgChannelOpenConfirm): Promise; - - /** - * Calls ChannelCloseInit. - * @param request MsgChannelCloseInit message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChannelCloseInitResponse - */ - public channelCloseInit(request: ibc.core.channel.v1.IMsgChannelCloseInit, callback: ibc.core.channel.v1.Msg.ChannelCloseInitCallback): void; - - /** - * Calls ChannelCloseInit. - * @param request MsgChannelCloseInit message or plain object - * @returns Promise - */ - public channelCloseInit(request: ibc.core.channel.v1.IMsgChannelCloseInit): Promise; - - /** - * Calls ChannelCloseConfirm. - * @param request MsgChannelCloseConfirm message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChannelCloseConfirmResponse - */ - public channelCloseConfirm(request: ibc.core.channel.v1.IMsgChannelCloseConfirm, callback: ibc.core.channel.v1.Msg.ChannelCloseConfirmCallback): void; - - /** - * Calls ChannelCloseConfirm. - * @param request MsgChannelCloseConfirm message or plain object - * @returns Promise - */ - public channelCloseConfirm(request: ibc.core.channel.v1.IMsgChannelCloseConfirm): Promise; - - /** - * Calls RecvPacket. - * @param request MsgRecvPacket message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRecvPacketResponse - */ - public recvPacket(request: ibc.core.channel.v1.IMsgRecvPacket, callback: ibc.core.channel.v1.Msg.RecvPacketCallback): void; - - /** - * Calls RecvPacket. - * @param request MsgRecvPacket message or plain object - * @returns Promise - */ - public recvPacket(request: ibc.core.channel.v1.IMsgRecvPacket): Promise; - - /** - * Calls Timeout. - * @param request MsgTimeout message or plain object - * @param callback Node-style callback called with the error, if any, and MsgTimeoutResponse - */ - public timeout(request: ibc.core.channel.v1.IMsgTimeout, callback: ibc.core.channel.v1.Msg.TimeoutCallback): void; - - /** - * Calls Timeout. - * @param request MsgTimeout message or plain object - * @returns Promise - */ - public timeout(request: ibc.core.channel.v1.IMsgTimeout): Promise; - - /** - * Calls TimeoutOnClose. - * @param request MsgTimeoutOnClose message or plain object - * @param callback Node-style callback called with the error, if any, and MsgTimeoutOnCloseResponse - */ - public timeoutOnClose(request: ibc.core.channel.v1.IMsgTimeoutOnClose, callback: ibc.core.channel.v1.Msg.TimeoutOnCloseCallback): void; - - /** - * Calls TimeoutOnClose. - * @param request MsgTimeoutOnClose message or plain object - * @returns Promise - */ - public timeoutOnClose(request: ibc.core.channel.v1.IMsgTimeoutOnClose): Promise; - - /** - * Calls Acknowledgement. - * @param request MsgAcknowledgement message or plain object - * @param callback Node-style callback called with the error, if any, and MsgAcknowledgementResponse - */ - public acknowledgement(request: ibc.core.channel.v1.IMsgAcknowledgement, callback: ibc.core.channel.v1.Msg.AcknowledgementCallback): void; - - /** - * Calls Acknowledgement. - * @param request MsgAcknowledgement message or plain object - * @returns Promise - */ - public acknowledgement(request: ibc.core.channel.v1.IMsgAcknowledgement): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenInit}. - * @param error Error, if any - * @param [response] MsgChannelOpenInitResponse - */ - type ChannelOpenInitCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgChannelOpenInitResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenTry}. - * @param error Error, if any - * @param [response] MsgChannelOpenTryResponse - */ - type ChannelOpenTryCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgChannelOpenTryResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenAck}. - * @param error Error, if any - * @param [response] MsgChannelOpenAckResponse - */ - type ChannelOpenAckCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgChannelOpenAckResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenConfirm}. - * @param error Error, if any - * @param [response] MsgChannelOpenConfirmResponse - */ - type ChannelOpenConfirmCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgChannelOpenConfirmResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseInit}. - * @param error Error, if any - * @param [response] MsgChannelCloseInitResponse - */ - type ChannelCloseInitCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgChannelCloseInitResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseConfirm}. - * @param error Error, if any - * @param [response] MsgChannelCloseConfirmResponse - */ - type ChannelCloseConfirmCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgChannelCloseConfirmResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#recvPacket}. - * @param error Error, if any - * @param [response] MsgRecvPacketResponse - */ - type RecvPacketCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgRecvPacketResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#timeout}. - * @param error Error, if any - * @param [response] MsgTimeoutResponse - */ - type TimeoutCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgTimeoutResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#timeoutOnClose}. - * @param error Error, if any - * @param [response] MsgTimeoutOnCloseResponse - */ - type TimeoutOnCloseCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgTimeoutOnCloseResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#acknowledgement}. - * @param error Error, if any - * @param [response] MsgAcknowledgementResponse - */ - type AcknowledgementCallback = (error: (Error|null), response?: ibc.core.channel.v1.MsgAcknowledgementResponse) => void; - } - - /** ResponseResultType enum. */ - enum ResponseResultType { - RESPONSE_RESULT_TYPE_UNSPECIFIED = 0, - RESPONSE_RESULT_TYPE_NOOP = 1, - RESPONSE_RESULT_TYPE_SUCCESS = 2 - } - - /** Properties of a MsgChannelOpenInit. */ - interface IMsgChannelOpenInit { - - /** MsgChannelOpenInit port_id */ - port_id?: (string|null); - - /** MsgChannelOpenInit channel */ - channel?: (ibc.core.channel.v1.IChannel|null); - - /** MsgChannelOpenInit signer */ - signer?: (string|null); - } - - /** Represents a MsgChannelOpenInit. */ - class MsgChannelOpenInit implements IMsgChannelOpenInit { - - /** - * Constructs a new MsgChannelOpenInit. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenInit); - - /** MsgChannelOpenInit port_id. */ - public port_id: string; - - /** MsgChannelOpenInit channel. */ - public channel?: (ibc.core.channel.v1.IChannel|null); - - /** MsgChannelOpenInit signer. */ - public signer: string; - - /** - * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgChannelOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgChannelOpenInitResponse. */ - interface IMsgChannelOpenInitResponse { - - /** MsgChannelOpenInitResponse channel_id */ - channel_id?: (string|null); - - /** MsgChannelOpenInitResponse version */ - version?: (string|null); - } - - /** Represents a MsgChannelOpenInitResponse. */ - class MsgChannelOpenInitResponse implements IMsgChannelOpenInitResponse { - - /** - * Constructs a new MsgChannelOpenInitResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenInitResponse); - - /** MsgChannelOpenInitResponse channel_id. */ - public channel_id: string; - - /** MsgChannelOpenInitResponse version. */ - public version: string; - - /** - * Encodes the specified MsgChannelOpenInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. - * @param message MsgChannelOpenInitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgChannelOpenInitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. - * @param message MsgChannelOpenInitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgChannelOpenInitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgChannelOpenInitResponse; - - /** - * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgChannelOpenInitResponse; - - /** - * Verifies a MsgChannelOpenInitResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenInitResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenInitResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgChannelOpenInitResponse; - - /** - * Creates a plain object from a MsgChannelOpenInitResponse message. Also converts values to other types if specified. - * @param message MsgChannelOpenInitResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgChannelOpenInitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenInitResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelOpenTry. */ - interface IMsgChannelOpenTry { - - /** MsgChannelOpenTry port_id */ - port_id?: (string|null); - - /** MsgChannelOpenTry previous_channel_id */ - previous_channel_id?: (string|null); - - /** MsgChannelOpenTry channel */ - channel?: (ibc.core.channel.v1.IChannel|null); - - /** MsgChannelOpenTry counterparty_version */ - counterparty_version?: (string|null); - - /** MsgChannelOpenTry proof_init */ - proof_init?: (Uint8Array|null); - - /** MsgChannelOpenTry proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelOpenTry signer */ - signer?: (string|null); - } - - /** Represents a MsgChannelOpenTry. */ - class MsgChannelOpenTry implements IMsgChannelOpenTry { - - /** - * Constructs a new MsgChannelOpenTry. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenTry); - - /** MsgChannelOpenTry port_id. */ - public port_id: string; - - /** MsgChannelOpenTry previous_channel_id. */ - public previous_channel_id: string; - - /** MsgChannelOpenTry channel. */ - public channel?: (ibc.core.channel.v1.IChannel|null); - - /** MsgChannelOpenTry counterparty_version. */ - public counterparty_version: string; - - /** MsgChannelOpenTry proof_init. */ - public proof_init: Uint8Array; - - /** MsgChannelOpenTry proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelOpenTry signer. */ - public signer: string; - - /** - * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgChannelOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgChannelOpenTryResponse. */ - interface IMsgChannelOpenTryResponse { - - /** MsgChannelOpenTryResponse version */ - version?: (string|null); - - /** MsgChannelOpenTryResponse channel_id */ - channel_id?: (string|null); - } - - /** Represents a MsgChannelOpenTryResponse. */ - class MsgChannelOpenTryResponse implements IMsgChannelOpenTryResponse { - - /** - * Constructs a new MsgChannelOpenTryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenTryResponse); - - /** MsgChannelOpenTryResponse version. */ - public version: string; - - /** MsgChannelOpenTryResponse channel_id. */ - public channel_id: string; - - /** - * Encodes the specified MsgChannelOpenTryResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. - * @param message MsgChannelOpenTryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgChannelOpenTryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. - * @param message MsgChannelOpenTryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgChannelOpenTryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgChannelOpenTryResponse; - - /** - * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgChannelOpenTryResponse; - - /** - * Verifies a MsgChannelOpenTryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenTryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenTryResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgChannelOpenTryResponse; - - /** - * Creates a plain object from a MsgChannelOpenTryResponse message. Also converts values to other types if specified. - * @param message MsgChannelOpenTryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgChannelOpenTryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenTryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelOpenAck. */ - interface IMsgChannelOpenAck { - - /** MsgChannelOpenAck port_id */ - port_id?: (string|null); - - /** MsgChannelOpenAck channel_id */ - channel_id?: (string|null); - - /** MsgChannelOpenAck counterparty_channel_id */ - counterparty_channel_id?: (string|null); - - /** MsgChannelOpenAck counterparty_version */ - counterparty_version?: (string|null); - - /** MsgChannelOpenAck proof_try */ - proof_try?: (Uint8Array|null); - - /** MsgChannelOpenAck proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelOpenAck signer */ - signer?: (string|null); - } - - /** Represents a MsgChannelOpenAck. */ - class MsgChannelOpenAck implements IMsgChannelOpenAck { - - /** - * Constructs a new MsgChannelOpenAck. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenAck); - - /** MsgChannelOpenAck port_id. */ - public port_id: string; - - /** MsgChannelOpenAck channel_id. */ - public channel_id: string; - - /** MsgChannelOpenAck counterparty_channel_id. */ - public counterparty_channel_id: string; - - /** MsgChannelOpenAck counterparty_version. */ - public counterparty_version: string; - - /** MsgChannelOpenAck proof_try. */ - public proof_try: Uint8Array; - - /** MsgChannelOpenAck proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelOpenAck signer. */ - public signer: string; - - /** - * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgChannelOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgChannelOpenAckResponse. */ - interface IMsgChannelOpenAckResponse { - } - - /** Represents a MsgChannelOpenAckResponse. */ - class MsgChannelOpenAckResponse implements IMsgChannelOpenAckResponse { - - /** - * Constructs a new MsgChannelOpenAckResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenAckResponse); - - /** - * Encodes the specified MsgChannelOpenAckResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. - * @param message MsgChannelOpenAckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgChannelOpenAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. - * @param message MsgChannelOpenAckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgChannelOpenAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgChannelOpenAckResponse; - - /** - * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgChannelOpenAckResponse; - - /** - * Verifies a MsgChannelOpenAckResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenAckResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenAckResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgChannelOpenAckResponse; - - /** - * Creates a plain object from a MsgChannelOpenAckResponse message. Also converts values to other types if specified. - * @param message MsgChannelOpenAckResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgChannelOpenAckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenAckResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelOpenConfirm. */ - interface IMsgChannelOpenConfirm { - - /** MsgChannelOpenConfirm port_id */ - port_id?: (string|null); - - /** MsgChannelOpenConfirm channel_id */ - channel_id?: (string|null); - - /** MsgChannelOpenConfirm proof_ack */ - proof_ack?: (Uint8Array|null); - - /** MsgChannelOpenConfirm proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelOpenConfirm signer */ - signer?: (string|null); - } - - /** Represents a MsgChannelOpenConfirm. */ - class MsgChannelOpenConfirm implements IMsgChannelOpenConfirm { - - /** - * Constructs a new MsgChannelOpenConfirm. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenConfirm); - - /** MsgChannelOpenConfirm port_id. */ - public port_id: string; - - /** MsgChannelOpenConfirm channel_id. */ - public channel_id: string; - - /** MsgChannelOpenConfirm proof_ack. */ - public proof_ack: Uint8Array; - - /** MsgChannelOpenConfirm proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelOpenConfirm signer. */ - public signer: string; - - /** - * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgChannelOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgChannelOpenConfirmResponse. */ - interface IMsgChannelOpenConfirmResponse { - } - - /** Represents a MsgChannelOpenConfirmResponse. */ - class MsgChannelOpenConfirmResponse implements IMsgChannelOpenConfirmResponse { - - /** - * Constructs a new MsgChannelOpenConfirmResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelOpenConfirmResponse); - - /** - * Encodes the specified MsgChannelOpenConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. - * @param message MsgChannelOpenConfirmResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgChannelOpenConfirmResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. - * @param message MsgChannelOpenConfirmResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgChannelOpenConfirmResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgChannelOpenConfirmResponse; - - /** - * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgChannelOpenConfirmResponse; - - /** - * Verifies a MsgChannelOpenConfirmResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenConfirmResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgChannelOpenConfirmResponse; - - /** - * Creates a plain object from a MsgChannelOpenConfirmResponse message. Also converts values to other types if specified. - * @param message MsgChannelOpenConfirmResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgChannelOpenConfirmResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenConfirmResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelCloseInit. */ - interface IMsgChannelCloseInit { - - /** MsgChannelCloseInit port_id */ - port_id?: (string|null); - - /** MsgChannelCloseInit channel_id */ - channel_id?: (string|null); - - /** MsgChannelCloseInit signer */ - signer?: (string|null); - } - - /** Represents a MsgChannelCloseInit. */ - class MsgChannelCloseInit implements IMsgChannelCloseInit { - - /** - * Constructs a new MsgChannelCloseInit. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelCloseInit); - - /** MsgChannelCloseInit port_id. */ - public port_id: string; - - /** MsgChannelCloseInit channel_id. */ - public channel_id: string; - - /** MsgChannelCloseInit signer. */ - public signer: string; - - /** - * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgChannelCloseInit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgChannelCloseInitResponse. */ - interface IMsgChannelCloseInitResponse { - } - - /** Represents a MsgChannelCloseInitResponse. */ - class MsgChannelCloseInitResponse implements IMsgChannelCloseInitResponse { - - /** - * Constructs a new MsgChannelCloseInitResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelCloseInitResponse); - - /** - * Encodes the specified MsgChannelCloseInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. - * @param message MsgChannelCloseInitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgChannelCloseInitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. - * @param message MsgChannelCloseInitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgChannelCloseInitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelCloseInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgChannelCloseInitResponse; - - /** - * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelCloseInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgChannelCloseInitResponse; - - /** - * Verifies a MsgChannelCloseInitResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelCloseInitResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelCloseInitResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgChannelCloseInitResponse; - - /** - * Creates a plain object from a MsgChannelCloseInitResponse message. Also converts values to other types if specified. - * @param message MsgChannelCloseInitResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgChannelCloseInitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelCloseInitResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelCloseConfirm. */ - interface IMsgChannelCloseConfirm { - - /** MsgChannelCloseConfirm port_id */ - port_id?: (string|null); - - /** MsgChannelCloseConfirm channel_id */ - channel_id?: (string|null); - - /** MsgChannelCloseConfirm proof_init */ - proof_init?: (Uint8Array|null); - - /** MsgChannelCloseConfirm proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelCloseConfirm signer */ - signer?: (string|null); - } - - /** Represents a MsgChannelCloseConfirm. */ - class MsgChannelCloseConfirm implements IMsgChannelCloseConfirm { - - /** - * Constructs a new MsgChannelCloseConfirm. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelCloseConfirm); - - /** MsgChannelCloseConfirm port_id. */ - public port_id: string; - - /** MsgChannelCloseConfirm channel_id. */ - public channel_id: string; - - /** MsgChannelCloseConfirm proof_init. */ - public proof_init: Uint8Array; - - /** MsgChannelCloseConfirm proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgChannelCloseConfirm signer. */ - public signer: string; - - /** - * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgChannelCloseConfirm, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgChannelCloseConfirmResponse. */ - interface IMsgChannelCloseConfirmResponse { - } - - /** Represents a MsgChannelCloseConfirmResponse. */ - class MsgChannelCloseConfirmResponse implements IMsgChannelCloseConfirmResponse { - - /** - * Constructs a new MsgChannelCloseConfirmResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgChannelCloseConfirmResponse); - - /** - * Encodes the specified MsgChannelCloseConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. - * @param message MsgChannelCloseConfirmResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgChannelCloseConfirmResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. - * @param message MsgChannelCloseConfirmResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgChannelCloseConfirmResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelCloseConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgChannelCloseConfirmResponse; - - /** - * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelCloseConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgChannelCloseConfirmResponse; - - /** - * Verifies a MsgChannelCloseConfirmResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelCloseConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelCloseConfirmResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgChannelCloseConfirmResponse; - - /** - * Creates a plain object from a MsgChannelCloseConfirmResponse message. Also converts values to other types if specified. - * @param message MsgChannelCloseConfirmResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgChannelCloseConfirmResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelCloseConfirmResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRecvPacket. */ - interface IMsgRecvPacket { - - /** MsgRecvPacket packet */ - packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgRecvPacket proof_commitment */ - proof_commitment?: (Uint8Array|null); - - /** MsgRecvPacket proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgRecvPacket signer */ - signer?: (string|null); - } - - /** Represents a MsgRecvPacket. */ - class MsgRecvPacket implements IMsgRecvPacket { - - /** - * Constructs a new MsgRecvPacket. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgRecvPacket); - - /** MsgRecvPacket packet. */ - public packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgRecvPacket proof_commitment. */ - public proof_commitment: Uint8Array; - - /** MsgRecvPacket proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgRecvPacket signer. */ - public signer: string; - - /** - * Encodes the specified MsgRecvPacket message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. - * @param message MsgRecvPacket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgRecvPacket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRecvPacket message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. - * @param message MsgRecvPacket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgRecvPacket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRecvPacket message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRecvPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgRecvPacket; - - /** - * Decodes a MsgRecvPacket message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRecvPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgRecvPacket; - - /** - * Verifies a MsgRecvPacket message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRecvPacket message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRecvPacket - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgRecvPacket; - - /** - * Creates a plain object from a MsgRecvPacket message. Also converts values to other types if specified. - * @param message MsgRecvPacket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgRecvPacket, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRecvPacket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRecvPacketResponse. */ - interface IMsgRecvPacketResponse { - - /** MsgRecvPacketResponse result */ - result?: (ibc.core.channel.v1.ResponseResultType|null); - } - - /** Represents a MsgRecvPacketResponse. */ - class MsgRecvPacketResponse implements IMsgRecvPacketResponse { - - /** - * Constructs a new MsgRecvPacketResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgRecvPacketResponse); - - /** MsgRecvPacketResponse result. */ - public result: ibc.core.channel.v1.ResponseResultType; - - /** - * Encodes the specified MsgRecvPacketResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. - * @param message MsgRecvPacketResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgRecvPacketResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRecvPacketResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. - * @param message MsgRecvPacketResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgRecvPacketResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRecvPacketResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRecvPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgRecvPacketResponse; - - /** - * Decodes a MsgRecvPacketResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRecvPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgRecvPacketResponse; - - /** - * Verifies a MsgRecvPacketResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRecvPacketResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRecvPacketResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgRecvPacketResponse; - - /** - * Creates a plain object from a MsgRecvPacketResponse message. Also converts values to other types if specified. - * @param message MsgRecvPacketResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgRecvPacketResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRecvPacketResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgTimeout. */ - interface IMsgTimeout { - - /** MsgTimeout packet */ - packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgTimeout proof_unreceived */ - proof_unreceived?: (Uint8Array|null); - - /** MsgTimeout proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTimeout next_sequence_recv */ - next_sequence_recv?: (Long|null); - - /** MsgTimeout signer */ - signer?: (string|null); - } - - /** Represents a MsgTimeout. */ - class MsgTimeout implements IMsgTimeout { - - /** - * Constructs a new MsgTimeout. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgTimeout); - - /** MsgTimeout packet. */ - public packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgTimeout proof_unreceived. */ - public proof_unreceived: Uint8Array; - - /** MsgTimeout proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTimeout next_sequence_recv. */ - public next_sequence_recv: Long; - - /** MsgTimeout signer. */ - public signer: string; - - /** - * Encodes the specified MsgTimeout message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgTimeout, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgTimeoutResponse. */ - interface IMsgTimeoutResponse { - - /** MsgTimeoutResponse result */ - result?: (ibc.core.channel.v1.ResponseResultType|null); - } - - /** Represents a MsgTimeoutResponse. */ - class MsgTimeoutResponse implements IMsgTimeoutResponse { - - /** - * Constructs a new MsgTimeoutResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgTimeoutResponse); - - /** MsgTimeoutResponse result. */ - public result: ibc.core.channel.v1.ResponseResultType; - - /** - * Encodes the specified MsgTimeoutResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. - * @param message MsgTimeoutResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgTimeoutResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTimeoutResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. - * @param message MsgTimeoutResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgTimeoutResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTimeoutResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTimeoutResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgTimeoutResponse; - - /** - * Decodes a MsgTimeoutResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTimeoutResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgTimeoutResponse; - - /** - * Verifies a MsgTimeoutResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTimeoutResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTimeoutResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgTimeoutResponse; - - /** - * Creates a plain object from a MsgTimeoutResponse message. Also converts values to other types if specified. - * @param message MsgTimeoutResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgTimeoutResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTimeoutResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgTimeoutOnClose. */ - interface IMsgTimeoutOnClose { - - /** MsgTimeoutOnClose packet */ - packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgTimeoutOnClose proof_unreceived */ - proof_unreceived?: (Uint8Array|null); - - /** MsgTimeoutOnClose proof_close */ - proof_close?: (Uint8Array|null); - - /** MsgTimeoutOnClose proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTimeoutOnClose next_sequence_recv */ - next_sequence_recv?: (Long|null); - - /** MsgTimeoutOnClose signer */ - signer?: (string|null); - } - - /** Represents a MsgTimeoutOnClose. */ - class MsgTimeoutOnClose implements IMsgTimeoutOnClose { - - /** - * Constructs a new MsgTimeoutOnClose. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgTimeoutOnClose); - - /** MsgTimeoutOnClose packet. */ - public packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgTimeoutOnClose proof_unreceived. */ - public proof_unreceived: Uint8Array; - - /** MsgTimeoutOnClose proof_close. */ - public proof_close: Uint8Array; - - /** MsgTimeoutOnClose proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTimeoutOnClose next_sequence_recv. */ - public next_sequence_recv: Long; - - /** MsgTimeoutOnClose signer. */ - public signer: string; - - /** - * Encodes the specified MsgTimeoutOnClose message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. - * @param message MsgTimeoutOnClose message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgTimeoutOnClose, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTimeoutOnClose message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. - * @param message MsgTimeoutOnClose message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgTimeoutOnClose, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTimeoutOnClose message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTimeoutOnClose - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgTimeoutOnClose; - - /** - * Decodes a MsgTimeoutOnClose message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTimeoutOnClose - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgTimeoutOnClose; - - /** - * Verifies a MsgTimeoutOnClose message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTimeoutOnClose message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTimeoutOnClose - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgTimeoutOnClose; - - /** - * Creates a plain object from a MsgTimeoutOnClose message. Also converts values to other types if specified. - * @param message MsgTimeoutOnClose - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgTimeoutOnClose, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTimeoutOnClose to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgTimeoutOnCloseResponse. */ - interface IMsgTimeoutOnCloseResponse { - - /** MsgTimeoutOnCloseResponse result */ - result?: (ibc.core.channel.v1.ResponseResultType|null); - } - - /** Represents a MsgTimeoutOnCloseResponse. */ - class MsgTimeoutOnCloseResponse implements IMsgTimeoutOnCloseResponse { - - /** - * Constructs a new MsgTimeoutOnCloseResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgTimeoutOnCloseResponse); - - /** MsgTimeoutOnCloseResponse result. */ - public result: ibc.core.channel.v1.ResponseResultType; - - /** - * Encodes the specified MsgTimeoutOnCloseResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. - * @param message MsgTimeoutOnCloseResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgTimeoutOnCloseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTimeoutOnCloseResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. - * @param message MsgTimeoutOnCloseResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgTimeoutOnCloseResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTimeoutOnCloseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgTimeoutOnCloseResponse; - - /** - * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTimeoutOnCloseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgTimeoutOnCloseResponse; - - /** - * Verifies a MsgTimeoutOnCloseResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTimeoutOnCloseResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTimeoutOnCloseResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgTimeoutOnCloseResponse; - - /** - * Creates a plain object from a MsgTimeoutOnCloseResponse message. Also converts values to other types if specified. - * @param message MsgTimeoutOnCloseResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgTimeoutOnCloseResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTimeoutOnCloseResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAcknowledgement. */ - interface IMsgAcknowledgement { - - /** MsgAcknowledgement packet */ - packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgAcknowledgement acknowledgement */ - acknowledgement?: (Uint8Array|null); - - /** MsgAcknowledgement proof_acked */ - proof_acked?: (Uint8Array|null); - - /** MsgAcknowledgement proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgAcknowledgement signer */ - signer?: (string|null); - } - - /** Represents a MsgAcknowledgement. */ - class MsgAcknowledgement implements IMsgAcknowledgement { - - /** - * Constructs a new MsgAcknowledgement. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgAcknowledgement); - - /** MsgAcknowledgement packet. */ - public packet?: (ibc.core.channel.v1.IPacket|null); - - /** MsgAcknowledgement acknowledgement. */ - public acknowledgement: Uint8Array; - - /** MsgAcknowledgement proof_acked. */ - public proof_acked: Uint8Array; - - /** MsgAcknowledgement proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgAcknowledgement signer. */ - public signer: string; - - /** - * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IMsgAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgAcknowledgementResponse. */ - interface IMsgAcknowledgementResponse { - - /** MsgAcknowledgementResponse result */ - result?: (ibc.core.channel.v1.ResponseResultType|null); - } - - /** Represents a MsgAcknowledgementResponse. */ - class MsgAcknowledgementResponse implements IMsgAcknowledgementResponse { - - /** - * Constructs a new MsgAcknowledgementResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IMsgAcknowledgementResponse); - - /** MsgAcknowledgementResponse result. */ - public result: ibc.core.channel.v1.ResponseResultType; - - /** - * Encodes the specified MsgAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. - * @param message MsgAcknowledgementResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IMsgAcknowledgementResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. - * @param message MsgAcknowledgementResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IMsgAcknowledgementResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.MsgAcknowledgementResponse; - - /** - * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.MsgAcknowledgementResponse; - - /** - * Verifies a MsgAcknowledgementResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAcknowledgementResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.MsgAcknowledgementResponse; - - /** - * Creates a plain object from a MsgAcknowledgementResponse message. Also converts values to other types if specified. - * @param message MsgAcknowledgementResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.MsgAcknowledgementResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAcknowledgementResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Channel. - * @param request QueryChannelRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryChannelResponse - */ - public channel(request: ibc.core.channel.v1.IQueryChannelRequest, callback: ibc.core.channel.v1.Query.ChannelCallback): void; - - /** - * Calls Channel. - * @param request QueryChannelRequest message or plain object - * @returns Promise - */ - public channel(request: ibc.core.channel.v1.IQueryChannelRequest): Promise; - - /** - * Calls Channels. - * @param request QueryChannelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryChannelsResponse - */ - public channels(request: ibc.core.channel.v1.IQueryChannelsRequest, callback: ibc.core.channel.v1.Query.ChannelsCallback): void; - - /** - * Calls Channels. - * @param request QueryChannelsRequest message or plain object - * @returns Promise - */ - public channels(request: ibc.core.channel.v1.IQueryChannelsRequest): Promise; - - /** - * Calls ConnectionChannels. - * @param request QueryConnectionChannelsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConnectionChannelsResponse - */ - public connectionChannels(request: ibc.core.channel.v1.IQueryConnectionChannelsRequest, callback: ibc.core.channel.v1.Query.ConnectionChannelsCallback): void; - - /** - * Calls ConnectionChannels. - * @param request QueryConnectionChannelsRequest message or plain object - * @returns Promise - */ - public connectionChannels(request: ibc.core.channel.v1.IQueryConnectionChannelsRequest): Promise; - - /** - * Calls ChannelClientState. - * @param request QueryChannelClientStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryChannelClientStateResponse - */ - public channelClientState(request: ibc.core.channel.v1.IQueryChannelClientStateRequest, callback: ibc.core.channel.v1.Query.ChannelClientStateCallback): void; - - /** - * Calls ChannelClientState. - * @param request QueryChannelClientStateRequest message or plain object - * @returns Promise - */ - public channelClientState(request: ibc.core.channel.v1.IQueryChannelClientStateRequest): Promise; - - /** - * Calls ChannelConsensusState. - * @param request QueryChannelConsensusStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryChannelConsensusStateResponse - */ - public channelConsensusState(request: ibc.core.channel.v1.IQueryChannelConsensusStateRequest, callback: ibc.core.channel.v1.Query.ChannelConsensusStateCallback): void; - - /** - * Calls ChannelConsensusState. - * @param request QueryChannelConsensusStateRequest message or plain object - * @returns Promise - */ - public channelConsensusState(request: ibc.core.channel.v1.IQueryChannelConsensusStateRequest): Promise; - - /** - * Calls PacketCommitment. - * @param request QueryPacketCommitmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryPacketCommitmentResponse - */ - public packetCommitment(request: ibc.core.channel.v1.IQueryPacketCommitmentRequest, callback: ibc.core.channel.v1.Query.PacketCommitmentCallback): void; - - /** - * Calls PacketCommitment. - * @param request QueryPacketCommitmentRequest message or plain object - * @returns Promise - */ - public packetCommitment(request: ibc.core.channel.v1.IQueryPacketCommitmentRequest): Promise; - - /** - * Calls PacketCommitments. - * @param request QueryPacketCommitmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryPacketCommitmentsResponse - */ - public packetCommitments(request: ibc.core.channel.v1.IQueryPacketCommitmentsRequest, callback: ibc.core.channel.v1.Query.PacketCommitmentsCallback): void; - - /** - * Calls PacketCommitments. - * @param request QueryPacketCommitmentsRequest message or plain object - * @returns Promise - */ - public packetCommitments(request: ibc.core.channel.v1.IQueryPacketCommitmentsRequest): Promise; - - /** - * Calls PacketReceipt. - * @param request QueryPacketReceiptRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryPacketReceiptResponse - */ - public packetReceipt(request: ibc.core.channel.v1.IQueryPacketReceiptRequest, callback: ibc.core.channel.v1.Query.PacketReceiptCallback): void; - - /** - * Calls PacketReceipt. - * @param request QueryPacketReceiptRequest message or plain object - * @returns Promise - */ - public packetReceipt(request: ibc.core.channel.v1.IQueryPacketReceiptRequest): Promise; - - /** - * Calls PacketAcknowledgement. - * @param request QueryPacketAcknowledgementRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementResponse - */ - public packetAcknowledgement(request: ibc.core.channel.v1.IQueryPacketAcknowledgementRequest, callback: ibc.core.channel.v1.Query.PacketAcknowledgementCallback): void; - - /** - * Calls PacketAcknowledgement. - * @param request QueryPacketAcknowledgementRequest message or plain object - * @returns Promise - */ - public packetAcknowledgement(request: ibc.core.channel.v1.IQueryPacketAcknowledgementRequest): Promise; - - /** - * Calls PacketAcknowledgements. - * @param request QueryPacketAcknowledgementsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementsResponse - */ - public packetAcknowledgements(request: ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest, callback: ibc.core.channel.v1.Query.PacketAcknowledgementsCallback): void; - - /** - * Calls PacketAcknowledgements. - * @param request QueryPacketAcknowledgementsRequest message or plain object - * @returns Promise - */ - public packetAcknowledgements(request: ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest): Promise; - - /** - * Calls UnreceivedPackets. - * @param request QueryUnreceivedPacketsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryUnreceivedPacketsResponse - */ - public unreceivedPackets(request: ibc.core.channel.v1.IQueryUnreceivedPacketsRequest, callback: ibc.core.channel.v1.Query.UnreceivedPacketsCallback): void; - - /** - * Calls UnreceivedPackets. - * @param request QueryUnreceivedPacketsRequest message or plain object - * @returns Promise - */ - public unreceivedPackets(request: ibc.core.channel.v1.IQueryUnreceivedPacketsRequest): Promise; - - /** - * Calls UnreceivedAcks. - * @param request QueryUnreceivedAcksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryUnreceivedAcksResponse - */ - public unreceivedAcks(request: ibc.core.channel.v1.IQueryUnreceivedAcksRequest, callback: ibc.core.channel.v1.Query.UnreceivedAcksCallback): void; - - /** - * Calls UnreceivedAcks. - * @param request QueryUnreceivedAcksRequest message or plain object - * @returns Promise - */ - public unreceivedAcks(request: ibc.core.channel.v1.IQueryUnreceivedAcksRequest): Promise; - - /** - * Calls NextSequenceReceive. - * @param request QueryNextSequenceReceiveRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryNextSequenceReceiveResponse - */ - public nextSequenceReceive(request: ibc.core.channel.v1.IQueryNextSequenceReceiveRequest, callback: ibc.core.channel.v1.Query.NextSequenceReceiveCallback): void; - - /** - * Calls NextSequenceReceive. - * @param request QueryNextSequenceReceiveRequest message or plain object - * @returns Promise - */ - public nextSequenceReceive(request: ibc.core.channel.v1.IQueryNextSequenceReceiveRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channel}. - * @param error Error, if any - * @param [response] QueryChannelResponse - */ - type ChannelCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryChannelResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channels}. - * @param error Error, if any - * @param [response] QueryChannelsResponse - */ - type ChannelsCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryChannelsResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#connectionChannels}. - * @param error Error, if any - * @param [response] QueryConnectionChannelsResponse - */ - type ConnectionChannelsCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryConnectionChannelsResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channelClientState}. - * @param error Error, if any - * @param [response] QueryChannelClientStateResponse - */ - type ChannelClientStateCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryChannelClientStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channelConsensusState}. - * @param error Error, if any - * @param [response] QueryChannelConsensusStateResponse - */ - type ChannelConsensusStateCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryChannelConsensusStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitment}. - * @param error Error, if any - * @param [response] QueryPacketCommitmentResponse - */ - type PacketCommitmentCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryPacketCommitmentResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitments}. - * @param error Error, if any - * @param [response] QueryPacketCommitmentsResponse - */ - type PacketCommitmentsCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryPacketCommitmentsResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetReceipt}. - * @param error Error, if any - * @param [response] QueryPacketReceiptResponse - */ - type PacketReceiptCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryPacketReceiptResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgement}. - * @param error Error, if any - * @param [response] QueryPacketAcknowledgementResponse - */ - type PacketAcknowledgementCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryPacketAcknowledgementResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgements}. - * @param error Error, if any - * @param [response] QueryPacketAcknowledgementsResponse - */ - type PacketAcknowledgementsCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryPacketAcknowledgementsResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedPackets}. - * @param error Error, if any - * @param [response] QueryUnreceivedPacketsResponse - */ - type UnreceivedPacketsCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryUnreceivedPacketsResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedAcks}. - * @param error Error, if any - * @param [response] QueryUnreceivedAcksResponse - */ - type UnreceivedAcksCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryUnreceivedAcksResponse) => void; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#nextSequenceReceive}. - * @param error Error, if any - * @param [response] QueryNextSequenceReceiveResponse - */ - type NextSequenceReceiveCallback = (error: (Error|null), response?: ibc.core.channel.v1.QueryNextSequenceReceiveResponse) => void; - } - - /** Properties of a QueryChannelRequest. */ - interface IQueryChannelRequest { - - /** QueryChannelRequest port_id */ - port_id?: (string|null); - - /** QueryChannelRequest channel_id */ - channel_id?: (string|null); - } - - /** Represents a QueryChannelRequest. */ - class QueryChannelRequest implements IQueryChannelRequest { - - /** - * Constructs a new QueryChannelRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelRequest); - - /** QueryChannelRequest port_id. */ - public port_id: string; - - /** QueryChannelRequest channel_id. */ - public channel_id: string; - - /** - * Encodes the specified QueryChannelRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. - * @param message QueryChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. - * @param message QueryChannelRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelRequest; - - /** - * Decodes a QueryChannelRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelRequest; - - /** - * Verifies a QueryChannelRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelRequest; - - /** - * Creates a plain object from a QueryChannelRequest message. Also converts values to other types if specified. - * @param message QueryChannelRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelResponse. */ - interface IQueryChannelResponse { - - /** QueryChannelResponse channel */ - channel?: (ibc.core.channel.v1.IChannel|null); - - /** QueryChannelResponse proof */ - proof?: (Uint8Array|null); - - /** QueryChannelResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryChannelResponse. */ - class QueryChannelResponse implements IQueryChannelResponse { - - /** - * Constructs a new QueryChannelResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelResponse); - - /** QueryChannelResponse channel. */ - public channel?: (ibc.core.channel.v1.IChannel|null); - - /** QueryChannelResponse proof. */ - public proof: Uint8Array; - - /** QueryChannelResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryChannelResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. - * @param message QueryChannelResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. - * @param message QueryChannelResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelResponse; - - /** - * Decodes a QueryChannelResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelResponse; - - /** - * Verifies a QueryChannelResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelResponse; - - /** - * Creates a plain object from a QueryChannelResponse message. Also converts values to other types if specified. - * @param message QueryChannelResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelsRequest. */ - interface IQueryChannelsRequest { - - /** QueryChannelsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryChannelsRequest. */ - class QueryChannelsRequest implements IQueryChannelsRequest { - - /** - * Constructs a new QueryChannelsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelsRequest); - - /** QueryChannelsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. - * @param message QueryChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. - * @param message QueryChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelsRequest; - - /** - * Decodes a QueryChannelsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelsRequest; - - /** - * Verifies a QueryChannelsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelsRequest; - - /** - * Creates a plain object from a QueryChannelsRequest message. Also converts values to other types if specified. - * @param message QueryChannelsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelsResponse. */ - interface IQueryChannelsResponse { - - /** QueryChannelsResponse channels */ - channels?: (ibc.core.channel.v1.IIdentifiedChannel[]|null); - - /** QueryChannelsResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryChannelsResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryChannelsResponse. */ - class QueryChannelsResponse implements IQueryChannelsResponse { - - /** - * Constructs a new QueryChannelsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelsResponse); - - /** QueryChannelsResponse channels. */ - public channels: ibc.core.channel.v1.IIdentifiedChannel[]; - - /** QueryChannelsResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryChannelsResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. - * @param message QueryChannelsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. - * @param message QueryChannelsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelsResponse; - - /** - * Decodes a QueryChannelsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelsResponse; - - /** - * Verifies a QueryChannelsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelsResponse; - - /** - * Creates a plain object from a QueryChannelsResponse message. Also converts values to other types if specified. - * @param message QueryChannelsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionChannelsRequest. */ - interface IQueryConnectionChannelsRequest { - - /** QueryConnectionChannelsRequest connection */ - connection?: (string|null); - - /** QueryConnectionChannelsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryConnectionChannelsRequest. */ - class QueryConnectionChannelsRequest implements IQueryConnectionChannelsRequest { - - /** - * Constructs a new QueryConnectionChannelsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryConnectionChannelsRequest); - - /** QueryConnectionChannelsRequest connection. */ - public connection: string; - - /** QueryConnectionChannelsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryConnectionChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. - * @param message QueryConnectionChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryConnectionChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. - * @param message QueryConnectionChannelsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryConnectionChannelsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryConnectionChannelsRequest; - - /** - * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryConnectionChannelsRequest; - - /** - * Verifies a QueryConnectionChannelsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionChannelsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryConnectionChannelsRequest; - - /** - * Creates a plain object from a QueryConnectionChannelsRequest message. Also converts values to other types if specified. - * @param message QueryConnectionChannelsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryConnectionChannelsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionChannelsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionChannelsResponse. */ - interface IQueryConnectionChannelsResponse { - - /** QueryConnectionChannelsResponse channels */ - channels?: (ibc.core.channel.v1.IIdentifiedChannel[]|null); - - /** QueryConnectionChannelsResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryConnectionChannelsResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryConnectionChannelsResponse. */ - class QueryConnectionChannelsResponse implements IQueryConnectionChannelsResponse { - - /** - * Constructs a new QueryConnectionChannelsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryConnectionChannelsResponse); - - /** QueryConnectionChannelsResponse channels. */ - public channels: ibc.core.channel.v1.IIdentifiedChannel[]; - - /** QueryConnectionChannelsResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryConnectionChannelsResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryConnectionChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. - * @param message QueryConnectionChannelsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryConnectionChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. - * @param message QueryConnectionChannelsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryConnectionChannelsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryConnectionChannelsResponse; - - /** - * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryConnectionChannelsResponse; - - /** - * Verifies a QueryConnectionChannelsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionChannelsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryConnectionChannelsResponse; - - /** - * Creates a plain object from a QueryConnectionChannelsResponse message. Also converts values to other types if specified. - * @param message QueryConnectionChannelsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryConnectionChannelsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionChannelsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelClientStateRequest. */ - interface IQueryChannelClientStateRequest { - - /** QueryChannelClientStateRequest port_id */ - port_id?: (string|null); - - /** QueryChannelClientStateRequest channel_id */ - channel_id?: (string|null); - } - - /** Represents a QueryChannelClientStateRequest. */ - class QueryChannelClientStateRequest implements IQueryChannelClientStateRequest { - - /** - * Constructs a new QueryChannelClientStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelClientStateRequest); - - /** QueryChannelClientStateRequest port_id. */ - public port_id: string; - - /** QueryChannelClientStateRequest channel_id. */ - public channel_id: string; - - /** - * Encodes the specified QueryChannelClientStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. - * @param message QueryChannelClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. - * @param message QueryChannelClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelClientStateRequest; - - /** - * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelClientStateRequest; - - /** - * Verifies a QueryChannelClientStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelClientStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelClientStateRequest; - - /** - * Creates a plain object from a QueryChannelClientStateRequest message. Also converts values to other types if specified. - * @param message QueryChannelClientStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelClientStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelClientStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelClientStateResponse. */ - interface IQueryChannelClientStateResponse { - - /** QueryChannelClientStateResponse identified_client_state */ - identified_client_state?: (ibc.core.client.v1.IIdentifiedClientState|null); - - /** QueryChannelClientStateResponse proof */ - proof?: (Uint8Array|null); - - /** QueryChannelClientStateResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryChannelClientStateResponse. */ - class QueryChannelClientStateResponse implements IQueryChannelClientStateResponse { - - /** - * Constructs a new QueryChannelClientStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelClientStateResponse); - - /** QueryChannelClientStateResponse identified_client_state. */ - public identified_client_state?: (ibc.core.client.v1.IIdentifiedClientState|null); - - /** QueryChannelClientStateResponse proof. */ - public proof: Uint8Array; - - /** QueryChannelClientStateResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryChannelClientStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. - * @param message QueryChannelClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. - * @param message QueryChannelClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelClientStateResponse; - - /** - * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelClientStateResponse; - - /** - * Verifies a QueryChannelClientStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelClientStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelClientStateResponse; - - /** - * Creates a plain object from a QueryChannelClientStateResponse message. Also converts values to other types if specified. - * @param message QueryChannelClientStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelClientStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelClientStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelConsensusStateRequest. */ - interface IQueryChannelConsensusStateRequest { - - /** QueryChannelConsensusStateRequest port_id */ - port_id?: (string|null); - - /** QueryChannelConsensusStateRequest channel_id */ - channel_id?: (string|null); - - /** QueryChannelConsensusStateRequest revision_number */ - revision_number?: (Long|null); - - /** QueryChannelConsensusStateRequest revision_height */ - revision_height?: (Long|null); - } - - /** Represents a QueryChannelConsensusStateRequest. */ - class QueryChannelConsensusStateRequest implements IQueryChannelConsensusStateRequest { - - /** - * Constructs a new QueryChannelConsensusStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelConsensusStateRequest); - - /** QueryChannelConsensusStateRequest port_id. */ - public port_id: string; - - /** QueryChannelConsensusStateRequest channel_id. */ - public channel_id: string; - - /** QueryChannelConsensusStateRequest revision_number. */ - public revision_number: Long; - - /** QueryChannelConsensusStateRequest revision_height. */ - public revision_height: Long; - - /** - * Encodes the specified QueryChannelConsensusStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. - * @param message QueryChannelConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. - * @param message QueryChannelConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelConsensusStateRequest; - - /** - * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelConsensusStateRequest; - - /** - * Verifies a QueryChannelConsensusStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelConsensusStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelConsensusStateRequest; - - /** - * Creates a plain object from a QueryChannelConsensusStateRequest message. Also converts values to other types if specified. - * @param message QueryChannelConsensusStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelConsensusStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelConsensusStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryChannelConsensusStateResponse. */ - interface IQueryChannelConsensusStateResponse { - - /** QueryChannelConsensusStateResponse consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - - /** QueryChannelConsensusStateResponse client_id */ - client_id?: (string|null); - - /** QueryChannelConsensusStateResponse proof */ - proof?: (Uint8Array|null); - - /** QueryChannelConsensusStateResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryChannelConsensusStateResponse. */ - class QueryChannelConsensusStateResponse implements IQueryChannelConsensusStateResponse { - - /** - * Constructs a new QueryChannelConsensusStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryChannelConsensusStateResponse); - - /** QueryChannelConsensusStateResponse consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** QueryChannelConsensusStateResponse client_id. */ - public client_id: string; - - /** QueryChannelConsensusStateResponse proof. */ - public proof: Uint8Array; - - /** QueryChannelConsensusStateResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryChannelConsensusStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. - * @param message QueryChannelConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryChannelConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryChannelConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. - * @param message QueryChannelConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryChannelConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryChannelConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryChannelConsensusStateResponse; - - /** - * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryChannelConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryChannelConsensusStateResponse; - - /** - * Verifies a QueryChannelConsensusStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryChannelConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryChannelConsensusStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryChannelConsensusStateResponse; - - /** - * Creates a plain object from a QueryChannelConsensusStateResponse message. Also converts values to other types if specified. - * @param message QueryChannelConsensusStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryChannelConsensusStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryChannelConsensusStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketCommitmentRequest. */ - interface IQueryPacketCommitmentRequest { - - /** QueryPacketCommitmentRequest port_id */ - port_id?: (string|null); - - /** QueryPacketCommitmentRequest channel_id */ - channel_id?: (string|null); - - /** QueryPacketCommitmentRequest sequence */ - sequence?: (Long|null); - } - - /** Represents a QueryPacketCommitmentRequest. */ - class QueryPacketCommitmentRequest implements IQueryPacketCommitmentRequest { - - /** - * Constructs a new QueryPacketCommitmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketCommitmentRequest); - - /** QueryPacketCommitmentRequest port_id. */ - public port_id: string; - - /** QueryPacketCommitmentRequest channel_id. */ - public channel_id: string; - - /** QueryPacketCommitmentRequest sequence. */ - public sequence: Long; - - /** - * Encodes the specified QueryPacketCommitmentRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. - * @param message QueryPacketCommitmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketCommitmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketCommitmentRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. - * @param message QueryPacketCommitmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketCommitmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketCommitmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketCommitmentRequest; - - /** - * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketCommitmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketCommitmentRequest; - - /** - * Verifies a QueryPacketCommitmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketCommitmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketCommitmentRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketCommitmentRequest; - - /** - * Creates a plain object from a QueryPacketCommitmentRequest message. Also converts values to other types if specified. - * @param message QueryPacketCommitmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketCommitmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketCommitmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketCommitmentResponse. */ - interface IQueryPacketCommitmentResponse { - - /** QueryPacketCommitmentResponse commitment */ - commitment?: (Uint8Array|null); - - /** QueryPacketCommitmentResponse proof */ - proof?: (Uint8Array|null); - - /** QueryPacketCommitmentResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryPacketCommitmentResponse. */ - class QueryPacketCommitmentResponse implements IQueryPacketCommitmentResponse { - - /** - * Constructs a new QueryPacketCommitmentResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketCommitmentResponse); - - /** QueryPacketCommitmentResponse commitment. */ - public commitment: Uint8Array; - - /** QueryPacketCommitmentResponse proof. */ - public proof: Uint8Array; - - /** QueryPacketCommitmentResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryPacketCommitmentResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. - * @param message QueryPacketCommitmentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketCommitmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketCommitmentResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. - * @param message QueryPacketCommitmentResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketCommitmentResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketCommitmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketCommitmentResponse; - - /** - * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketCommitmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketCommitmentResponse; - - /** - * Verifies a QueryPacketCommitmentResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketCommitmentResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketCommitmentResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketCommitmentResponse; - - /** - * Creates a plain object from a QueryPacketCommitmentResponse message. Also converts values to other types if specified. - * @param message QueryPacketCommitmentResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketCommitmentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketCommitmentResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketCommitmentsRequest. */ - interface IQueryPacketCommitmentsRequest { - - /** QueryPacketCommitmentsRequest port_id */ - port_id?: (string|null); - - /** QueryPacketCommitmentsRequest channel_id */ - channel_id?: (string|null); - - /** QueryPacketCommitmentsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryPacketCommitmentsRequest. */ - class QueryPacketCommitmentsRequest implements IQueryPacketCommitmentsRequest { - - /** - * Constructs a new QueryPacketCommitmentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketCommitmentsRequest); - - /** QueryPacketCommitmentsRequest port_id. */ - public port_id: string; - - /** QueryPacketCommitmentsRequest channel_id. */ - public channel_id: string; - - /** QueryPacketCommitmentsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryPacketCommitmentsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. - * @param message QueryPacketCommitmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketCommitmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketCommitmentsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. - * @param message QueryPacketCommitmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketCommitmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketCommitmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketCommitmentsRequest; - - /** - * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketCommitmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketCommitmentsRequest; - - /** - * Verifies a QueryPacketCommitmentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketCommitmentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketCommitmentsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketCommitmentsRequest; - - /** - * Creates a plain object from a QueryPacketCommitmentsRequest message. Also converts values to other types if specified. - * @param message QueryPacketCommitmentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketCommitmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketCommitmentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketCommitmentsResponse. */ - interface IQueryPacketCommitmentsResponse { - - /** QueryPacketCommitmentsResponse commitments */ - commitments?: (ibc.core.channel.v1.IPacketState[]|null); - - /** QueryPacketCommitmentsResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryPacketCommitmentsResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryPacketCommitmentsResponse. */ - class QueryPacketCommitmentsResponse implements IQueryPacketCommitmentsResponse { - - /** - * Constructs a new QueryPacketCommitmentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketCommitmentsResponse); - - /** QueryPacketCommitmentsResponse commitments. */ - public commitments: ibc.core.channel.v1.IPacketState[]; - - /** QueryPacketCommitmentsResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryPacketCommitmentsResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryPacketCommitmentsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. - * @param message QueryPacketCommitmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketCommitmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketCommitmentsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. - * @param message QueryPacketCommitmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketCommitmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketCommitmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketCommitmentsResponse; - - /** - * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketCommitmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketCommitmentsResponse; - - /** - * Verifies a QueryPacketCommitmentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketCommitmentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketCommitmentsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketCommitmentsResponse; - - /** - * Creates a plain object from a QueryPacketCommitmentsResponse message. Also converts values to other types if specified. - * @param message QueryPacketCommitmentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketCommitmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketCommitmentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketReceiptRequest. */ - interface IQueryPacketReceiptRequest { - - /** QueryPacketReceiptRequest port_id */ - port_id?: (string|null); - - /** QueryPacketReceiptRequest channel_id */ - channel_id?: (string|null); - - /** QueryPacketReceiptRequest sequence */ - sequence?: (Long|null); - } - - /** Represents a QueryPacketReceiptRequest. */ - class QueryPacketReceiptRequest implements IQueryPacketReceiptRequest { - - /** - * Constructs a new QueryPacketReceiptRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketReceiptRequest); - - /** QueryPacketReceiptRequest port_id. */ - public port_id: string; - - /** QueryPacketReceiptRequest channel_id. */ - public channel_id: string; - - /** QueryPacketReceiptRequest sequence. */ - public sequence: Long; - - /** - * Encodes the specified QueryPacketReceiptRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. - * @param message QueryPacketReceiptRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketReceiptRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketReceiptRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. - * @param message QueryPacketReceiptRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketReceiptRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketReceiptRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketReceiptRequest; - - /** - * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketReceiptRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketReceiptRequest; - - /** - * Verifies a QueryPacketReceiptRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketReceiptRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketReceiptRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketReceiptRequest; - - /** - * Creates a plain object from a QueryPacketReceiptRequest message. Also converts values to other types if specified. - * @param message QueryPacketReceiptRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketReceiptRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketReceiptRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketReceiptResponse. */ - interface IQueryPacketReceiptResponse { - - /** QueryPacketReceiptResponse received */ - received?: (boolean|null); - - /** QueryPacketReceiptResponse proof */ - proof?: (Uint8Array|null); - - /** QueryPacketReceiptResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryPacketReceiptResponse. */ - class QueryPacketReceiptResponse implements IQueryPacketReceiptResponse { - - /** - * Constructs a new QueryPacketReceiptResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketReceiptResponse); - - /** QueryPacketReceiptResponse received. */ - public received: boolean; - - /** QueryPacketReceiptResponse proof. */ - public proof: Uint8Array; - - /** QueryPacketReceiptResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryPacketReceiptResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. - * @param message QueryPacketReceiptResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketReceiptResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketReceiptResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. - * @param message QueryPacketReceiptResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketReceiptResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketReceiptResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketReceiptResponse; - - /** - * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketReceiptResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketReceiptResponse; - - /** - * Verifies a QueryPacketReceiptResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketReceiptResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketReceiptResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketReceiptResponse; - - /** - * Creates a plain object from a QueryPacketReceiptResponse message. Also converts values to other types if specified. - * @param message QueryPacketReceiptResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketReceiptResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketReceiptResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketAcknowledgementRequest. */ - interface IQueryPacketAcknowledgementRequest { - - /** QueryPacketAcknowledgementRequest port_id */ - port_id?: (string|null); - - /** QueryPacketAcknowledgementRequest channel_id */ - channel_id?: (string|null); - - /** QueryPacketAcknowledgementRequest sequence */ - sequence?: (Long|null); - } - - /** Represents a QueryPacketAcknowledgementRequest. */ - class QueryPacketAcknowledgementRequest implements IQueryPacketAcknowledgementRequest { - - /** - * Constructs a new QueryPacketAcknowledgementRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketAcknowledgementRequest); - - /** QueryPacketAcknowledgementRequest port_id. */ - public port_id: string; - - /** QueryPacketAcknowledgementRequest channel_id. */ - public channel_id: string; - - /** QueryPacketAcknowledgementRequest sequence. */ - public sequence: Long; - - /** - * Encodes the specified QueryPacketAcknowledgementRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. - * @param message QueryPacketAcknowledgementRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketAcknowledgementRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketAcknowledgementRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. - * @param message QueryPacketAcknowledgementRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketAcknowledgementRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketAcknowledgementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketAcknowledgementRequest; - - /** - * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketAcknowledgementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketAcknowledgementRequest; - - /** - * Verifies a QueryPacketAcknowledgementRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketAcknowledgementRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketAcknowledgementRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketAcknowledgementRequest; - - /** - * Creates a plain object from a QueryPacketAcknowledgementRequest message. Also converts values to other types if specified. - * @param message QueryPacketAcknowledgementRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketAcknowledgementRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketAcknowledgementRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketAcknowledgementResponse. */ - interface IQueryPacketAcknowledgementResponse { - - /** QueryPacketAcknowledgementResponse acknowledgement */ - acknowledgement?: (Uint8Array|null); - - /** QueryPacketAcknowledgementResponse proof */ - proof?: (Uint8Array|null); - - /** QueryPacketAcknowledgementResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryPacketAcknowledgementResponse. */ - class QueryPacketAcknowledgementResponse implements IQueryPacketAcknowledgementResponse { - - /** - * Constructs a new QueryPacketAcknowledgementResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketAcknowledgementResponse); - - /** QueryPacketAcknowledgementResponse acknowledgement. */ - public acknowledgement: Uint8Array; - - /** QueryPacketAcknowledgementResponse proof. */ - public proof: Uint8Array; - - /** QueryPacketAcknowledgementResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryPacketAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. - * @param message QueryPacketAcknowledgementResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketAcknowledgementResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. - * @param message QueryPacketAcknowledgementResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketAcknowledgementResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketAcknowledgementResponse; - - /** - * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketAcknowledgementResponse; - - /** - * Verifies a QueryPacketAcknowledgementResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketAcknowledgementResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketAcknowledgementResponse; - - /** - * Creates a plain object from a QueryPacketAcknowledgementResponse message. Also converts values to other types if specified. - * @param message QueryPacketAcknowledgementResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketAcknowledgementResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketAcknowledgementResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketAcknowledgementsRequest. */ - interface IQueryPacketAcknowledgementsRequest { - - /** QueryPacketAcknowledgementsRequest port_id */ - port_id?: (string|null); - - /** QueryPacketAcknowledgementsRequest channel_id */ - channel_id?: (string|null); - - /** QueryPacketAcknowledgementsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryPacketAcknowledgementsRequest packet_commitment_sequences */ - packet_commitment_sequences?: (Long[]|null); - } - - /** Represents a QueryPacketAcknowledgementsRequest. */ - class QueryPacketAcknowledgementsRequest implements IQueryPacketAcknowledgementsRequest { - - /** - * Constructs a new QueryPacketAcknowledgementsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest); - - /** QueryPacketAcknowledgementsRequest port_id. */ - public port_id: string; - - /** QueryPacketAcknowledgementsRequest channel_id. */ - public channel_id: string; - - /** QueryPacketAcknowledgementsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** QueryPacketAcknowledgementsRequest packet_commitment_sequences. */ - public packet_commitment_sequences: Long[]; - - /** - * Encodes the specified QueryPacketAcknowledgementsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. - * @param message QueryPacketAcknowledgementsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketAcknowledgementsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. - * @param message QueryPacketAcknowledgementsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketAcknowledgementsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketAcknowledgementsRequest; - - /** - * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketAcknowledgementsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketAcknowledgementsRequest; - - /** - * Verifies a QueryPacketAcknowledgementsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketAcknowledgementsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketAcknowledgementsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketAcknowledgementsRequest; - - /** - * Creates a plain object from a QueryPacketAcknowledgementsRequest message. Also converts values to other types if specified. - * @param message QueryPacketAcknowledgementsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketAcknowledgementsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryPacketAcknowledgementsResponse. */ - interface IQueryPacketAcknowledgementsResponse { - - /** QueryPacketAcknowledgementsResponse acknowledgements */ - acknowledgements?: (ibc.core.channel.v1.IPacketState[]|null); - - /** QueryPacketAcknowledgementsResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryPacketAcknowledgementsResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryPacketAcknowledgementsResponse. */ - class QueryPacketAcknowledgementsResponse implements IQueryPacketAcknowledgementsResponse { - - /** - * Constructs a new QueryPacketAcknowledgementsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse); - - /** QueryPacketAcknowledgementsResponse acknowledgements. */ - public acknowledgements: ibc.core.channel.v1.IPacketState[]; - - /** QueryPacketAcknowledgementsResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryPacketAcknowledgementsResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryPacketAcknowledgementsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. - * @param message QueryPacketAcknowledgementsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryPacketAcknowledgementsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. - * @param message QueryPacketAcknowledgementsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryPacketAcknowledgementsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryPacketAcknowledgementsResponse; - - /** - * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryPacketAcknowledgementsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryPacketAcknowledgementsResponse; - - /** - * Verifies a QueryPacketAcknowledgementsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryPacketAcknowledgementsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryPacketAcknowledgementsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryPacketAcknowledgementsResponse; - - /** - * Creates a plain object from a QueryPacketAcknowledgementsResponse message. Also converts values to other types if specified. - * @param message QueryPacketAcknowledgementsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryPacketAcknowledgementsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUnreceivedPacketsRequest. */ - interface IQueryUnreceivedPacketsRequest { - - /** QueryUnreceivedPacketsRequest port_id */ - port_id?: (string|null); - - /** QueryUnreceivedPacketsRequest channel_id */ - channel_id?: (string|null); - - /** QueryUnreceivedPacketsRequest packet_commitment_sequences */ - packet_commitment_sequences?: (Long[]|null); - } - - /** Represents a QueryUnreceivedPacketsRequest. */ - class QueryUnreceivedPacketsRequest implements IQueryUnreceivedPacketsRequest { - - /** - * Constructs a new QueryUnreceivedPacketsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryUnreceivedPacketsRequest); - - /** QueryUnreceivedPacketsRequest port_id. */ - public port_id: string; - - /** QueryUnreceivedPacketsRequest channel_id. */ - public channel_id: string; - - /** QueryUnreceivedPacketsRequest packet_commitment_sequences. */ - public packet_commitment_sequences: Long[]; - - /** - * Encodes the specified QueryUnreceivedPacketsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. - * @param message QueryUnreceivedPacketsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryUnreceivedPacketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUnreceivedPacketsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. - * @param message QueryUnreceivedPacketsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryUnreceivedPacketsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUnreceivedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryUnreceivedPacketsRequest; - - /** - * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUnreceivedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryUnreceivedPacketsRequest; - - /** - * Verifies a QueryUnreceivedPacketsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUnreceivedPacketsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUnreceivedPacketsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryUnreceivedPacketsRequest; - - /** - * Creates a plain object from a QueryUnreceivedPacketsRequest message. Also converts values to other types if specified. - * @param message QueryUnreceivedPacketsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryUnreceivedPacketsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUnreceivedPacketsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUnreceivedPacketsResponse. */ - interface IQueryUnreceivedPacketsResponse { - - /** QueryUnreceivedPacketsResponse sequences */ - sequences?: (Long[]|null); - - /** QueryUnreceivedPacketsResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryUnreceivedPacketsResponse. */ - class QueryUnreceivedPacketsResponse implements IQueryUnreceivedPacketsResponse { - - /** - * Constructs a new QueryUnreceivedPacketsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryUnreceivedPacketsResponse); - - /** QueryUnreceivedPacketsResponse sequences. */ - public sequences: Long[]; - - /** QueryUnreceivedPacketsResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryUnreceivedPacketsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. - * @param message QueryUnreceivedPacketsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryUnreceivedPacketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUnreceivedPacketsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. - * @param message QueryUnreceivedPacketsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryUnreceivedPacketsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUnreceivedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryUnreceivedPacketsResponse; - - /** - * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUnreceivedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryUnreceivedPacketsResponse; - - /** - * Verifies a QueryUnreceivedPacketsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUnreceivedPacketsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUnreceivedPacketsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryUnreceivedPacketsResponse; - - /** - * Creates a plain object from a QueryUnreceivedPacketsResponse message. Also converts values to other types if specified. - * @param message QueryUnreceivedPacketsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryUnreceivedPacketsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUnreceivedPacketsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUnreceivedAcksRequest. */ - interface IQueryUnreceivedAcksRequest { - - /** QueryUnreceivedAcksRequest port_id */ - port_id?: (string|null); - - /** QueryUnreceivedAcksRequest channel_id */ - channel_id?: (string|null); - - /** QueryUnreceivedAcksRequest packet_ack_sequences */ - packet_ack_sequences?: (Long[]|null); - } - - /** Represents a QueryUnreceivedAcksRequest. */ - class QueryUnreceivedAcksRequest implements IQueryUnreceivedAcksRequest { - - /** - * Constructs a new QueryUnreceivedAcksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryUnreceivedAcksRequest); - - /** QueryUnreceivedAcksRequest port_id. */ - public port_id: string; - - /** QueryUnreceivedAcksRequest channel_id. */ - public channel_id: string; - - /** QueryUnreceivedAcksRequest packet_ack_sequences. */ - public packet_ack_sequences: Long[]; - - /** - * Encodes the specified QueryUnreceivedAcksRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. - * @param message QueryUnreceivedAcksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryUnreceivedAcksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUnreceivedAcksRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. - * @param message QueryUnreceivedAcksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryUnreceivedAcksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUnreceivedAcksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryUnreceivedAcksRequest; - - /** - * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUnreceivedAcksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryUnreceivedAcksRequest; - - /** - * Verifies a QueryUnreceivedAcksRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUnreceivedAcksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUnreceivedAcksRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryUnreceivedAcksRequest; - - /** - * Creates a plain object from a QueryUnreceivedAcksRequest message. Also converts values to other types if specified. - * @param message QueryUnreceivedAcksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryUnreceivedAcksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUnreceivedAcksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUnreceivedAcksResponse. */ - interface IQueryUnreceivedAcksResponse { - - /** QueryUnreceivedAcksResponse sequences */ - sequences?: (Long[]|null); - - /** QueryUnreceivedAcksResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryUnreceivedAcksResponse. */ - class QueryUnreceivedAcksResponse implements IQueryUnreceivedAcksResponse { - - /** - * Constructs a new QueryUnreceivedAcksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryUnreceivedAcksResponse); - - /** QueryUnreceivedAcksResponse sequences. */ - public sequences: Long[]; - - /** QueryUnreceivedAcksResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryUnreceivedAcksResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. - * @param message QueryUnreceivedAcksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryUnreceivedAcksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUnreceivedAcksResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. - * @param message QueryUnreceivedAcksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryUnreceivedAcksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUnreceivedAcksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryUnreceivedAcksResponse; - - /** - * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUnreceivedAcksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryUnreceivedAcksResponse; - - /** - * Verifies a QueryUnreceivedAcksResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUnreceivedAcksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUnreceivedAcksResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryUnreceivedAcksResponse; - - /** - * Creates a plain object from a QueryUnreceivedAcksResponse message. Also converts values to other types if specified. - * @param message QueryUnreceivedAcksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryUnreceivedAcksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUnreceivedAcksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryNextSequenceReceiveRequest. */ - interface IQueryNextSequenceReceiveRequest { - - /** QueryNextSequenceReceiveRequest port_id */ - port_id?: (string|null); - - /** QueryNextSequenceReceiveRequest channel_id */ - channel_id?: (string|null); - } - - /** Represents a QueryNextSequenceReceiveRequest. */ - class QueryNextSequenceReceiveRequest implements IQueryNextSequenceReceiveRequest { - - /** - * Constructs a new QueryNextSequenceReceiveRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryNextSequenceReceiveRequest); - - /** QueryNextSequenceReceiveRequest port_id. */ - public port_id: string; - - /** QueryNextSequenceReceiveRequest channel_id. */ - public channel_id: string; - - /** - * Encodes the specified QueryNextSequenceReceiveRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. - * @param message QueryNextSequenceReceiveRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryNextSequenceReceiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryNextSequenceReceiveRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. - * @param message QueryNextSequenceReceiveRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryNextSequenceReceiveRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryNextSequenceReceiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryNextSequenceReceiveRequest; - - /** - * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryNextSequenceReceiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryNextSequenceReceiveRequest; - - /** - * Verifies a QueryNextSequenceReceiveRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryNextSequenceReceiveRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryNextSequenceReceiveRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryNextSequenceReceiveRequest; - - /** - * Creates a plain object from a QueryNextSequenceReceiveRequest message. Also converts values to other types if specified. - * @param message QueryNextSequenceReceiveRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryNextSequenceReceiveRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryNextSequenceReceiveRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryNextSequenceReceiveResponse. */ - interface IQueryNextSequenceReceiveResponse { - - /** QueryNextSequenceReceiveResponse next_sequence_receive */ - next_sequence_receive?: (Long|null); - - /** QueryNextSequenceReceiveResponse proof */ - proof?: (Uint8Array|null); - - /** QueryNextSequenceReceiveResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryNextSequenceReceiveResponse. */ - class QueryNextSequenceReceiveResponse implements IQueryNextSequenceReceiveResponse { - - /** - * Constructs a new QueryNextSequenceReceiveResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IQueryNextSequenceReceiveResponse); - - /** QueryNextSequenceReceiveResponse next_sequence_receive. */ - public next_sequence_receive: Long; - - /** QueryNextSequenceReceiveResponse proof. */ - public proof: Uint8Array; - - /** QueryNextSequenceReceiveResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryNextSequenceReceiveResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. - * @param message QueryNextSequenceReceiveResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IQueryNextSequenceReceiveResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryNextSequenceReceiveResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. - * @param message QueryNextSequenceReceiveResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IQueryNextSequenceReceiveResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryNextSequenceReceiveResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.QueryNextSequenceReceiveResponse; - - /** - * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryNextSequenceReceiveResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.QueryNextSequenceReceiveResponse; - - /** - * Verifies a QueryNextSequenceReceiveResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryNextSequenceReceiveResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryNextSequenceReceiveResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.QueryNextSequenceReceiveResponse; - - /** - * Creates a plain object from a QueryNextSequenceReceiveResponse message. Also converts values to other types if specified. - * @param message QueryNextSequenceReceiveResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.QueryNextSequenceReceiveResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryNextSequenceReceiveResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState channels */ - channels?: (ibc.core.channel.v1.IIdentifiedChannel[]|null); - - /** GenesisState acknowledgements */ - acknowledgements?: (ibc.core.channel.v1.IPacketState[]|null); - - /** GenesisState commitments */ - commitments?: (ibc.core.channel.v1.IPacketState[]|null); - - /** GenesisState receipts */ - receipts?: (ibc.core.channel.v1.IPacketState[]|null); - - /** GenesisState send_sequences */ - send_sequences?: (ibc.core.channel.v1.IPacketSequence[]|null); - - /** GenesisState recv_sequences */ - recv_sequences?: (ibc.core.channel.v1.IPacketSequence[]|null); - - /** GenesisState ack_sequences */ - ack_sequences?: (ibc.core.channel.v1.IPacketSequence[]|null); - - /** GenesisState next_channel_sequence */ - next_channel_sequence?: (Long|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IGenesisState); - - /** GenesisState channels. */ - public channels: ibc.core.channel.v1.IIdentifiedChannel[]; - - /** GenesisState acknowledgements. */ - public acknowledgements: ibc.core.channel.v1.IPacketState[]; - - /** GenesisState commitments. */ - public commitments: ibc.core.channel.v1.IPacketState[]; - - /** GenesisState receipts. */ - public receipts: ibc.core.channel.v1.IPacketState[]; - - /** GenesisState send_sequences. */ - public send_sequences: ibc.core.channel.v1.IPacketSequence[]; - - /** GenesisState recv_sequences. */ - public recv_sequences: ibc.core.channel.v1.IPacketSequence[]; - - /** GenesisState ack_sequences. */ - public ack_sequences: ibc.core.channel.v1.IPacketSequence[]; - - /** GenesisState next_channel_sequence. */ - public next_channel_sequence: Long; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketSequence. */ - interface IPacketSequence { - - /** PacketSequence port_id */ - port_id?: (string|null); - - /** PacketSequence channel_id */ - channel_id?: (string|null); - - /** PacketSequence sequence */ - sequence?: (Long|null); - } - - /** Represents a PacketSequence. */ - class PacketSequence implements IPacketSequence { - - /** - * Constructs a new PacketSequence. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacketSequence); - - /** PacketSequence port_id. */ - public port_id: string; - - /** PacketSequence channel_id. */ - public channel_id: string; - - /** PacketSequence sequence. */ - public sequence: Long; - - /** - * Encodes the specified PacketSequence message. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. - * @param message PacketSequence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IPacketSequence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketSequence message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. - * @param message PacketSequence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IPacketSequence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketSequence message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketSequence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.PacketSequence; - - /** - * Decodes a PacketSequence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketSequence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.PacketSequence; - - /** - * Verifies a PacketSequence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketSequence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketSequence - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.PacketSequence; - - /** - * Creates a plain object from a PacketSequence message. Also converts values to other types if specified. - * @param message PacketSequence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.PacketSequence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketSequence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace client. */ - namespace client { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an IdentifiedClientState. */ - interface IIdentifiedClientState { - - /** IdentifiedClientState client_id */ - client_id?: (string|null); - - /** IdentifiedClientState client_state */ - client_state?: (google.protobuf.IAny|null); - } - - /** Represents an IdentifiedClientState. */ - class IdentifiedClientState implements IIdentifiedClientState { - - /** - * Constructs a new IdentifiedClientState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IIdentifiedClientState); - - /** IdentifiedClientState client_id. */ - public client_id: string; - - /** IdentifiedClientState client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @param message IdentifiedClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IIdentifiedClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @param message IdentifiedClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IIdentifiedClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.IdentifiedClientState; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.IdentifiedClientState; - - /** - * Verifies an IdentifiedClientState message. - * @param message Plain 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 IdentifiedClientState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedClientState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.IdentifiedClientState; - - /** - * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. - * @param message IdentifiedClientState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.IdentifiedClientState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedClientState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusStateWithHeight. */ - interface IConsensusStateWithHeight { - - /** ConsensusStateWithHeight height */ - height?: (ibc.core.client.v1.IHeight|null); - - /** ConsensusStateWithHeight consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - } - - /** Represents a ConsensusStateWithHeight. */ - class ConsensusStateWithHeight implements IConsensusStateWithHeight { - - /** - * Constructs a new ConsensusStateWithHeight. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IConsensusStateWithHeight); - - /** ConsensusStateWithHeight height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** ConsensusStateWithHeight consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @param message ConsensusStateWithHeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IConsensusStateWithHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @param message ConsensusStateWithHeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IConsensusStateWithHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.ConsensusStateWithHeight; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.ConsensusStateWithHeight; - - /** - * Verifies a ConsensusStateWithHeight message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusStateWithHeight - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.ConsensusStateWithHeight; - - /** - * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. - * @param message ConsensusStateWithHeight - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.ConsensusStateWithHeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusStateWithHeight to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientConsensusStates. */ - interface IClientConsensusStates { - - /** ClientConsensusStates client_id */ - client_id?: (string|null); - - /** ClientConsensusStates consensus_states */ - consensus_states?: (ibc.core.client.v1.IConsensusStateWithHeight[]|null); - } - - /** Represents a ClientConsensusStates. */ - class ClientConsensusStates implements IClientConsensusStates { - - /** - * Constructs a new ClientConsensusStates. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IClientConsensusStates); - - /** ClientConsensusStates client_id. */ - public client_id: string; - - /** ClientConsensusStates consensus_states. */ - public consensus_states: ibc.core.client.v1.IConsensusStateWithHeight[]; - - /** - * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @param message ClientConsensusStates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IClientConsensusStates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @param message ClientConsensusStates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IClientConsensusStates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.ClientConsensusStates; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.ClientConsensusStates; - - /** - * Verifies a ClientConsensusStates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientConsensusStates - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.ClientConsensusStates; - - /** - * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. - * @param message ClientConsensusStates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.ClientConsensusStates, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientConsensusStates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientUpdateProposal. */ - interface IClientUpdateProposal { - - /** ClientUpdateProposal title */ - title?: (string|null); - - /** ClientUpdateProposal description */ - description?: (string|null); - - /** ClientUpdateProposal subject_client_id */ - subject_client_id?: (string|null); - - /** ClientUpdateProposal substitute_client_id */ - substitute_client_id?: (string|null); - } - - /** Represents a ClientUpdateProposal. */ - class ClientUpdateProposal implements IClientUpdateProposal { - - /** - * Constructs a new ClientUpdateProposal. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IClientUpdateProposal); - - /** ClientUpdateProposal title. */ - public title: string; - - /** ClientUpdateProposal description. */ - public description: string; - - /** ClientUpdateProposal subject_client_id. */ - public subject_client_id: string; - - /** ClientUpdateProposal substitute_client_id. */ - public substitute_client_id: string; - - /** - * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @param message ClientUpdateProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IClientUpdateProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @param message ClientUpdateProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IClientUpdateProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.ClientUpdateProposal; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.ClientUpdateProposal; - - /** - * Verifies a ClientUpdateProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientUpdateProposal - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.ClientUpdateProposal; - - /** - * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. - * @param message ClientUpdateProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.ClientUpdateProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientUpdateProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpgradeProposal. */ - interface IUpgradeProposal { - - /** UpgradeProposal title */ - title?: (string|null); - - /** UpgradeProposal description */ - description?: (string|null); - - /** UpgradeProposal plan */ - plan?: (cosmos.upgrade.v1beta1.IPlan|null); - - /** UpgradeProposal upgraded_client_state */ - upgraded_client_state?: (google.protobuf.IAny|null); - } - - /** Represents an UpgradeProposal. */ - class UpgradeProposal implements IUpgradeProposal { - - /** - * Constructs a new UpgradeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IUpgradeProposal); - - /** UpgradeProposal title. */ - public title: string; - - /** UpgradeProposal description. */ - public description: string; - - /** UpgradeProposal plan. */ - public plan?: (cosmos.upgrade.v1beta1.IPlan|null); - - /** UpgradeProposal upgraded_client_state. */ - public upgraded_client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified UpgradeProposal message. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @param message UpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @param message UpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.UpgradeProposal; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.UpgradeProposal; - - /** - * Verifies an UpgradeProposal message. - * @param message Plain 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 UpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeProposal - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.UpgradeProposal; - - /** - * Creates a plain object from an UpgradeProposal message. Also converts values to other types if specified. - * @param message UpgradeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.UpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Height. */ - interface IHeight { - - /** Height revision_number */ - revision_number?: (Long|null); - - /** Height revision_height */ - revision_height?: (Long|null); - } - - /** Represents an Height. */ - class Height implements IHeight { - - /** - * Constructs a new Height. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IHeight); - - /** Height revision_number. */ - public revision_number: Long; - - /** Height revision_height. */ - public revision_height: Long; - - /** - * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @param message Height message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @param message Height message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Height message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.Height; - - /** - * Decodes an Height message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.Height; - - /** - * Verifies an Height message. - * @param message Plain 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 Height message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Height - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.Height; - - /** - * Creates a plain object from an Height message. Also converts values to other types if specified. - * @param message Height - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.Height, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Height to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params allowed_clients */ - allowed_clients?: (string[]|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IParams); - - /** Params allowed_clients. */ - public allowed_clients: string[]; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.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: ibc.core.client.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.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: ibc.core.client.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): ibc.core.client.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)): ibc.core.client.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 }): ibc.core.client.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: ibc.core.client.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls CreateClient. - * @param request MsgCreateClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgCreateClientResponse - */ - public createClient(request: ibc.core.client.v1.IMsgCreateClient, callback: ibc.core.client.v1.Msg.CreateClientCallback): void; - - /** - * Calls CreateClient. - * @param request MsgCreateClient message or plain object - * @returns Promise - */ - public createClient(request: ibc.core.client.v1.IMsgCreateClient): Promise; - - /** - * Calls UpdateClient. - * @param request MsgUpdateClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateClientResponse - */ - public updateClient(request: ibc.core.client.v1.IMsgUpdateClient, callback: ibc.core.client.v1.Msg.UpdateClientCallback): void; - - /** - * Calls UpdateClient. - * @param request MsgUpdateClient message or plain object - * @returns Promise - */ - public updateClient(request: ibc.core.client.v1.IMsgUpdateClient): Promise; - - /** - * Calls UpgradeClient. - * @param request MsgUpgradeClient message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse - */ - public upgradeClient(request: ibc.core.client.v1.IMsgUpgradeClient, callback: ibc.core.client.v1.Msg.UpgradeClientCallback): void; - - /** - * Calls UpgradeClient. - * @param request MsgUpgradeClient message or plain object - * @returns Promise - */ - public upgradeClient(request: ibc.core.client.v1.IMsgUpgradeClient): Promise; - - /** - * Calls SubmitMisbehaviour. - * @param request MsgSubmitMisbehaviour message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse - */ - public submitMisbehaviour(request: ibc.core.client.v1.IMsgSubmitMisbehaviour, callback: ibc.core.client.v1.Msg.SubmitMisbehaviourCallback): void; - - /** - * Calls SubmitMisbehaviour. - * @param request MsgSubmitMisbehaviour message or plain object - * @returns Promise - */ - public submitMisbehaviour(request: ibc.core.client.v1.IMsgSubmitMisbehaviour): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. - * @param error Error, if any - * @param [response] MsgCreateClientResponse - */ - type CreateClientCallback = (error: (Error|null), response?: ibc.core.client.v1.MsgCreateClientResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. - * @param error Error, if any - * @param [response] MsgUpdateClientResponse - */ - type UpdateClientCallback = (error: (Error|null), response?: ibc.core.client.v1.MsgUpdateClientResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. - * @param error Error, if any - * @param [response] MsgUpgradeClientResponse - */ - type UpgradeClientCallback = (error: (Error|null), response?: ibc.core.client.v1.MsgUpgradeClientResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. - * @param error Error, if any - * @param [response] MsgSubmitMisbehaviourResponse - */ - type SubmitMisbehaviourCallback = (error: (Error|null), response?: ibc.core.client.v1.MsgSubmitMisbehaviourResponse) => void; - } - - /** Properties of a MsgCreateClient. */ - interface IMsgCreateClient { - - /** MsgCreateClient client_state */ - client_state?: (google.protobuf.IAny|null); - - /** MsgCreateClient consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - - /** MsgCreateClient signer */ - signer?: (string|null); - } - - /** Represents a MsgCreateClient. */ - class MsgCreateClient implements IMsgCreateClient { - - /** - * Constructs a new MsgCreateClient. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgCreateClient); - - /** MsgCreateClient client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** MsgCreateClient consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** MsgCreateClient signer. */ - public signer: string; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.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: ibc.core.client.v1.IMsgCreateClient, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link ibc.core.client.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: ibc.core.client.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): ibc.core.client.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)): ibc.core.client.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 }): ibc.core.client.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: ibc.core.client.v1.MsgCreateClient, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgCreateClient to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgCreateClientResponse. */ - interface IMsgCreateClientResponse { - } - - /** Represents a MsgCreateClientResponse. */ - class MsgCreateClientResponse implements IMsgCreateClientResponse { - - /** - * Constructs a new MsgCreateClientResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgCreateClientResponse); - - /** - * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @param message MsgCreateClientResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgCreateClientResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @param message MsgCreateClientResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgCreateClientResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgCreateClientResponse; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgCreateClientResponse; - - /** - * Verifies a MsgCreateClientResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgCreateClientResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateClientResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgCreateClientResponse; - - /** - * Creates a plain object from a MsgCreateClientResponse message. Also converts values to other types if specified. - * @param message MsgCreateClientResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgCreateClientResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgCreateClientResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateClient. */ - interface IMsgUpdateClient { - - /** MsgUpdateClient client_id */ - client_id?: (string|null); - - /** MsgUpdateClient client_message */ - client_message?: (google.protobuf.IAny|null); - - /** MsgUpdateClient signer */ - signer?: (string|null); - } - - /** Represents a MsgUpdateClient. */ - class MsgUpdateClient implements IMsgUpdateClient { - - /** - * Constructs a new MsgUpdateClient. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgUpdateClient); - - /** MsgUpdateClient client_id. */ - public client_id: string; - - /** MsgUpdateClient client_message. */ - public client_message?: (google.protobuf.IAny|null); - - /** MsgUpdateClient signer. */ - public signer: string; - - /** - * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @param message MsgUpdateClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgUpdateClient, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @param message MsgUpdateClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgUpdateClient, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgUpdateClient; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgUpdateClient; - - /** - * Verifies a MsgUpdateClient message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateClient message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateClient - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgUpdateClient; - - /** - * Creates a plain object from a MsgUpdateClient message. Also converts values to other types if specified. - * @param message MsgUpdateClient - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgUpdateClient, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateClient to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateClientResponse. */ - interface IMsgUpdateClientResponse { - } - - /** Represents a MsgUpdateClientResponse. */ - class MsgUpdateClientResponse implements IMsgUpdateClientResponse { - - /** - * Constructs a new MsgUpdateClientResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgUpdateClientResponse); - - /** - * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @param message MsgUpdateClientResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgUpdateClientResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @param message MsgUpdateClientResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgUpdateClientResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgUpdateClientResponse; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgUpdateClientResponse; - - /** - * Verifies a MsgUpdateClientResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateClientResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateClientResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgUpdateClientResponse; - - /** - * Creates a plain object from a MsgUpdateClientResponse message. Also converts values to other types if specified. - * @param message MsgUpdateClientResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgUpdateClientResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateClientResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpgradeClient. */ - interface IMsgUpgradeClient { - - /** MsgUpgradeClient client_id */ - client_id?: (string|null); - - /** MsgUpgradeClient client_state */ - client_state?: (google.protobuf.IAny|null); - - /** MsgUpgradeClient consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - - /** MsgUpgradeClient proof_upgrade_client */ - proof_upgrade_client?: (Uint8Array|null); - - /** MsgUpgradeClient proof_upgrade_consensus_state */ - proof_upgrade_consensus_state?: (Uint8Array|null); - - /** MsgUpgradeClient signer */ - signer?: (string|null); - } - - /** Represents a MsgUpgradeClient. */ - class MsgUpgradeClient implements IMsgUpgradeClient { - - /** - * Constructs a new MsgUpgradeClient. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgUpgradeClient); - - /** MsgUpgradeClient client_id. */ - public client_id: string; - - /** MsgUpgradeClient client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** MsgUpgradeClient consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** MsgUpgradeClient proof_upgrade_client. */ - public proof_upgrade_client: Uint8Array; - - /** MsgUpgradeClient proof_upgrade_consensus_state. */ - public proof_upgrade_consensus_state: Uint8Array; - - /** MsgUpgradeClient signer. */ - public signer: string; - - /** - * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @param message MsgUpgradeClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgUpgradeClient, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpgradeClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @param message MsgUpgradeClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgUpgradeClient, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgUpgradeClient; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgUpgradeClient; - - /** - * Verifies a MsgUpgradeClient message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpgradeClient message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpgradeClient - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgUpgradeClient; - - /** - * Creates a plain object from a MsgUpgradeClient message. Also converts values to other types if specified. - * @param message MsgUpgradeClient - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgUpgradeClient, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpgradeClient to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpgradeClientResponse. */ - interface IMsgUpgradeClientResponse { - } - - /** Represents a MsgUpgradeClientResponse. */ - class MsgUpgradeClientResponse implements IMsgUpgradeClientResponse { - - /** - * Constructs a new MsgUpgradeClientResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgUpgradeClientResponse); - - /** - * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @param message MsgUpgradeClientResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgUpgradeClientResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpgradeClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @param message MsgUpgradeClientResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgUpgradeClientResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgUpgradeClientResponse; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgUpgradeClientResponse; - - /** - * Verifies a MsgUpgradeClientResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpgradeClientResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpgradeClientResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgUpgradeClientResponse; - - /** - * Creates a plain object from a MsgUpgradeClientResponse message. Also converts values to other types if specified. - * @param message MsgUpgradeClientResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgUpgradeClientResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpgradeClientResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitMisbehaviour. */ - interface IMsgSubmitMisbehaviour { - - /** MsgSubmitMisbehaviour client_id */ - client_id?: (string|null); - - /** MsgSubmitMisbehaviour misbehaviour */ - misbehaviour?: (google.protobuf.IAny|null); - - /** MsgSubmitMisbehaviour signer */ - signer?: (string|null); - } - - /** Represents a MsgSubmitMisbehaviour. */ - class MsgSubmitMisbehaviour implements IMsgSubmitMisbehaviour { - - /** - * Constructs a new MsgSubmitMisbehaviour. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgSubmitMisbehaviour); - - /** MsgSubmitMisbehaviour client_id. */ - public client_id: string; - - /** MsgSubmitMisbehaviour misbehaviour. */ - public misbehaviour?: (google.protobuf.IAny|null); - - /** MsgSubmitMisbehaviour signer. */ - public signer: string; - - /** - * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @param message MsgSubmitMisbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgSubmitMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitMisbehaviour message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @param message MsgSubmitMisbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgSubmitMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgSubmitMisbehaviour; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgSubmitMisbehaviour; - - /** - * Verifies a MsgSubmitMisbehaviour message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitMisbehaviour message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitMisbehaviour - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgSubmitMisbehaviour; - - /** - * Creates a plain object from a MsgSubmitMisbehaviour message. Also converts values to other types if specified. - * @param message MsgSubmitMisbehaviour - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgSubmitMisbehaviour, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitMisbehaviour to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitMisbehaviourResponse. */ - interface IMsgSubmitMisbehaviourResponse { - } - - /** Represents a MsgSubmitMisbehaviourResponse. */ - class MsgSubmitMisbehaviourResponse implements IMsgSubmitMisbehaviourResponse { - - /** - * Constructs a new MsgSubmitMisbehaviourResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse); - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @param message MsgSubmitMisbehaviourResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @param message MsgSubmitMisbehaviourResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IMsgSubmitMisbehaviourResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - - /** - * Verifies a MsgSubmitMisbehaviourResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitMisbehaviourResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitMisbehaviourResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.MsgSubmitMisbehaviourResponse; - - /** - * Creates a plain object from a MsgSubmitMisbehaviourResponse message. Also converts values to other types if specified. - * @param message MsgSubmitMisbehaviourResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.MsgSubmitMisbehaviourResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitMisbehaviourResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls ClientState. - * @param request QueryClientStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryClientStateResponse - */ - public clientState(request: ibc.core.client.v1.IQueryClientStateRequest, callback: ibc.core.client.v1.Query.ClientStateCallback): void; - - /** - * Calls ClientState. - * @param request QueryClientStateRequest message or plain object - * @returns Promise - */ - public clientState(request: ibc.core.client.v1.IQueryClientStateRequest): Promise; - - /** - * Calls ClientStates. - * @param request QueryClientStatesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryClientStatesResponse - */ - public clientStates(request: ibc.core.client.v1.IQueryClientStatesRequest, callback: ibc.core.client.v1.Query.ClientStatesCallback): void; - - /** - * Calls ClientStates. - * @param request QueryClientStatesRequest message or plain object - * @returns Promise - */ - public clientStates(request: ibc.core.client.v1.IQueryClientStatesRequest): Promise; - - /** - * Calls ConsensusState. - * @param request QueryConsensusStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConsensusStateResponse - */ - public consensusState(request: ibc.core.client.v1.IQueryConsensusStateRequest, callback: ibc.core.client.v1.Query.ConsensusStateCallback): void; - - /** - * Calls ConsensusState. - * @param request QueryConsensusStateRequest message or plain object - * @returns Promise - */ - public consensusState(request: ibc.core.client.v1.IQueryConsensusStateRequest): Promise; - - /** - * Calls ConsensusStates. - * @param request QueryConsensusStatesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConsensusStatesResponse - */ - public consensusStates(request: ibc.core.client.v1.IQueryConsensusStatesRequest, callback: ibc.core.client.v1.Query.ConsensusStatesCallback): void; - - /** - * Calls ConsensusStates. - * @param request QueryConsensusStatesRequest message or plain object - * @returns Promise - */ - public consensusStates(request: ibc.core.client.v1.IQueryConsensusStatesRequest): Promise; - - /** - * Calls ConsensusStateHeights. - * @param request QueryConsensusStateHeightsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConsensusStateHeightsResponse - */ - public consensusStateHeights(request: ibc.core.client.v1.IQueryConsensusStateHeightsRequest, callback: ibc.core.client.v1.Query.ConsensusStateHeightsCallback): void; - - /** - * Calls ConsensusStateHeights. - * @param request QueryConsensusStateHeightsRequest message or plain object - * @returns Promise - */ - public consensusStateHeights(request: ibc.core.client.v1.IQueryConsensusStateHeightsRequest): Promise; - - /** - * Calls ClientStatus. - * @param request QueryClientStatusRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryClientStatusResponse - */ - public clientStatus(request: ibc.core.client.v1.IQueryClientStatusRequest, callback: ibc.core.client.v1.Query.ClientStatusCallback): void; - - /** - * Calls ClientStatus. - * @param request QueryClientStatusRequest message or plain object - * @returns Promise - */ - public clientStatus(request: ibc.core.client.v1.IQueryClientStatusRequest): Promise; - - /** - * Calls ClientParams. - * @param request QueryClientParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryClientParamsResponse - */ - public clientParams(request: ibc.core.client.v1.IQueryClientParamsRequest, callback: ibc.core.client.v1.Query.ClientParamsCallback): void; - - /** - * Calls ClientParams. - * @param request QueryClientParamsRequest message or plain object - * @returns Promise - */ - public clientParams(request: ibc.core.client.v1.IQueryClientParamsRequest): Promise; - - /** - * Calls UpgradedClientState. - * @param request QueryUpgradedClientStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryUpgradedClientStateResponse - */ - public upgradedClientState(request: ibc.core.client.v1.IQueryUpgradedClientStateRequest, callback: ibc.core.client.v1.Query.UpgradedClientStateCallback): void; - - /** - * Calls UpgradedClientState. - * @param request QueryUpgradedClientStateRequest message or plain object - * @returns Promise - */ - public upgradedClientState(request: ibc.core.client.v1.IQueryUpgradedClientStateRequest): Promise; - - /** - * Calls UpgradedConsensusState. - * @param request QueryUpgradedConsensusStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryUpgradedConsensusStateResponse - */ - public upgradedConsensusState(request: ibc.core.client.v1.IQueryUpgradedConsensusStateRequest, callback: ibc.core.client.v1.Query.UpgradedConsensusStateCallback): void; - - /** - * Calls UpgradedConsensusState. - * @param request QueryUpgradedConsensusStateRequest message or plain object - * @returns Promise - */ - public upgradedConsensusState(request: ibc.core.client.v1.IQueryUpgradedConsensusStateRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientState}. - * @param error Error, if any - * @param [response] QueryClientStateResponse - */ - type ClientStateCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryClientStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientStates}. - * @param error Error, if any - * @param [response] QueryClientStatesResponse - */ - type ClientStatesCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryClientStatesResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusState}. - * @param error Error, if any - * @param [response] QueryConsensusStateResponse - */ - type ConsensusStateCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryConsensusStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusStates}. - * @param error Error, if any - * @param [response] QueryConsensusStatesResponse - */ - type ConsensusStatesCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryConsensusStatesResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusStateHeights}. - * @param error Error, if any - * @param [response] QueryConsensusStateHeightsResponse - */ - type ConsensusStateHeightsCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryConsensusStateHeightsResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientStatus}. - * @param error Error, if any - * @param [response] QueryClientStatusResponse - */ - type ClientStatusCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryClientStatusResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientParams}. - * @param error Error, if any - * @param [response] QueryClientParamsResponse - */ - type ClientParamsCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryClientParamsResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#upgradedClientState}. - * @param error Error, if any - * @param [response] QueryUpgradedClientStateResponse - */ - type UpgradedClientStateCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryUpgradedClientStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#upgradedConsensusState}. - * @param error Error, if any - * @param [response] QueryUpgradedConsensusStateResponse - */ - type UpgradedConsensusStateCallback = (error: (Error|null), response?: ibc.core.client.v1.QueryUpgradedConsensusStateResponse) => void; - } - - /** Properties of a QueryClientStateRequest. */ - interface IQueryClientStateRequest { - - /** QueryClientStateRequest client_id */ - client_id?: (string|null); - } - - /** Represents a QueryClientStateRequest. */ - class QueryClientStateRequest implements IQueryClientStateRequest { - - /** - * Constructs a new QueryClientStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientStateRequest); - - /** QueryClientStateRequest client_id. */ - public client_id: string; - - /** - * Encodes the specified QueryClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. - * @param message QueryClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. - * @param message QueryClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientStateRequest; - - /** - * Decodes a QueryClientStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientStateRequest; - - /** - * Verifies a QueryClientStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientStateRequest; - - /** - * Creates a plain object from a QueryClientStateRequest message. Also converts values to other types if specified. - * @param message QueryClientStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientStateResponse. */ - interface IQueryClientStateResponse { - - /** QueryClientStateResponse client_state */ - client_state?: (google.protobuf.IAny|null); - - /** QueryClientStateResponse proof */ - proof?: (Uint8Array|null); - - /** QueryClientStateResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryClientStateResponse. */ - class QueryClientStateResponse implements IQueryClientStateResponse { - - /** - * Constructs a new QueryClientStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientStateResponse); - - /** QueryClientStateResponse client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** QueryClientStateResponse proof. */ - public proof: Uint8Array; - - /** QueryClientStateResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. - * @param message QueryClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. - * @param message QueryClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientStateResponse; - - /** - * Decodes a QueryClientStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientStateResponse; - - /** - * Verifies a QueryClientStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientStateResponse; - - /** - * Creates a plain object from a QueryClientStateResponse message. Also converts values to other types if specified. - * @param message QueryClientStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientStatesRequest. */ - interface IQueryClientStatesRequest { - - /** QueryClientStatesRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryClientStatesRequest. */ - class QueryClientStatesRequest implements IQueryClientStatesRequest { - - /** - * Constructs a new QueryClientStatesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientStatesRequest); - - /** QueryClientStatesRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryClientStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. - * @param message QueryClientStatesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. - * @param message QueryClientStatesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientStatesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientStatesRequest; - - /** - * Decodes a QueryClientStatesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientStatesRequest; - - /** - * Verifies a QueryClientStatesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientStatesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientStatesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientStatesRequest; - - /** - * Creates a plain object from a QueryClientStatesRequest message. Also converts values to other types if specified. - * @param message QueryClientStatesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientStatesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientStatesResponse. */ - interface IQueryClientStatesResponse { - - /** QueryClientStatesResponse client_states */ - client_states?: (ibc.core.client.v1.IIdentifiedClientState[]|null); - - /** QueryClientStatesResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryClientStatesResponse. */ - class QueryClientStatesResponse implements IQueryClientStatesResponse { - - /** - * Constructs a new QueryClientStatesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientStatesResponse); - - /** QueryClientStatesResponse client_states. */ - public client_states: ibc.core.client.v1.IIdentifiedClientState[]; - - /** QueryClientStatesResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryClientStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. - * @param message QueryClientStatesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. - * @param message QueryClientStatesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientStatesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientStatesResponse; - - /** - * Decodes a QueryClientStatesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientStatesResponse; - - /** - * Verifies a QueryClientStatesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientStatesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientStatesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientStatesResponse; - - /** - * Creates a plain object from a QueryClientStatesResponse message. Also converts values to other types if specified. - * @param message QueryClientStatesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientStatesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConsensusStateRequest. */ - interface IQueryConsensusStateRequest { - - /** QueryConsensusStateRequest client_id */ - client_id?: (string|null); - - /** QueryConsensusStateRequest revision_number */ - revision_number?: (Long|null); - - /** QueryConsensusStateRequest revision_height */ - revision_height?: (Long|null); - - /** QueryConsensusStateRequest latest_height */ - latest_height?: (boolean|null); - } - - /** Represents a QueryConsensusStateRequest. */ - class QueryConsensusStateRequest implements IQueryConsensusStateRequest { - - /** - * Constructs a new QueryConsensusStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryConsensusStateRequest); - - /** QueryConsensusStateRequest client_id. */ - public client_id: string; - - /** QueryConsensusStateRequest revision_number. */ - public revision_number: Long; - - /** QueryConsensusStateRequest revision_height. */ - public revision_height: Long; - - /** QueryConsensusStateRequest latest_height. */ - public latest_height: boolean; - - /** - * Encodes the specified QueryConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. - * @param message QueryConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. - * @param message QueryConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConsensusStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryConsensusStateRequest; - - /** - * Decodes a QueryConsensusStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryConsensusStateRequest; - - /** - * Verifies a QueryConsensusStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConsensusStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryConsensusStateRequest; - - /** - * Creates a plain object from a QueryConsensusStateRequest message. Also converts values to other types if specified. - * @param message QueryConsensusStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryConsensusStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConsensusStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConsensusStateResponse. */ - interface IQueryConsensusStateResponse { - - /** QueryConsensusStateResponse consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - - /** QueryConsensusStateResponse proof */ - proof?: (Uint8Array|null); - - /** QueryConsensusStateResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryConsensusStateResponse. */ - class QueryConsensusStateResponse implements IQueryConsensusStateResponse { - - /** - * Constructs a new QueryConsensusStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryConsensusStateResponse); - - /** QueryConsensusStateResponse consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** QueryConsensusStateResponse proof. */ - public proof: Uint8Array; - - /** QueryConsensusStateResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. - * @param message QueryConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. - * @param message QueryConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConsensusStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryConsensusStateResponse; - - /** - * Decodes a QueryConsensusStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryConsensusStateResponse; - - /** - * Verifies a QueryConsensusStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConsensusStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryConsensusStateResponse; - - /** - * Creates a plain object from a QueryConsensusStateResponse message. Also converts values to other types if specified. - * @param message QueryConsensusStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryConsensusStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConsensusStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConsensusStatesRequest. */ - interface IQueryConsensusStatesRequest { - - /** QueryConsensusStatesRequest client_id */ - client_id?: (string|null); - - /** QueryConsensusStatesRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryConsensusStatesRequest. */ - class QueryConsensusStatesRequest implements IQueryConsensusStatesRequest { - - /** - * Constructs a new QueryConsensusStatesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryConsensusStatesRequest); - - /** QueryConsensusStatesRequest client_id. */ - public client_id: string; - - /** QueryConsensusStatesRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryConsensusStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. - * @param message QueryConsensusStatesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryConsensusStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConsensusStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. - * @param message QueryConsensusStatesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryConsensusStatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConsensusStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryConsensusStatesRequest; - - /** - * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConsensusStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryConsensusStatesRequest; - - /** - * Verifies a QueryConsensusStatesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConsensusStatesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConsensusStatesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryConsensusStatesRequest; - - /** - * Creates a plain object from a QueryConsensusStatesRequest message. Also converts values to other types if specified. - * @param message QueryConsensusStatesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryConsensusStatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConsensusStatesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConsensusStatesResponse. */ - interface IQueryConsensusStatesResponse { - - /** QueryConsensusStatesResponse consensus_states */ - consensus_states?: (ibc.core.client.v1.IConsensusStateWithHeight[]|null); - - /** QueryConsensusStatesResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryConsensusStatesResponse. */ - class QueryConsensusStatesResponse implements IQueryConsensusStatesResponse { - - /** - * Constructs a new QueryConsensusStatesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryConsensusStatesResponse); - - /** QueryConsensusStatesResponse consensus_states. */ - public consensus_states: ibc.core.client.v1.IConsensusStateWithHeight[]; - - /** QueryConsensusStatesResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryConsensusStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. - * @param message QueryConsensusStatesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryConsensusStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConsensusStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. - * @param message QueryConsensusStatesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryConsensusStatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConsensusStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryConsensusStatesResponse; - - /** - * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConsensusStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryConsensusStatesResponse; - - /** - * Verifies a QueryConsensusStatesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConsensusStatesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConsensusStatesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryConsensusStatesResponse; - - /** - * Creates a plain object from a QueryConsensusStatesResponse message. Also converts values to other types if specified. - * @param message QueryConsensusStatesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryConsensusStatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConsensusStatesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConsensusStateHeightsRequest. */ - interface IQueryConsensusStateHeightsRequest { - - /** QueryConsensusStateHeightsRequest client_id */ - client_id?: (string|null); - - /** QueryConsensusStateHeightsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryConsensusStateHeightsRequest. */ - class QueryConsensusStateHeightsRequest implements IQueryConsensusStateHeightsRequest { - - /** - * Constructs a new QueryConsensusStateHeightsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryConsensusStateHeightsRequest); - - /** QueryConsensusStateHeightsRequest client_id. */ - public client_id: string; - - /** QueryConsensusStateHeightsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryConsensusStateHeightsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsRequest.verify|verify} messages. - * @param message QueryConsensusStateHeightsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryConsensusStateHeightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConsensusStateHeightsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsRequest.verify|verify} messages. - * @param message QueryConsensusStateHeightsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryConsensusStateHeightsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConsensusStateHeightsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConsensusStateHeightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryConsensusStateHeightsRequest; - - /** - * Decodes a QueryConsensusStateHeightsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConsensusStateHeightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryConsensusStateHeightsRequest; - - /** - * Verifies a QueryConsensusStateHeightsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConsensusStateHeightsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConsensusStateHeightsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryConsensusStateHeightsRequest; - - /** - * Creates a plain object from a QueryConsensusStateHeightsRequest message. Also converts values to other types if specified. - * @param message QueryConsensusStateHeightsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryConsensusStateHeightsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConsensusStateHeightsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConsensusStateHeightsResponse. */ - interface IQueryConsensusStateHeightsResponse { - - /** QueryConsensusStateHeightsResponse consensus_state_heights */ - consensus_state_heights?: (ibc.core.client.v1.IHeight[]|null); - - /** QueryConsensusStateHeightsResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryConsensusStateHeightsResponse. */ - class QueryConsensusStateHeightsResponse implements IQueryConsensusStateHeightsResponse { - - /** - * Constructs a new QueryConsensusStateHeightsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryConsensusStateHeightsResponse); - - /** QueryConsensusStateHeightsResponse consensus_state_heights. */ - public consensus_state_heights: ibc.core.client.v1.IHeight[]; - - /** QueryConsensusStateHeightsResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryConsensusStateHeightsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsResponse.verify|verify} messages. - * @param message QueryConsensusStateHeightsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryConsensusStateHeightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConsensusStateHeightsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsResponse.verify|verify} messages. - * @param message QueryConsensusStateHeightsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryConsensusStateHeightsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConsensusStateHeightsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConsensusStateHeightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryConsensusStateHeightsResponse; - - /** - * Decodes a QueryConsensusStateHeightsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConsensusStateHeightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryConsensusStateHeightsResponse; - - /** - * Verifies a QueryConsensusStateHeightsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConsensusStateHeightsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConsensusStateHeightsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryConsensusStateHeightsResponse; - - /** - * Creates a plain object from a QueryConsensusStateHeightsResponse message. Also converts values to other types if specified. - * @param message QueryConsensusStateHeightsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryConsensusStateHeightsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConsensusStateHeightsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientStatusRequest. */ - interface IQueryClientStatusRequest { - - /** QueryClientStatusRequest client_id */ - client_id?: (string|null); - } - - /** Represents a QueryClientStatusRequest. */ - class QueryClientStatusRequest implements IQueryClientStatusRequest { - - /** - * Constructs a new QueryClientStatusRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientStatusRequest); - - /** QueryClientStatusRequest client_id. */ - public client_id: string; - - /** - * Encodes the specified QueryClientStatusRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusRequest.verify|verify} messages. - * @param message QueryClientStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientStatusRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusRequest.verify|verify} messages. - * @param message QueryClientStatusRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientStatusRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientStatusRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientStatusRequest; - - /** - * Decodes a QueryClientStatusRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientStatusRequest; - - /** - * Verifies a QueryClientStatusRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientStatusRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientStatusRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientStatusRequest; - - /** - * Creates a plain object from a QueryClientStatusRequest message. Also converts values to other types if specified. - * @param message QueryClientStatusRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientStatusRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientStatusRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientStatusResponse. */ - interface IQueryClientStatusResponse { - - /** QueryClientStatusResponse status */ - status?: (string|null); - } - - /** Represents a QueryClientStatusResponse. */ - class QueryClientStatusResponse implements IQueryClientStatusResponse { - - /** - * Constructs a new QueryClientStatusResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientStatusResponse); - - /** QueryClientStatusResponse status. */ - public status: string; - - /** - * Encodes the specified QueryClientStatusResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusResponse.verify|verify} messages. - * @param message QueryClientStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientStatusResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusResponse.verify|verify} messages. - * @param message QueryClientStatusResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientStatusResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientStatusResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientStatusResponse; - - /** - * Decodes a QueryClientStatusResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientStatusResponse; - - /** - * Verifies a QueryClientStatusResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientStatusResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientStatusResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientStatusResponse; - - /** - * Creates a plain object from a QueryClientStatusResponse message. Also converts values to other types if specified. - * @param message QueryClientStatusResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientStatusResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientStatusResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientParamsRequest. */ - interface IQueryClientParamsRequest { - } - - /** Represents a QueryClientParamsRequest. */ - class QueryClientParamsRequest implements IQueryClientParamsRequest { - - /** - * Constructs a new QueryClientParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientParamsRequest); - - /** - * Encodes the specified QueryClientParamsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. - * @param message QueryClientParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientParamsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. - * @param message QueryClientParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientParamsRequest; - - /** - * Decodes a QueryClientParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientParamsRequest; - - /** - * Verifies a QueryClientParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientParamsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientParamsRequest; - - /** - * Creates a plain object from a QueryClientParamsRequest message. Also converts values to other types if specified. - * @param message QueryClientParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientParamsResponse. */ - interface IQueryClientParamsResponse { - - /** QueryClientParamsResponse params */ - params?: (ibc.core.client.v1.IParams|null); - } - - /** Represents a QueryClientParamsResponse. */ - class QueryClientParamsResponse implements IQueryClientParamsResponse { - - /** - * Constructs a new QueryClientParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryClientParamsResponse); - - /** QueryClientParamsResponse params. */ - public params?: (ibc.core.client.v1.IParams|null); - - /** - * Encodes the specified QueryClientParamsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. - * @param message QueryClientParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryClientParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientParamsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. - * @param message QueryClientParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryClientParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryClientParamsResponse; - - /** - * Decodes a QueryClientParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryClientParamsResponse; - - /** - * Verifies a QueryClientParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientParamsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryClientParamsResponse; - - /** - * Creates a plain object from a QueryClientParamsResponse message. Also converts values to other types if specified. - * @param message QueryClientParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryClientParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUpgradedClientStateRequest. */ - interface IQueryUpgradedClientStateRequest { - } - - /** Represents a QueryUpgradedClientStateRequest. */ - class QueryUpgradedClientStateRequest implements IQueryUpgradedClientStateRequest { - - /** - * Constructs a new QueryUpgradedClientStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryUpgradedClientStateRequest); - - /** - * Encodes the specified QueryUpgradedClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateRequest.verify|verify} messages. - * @param message QueryUpgradedClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryUpgradedClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUpgradedClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateRequest.verify|verify} messages. - * @param message QueryUpgradedClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryUpgradedClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUpgradedClientStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUpgradedClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryUpgradedClientStateRequest; - - /** - * Decodes a QueryUpgradedClientStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUpgradedClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryUpgradedClientStateRequest; - - /** - * Verifies a QueryUpgradedClientStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUpgradedClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUpgradedClientStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryUpgradedClientStateRequest; - - /** - * Creates a plain object from a QueryUpgradedClientStateRequest message. Also converts values to other types if specified. - * @param message QueryUpgradedClientStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryUpgradedClientStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUpgradedClientStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUpgradedClientStateResponse. */ - interface IQueryUpgradedClientStateResponse { - - /** QueryUpgradedClientStateResponse upgraded_client_state */ - upgraded_client_state?: (google.protobuf.IAny|null); - } - - /** Represents a QueryUpgradedClientStateResponse. */ - class QueryUpgradedClientStateResponse implements IQueryUpgradedClientStateResponse { - - /** - * Constructs a new QueryUpgradedClientStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryUpgradedClientStateResponse); - - /** QueryUpgradedClientStateResponse upgraded_client_state. */ - public upgraded_client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified QueryUpgradedClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateResponse.verify|verify} messages. - * @param message QueryUpgradedClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryUpgradedClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUpgradedClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateResponse.verify|verify} messages. - * @param message QueryUpgradedClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryUpgradedClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUpgradedClientStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUpgradedClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryUpgradedClientStateResponse; - - /** - * Decodes a QueryUpgradedClientStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUpgradedClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryUpgradedClientStateResponse; - - /** - * Verifies a QueryUpgradedClientStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUpgradedClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUpgradedClientStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryUpgradedClientStateResponse; - - /** - * Creates a plain object from a QueryUpgradedClientStateResponse message. Also converts values to other types if specified. - * @param message QueryUpgradedClientStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryUpgradedClientStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUpgradedClientStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUpgradedConsensusStateRequest. */ - interface IQueryUpgradedConsensusStateRequest { - } - - /** Represents a QueryUpgradedConsensusStateRequest. */ - class QueryUpgradedConsensusStateRequest implements IQueryUpgradedConsensusStateRequest { - - /** - * Constructs a new QueryUpgradedConsensusStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryUpgradedConsensusStateRequest); - - /** - * Encodes the specified QueryUpgradedConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateRequest.verify|verify} messages. - * @param message QueryUpgradedConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryUpgradedConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUpgradedConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateRequest.verify|verify} messages. - * @param message QueryUpgradedConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryUpgradedConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUpgradedConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryUpgradedConsensusStateRequest; - - /** - * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUpgradedConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryUpgradedConsensusStateRequest; - - /** - * Verifies a QueryUpgradedConsensusStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUpgradedConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUpgradedConsensusStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryUpgradedConsensusStateRequest; - - /** - * Creates a plain object from a QueryUpgradedConsensusStateRequest message. Also converts values to other types if specified. - * @param message QueryUpgradedConsensusStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryUpgradedConsensusStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUpgradedConsensusStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryUpgradedConsensusStateResponse. */ - interface IQueryUpgradedConsensusStateResponse { - - /** QueryUpgradedConsensusStateResponse upgraded_consensus_state */ - upgraded_consensus_state?: (google.protobuf.IAny|null); - } - - /** Represents a QueryUpgradedConsensusStateResponse. */ - class QueryUpgradedConsensusStateResponse implements IQueryUpgradedConsensusStateResponse { - - /** - * Constructs a new QueryUpgradedConsensusStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IQueryUpgradedConsensusStateResponse); - - /** QueryUpgradedConsensusStateResponse upgraded_consensus_state. */ - public upgraded_consensus_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified QueryUpgradedConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateResponse.verify|verify} messages. - * @param message QueryUpgradedConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IQueryUpgradedConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryUpgradedConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateResponse.verify|verify} messages. - * @param message QueryUpgradedConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IQueryUpgradedConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryUpgradedConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.QueryUpgradedConsensusStateResponse; - - /** - * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryUpgradedConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.QueryUpgradedConsensusStateResponse; - - /** - * Verifies a QueryUpgradedConsensusStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryUpgradedConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryUpgradedConsensusStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.QueryUpgradedConsensusStateResponse; - - /** - * Creates a plain object from a QueryUpgradedConsensusStateResponse message. Also converts values to other types if specified. - * @param message QueryUpgradedConsensusStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.QueryUpgradedConsensusStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryUpgradedConsensusStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState clients */ - clients?: (ibc.core.client.v1.IIdentifiedClientState[]|null); - - /** GenesisState clients_consensus */ - clients_consensus?: (ibc.core.client.v1.IClientConsensusStates[]|null); - - /** GenesisState clients_metadata */ - clients_metadata?: (ibc.core.client.v1.IIdentifiedGenesisMetadata[]|null); - - /** GenesisState params */ - params?: (ibc.core.client.v1.IParams|null); - - /** GenesisState create_localhost */ - create_localhost?: (boolean|null); - - /** GenesisState next_client_sequence */ - next_client_sequence?: (Long|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IGenesisState); - - /** GenesisState clients. */ - public clients: ibc.core.client.v1.IIdentifiedClientState[]; - - /** GenesisState clients_consensus. */ - public clients_consensus: ibc.core.client.v1.IClientConsensusStates[]; - - /** GenesisState clients_metadata. */ - public clients_metadata: ibc.core.client.v1.IIdentifiedGenesisMetadata[]; - - /** GenesisState params. */ - public params?: (ibc.core.client.v1.IParams|null); - - /** GenesisState create_localhost. */ - public create_localhost: boolean; - - /** GenesisState next_client_sequence. */ - public next_client_sequence: Long; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisMetadata. */ - interface IGenesisMetadata { - - /** GenesisMetadata key */ - key?: (Uint8Array|null); - - /** GenesisMetadata value */ - value?: (Uint8Array|null); - } - - /** Represents a GenesisMetadata. */ - class GenesisMetadata implements IGenesisMetadata { - - /** - * Constructs a new GenesisMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IGenesisMetadata); - - /** GenesisMetadata key. */ - public key: Uint8Array; - - /** GenesisMetadata value. */ - public value: Uint8Array; - - /** - * Encodes the specified GenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. - * @param message GenesisMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IGenesisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. - * @param message GenesisMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IGenesisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.GenesisMetadata; - - /** - * Decodes a GenesisMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.GenesisMetadata; - - /** - * Verifies a GenesisMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisMetadata - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.GenesisMetadata; - - /** - * Creates a plain object from a GenesisMetadata message. Also converts values to other types if specified. - * @param message GenesisMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.GenesisMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IdentifiedGenesisMetadata. */ - interface IIdentifiedGenesisMetadata { - - /** IdentifiedGenesisMetadata client_id */ - client_id?: (string|null); - - /** IdentifiedGenesisMetadata client_metadata */ - client_metadata?: (ibc.core.client.v1.IGenesisMetadata[]|null); - } - - /** Represents an IdentifiedGenesisMetadata. */ - class IdentifiedGenesisMetadata implements IIdentifiedGenesisMetadata { - - /** - * Constructs a new IdentifiedGenesisMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IIdentifiedGenesisMetadata); - - /** IdentifiedGenesisMetadata client_id. */ - public client_id: string; - - /** IdentifiedGenesisMetadata client_metadata. */ - public client_metadata: ibc.core.client.v1.IGenesisMetadata[]; - - /** - * Encodes the specified IdentifiedGenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. - * @param message IdentifiedGenesisMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IIdentifiedGenesisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedGenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. - * @param message IdentifiedGenesisMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IIdentifiedGenesisMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedGenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.IdentifiedGenesisMetadata; - - /** - * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedGenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.IdentifiedGenesisMetadata; - - /** - * Verifies an IdentifiedGenesisMetadata message. - * @param message Plain 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 IdentifiedGenesisMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedGenesisMetadata - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.IdentifiedGenesisMetadata; - - /** - * Creates a plain object from an IdentifiedGenesisMetadata message. Also converts values to other types if specified. - * @param message IdentifiedGenesisMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.IdentifiedGenesisMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedGenesisMetadata 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?: ibc.core.commitment.v1.IMerkleRoot); - - /** MerkleRoot hash. */ - public hash: Uint8Array; - - /** - * Encodes the specified MerkleRoot message. Does not implicitly {@link ibc.core.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: ibc.core.commitment.v1.IMerkleRoot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 key_prefix */ - key_prefix?: (Uint8Array|null); - } - - /** Represents a MerklePrefix. */ - class MerklePrefix implements IMerklePrefix { - - /** - * Constructs a new MerklePrefix. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.commitment.v1.IMerklePrefix); - - /** MerklePrefix key_prefix. */ - public key_prefix: Uint8Array; - - /** - * Encodes the specified MerklePrefix message. Does not implicitly {@link ibc.core.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: ibc.core.commitment.v1.IMerklePrefix, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 key_path */ - key_path?: (string[]|null); - } - - /** Represents a MerklePath. */ - class MerklePath implements IMerklePath { - - /** - * Constructs a new MerklePath. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.commitment.v1.IMerklePath); - - /** MerklePath key_path. */ - public key_path: string[]; - - /** - * Encodes the specified MerklePath message. Does not implicitly {@link ibc.core.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: ibc.core.commitment.v1.IMerklePath, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 proofs */ - proofs?: (cosmos.ics23.v1.ICommitmentProof[]|null); - } - - /** Represents a MerkleProof. */ - class MerkleProof implements IMerkleProof { - - /** - * Constructs a new MerkleProof. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.commitment.v1.IMerkleProof); - - /** MerkleProof proofs. */ - public proofs: cosmos.ics23.v1.ICommitmentProof[]; - - /** - * Encodes the specified MerkleProof message. Does not implicitly {@link ibc.core.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: ibc.core.commitment.v1.IMerkleProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.commitment.v1.MerkleProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MerkleProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace connection. */ - namespace connection { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls ConnectionOpenInit. - * @param request MsgConnectionOpenInit message or plain object - * @param callback Node-style callback called with the error, if any, and MsgConnectionOpenInitResponse - */ - public connectionOpenInit(request: ibc.core.connection.v1.IMsgConnectionOpenInit, callback: ibc.core.connection.v1.Msg.ConnectionOpenInitCallback): void; - - /** - * Calls ConnectionOpenInit. - * @param request MsgConnectionOpenInit message or plain object - * @returns Promise - */ - public connectionOpenInit(request: ibc.core.connection.v1.IMsgConnectionOpenInit): Promise; - - /** - * Calls ConnectionOpenTry. - * @param request MsgConnectionOpenTry message or plain object - * @param callback Node-style callback called with the error, if any, and MsgConnectionOpenTryResponse - */ - public connectionOpenTry(request: ibc.core.connection.v1.IMsgConnectionOpenTry, callback: ibc.core.connection.v1.Msg.ConnectionOpenTryCallback): void; - - /** - * Calls ConnectionOpenTry. - * @param request MsgConnectionOpenTry message or plain object - * @returns Promise - */ - public connectionOpenTry(request: ibc.core.connection.v1.IMsgConnectionOpenTry): Promise; - - /** - * Calls ConnectionOpenAck. - * @param request MsgConnectionOpenAck message or plain object - * @param callback Node-style callback called with the error, if any, and MsgConnectionOpenAckResponse - */ - public connectionOpenAck(request: ibc.core.connection.v1.IMsgConnectionOpenAck, callback: ibc.core.connection.v1.Msg.ConnectionOpenAckCallback): void; - - /** - * Calls ConnectionOpenAck. - * @param request MsgConnectionOpenAck message or plain object - * @returns Promise - */ - public connectionOpenAck(request: ibc.core.connection.v1.IMsgConnectionOpenAck): Promise; - - /** - * Calls ConnectionOpenConfirm. - * @param request MsgConnectionOpenConfirm message or plain object - * @param callback Node-style callback called with the error, if any, and MsgConnectionOpenConfirmResponse - */ - public connectionOpenConfirm(request: ibc.core.connection.v1.IMsgConnectionOpenConfirm, callback: ibc.core.connection.v1.Msg.ConnectionOpenConfirmCallback): void; - - /** - * Calls ConnectionOpenConfirm. - * @param request MsgConnectionOpenConfirm message or plain object - * @returns Promise - */ - public connectionOpenConfirm(request: ibc.core.connection.v1.IMsgConnectionOpenConfirm): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenInit}. - * @param error Error, if any - * @param [response] MsgConnectionOpenInitResponse - */ - type ConnectionOpenInitCallback = (error: (Error|null), response?: ibc.core.connection.v1.MsgConnectionOpenInitResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenTry}. - * @param error Error, if any - * @param [response] MsgConnectionOpenTryResponse - */ - type ConnectionOpenTryCallback = (error: (Error|null), response?: ibc.core.connection.v1.MsgConnectionOpenTryResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenAck}. - * @param error Error, if any - * @param [response] MsgConnectionOpenAckResponse - */ - type ConnectionOpenAckCallback = (error: (Error|null), response?: ibc.core.connection.v1.MsgConnectionOpenAckResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenConfirm}. - * @param error Error, if any - * @param [response] MsgConnectionOpenConfirmResponse - */ - type ConnectionOpenConfirmCallback = (error: (Error|null), response?: ibc.core.connection.v1.MsgConnectionOpenConfirmResponse) => void; - } - - /** Properties of a MsgConnectionOpenInit. */ - interface IMsgConnectionOpenInit { - - /** MsgConnectionOpenInit client_id */ - client_id?: (string|null); - - /** MsgConnectionOpenInit counterparty */ - counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenInit version */ - version?: (ibc.core.connection.v1.IVersion|null); - - /** MsgConnectionOpenInit delay_period */ - delay_period?: (Long|null); - - /** MsgConnectionOpenInit signer */ - signer?: (string|null); - } - - /** Represents a MsgConnectionOpenInit. */ - class MsgConnectionOpenInit implements IMsgConnectionOpenInit { - - /** - * Constructs a new MsgConnectionOpenInit. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenInit); - - /** MsgConnectionOpenInit client_id. */ - public client_id: string; - - /** MsgConnectionOpenInit counterparty. */ - public counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenInit version. */ - public version?: (ibc.core.connection.v1.IVersion|null); - - /** MsgConnectionOpenInit delay_period. */ - public delay_period: Long; - - /** MsgConnectionOpenInit signer. */ - public signer: string; - - /** - * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.IMsgConnectionOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgConnectionOpenInitResponse. */ - interface IMsgConnectionOpenInitResponse { - } - - /** Represents a MsgConnectionOpenInitResponse. */ - class MsgConnectionOpenInitResponse implements IMsgConnectionOpenInitResponse { - - /** - * Constructs a new MsgConnectionOpenInitResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenInitResponse); - - /** - * Encodes the specified MsgConnectionOpenInitResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. - * @param message MsgConnectionOpenInitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IMsgConnectionOpenInitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. - * @param message MsgConnectionOpenInitResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IMsgConnectionOpenInitResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.MsgConnectionOpenInitResponse; - - /** - * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.MsgConnectionOpenInitResponse; - - /** - * Verifies a MsgConnectionOpenInitResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenInitResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenInitResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.MsgConnectionOpenInitResponse; - - /** - * Creates a plain object from a MsgConnectionOpenInitResponse message. Also converts values to other types if specified. - * @param message MsgConnectionOpenInitResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.MsgConnectionOpenInitResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenInitResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgConnectionOpenTry. */ - interface IMsgConnectionOpenTry { - - /** MsgConnectionOpenTry client_id */ - client_id?: (string|null); - - /** MsgConnectionOpenTry previous_connection_id */ - previous_connection_id?: (string|null); - - /** MsgConnectionOpenTry client_state */ - client_state?: (google.protobuf.IAny|null); - - /** MsgConnectionOpenTry counterparty */ - counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenTry delay_period */ - delay_period?: (Long|null); - - /** MsgConnectionOpenTry counterparty_versions */ - counterparty_versions?: (ibc.core.connection.v1.IVersion[]|null); - - /** MsgConnectionOpenTry proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenTry proof_init */ - proof_init?: (Uint8Array|null); - - /** MsgConnectionOpenTry proof_client */ - proof_client?: (Uint8Array|null); - - /** MsgConnectionOpenTry proof_consensus */ - proof_consensus?: (Uint8Array|null); - - /** MsgConnectionOpenTry consensus_height */ - consensus_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenTry signer */ - signer?: (string|null); - - /** MsgConnectionOpenTry host_consensus_state_proof */ - host_consensus_state_proof?: (Uint8Array|null); - } - - /** Represents a MsgConnectionOpenTry. */ - class MsgConnectionOpenTry implements IMsgConnectionOpenTry { - - /** - * Constructs a new MsgConnectionOpenTry. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenTry); - - /** MsgConnectionOpenTry client_id. */ - public client_id: string; - - /** MsgConnectionOpenTry previous_connection_id. */ - public previous_connection_id: string; - - /** MsgConnectionOpenTry client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** MsgConnectionOpenTry counterparty. */ - public counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenTry delay_period. */ - public delay_period: Long; - - /** MsgConnectionOpenTry counterparty_versions. */ - public counterparty_versions: ibc.core.connection.v1.IVersion[]; - - /** MsgConnectionOpenTry proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenTry proof_init. */ - public proof_init: Uint8Array; - - /** MsgConnectionOpenTry proof_client. */ - public proof_client: Uint8Array; - - /** MsgConnectionOpenTry proof_consensus. */ - public proof_consensus: Uint8Array; - - /** MsgConnectionOpenTry consensus_height. */ - public consensus_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenTry signer. */ - public signer: string; - - /** MsgConnectionOpenTry host_consensus_state_proof. */ - public host_consensus_state_proof: Uint8Array; - - /** - * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.IMsgConnectionOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgConnectionOpenTryResponse. */ - interface IMsgConnectionOpenTryResponse { - } - - /** Represents a MsgConnectionOpenTryResponse. */ - class MsgConnectionOpenTryResponse implements IMsgConnectionOpenTryResponse { - - /** - * Constructs a new MsgConnectionOpenTryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenTryResponse); - - /** - * Encodes the specified MsgConnectionOpenTryResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. - * @param message MsgConnectionOpenTryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IMsgConnectionOpenTryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. - * @param message MsgConnectionOpenTryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IMsgConnectionOpenTryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.MsgConnectionOpenTryResponse; - - /** - * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.MsgConnectionOpenTryResponse; - - /** - * Verifies a MsgConnectionOpenTryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenTryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenTryResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.MsgConnectionOpenTryResponse; - - /** - * Creates a plain object from a MsgConnectionOpenTryResponse message. Also converts values to other types if specified. - * @param message MsgConnectionOpenTryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.MsgConnectionOpenTryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenTryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgConnectionOpenAck. */ - interface IMsgConnectionOpenAck { - - /** MsgConnectionOpenAck connection_id */ - connection_id?: (string|null); - - /** MsgConnectionOpenAck counterparty_connection_id */ - counterparty_connection_id?: (string|null); - - /** MsgConnectionOpenAck version */ - version?: (ibc.core.connection.v1.IVersion|null); - - /** MsgConnectionOpenAck client_state */ - client_state?: (google.protobuf.IAny|null); - - /** MsgConnectionOpenAck proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenAck proof_try */ - proof_try?: (Uint8Array|null); - - /** MsgConnectionOpenAck proof_client */ - proof_client?: (Uint8Array|null); - - /** MsgConnectionOpenAck proof_consensus */ - proof_consensus?: (Uint8Array|null); - - /** MsgConnectionOpenAck consensus_height */ - consensus_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenAck signer */ - signer?: (string|null); - - /** MsgConnectionOpenAck host_consensus_state_proof */ - host_consensus_state_proof?: (Uint8Array|null); - } - - /** Represents a MsgConnectionOpenAck. */ - class MsgConnectionOpenAck implements IMsgConnectionOpenAck { - - /** - * Constructs a new MsgConnectionOpenAck. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenAck); - - /** MsgConnectionOpenAck connection_id. */ - public connection_id: string; - - /** MsgConnectionOpenAck counterparty_connection_id. */ - public counterparty_connection_id: string; - - /** MsgConnectionOpenAck version. */ - public version?: (ibc.core.connection.v1.IVersion|null); - - /** MsgConnectionOpenAck client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** MsgConnectionOpenAck proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenAck proof_try. */ - public proof_try: Uint8Array; - - /** MsgConnectionOpenAck proof_client. */ - public proof_client: Uint8Array; - - /** MsgConnectionOpenAck proof_consensus. */ - public proof_consensus: Uint8Array; - - /** MsgConnectionOpenAck consensus_height. */ - public consensus_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenAck signer. */ - public signer: string; - - /** MsgConnectionOpenAck host_consensus_state_proof. */ - public host_consensus_state_proof: Uint8Array; - - /** - * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.IMsgConnectionOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgConnectionOpenAckResponse. */ - interface IMsgConnectionOpenAckResponse { - } - - /** Represents a MsgConnectionOpenAckResponse. */ - class MsgConnectionOpenAckResponse implements IMsgConnectionOpenAckResponse { - - /** - * Constructs a new MsgConnectionOpenAckResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenAckResponse); - - /** - * Encodes the specified MsgConnectionOpenAckResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. - * @param message MsgConnectionOpenAckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IMsgConnectionOpenAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. - * @param message MsgConnectionOpenAckResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IMsgConnectionOpenAckResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.MsgConnectionOpenAckResponse; - - /** - * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.MsgConnectionOpenAckResponse; - - /** - * Verifies a MsgConnectionOpenAckResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenAckResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenAckResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.MsgConnectionOpenAckResponse; - - /** - * Creates a plain object from a MsgConnectionOpenAckResponse message. Also converts values to other types if specified. - * @param message MsgConnectionOpenAckResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.MsgConnectionOpenAckResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenAckResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgConnectionOpenConfirm. */ - interface IMsgConnectionOpenConfirm { - - /** MsgConnectionOpenConfirm connection_id */ - connection_id?: (string|null); - - /** MsgConnectionOpenConfirm proof_ack */ - proof_ack?: (Uint8Array|null); - - /** MsgConnectionOpenConfirm proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenConfirm signer */ - signer?: (string|null); - } - - /** Represents a MsgConnectionOpenConfirm. */ - class MsgConnectionOpenConfirm implements IMsgConnectionOpenConfirm { - - /** - * Constructs a new MsgConnectionOpenConfirm. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenConfirm); - - /** MsgConnectionOpenConfirm connection_id. */ - public connection_id: string; - - /** MsgConnectionOpenConfirm proof_ack. */ - public proof_ack: Uint8Array; - - /** MsgConnectionOpenConfirm proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgConnectionOpenConfirm signer. */ - public signer: string; - - /** - * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.IMsgConnectionOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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 MsgConnectionOpenConfirmResponse. */ - interface IMsgConnectionOpenConfirmResponse { - } - - /** Represents a MsgConnectionOpenConfirmResponse. */ - class MsgConnectionOpenConfirmResponse implements IMsgConnectionOpenConfirmResponse { - - /** - * Constructs a new MsgConnectionOpenConfirmResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse); - - /** - * Encodes the specified MsgConnectionOpenConfirmResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. - * @param message MsgConnectionOpenConfirmResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. - * @param message MsgConnectionOpenConfirmResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.MsgConnectionOpenConfirmResponse; - - /** - * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.MsgConnectionOpenConfirmResponse; - - /** - * Verifies a MsgConnectionOpenConfirmResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenConfirmResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.MsgConnectionOpenConfirmResponse; - - /** - * Creates a plain object from a MsgConnectionOpenConfirmResponse message. Also converts values to other types if specified. - * @param message MsgConnectionOpenConfirmResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenConfirmResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConnectionEnd. */ - interface IConnectionEnd { - - /** ConnectionEnd client_id */ - client_id?: (string|null); - - /** ConnectionEnd versions */ - versions?: (ibc.core.connection.v1.IVersion[]|null); - - /** ConnectionEnd state */ - state?: (ibc.core.connection.v1.State|null); - - /** ConnectionEnd counterparty */ - counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** ConnectionEnd delay_period */ - delay_period?: (Long|null); - } - - /** Represents a ConnectionEnd. */ - class ConnectionEnd implements IConnectionEnd { - - /** - * Constructs a new ConnectionEnd. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IConnectionEnd); - - /** ConnectionEnd client_id. */ - public client_id: string; - - /** ConnectionEnd versions. */ - public versions: ibc.core.connection.v1.IVersion[]; - - /** ConnectionEnd state. */ - public state: ibc.core.connection.v1.State; - - /** ConnectionEnd counterparty. */ - public counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** ConnectionEnd delay_period. */ - public delay_period: Long; - - /** - * Encodes the specified ConnectionEnd message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.IConnectionEnd, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.connection.v1.ConnectionEnd, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectionEnd to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IdentifiedConnection. */ - interface IIdentifiedConnection { - - /** IdentifiedConnection id */ - id?: (string|null); - - /** IdentifiedConnection client_id */ - client_id?: (string|null); - - /** IdentifiedConnection versions */ - versions?: (ibc.core.connection.v1.IVersion[]|null); - - /** IdentifiedConnection state */ - state?: (ibc.core.connection.v1.State|null); - - /** IdentifiedConnection counterparty */ - counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** IdentifiedConnection delay_period */ - delay_period?: (Long|null); - } - - /** Represents an IdentifiedConnection. */ - class IdentifiedConnection implements IIdentifiedConnection { - - /** - * Constructs a new IdentifiedConnection. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IIdentifiedConnection); - - /** IdentifiedConnection id. */ - public id: string; - - /** IdentifiedConnection client_id. */ - public client_id: string; - - /** IdentifiedConnection versions. */ - public versions: ibc.core.connection.v1.IVersion[]; - - /** IdentifiedConnection state. */ - public state: ibc.core.connection.v1.State; - - /** IdentifiedConnection counterparty. */ - public counterparty?: (ibc.core.connection.v1.ICounterparty|null); - - /** IdentifiedConnection delay_period. */ - public delay_period: Long; - - /** - * Encodes the specified IdentifiedConnection message. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. - * @param message IdentifiedConnection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IIdentifiedConnection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedConnection message, length delimited. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. - * @param message IdentifiedConnection message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IIdentifiedConnection, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedConnection message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.IdentifiedConnection; - - /** - * Decodes an IdentifiedConnection message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.IdentifiedConnection; - - /** - * Verifies an IdentifiedConnection message. - * @param message Plain 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 IdentifiedConnection message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedConnection - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.IdentifiedConnection; - - /** - * Creates a plain object from an IdentifiedConnection message. Also converts values to other types if specified. - * @param message IdentifiedConnection - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.IdentifiedConnection, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedConnection 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 client_id */ - client_id?: (string|null); - - /** Counterparty connection_id */ - connection_id?: (string|null); - - /** Counterparty prefix */ - prefix?: (ibc.core.commitment.v1.IMerklePrefix|null); - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - - /** - * Constructs a new Counterparty. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.ICounterparty); - - /** Counterparty client_id. */ - public client_id: string; - - /** Counterparty connection_id. */ - public connection_id: string; - - /** Counterparty prefix. */ - public prefix?: (ibc.core.commitment.v1.IMerklePrefix|null); - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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?: ibc.core.connection.v1.IClientPaths); - - /** ClientPaths paths. */ - public paths: string[]; - - /** - * Encodes the specified ClientPaths message. Does not implicitly {@link ibc.core.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: ibc.core.connection.v1.IClientPaths, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.connection.v1.ClientPaths, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientPaths to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConnectionPaths. */ - interface IConnectionPaths { - - /** ConnectionPaths client_id */ - client_id?: (string|null); - - /** ConnectionPaths paths */ - paths?: (string[]|null); - } - - /** Represents a ConnectionPaths. */ - class ConnectionPaths implements IConnectionPaths { - - /** - * Constructs a new ConnectionPaths. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IConnectionPaths); - - /** ConnectionPaths client_id. */ - public client_id: string; - - /** ConnectionPaths paths. */ - public paths: string[]; - - /** - * Encodes the specified ConnectionPaths message. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. - * @param message ConnectionPaths message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IConnectionPaths, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectionPaths message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. - * @param message ConnectionPaths message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IConnectionPaths, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectionPaths message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectionPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.ConnectionPaths; - - /** - * Decodes a ConnectionPaths message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectionPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.ConnectionPaths; - - /** - * Verifies a ConnectionPaths message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectionPaths message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectionPaths - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.ConnectionPaths; - - /** - * Creates a plain object from a ConnectionPaths message. Also converts values to other types if specified. - * @param message ConnectionPaths - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.ConnectionPaths, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectionPaths to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Version. */ - interface IVersion { - - /** Version identifier */ - identifier?: (string|null); - - /** Version features */ - features?: (string[]|null); - } - - /** Represents a Version. */ - class Version implements IVersion { - - /** - * Constructs a new Version. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IVersion); - - /** Version identifier. */ - public identifier: string; - - /** Version features. */ - public features: string[]; - - /** - * Encodes the specified Version message. Does not implicitly {@link ibc.core.connection.v1.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: ibc.core.connection.v1.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link ibc.core.connection.v1.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: ibc.core.connection.v1.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): ibc.core.connection.v1.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)): ibc.core.connection.v1.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 }): ibc.core.connection.v1.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: ibc.core.connection.v1.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Version to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params max_expected_time_per_block */ - max_expected_time_per_block?: (Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IParams); - - /** Params max_expected_time_per_block. */ - public max_expected_time_per_block: Long; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.connection.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: ibc.core.connection.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.connection.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: ibc.core.connection.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): ibc.core.connection.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)): ibc.core.connection.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 }): ibc.core.connection.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: ibc.core.connection.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Connection. - * @param request QueryConnectionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConnectionResponse - */ - public connection(request: ibc.core.connection.v1.IQueryConnectionRequest, callback: ibc.core.connection.v1.Query.ConnectionCallback): void; - - /** - * Calls Connection. - * @param request QueryConnectionRequest message or plain object - * @returns Promise - */ - public connection(request: ibc.core.connection.v1.IQueryConnectionRequest): Promise; - - /** - * Calls Connections. - * @param request QueryConnectionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConnectionsResponse - */ - public connections(request: ibc.core.connection.v1.IQueryConnectionsRequest, callback: ibc.core.connection.v1.Query.ConnectionsCallback): void; - - /** - * Calls Connections. - * @param request QueryConnectionsRequest message or plain object - * @returns Promise - */ - public connections(request: ibc.core.connection.v1.IQueryConnectionsRequest): Promise; - - /** - * Calls ClientConnections. - * @param request QueryClientConnectionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryClientConnectionsResponse - */ - public clientConnections(request: ibc.core.connection.v1.IQueryClientConnectionsRequest, callback: ibc.core.connection.v1.Query.ClientConnectionsCallback): void; - - /** - * Calls ClientConnections. - * @param request QueryClientConnectionsRequest message or plain object - * @returns Promise - */ - public clientConnections(request: ibc.core.connection.v1.IQueryClientConnectionsRequest): Promise; - - /** - * Calls ConnectionClientState. - * @param request QueryConnectionClientStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConnectionClientStateResponse - */ - public connectionClientState(request: ibc.core.connection.v1.IQueryConnectionClientStateRequest, callback: ibc.core.connection.v1.Query.ConnectionClientStateCallback): void; - - /** - * Calls ConnectionClientState. - * @param request QueryConnectionClientStateRequest message or plain object - * @returns Promise - */ - public connectionClientState(request: ibc.core.connection.v1.IQueryConnectionClientStateRequest): Promise; - - /** - * Calls ConnectionConsensusState. - * @param request QueryConnectionConsensusStateRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConnectionConsensusStateResponse - */ - public connectionConsensusState(request: ibc.core.connection.v1.IQueryConnectionConsensusStateRequest, callback: ibc.core.connection.v1.Query.ConnectionConsensusStateCallback): void; - - /** - * Calls ConnectionConsensusState. - * @param request QueryConnectionConsensusStateRequest message or plain object - * @returns Promise - */ - public connectionConsensusState(request: ibc.core.connection.v1.IQueryConnectionConsensusStateRequest): Promise; - - /** - * Calls ConnectionParams. - * @param request QueryConnectionParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryConnectionParamsResponse - */ - public connectionParams(request: ibc.core.connection.v1.IQueryConnectionParamsRequest, callback: ibc.core.connection.v1.Query.ConnectionParamsCallback): void; - - /** - * Calls ConnectionParams. - * @param request QueryConnectionParamsRequest message or plain object - * @returns Promise - */ - public connectionParams(request: ibc.core.connection.v1.IQueryConnectionParamsRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connection}. - * @param error Error, if any - * @param [response] QueryConnectionResponse - */ - type ConnectionCallback = (error: (Error|null), response?: ibc.core.connection.v1.QueryConnectionResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connections}. - * @param error Error, if any - * @param [response] QueryConnectionsResponse - */ - type ConnectionsCallback = (error: (Error|null), response?: ibc.core.connection.v1.QueryConnectionsResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#clientConnections}. - * @param error Error, if any - * @param [response] QueryClientConnectionsResponse - */ - type ClientConnectionsCallback = (error: (Error|null), response?: ibc.core.connection.v1.QueryClientConnectionsResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionClientState}. - * @param error Error, if any - * @param [response] QueryConnectionClientStateResponse - */ - type ConnectionClientStateCallback = (error: (Error|null), response?: ibc.core.connection.v1.QueryConnectionClientStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionConsensusState}. - * @param error Error, if any - * @param [response] QueryConnectionConsensusStateResponse - */ - type ConnectionConsensusStateCallback = (error: (Error|null), response?: ibc.core.connection.v1.QueryConnectionConsensusStateResponse) => void; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionParams}. - * @param error Error, if any - * @param [response] QueryConnectionParamsResponse - */ - type ConnectionParamsCallback = (error: (Error|null), response?: ibc.core.connection.v1.QueryConnectionParamsResponse) => void; - } - - /** Properties of a QueryConnectionRequest. */ - interface IQueryConnectionRequest { - - /** QueryConnectionRequest connection_id */ - connection_id?: (string|null); - } - - /** Represents a QueryConnectionRequest. */ - class QueryConnectionRequest implements IQueryConnectionRequest { - - /** - * Constructs a new QueryConnectionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionRequest); - - /** QueryConnectionRequest connection_id. */ - public connection_id: string; - - /** - * Encodes the specified QueryConnectionRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. - * @param message QueryConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. - * @param message QueryConnectionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionRequest; - - /** - * Decodes a QueryConnectionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionRequest; - - /** - * Verifies a QueryConnectionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionRequest; - - /** - * Creates a plain object from a QueryConnectionRequest message. Also converts values to other types if specified. - * @param message QueryConnectionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionResponse. */ - interface IQueryConnectionResponse { - - /** QueryConnectionResponse connection */ - connection?: (ibc.core.connection.v1.IConnectionEnd|null); - - /** QueryConnectionResponse proof */ - proof?: (Uint8Array|null); - - /** QueryConnectionResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryConnectionResponse. */ - class QueryConnectionResponse implements IQueryConnectionResponse { - - /** - * Constructs a new QueryConnectionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionResponse); - - /** QueryConnectionResponse connection. */ - public connection?: (ibc.core.connection.v1.IConnectionEnd|null); - - /** QueryConnectionResponse proof. */ - public proof: Uint8Array; - - /** QueryConnectionResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryConnectionResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. - * @param message QueryConnectionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. - * @param message QueryConnectionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionResponse; - - /** - * Decodes a QueryConnectionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionResponse; - - /** - * Verifies a QueryConnectionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionResponse; - - /** - * Creates a plain object from a QueryConnectionResponse message. Also converts values to other types if specified. - * @param message QueryConnectionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionsRequest. */ - interface IQueryConnectionsRequest { - - /** QueryConnectionsRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryConnectionsRequest. */ - class QueryConnectionsRequest implements IQueryConnectionsRequest { - - /** - * Constructs a new QueryConnectionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionsRequest); - - /** QueryConnectionsRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. - * @param message QueryConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. - * @param message QueryConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionsRequest; - - /** - * Decodes a QueryConnectionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionsRequest; - - /** - * Verifies a QueryConnectionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionsRequest; - - /** - * Creates a plain object from a QueryConnectionsRequest message. Also converts values to other types if specified. - * @param message QueryConnectionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionsResponse. */ - interface IQueryConnectionsResponse { - - /** QueryConnectionsResponse connections */ - connections?: (ibc.core.connection.v1.IIdentifiedConnection[]|null); - - /** QueryConnectionsResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryConnectionsResponse height */ - height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryConnectionsResponse. */ - class QueryConnectionsResponse implements IQueryConnectionsResponse { - - /** - * Constructs a new QueryConnectionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionsResponse); - - /** QueryConnectionsResponse connections. */ - public connections: ibc.core.connection.v1.IIdentifiedConnection[]; - - /** QueryConnectionsResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** QueryConnectionsResponse height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. - * @param message QueryConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. - * @param message QueryConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionsResponse; - - /** - * Decodes a QueryConnectionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionsResponse; - - /** - * Verifies a QueryConnectionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionsResponse; - - /** - * Creates a plain object from a QueryConnectionsResponse message. Also converts values to other types if specified. - * @param message QueryConnectionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientConnectionsRequest. */ - interface IQueryClientConnectionsRequest { - - /** QueryClientConnectionsRequest client_id */ - client_id?: (string|null); - } - - /** Represents a QueryClientConnectionsRequest. */ - class QueryClientConnectionsRequest implements IQueryClientConnectionsRequest { - - /** - * Constructs a new QueryClientConnectionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryClientConnectionsRequest); - - /** QueryClientConnectionsRequest client_id. */ - public client_id: string; - - /** - * Encodes the specified QueryClientConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. - * @param message QueryClientConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryClientConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. - * @param message QueryClientConnectionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryClientConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryClientConnectionsRequest; - - /** - * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryClientConnectionsRequest; - - /** - * Verifies a QueryClientConnectionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientConnectionsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryClientConnectionsRequest; - - /** - * Creates a plain object from a QueryClientConnectionsRequest message. Also converts values to other types if specified. - * @param message QueryClientConnectionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryClientConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientConnectionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryClientConnectionsResponse. */ - interface IQueryClientConnectionsResponse { - - /** QueryClientConnectionsResponse connection_paths */ - connection_paths?: (string[]|null); - - /** QueryClientConnectionsResponse proof */ - proof?: (Uint8Array|null); - - /** QueryClientConnectionsResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryClientConnectionsResponse. */ - class QueryClientConnectionsResponse implements IQueryClientConnectionsResponse { - - /** - * Constructs a new QueryClientConnectionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryClientConnectionsResponse); - - /** QueryClientConnectionsResponse connection_paths. */ - public connection_paths: string[]; - - /** QueryClientConnectionsResponse proof. */ - public proof: Uint8Array; - - /** QueryClientConnectionsResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryClientConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. - * @param message QueryClientConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryClientConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryClientConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. - * @param message QueryClientConnectionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryClientConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryClientConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryClientConnectionsResponse; - - /** - * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryClientConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryClientConnectionsResponse; - - /** - * Verifies a QueryClientConnectionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryClientConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryClientConnectionsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryClientConnectionsResponse; - - /** - * Creates a plain object from a QueryClientConnectionsResponse message. Also converts values to other types if specified. - * @param message QueryClientConnectionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryClientConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryClientConnectionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionClientStateRequest. */ - interface IQueryConnectionClientStateRequest { - - /** QueryConnectionClientStateRequest connection_id */ - connection_id?: (string|null); - } - - /** Represents a QueryConnectionClientStateRequest. */ - class QueryConnectionClientStateRequest implements IQueryConnectionClientStateRequest { - - /** - * Constructs a new QueryConnectionClientStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionClientStateRequest); - - /** QueryConnectionClientStateRequest connection_id. */ - public connection_id: string; - - /** - * Encodes the specified QueryConnectionClientStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. - * @param message QueryConnectionClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. - * @param message QueryConnectionClientStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionClientStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionClientStateRequest; - - /** - * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionClientStateRequest; - - /** - * Verifies a QueryConnectionClientStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionClientStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionClientStateRequest; - - /** - * Creates a plain object from a QueryConnectionClientStateRequest message. Also converts values to other types if specified. - * @param message QueryConnectionClientStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionClientStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionClientStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionClientStateResponse. */ - interface IQueryConnectionClientStateResponse { - - /** QueryConnectionClientStateResponse identified_client_state */ - identified_client_state?: (ibc.core.client.v1.IIdentifiedClientState|null); - - /** QueryConnectionClientStateResponse proof */ - proof?: (Uint8Array|null); - - /** QueryConnectionClientStateResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryConnectionClientStateResponse. */ - class QueryConnectionClientStateResponse implements IQueryConnectionClientStateResponse { - - /** - * Constructs a new QueryConnectionClientStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionClientStateResponse); - - /** QueryConnectionClientStateResponse identified_client_state. */ - public identified_client_state?: (ibc.core.client.v1.IIdentifiedClientState|null); - - /** QueryConnectionClientStateResponse proof. */ - public proof: Uint8Array; - - /** QueryConnectionClientStateResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryConnectionClientStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. - * @param message QueryConnectionClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. - * @param message QueryConnectionClientStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionClientStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionClientStateResponse; - - /** - * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionClientStateResponse; - - /** - * Verifies a QueryConnectionClientStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionClientStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionClientStateResponse; - - /** - * Creates a plain object from a QueryConnectionClientStateResponse message. Also converts values to other types if specified. - * @param message QueryConnectionClientStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionClientStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionClientStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionConsensusStateRequest. */ - interface IQueryConnectionConsensusStateRequest { - - /** QueryConnectionConsensusStateRequest connection_id */ - connection_id?: (string|null); - - /** QueryConnectionConsensusStateRequest revision_number */ - revision_number?: (Long|null); - - /** QueryConnectionConsensusStateRequest revision_height */ - revision_height?: (Long|null); - } - - /** Represents a QueryConnectionConsensusStateRequest. */ - class QueryConnectionConsensusStateRequest implements IQueryConnectionConsensusStateRequest { - - /** - * Constructs a new QueryConnectionConsensusStateRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionConsensusStateRequest); - - /** QueryConnectionConsensusStateRequest connection_id. */ - public connection_id: string; - - /** QueryConnectionConsensusStateRequest revision_number. */ - public revision_number: Long; - - /** QueryConnectionConsensusStateRequest revision_height. */ - public revision_height: Long; - - /** - * Encodes the specified QueryConnectionConsensusStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. - * @param message QueryConnectionConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. - * @param message QueryConnectionConsensusStateRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionConsensusStateRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionConsensusStateRequest; - - /** - * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionConsensusStateRequest; - - /** - * Verifies a QueryConnectionConsensusStateRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionConsensusStateRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionConsensusStateRequest; - - /** - * Creates a plain object from a QueryConnectionConsensusStateRequest message. Also converts values to other types if specified. - * @param message QueryConnectionConsensusStateRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionConsensusStateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionConsensusStateRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionConsensusStateResponse. */ - interface IQueryConnectionConsensusStateResponse { - - /** QueryConnectionConsensusStateResponse consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - - /** QueryConnectionConsensusStateResponse client_id */ - client_id?: (string|null); - - /** QueryConnectionConsensusStateResponse proof */ - proof?: (Uint8Array|null); - - /** QueryConnectionConsensusStateResponse proof_height */ - proof_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a QueryConnectionConsensusStateResponse. */ - class QueryConnectionConsensusStateResponse implements IQueryConnectionConsensusStateResponse { - - /** - * Constructs a new QueryConnectionConsensusStateResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionConsensusStateResponse); - - /** QueryConnectionConsensusStateResponse consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** QueryConnectionConsensusStateResponse client_id. */ - public client_id: string; - - /** QueryConnectionConsensusStateResponse proof. */ - public proof: Uint8Array; - - /** QueryConnectionConsensusStateResponse proof_height. */ - public proof_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified QueryConnectionConsensusStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. - * @param message QueryConnectionConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. - * @param message QueryConnectionConsensusStateResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionConsensusStateResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionConsensusStateResponse; - - /** - * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionConsensusStateResponse; - - /** - * Verifies a QueryConnectionConsensusStateResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionConsensusStateResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionConsensusStateResponse; - - /** - * Creates a plain object from a QueryConnectionConsensusStateResponse message. Also converts values to other types if specified. - * @param message QueryConnectionConsensusStateResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionConsensusStateResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionConsensusStateResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionParamsRequest. */ - interface IQueryConnectionParamsRequest { - } - - /** Represents a QueryConnectionParamsRequest. */ - class QueryConnectionParamsRequest implements IQueryConnectionParamsRequest { - - /** - * Constructs a new QueryConnectionParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionParamsRequest); - - /** - * Encodes the specified QueryConnectionParamsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsRequest.verify|verify} messages. - * @param message QueryConnectionParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionParamsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsRequest.verify|verify} messages. - * @param message QueryConnectionParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionParamsRequest; - - /** - * Decodes a QueryConnectionParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionParamsRequest; - - /** - * Verifies a QueryConnectionParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionParamsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionParamsRequest; - - /** - * Creates a plain object from a QueryConnectionParamsRequest message. Also converts values to other types if specified. - * @param message QueryConnectionParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryConnectionParamsResponse. */ - interface IQueryConnectionParamsResponse { - - /** QueryConnectionParamsResponse params */ - params?: (ibc.core.connection.v1.IParams|null); - } - - /** Represents a QueryConnectionParamsResponse. */ - class QueryConnectionParamsResponse implements IQueryConnectionParamsResponse { - - /** - * Constructs a new QueryConnectionParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IQueryConnectionParamsResponse); - - /** QueryConnectionParamsResponse params. */ - public params?: (ibc.core.connection.v1.IParams|null); - - /** - * Encodes the specified QueryConnectionParamsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsResponse.verify|verify} messages. - * @param message QueryConnectionParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IQueryConnectionParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryConnectionParamsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsResponse.verify|verify} messages. - * @param message QueryConnectionParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IQueryConnectionParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryConnectionParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryConnectionParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.QueryConnectionParamsResponse; - - /** - * Decodes a QueryConnectionParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryConnectionParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.QueryConnectionParamsResponse; - - /** - * Verifies a QueryConnectionParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryConnectionParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryConnectionParamsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.QueryConnectionParamsResponse; - - /** - * Creates a plain object from a QueryConnectionParamsResponse message. Also converts values to other types if specified. - * @param message QueryConnectionParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.QueryConnectionParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryConnectionParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState connections */ - connections?: (ibc.core.connection.v1.IIdentifiedConnection[]|null); - - /** GenesisState client_connection_paths */ - client_connection_paths?: (ibc.core.connection.v1.IConnectionPaths[]|null); - - /** GenesisState next_connection_sequence */ - next_connection_sequence?: (Long|null); - - /** GenesisState params */ - params?: (ibc.core.connection.v1.IParams|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.connection.v1.IGenesisState); - - /** GenesisState connections. */ - public connections: ibc.core.connection.v1.IIdentifiedConnection[]; - - /** GenesisState client_connection_paths. */ - public client_connection_paths: ibc.core.connection.v1.IConnectionPaths[]; - - /** GenesisState next_connection_sequence. */ - public next_connection_sequence: Long; - - /** GenesisState params. */ - public params?: (ibc.core.connection.v1.IParams|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.connection.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.connection.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.connection.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.connection.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.connection.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.connection.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace types. */ - namespace types { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState client_genesis */ - client_genesis?: (ibc.core.client.v1.IGenesisState|null); - - /** GenesisState connection_genesis */ - connection_genesis?: (ibc.core.connection.v1.IGenesisState|null); - - /** GenesisState channel_genesis */ - channel_genesis?: (ibc.core.channel.v1.IGenesisState|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.types.v1.IGenesisState); - - /** GenesisState client_genesis. */ - public client_genesis?: (ibc.core.client.v1.IGenesisState|null); - - /** GenesisState connection_genesis. */ - public connection_genesis?: (ibc.core.connection.v1.IGenesisState|null); - - /** GenesisState channel_genesis. */ - public channel_genesis?: (ibc.core.channel.v1.IGenesisState|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.types.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.types.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.types.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.types.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.types.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.types.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace lightclients. */ - namespace lightclients { - - /** Namespace localhost. */ - namespace localhost { - - /** Namespace v2. */ - namespace v2 { - - /** Properties of a ClientState. */ - interface IClientState { - - /** ClientState latest_height */ - latest_height?: (ibc.core.client.v1.IHeight|null); - } - - /** Represents a ClientState. */ - class ClientState implements IClientState { - - /** - * Constructs a new ClientState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.localhost.v2.IClientState); - - /** ClientState latest_height. */ - public latest_height?: (ibc.core.client.v1.IHeight|null); - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.localhost.v2.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.localhost.v2.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.localhost.v2.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.localhost.v2.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.localhost.v2.ClientState; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.localhost.v2.ClientState; - - /** - * Verifies a ClientState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.localhost.v2.ClientState; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @param message ClientState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.localhost.v2.ClientState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace solomachine. */ - namespace solomachine { - - /** Namespace v2. */ - namespace v2 { - - /** Properties of a ClientState. */ - interface IClientState { - - /** ClientState sequence */ - sequence?: (Long|null); - - /** ClientState is_frozen */ - is_frozen?: (boolean|null); - - /** ClientState consensus_state */ - consensus_state?: (ibc.lightclients.solomachine.v2.IConsensusState|null); - - /** ClientState allow_update_after_proposal */ - allow_update_after_proposal?: (boolean|null); - } - - /** Represents a ClientState. */ - class ClientState implements IClientState { - - /** - * Constructs a new ClientState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IClientState); - - /** ClientState sequence. */ - public sequence: Long; - - /** ClientState is_frozen. */ - public is_frozen: boolean; - - /** ClientState consensus_state. */ - public consensus_state?: (ibc.lightclients.solomachine.v2.IConsensusState|null); - - /** ClientState allow_update_after_proposal. */ - public allow_update_after_proposal: boolean; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.ClientState; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.ClientState; - - /** - * Verifies a ClientState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.ClientState; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @param message ClientState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.ClientState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusState. */ - interface IConsensusState { - - /** ConsensusState public_key */ - public_key?: (google.protobuf.IAny|null); - - /** ConsensusState diversifier */ - diversifier?: (string|null); - - /** ConsensusState timestamp */ - timestamp?: (Long|null); - } - - /** Represents a ConsensusState. */ - class ConsensusState implements IConsensusState { - - /** - * Constructs a new ConsensusState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IConsensusState); - - /** ConsensusState public_key. */ - public public_key?: (google.protobuf.IAny|null); - - /** ConsensusState diversifier. */ - public diversifier: string; - - /** ConsensusState timestamp. */ - public timestamp: Long; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusState.verify|verify} messages. - * @param message ConsensusState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IConsensusState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusState.verify|verify} messages. - * @param message ConsensusState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IConsensusState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.ConsensusState; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.ConsensusState; - - /** - * Verifies a ConsensusState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.ConsensusState; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @param message ConsensusState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.ConsensusState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Header. */ - interface IHeader { - - /** Header sequence */ - sequence?: (Long|null); - - /** Header timestamp */ - timestamp?: (Long|null); - - /** Header signature */ - signature?: (Uint8Array|null); - - /** Header new_public_key */ - new_public_key?: (google.protobuf.IAny|null); - - /** Header new_diversifier */ - new_diversifier?: (string|null); - } - - /** Represents a Header. */ - class Header implements IHeader { - - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IHeader); - - /** Header sequence. */ - public sequence: Long; - - /** Header timestamp. */ - public timestamp: Long; - - /** Header signature. */ - public signature: Uint8Array; - - /** Header new_public_key. */ - public new_public_key?: (google.protobuf.IAny|null); - - /** Header new_diversifier. */ - public new_diversifier: string; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.solomachine.v2.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: ibc.lightclients.solomachine.v2.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.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: ibc.lightclients.solomachine.v2.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): ibc.lightclients.solomachine.v2.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)): ibc.lightclients.solomachine.v2.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 }): ibc.lightclients.solomachine.v2.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: ibc.lightclients.solomachine.v2.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Misbehaviour. */ - interface IMisbehaviour { - - /** Misbehaviour client_id */ - client_id?: (string|null); - - /** Misbehaviour sequence */ - sequence?: (Long|null); - - /** Misbehaviour signature_one */ - signature_one?: (ibc.lightclients.solomachine.v2.ISignatureAndData|null); - - /** Misbehaviour signature_two */ - signature_two?: (ibc.lightclients.solomachine.v2.ISignatureAndData|null); - } - - /** Represents a Misbehaviour. */ - class Misbehaviour implements IMisbehaviour { - - /** - * Constructs a new Misbehaviour. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IMisbehaviour); - - /** Misbehaviour client_id. */ - public client_id: string; - - /** Misbehaviour sequence. */ - public sequence: Long; - - /** Misbehaviour signature_one. */ - public signature_one?: (ibc.lightclients.solomachine.v2.ISignatureAndData|null); - - /** Misbehaviour signature_two. */ - public signature_two?: (ibc.lightclients.solomachine.v2.ISignatureAndData|null); - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.solomachine.v2.Misbehaviour.verify|verify} messages. - * @param message Misbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.Misbehaviour.verify|verify} messages. - * @param message Misbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.Misbehaviour; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.Misbehaviour; - - /** - * Verifies a Misbehaviour message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Misbehaviour - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.Misbehaviour; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @param message Misbehaviour - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.Misbehaviour, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Misbehaviour to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SignatureAndData. */ - interface ISignatureAndData { - - /** SignatureAndData signature */ - signature?: (Uint8Array|null); - - /** SignatureAndData data_type */ - data_type?: (ibc.lightclients.solomachine.v2.DataType|null); - - /** SignatureAndData data */ - data?: (Uint8Array|null); - - /** SignatureAndData timestamp */ - timestamp?: (Long|null); - } - - /** Represents a SignatureAndData. */ - class SignatureAndData implements ISignatureAndData { - - /** - * Constructs a new SignatureAndData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.ISignatureAndData); - - /** SignatureAndData signature. */ - public signature: Uint8Array; - - /** SignatureAndData data_type. */ - public data_type: ibc.lightclients.solomachine.v2.DataType; - - /** SignatureAndData data. */ - public data: Uint8Array; - - /** SignatureAndData timestamp. */ - public timestamp: Long; - - /** - * Encodes the specified SignatureAndData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignatureAndData.verify|verify} messages. - * @param message SignatureAndData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.ISignatureAndData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignatureAndData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignatureAndData.verify|verify} messages. - * @param message SignatureAndData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.ISignatureAndData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.SignatureAndData; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.SignatureAndData; - - /** - * Verifies a SignatureAndData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignatureAndData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignatureAndData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.SignatureAndData; - - /** - * Creates a plain object from a SignatureAndData message. Also converts values to other types if specified. - * @param message SignatureAndData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.SignatureAndData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignatureAndData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TimestampedSignatureData. */ - interface ITimestampedSignatureData { - - /** TimestampedSignatureData signature_data */ - signature_data?: (Uint8Array|null); - - /** TimestampedSignatureData timestamp */ - timestamp?: (Long|null); - } - - /** Represents a TimestampedSignatureData. */ - class TimestampedSignatureData implements ITimestampedSignatureData { - - /** - * Constructs a new TimestampedSignatureData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.ITimestampedSignatureData); - - /** TimestampedSignatureData signature_data. */ - public signature_data: Uint8Array; - - /** TimestampedSignatureData timestamp. */ - public timestamp: Long; - - /** - * Encodes the specified TimestampedSignatureData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.TimestampedSignatureData.verify|verify} messages. - * @param message TimestampedSignatureData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.ITimestampedSignatureData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimestampedSignatureData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.TimestampedSignatureData.verify|verify} messages. - * @param message TimestampedSignatureData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.ITimestampedSignatureData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.TimestampedSignatureData; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.TimestampedSignatureData; - - /** - * Verifies a TimestampedSignatureData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TimestampedSignatureData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimestampedSignatureData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.TimestampedSignatureData; - - /** - * Creates a plain object from a TimestampedSignatureData message. Also converts values to other types if specified. - * @param message TimestampedSignatureData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.TimestampedSignatureData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimestampedSignatureData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SignBytes. */ - interface ISignBytes { - - /** SignBytes sequence */ - sequence?: (Long|null); - - /** SignBytes timestamp */ - timestamp?: (Long|null); - - /** SignBytes diversifier */ - diversifier?: (string|null); - - /** SignBytes data_type */ - data_type?: (ibc.lightclients.solomachine.v2.DataType|null); - - /** SignBytes data */ - data?: (Uint8Array|null); - } - - /** Represents a SignBytes. */ - class SignBytes implements ISignBytes { - - /** - * Constructs a new SignBytes. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.ISignBytes); - - /** SignBytes sequence. */ - public sequence: Long; - - /** SignBytes timestamp. */ - public timestamp: Long; - - /** SignBytes diversifier. */ - public diversifier: string; - - /** SignBytes data_type. */ - public data_type: ibc.lightclients.solomachine.v2.DataType; - - /** SignBytes data. */ - public data: Uint8Array; - - /** - * Encodes the specified SignBytes message. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignBytes.verify|verify} messages. - * @param message SignBytes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.ISignBytes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignBytes message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignBytes.verify|verify} messages. - * @param message SignBytes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.ISignBytes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignBytes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.SignBytes; - - /** - * Decodes a SignBytes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.SignBytes; - - /** - * Verifies a SignBytes message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignBytes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignBytes - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.SignBytes; - - /** - * Creates a plain object from a SignBytes message. Also converts values to other types if specified. - * @param message SignBytes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.SignBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignBytes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** DataType enum. */ - enum DataType { - DATA_TYPE_UNINITIALIZED_UNSPECIFIED = 0, - DATA_TYPE_CLIENT_STATE = 1, - DATA_TYPE_CONSENSUS_STATE = 2, - DATA_TYPE_CONNECTION_STATE = 3, - DATA_TYPE_CHANNEL_STATE = 4, - DATA_TYPE_PACKET_COMMITMENT = 5, - DATA_TYPE_PACKET_ACKNOWLEDGEMENT = 6, - DATA_TYPE_PACKET_RECEIPT_ABSENCE = 7, - DATA_TYPE_NEXT_SEQUENCE_RECV = 8, - DATA_TYPE_HEADER = 9 - } - - /** Properties of a HeaderData. */ - interface IHeaderData { - - /** HeaderData new_pub_key */ - new_pub_key?: (google.protobuf.IAny|null); - - /** HeaderData new_diversifier */ - new_diversifier?: (string|null); - } - - /** Represents a HeaderData. */ - class HeaderData implements IHeaderData { - - /** - * Constructs a new HeaderData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IHeaderData); - - /** HeaderData new_pub_key. */ - public new_pub_key?: (google.protobuf.IAny|null); - - /** HeaderData new_diversifier. */ - public new_diversifier: string; - - /** - * Encodes the specified HeaderData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.HeaderData.verify|verify} messages. - * @param message HeaderData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IHeaderData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HeaderData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.HeaderData.verify|verify} messages. - * @param message HeaderData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IHeaderData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HeaderData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.HeaderData; - - /** - * Decodes a HeaderData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.HeaderData; - - /** - * Verifies a HeaderData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HeaderData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HeaderData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.HeaderData; - - /** - * Creates a plain object from a HeaderData message. Also converts values to other types if specified. - * @param message HeaderData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.HeaderData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HeaderData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientStateData. */ - interface IClientStateData { - - /** ClientStateData path */ - path?: (Uint8Array|null); - - /** ClientStateData client_state */ - client_state?: (google.protobuf.IAny|null); - } - - /** Represents a ClientStateData. */ - class ClientStateData implements IClientStateData { - - /** - * Constructs a new ClientStateData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IClientStateData); - - /** ClientStateData path. */ - public path: Uint8Array; - - /** ClientStateData client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified ClientStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientStateData.verify|verify} messages. - * @param message ClientStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IClientStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientStateData.verify|verify} messages. - * @param message ClientStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IClientStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientStateData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.ClientStateData; - - /** - * Decodes a ClientStateData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.ClientStateData; - - /** - * Verifies a ClientStateData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientStateData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientStateData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.ClientStateData; - - /** - * Creates a plain object from a ClientStateData message. Also converts values to other types if specified. - * @param message ClientStateData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.ClientStateData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientStateData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusStateData. */ - interface IConsensusStateData { - - /** ConsensusStateData path */ - path?: (Uint8Array|null); - - /** ConsensusStateData consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - } - - /** Represents a ConsensusStateData. */ - class ConsensusStateData implements IConsensusStateData { - - /** - * Constructs a new ConsensusStateData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IConsensusStateData); - - /** ConsensusStateData path. */ - public path: Uint8Array; - - /** ConsensusStateData consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified ConsensusStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusStateData.verify|verify} messages. - * @param message ConsensusStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IConsensusStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusStateData.verify|verify} messages. - * @param message ConsensusStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IConsensusStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsensusStateData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsensusStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.ConsensusStateData; - - /** - * Decodes a ConsensusStateData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsensusStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.ConsensusStateData; - - /** - * Verifies a ConsensusStateData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusStateData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusStateData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.ConsensusStateData; - - /** - * Creates a plain object from a ConsensusStateData message. Also converts values to other types if specified. - * @param message ConsensusStateData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.ConsensusStateData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusStateData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConnectionStateData. */ - interface IConnectionStateData { - - /** ConnectionStateData path */ - path?: (Uint8Array|null); - - /** ConnectionStateData connection */ - connection?: (ibc.core.connection.v1.IConnectionEnd|null); - } - - /** Represents a ConnectionStateData. */ - class ConnectionStateData implements IConnectionStateData { - - /** - * Constructs a new ConnectionStateData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IConnectionStateData); - - /** ConnectionStateData path. */ - public path: Uint8Array; - - /** ConnectionStateData connection. */ - public connection?: (ibc.core.connection.v1.IConnectionEnd|null); - - /** - * Encodes the specified ConnectionStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConnectionStateData.verify|verify} messages. - * @param message ConnectionStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IConnectionStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectionStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConnectionStateData.verify|verify} messages. - * @param message ConnectionStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IConnectionStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectionStateData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectionStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.ConnectionStateData; - - /** - * Decodes a ConnectionStateData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectionStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.ConnectionStateData; - - /** - * Verifies a ConnectionStateData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectionStateData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectionStateData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.ConnectionStateData; - - /** - * Creates a plain object from a ConnectionStateData message. Also converts values to other types if specified. - * @param message ConnectionStateData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.ConnectionStateData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectionStateData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ChannelStateData. */ - interface IChannelStateData { - - /** ChannelStateData path */ - path?: (Uint8Array|null); - - /** ChannelStateData channel */ - channel?: (ibc.core.channel.v1.IChannel|null); - } - - /** Represents a ChannelStateData. */ - class ChannelStateData implements IChannelStateData { - - /** - * Constructs a new ChannelStateData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IChannelStateData); - - /** ChannelStateData path. */ - public path: Uint8Array; - - /** ChannelStateData channel. */ - public channel?: (ibc.core.channel.v1.IChannel|null); - - /** - * Encodes the specified ChannelStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ChannelStateData.verify|verify} messages. - * @param message ChannelStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IChannelStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ChannelStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ChannelStateData.verify|verify} messages. - * @param message ChannelStateData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IChannelStateData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ChannelStateData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ChannelStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.ChannelStateData; - - /** - * Decodes a ChannelStateData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ChannelStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.ChannelStateData; - - /** - * Verifies a ChannelStateData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ChannelStateData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ChannelStateData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.ChannelStateData; - - /** - * Creates a plain object from a ChannelStateData message. Also converts values to other types if specified. - * @param message ChannelStateData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.ChannelStateData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ChannelStateData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketCommitmentData. */ - interface IPacketCommitmentData { - - /** PacketCommitmentData path */ - path?: (Uint8Array|null); - - /** PacketCommitmentData commitment */ - commitment?: (Uint8Array|null); - } - - /** Represents a PacketCommitmentData. */ - class PacketCommitmentData implements IPacketCommitmentData { - - /** - * Constructs a new PacketCommitmentData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IPacketCommitmentData); - - /** PacketCommitmentData path. */ - public path: Uint8Array; - - /** PacketCommitmentData commitment. */ - public commitment: Uint8Array; - - /** - * Encodes the specified PacketCommitmentData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketCommitmentData.verify|verify} messages. - * @param message PacketCommitmentData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IPacketCommitmentData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketCommitmentData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketCommitmentData.verify|verify} messages. - * @param message PacketCommitmentData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IPacketCommitmentData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketCommitmentData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketCommitmentData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.PacketCommitmentData; - - /** - * Decodes a PacketCommitmentData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketCommitmentData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.PacketCommitmentData; - - /** - * Verifies a PacketCommitmentData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketCommitmentData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketCommitmentData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.PacketCommitmentData; - - /** - * Creates a plain object from a PacketCommitmentData message. Also converts values to other types if specified. - * @param message PacketCommitmentData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.PacketCommitmentData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketCommitmentData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketAcknowledgementData. */ - interface IPacketAcknowledgementData { - - /** PacketAcknowledgementData path */ - path?: (Uint8Array|null); - - /** PacketAcknowledgementData acknowledgement */ - acknowledgement?: (Uint8Array|null); - } - - /** Represents a PacketAcknowledgementData. */ - class PacketAcknowledgementData implements IPacketAcknowledgementData { - - /** - * Constructs a new PacketAcknowledgementData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IPacketAcknowledgementData); - - /** PacketAcknowledgementData path. */ - public path: Uint8Array; - - /** PacketAcknowledgementData acknowledgement. */ - public acknowledgement: Uint8Array; - - /** - * Encodes the specified PacketAcknowledgementData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketAcknowledgementData.verify|verify} messages. - * @param message PacketAcknowledgementData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IPacketAcknowledgementData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketAcknowledgementData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketAcknowledgementData.verify|verify} messages. - * @param message PacketAcknowledgementData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IPacketAcknowledgementData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketAcknowledgementData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketAcknowledgementData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.PacketAcknowledgementData; - - /** - * Decodes a PacketAcknowledgementData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketAcknowledgementData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.PacketAcknowledgementData; - - /** - * Verifies a PacketAcknowledgementData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketAcknowledgementData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketAcknowledgementData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.PacketAcknowledgementData; - - /** - * Creates a plain object from a PacketAcknowledgementData message. Also converts values to other types if specified. - * @param message PacketAcknowledgementData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.PacketAcknowledgementData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketAcknowledgementData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketReceiptAbsenceData. */ - interface IPacketReceiptAbsenceData { - - /** PacketReceiptAbsenceData path */ - path?: (Uint8Array|null); - } - - /** Represents a PacketReceiptAbsenceData. */ - class PacketReceiptAbsenceData implements IPacketReceiptAbsenceData { - - /** - * Constructs a new PacketReceiptAbsenceData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData); - - /** PacketReceiptAbsenceData path. */ - public path: Uint8Array; - - /** - * Encodes the specified PacketReceiptAbsenceData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.verify|verify} messages. - * @param message PacketReceiptAbsenceData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketReceiptAbsenceData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.verify|verify} messages. - * @param message PacketReceiptAbsenceData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketReceiptAbsenceData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketReceiptAbsenceData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData; - - /** - * Decodes a PacketReceiptAbsenceData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketReceiptAbsenceData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData; - - /** - * Verifies a PacketReceiptAbsenceData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketReceiptAbsenceData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketReceiptAbsenceData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData; - - /** - * Creates a plain object from a PacketReceiptAbsenceData message. Also converts values to other types if specified. - * @param message PacketReceiptAbsenceData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketReceiptAbsenceData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a NextSequenceRecvData. */ - interface INextSequenceRecvData { - - /** NextSequenceRecvData path */ - path?: (Uint8Array|null); - - /** NextSequenceRecvData next_seq_recv */ - next_seq_recv?: (Long|null); - } - - /** Represents a NextSequenceRecvData. */ - class NextSequenceRecvData implements INextSequenceRecvData { - - /** - * Constructs a new NextSequenceRecvData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v2.INextSequenceRecvData); - - /** NextSequenceRecvData path. */ - public path: Uint8Array; - - /** NextSequenceRecvData next_seq_recv. */ - public next_seq_recv: Long; - - /** - * Encodes the specified NextSequenceRecvData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.NextSequenceRecvData.verify|verify} messages. - * @param message NextSequenceRecvData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v2.INextSequenceRecvData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NextSequenceRecvData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.NextSequenceRecvData.verify|verify} messages. - * @param message NextSequenceRecvData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v2.INextSequenceRecvData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NextSequenceRecvData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NextSequenceRecvData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v2.NextSequenceRecvData; - - /** - * Decodes a NextSequenceRecvData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NextSequenceRecvData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v2.NextSequenceRecvData; - - /** - * Verifies a NextSequenceRecvData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NextSequenceRecvData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NextSequenceRecvData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v2.NextSequenceRecvData; - - /** - * Creates a plain object from a NextSequenceRecvData message. Also converts values to other types if specified. - * @param message NextSequenceRecvData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v2.NextSequenceRecvData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NextSequenceRecvData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace v3. */ - namespace v3 { - - /** Properties of a ClientState. */ - interface IClientState { - - /** ClientState sequence */ - sequence?: (Long|null); - - /** ClientState is_frozen */ - is_frozen?: (boolean|null); - - /** ClientState consensus_state */ - consensus_state?: (ibc.lightclients.solomachine.v3.IConsensusState|null); - } - - /** Represents a ClientState. */ - class ClientState implements IClientState { - - /** - * Constructs a new ClientState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.IClientState); - - /** ClientState sequence. */ - public sequence: Long; - - /** ClientState is_frozen. */ - public is_frozen: boolean; - - /** ClientState consensus_state. */ - public consensus_state?: (ibc.lightclients.solomachine.v3.IConsensusState|null); - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.solomachine.v3.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.ClientState; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.ClientState; - - /** - * Verifies a ClientState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.ClientState; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @param message ClientState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.ClientState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusState. */ - interface IConsensusState { - - /** ConsensusState public_key */ - public_key?: (google.protobuf.IAny|null); - - /** ConsensusState diversifier */ - diversifier?: (string|null); - - /** ConsensusState timestamp */ - timestamp?: (Long|null); - } - - /** Represents a ConsensusState. */ - class ConsensusState implements IConsensusState { - - /** - * Constructs a new ConsensusState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.IConsensusState); - - /** ConsensusState public_key. */ - public public_key?: (google.protobuf.IAny|null); - - /** ConsensusState diversifier. */ - public diversifier: string; - - /** ConsensusState timestamp. */ - public timestamp: Long; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.solomachine.v3.ConsensusState.verify|verify} messages. - * @param message ConsensusState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.IConsensusState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.ConsensusState.verify|verify} messages. - * @param message ConsensusState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.IConsensusState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.ConsensusState; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.ConsensusState; - - /** - * Verifies a ConsensusState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.ConsensusState; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @param message ConsensusState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.ConsensusState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Header. */ - interface IHeader { - - /** Header timestamp */ - timestamp?: (Long|null); - - /** Header signature */ - signature?: (Uint8Array|null); - - /** Header new_public_key */ - new_public_key?: (google.protobuf.IAny|null); - - /** Header new_diversifier */ - new_diversifier?: (string|null); - } - - /** Represents a Header. */ - class Header implements IHeader { - - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.IHeader); - - /** Header timestamp. */ - public timestamp: Long; - - /** Header signature. */ - public signature: Uint8Array; - - /** Header new_public_key. */ - public new_public_key?: (google.protobuf.IAny|null); - - /** Header new_diversifier. */ - public new_diversifier: string; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.solomachine.v3.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: ibc.lightclients.solomachine.v3.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.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: ibc.lightclients.solomachine.v3.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): ibc.lightclients.solomachine.v3.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)): ibc.lightclients.solomachine.v3.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 }): ibc.lightclients.solomachine.v3.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: ibc.lightclients.solomachine.v3.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Misbehaviour. */ - interface IMisbehaviour { - - /** Misbehaviour sequence */ - sequence?: (Long|null); - - /** Misbehaviour signature_one */ - signature_one?: (ibc.lightclients.solomachine.v3.ISignatureAndData|null); - - /** Misbehaviour signature_two */ - signature_two?: (ibc.lightclients.solomachine.v3.ISignatureAndData|null); - } - - /** Represents a Misbehaviour. */ - class Misbehaviour implements IMisbehaviour { - - /** - * Constructs a new Misbehaviour. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.IMisbehaviour); - - /** Misbehaviour sequence. */ - public sequence: Long; - - /** Misbehaviour signature_one. */ - public signature_one?: (ibc.lightclients.solomachine.v3.ISignatureAndData|null); - - /** Misbehaviour signature_two. */ - public signature_two?: (ibc.lightclients.solomachine.v3.ISignatureAndData|null); - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.solomachine.v3.Misbehaviour.verify|verify} messages. - * @param message Misbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.IMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.Misbehaviour.verify|verify} messages. - * @param message Misbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.IMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.Misbehaviour; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.Misbehaviour; - - /** - * Verifies a Misbehaviour message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Misbehaviour - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.Misbehaviour; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @param message Misbehaviour - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.Misbehaviour, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Misbehaviour to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SignatureAndData. */ - interface ISignatureAndData { - - /** SignatureAndData signature */ - signature?: (Uint8Array|null); - - /** SignatureAndData path */ - path?: (Uint8Array|null); - - /** SignatureAndData data */ - data?: (Uint8Array|null); - - /** SignatureAndData timestamp */ - timestamp?: (Long|null); - } - - /** Represents a SignatureAndData. */ - class SignatureAndData implements ISignatureAndData { - - /** - * Constructs a new SignatureAndData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.ISignatureAndData); - - /** SignatureAndData signature. */ - public signature: Uint8Array; - - /** SignatureAndData path. */ - public path: Uint8Array; - - /** SignatureAndData data. */ - public data: Uint8Array; - - /** SignatureAndData timestamp. */ - public timestamp: Long; - - /** - * Encodes the specified SignatureAndData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignatureAndData.verify|verify} messages. - * @param message SignatureAndData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.ISignatureAndData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignatureAndData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignatureAndData.verify|verify} messages. - * @param message SignatureAndData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.ISignatureAndData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.SignatureAndData; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.SignatureAndData; - - /** - * Verifies a SignatureAndData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignatureAndData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignatureAndData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.SignatureAndData; - - /** - * Creates a plain object from a SignatureAndData message. Also converts values to other types if specified. - * @param message SignatureAndData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.SignatureAndData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignatureAndData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TimestampedSignatureData. */ - interface ITimestampedSignatureData { - - /** TimestampedSignatureData signature_data */ - signature_data?: (Uint8Array|null); - - /** TimestampedSignatureData timestamp */ - timestamp?: (Long|null); - } - - /** Represents a TimestampedSignatureData. */ - class TimestampedSignatureData implements ITimestampedSignatureData { - - /** - * Constructs a new TimestampedSignatureData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.ITimestampedSignatureData); - - /** TimestampedSignatureData signature_data. */ - public signature_data: Uint8Array; - - /** TimestampedSignatureData timestamp. */ - public timestamp: Long; - - /** - * Encodes the specified TimestampedSignatureData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.TimestampedSignatureData.verify|verify} messages. - * @param message TimestampedSignatureData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.ITimestampedSignatureData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimestampedSignatureData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.TimestampedSignatureData.verify|verify} messages. - * @param message TimestampedSignatureData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.ITimestampedSignatureData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.TimestampedSignatureData; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.TimestampedSignatureData; - - /** - * Verifies a TimestampedSignatureData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TimestampedSignatureData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimestampedSignatureData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.TimestampedSignatureData; - - /** - * Creates a plain object from a TimestampedSignatureData message. Also converts values to other types if specified. - * @param message TimestampedSignatureData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.TimestampedSignatureData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimestampedSignatureData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SignBytes. */ - interface ISignBytes { - - /** SignBytes sequence */ - sequence?: (Long|null); - - /** SignBytes timestamp */ - timestamp?: (Long|null); - - /** SignBytes diversifier */ - diversifier?: (string|null); - - /** SignBytes path */ - path?: (Uint8Array|null); - - /** SignBytes data */ - data?: (Uint8Array|null); - } - - /** Represents a SignBytes. */ - class SignBytes implements ISignBytes { - - /** - * Constructs a new SignBytes. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.ISignBytes); - - /** SignBytes sequence. */ - public sequence: Long; - - /** SignBytes timestamp. */ - public timestamp: Long; - - /** SignBytes diversifier. */ - public diversifier: string; - - /** SignBytes path. */ - public path: Uint8Array; - - /** SignBytes data. */ - public data: Uint8Array; - - /** - * Encodes the specified SignBytes message. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignBytes.verify|verify} messages. - * @param message SignBytes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.ISignBytes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignBytes message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignBytes.verify|verify} messages. - * @param message SignBytes message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.ISignBytes, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignBytes message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.SignBytes; - - /** - * Decodes a SignBytes message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.SignBytes; - - /** - * Verifies a SignBytes message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignBytes message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignBytes - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.SignBytes; - - /** - * Creates a plain object from a SignBytes message. Also converts values to other types if specified. - * @param message SignBytes - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.SignBytes, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignBytes to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HeaderData. */ - interface IHeaderData { - - /** HeaderData new_pub_key */ - new_pub_key?: (google.protobuf.IAny|null); - - /** HeaderData new_diversifier */ - new_diversifier?: (string|null); - } - - /** Represents a HeaderData. */ - class HeaderData implements IHeaderData { - - /** - * Constructs a new HeaderData. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.solomachine.v3.IHeaderData); - - /** HeaderData new_pub_key. */ - public new_pub_key?: (google.protobuf.IAny|null); - - /** HeaderData new_diversifier. */ - public new_diversifier: string; - - /** - * Encodes the specified HeaderData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.HeaderData.verify|verify} messages. - * @param message HeaderData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.solomachine.v3.IHeaderData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HeaderData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.HeaderData.verify|verify} messages. - * @param message HeaderData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.solomachine.v3.IHeaderData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HeaderData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.solomachine.v3.HeaderData; - - /** - * Decodes a HeaderData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.solomachine.v3.HeaderData; - - /** - * Verifies a HeaderData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HeaderData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HeaderData - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.solomachine.v3.HeaderData; - - /** - * Creates a plain object from a HeaderData message. Also converts values to other types if specified. - * @param message HeaderData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.solomachine.v3.HeaderData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HeaderData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace tendermint. */ - namespace tendermint { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ClientState. */ - interface IClientState { - - /** ClientState chain_id */ - chain_id?: (string|null); - - /** ClientState trust_level */ - trust_level?: (ibc.lightclients.tendermint.v1.IFraction|null); - - /** ClientState trusting_period */ - trusting_period?: (google.protobuf.IDuration|null); - - /** ClientState unbonding_period */ - unbonding_period?: (google.protobuf.IDuration|null); - - /** ClientState max_clock_drift */ - max_clock_drift?: (google.protobuf.IDuration|null); - - /** ClientState frozen_height */ - frozen_height?: (ibc.core.client.v1.IHeight|null); - - /** ClientState latest_height */ - latest_height?: (ibc.core.client.v1.IHeight|null); - - /** ClientState proof_specs */ - proof_specs?: (cosmos.ics23.v1.IProofSpec[]|null); - - /** ClientState upgrade_path */ - upgrade_path?: (string[]|null); - - /** ClientState allow_update_after_expiry */ - allow_update_after_expiry?: (boolean|null); - - /** ClientState allow_update_after_misbehaviour */ - allow_update_after_misbehaviour?: (boolean|null); - } - - /** Represents a ClientState. */ - class ClientState implements IClientState { - - /** - * Constructs a new ClientState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.tendermint.v1.IClientState); - - /** ClientState chain_id. */ - public chain_id: string; - - /** ClientState trust_level. */ - public trust_level?: (ibc.lightclients.tendermint.v1.IFraction|null); - - /** ClientState trusting_period. */ - public trusting_period?: (google.protobuf.IDuration|null); - - /** ClientState unbonding_period. */ - public unbonding_period?: (google.protobuf.IDuration|null); - - /** ClientState max_clock_drift. */ - public max_clock_drift?: (google.protobuf.IDuration|null); - - /** ClientState frozen_height. */ - public frozen_height?: (ibc.core.client.v1.IHeight|null); - - /** ClientState latest_height. */ - public latest_height?: (ibc.core.client.v1.IHeight|null); - - /** ClientState proof_specs. */ - public proof_specs: cosmos.ics23.v1.IProofSpec[]; - - /** ClientState upgrade_path. */ - public upgrade_path: string[]; - - /** ClientState allow_update_after_expiry. */ - public allow_update_after_expiry: boolean; - - /** ClientState allow_update_after_misbehaviour. */ - public allow_update_after_misbehaviour: boolean; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.tendermint.v1.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.tendermint.v1.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.ClientState.verify|verify} messages. - * @param message ClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.tendermint.v1.IClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.tendermint.v1.ClientState; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.tendermint.v1.ClientState; - - /** - * Verifies a ClientState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.tendermint.v1.ClientState; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @param message ClientState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.tendermint.v1.ClientState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusState. */ - interface IConsensusState { - - /** ConsensusState timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** ConsensusState root */ - root?: (ibc.core.commitment.v1.IMerkleRoot|null); - - /** ConsensusState next_validators_hash */ - next_validators_hash?: (Uint8Array|null); - } - - /** Represents a ConsensusState. */ - class ConsensusState implements IConsensusState { - - /** - * Constructs a new ConsensusState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.tendermint.v1.IConsensusState); - - /** ConsensusState timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** ConsensusState root. */ - public root?: (ibc.core.commitment.v1.IMerkleRoot|null); - - /** ConsensusState next_validators_hash. */ - public next_validators_hash: Uint8Array; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.tendermint.v1.ConsensusState.verify|verify} messages. - * @param message ConsensusState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.tendermint.v1.IConsensusState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.ConsensusState.verify|verify} messages. - * @param message ConsensusState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.tendermint.v1.IConsensusState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.tendermint.v1.ConsensusState; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.tendermint.v1.ConsensusState; - - /** - * Verifies a ConsensusState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusState - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.tendermint.v1.ConsensusState; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @param message ConsensusState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.tendermint.v1.ConsensusState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Misbehaviour. */ - interface IMisbehaviour { - - /** Misbehaviour client_id */ - client_id?: (string|null); - - /** Misbehaviour header_1 */ - header_1?: (ibc.lightclients.tendermint.v1.IHeader|null); - - /** Misbehaviour header_2 */ - header_2?: (ibc.lightclients.tendermint.v1.IHeader|null); - } - - /** Represents a Misbehaviour. */ - class Misbehaviour implements IMisbehaviour { - - /** - * Constructs a new Misbehaviour. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.tendermint.v1.IMisbehaviour); - - /** Misbehaviour client_id. */ - public client_id: string; - - /** Misbehaviour header_1. */ - public header_1?: (ibc.lightclients.tendermint.v1.IHeader|null); - - /** Misbehaviour header_2. */ - public header_2?: (ibc.lightclients.tendermint.v1.IHeader|null); - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Misbehaviour.verify|verify} messages. - * @param message Misbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.tendermint.v1.IMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Misbehaviour.verify|verify} messages. - * @param message Misbehaviour message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.tendermint.v1.IMisbehaviour, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.tendermint.v1.Misbehaviour; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.tendermint.v1.Misbehaviour; - - /** - * Verifies a Misbehaviour message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Misbehaviour - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.tendermint.v1.Misbehaviour; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @param message Misbehaviour - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.tendermint.v1.Misbehaviour, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Misbehaviour to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Header. */ - interface IHeader { - - /** Header signed_header */ - signed_header?: (tendermint.types.ISignedHeader|null); - - /** Header validator_set */ - validator_set?: (tendermint.types.IValidatorSet|null); - - /** Header trusted_height */ - trusted_height?: (ibc.core.client.v1.IHeight|null); - - /** Header trusted_validators */ - trusted_validators?: (tendermint.types.IValidatorSet|null); - } - - /** Represents a Header. */ - class Header implements IHeader { - - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.tendermint.v1.IHeader); - - /** Header signed_header. */ - public signed_header?: (tendermint.types.ISignedHeader|null); - - /** Header validator_set. */ - public validator_set?: (tendermint.types.IValidatorSet|null); - - /** Header trusted_height. */ - public trusted_height?: (ibc.core.client.v1.IHeight|null); - - /** Header trusted_validators. */ - public trusted_validators?: (tendermint.types.IValidatorSet|null); - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.tendermint.v1.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: ibc.lightclients.tendermint.v1.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.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: ibc.lightclients.tendermint.v1.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): ibc.lightclients.tendermint.v1.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)): ibc.lightclients.tendermint.v1.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 }): ibc.lightclients.tendermint.v1.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: ibc.lightclients.tendermint.v1.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Fraction. */ - interface IFraction { - - /** Fraction numerator */ - numerator?: (Long|null); - - /** Fraction denominator */ - denominator?: (Long|null); - } - - /** Represents a Fraction. */ - class Fraction implements IFraction { - - /** - * Constructs a new Fraction. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.lightclients.tendermint.v1.IFraction); - - /** Fraction numerator. */ - public numerator: Long; - - /** Fraction denominator. */ - public denominator: Long; - - /** - * Encodes the specified Fraction message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Fraction.verify|verify} messages. - * @param message Fraction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.lightclients.tendermint.v1.IFraction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fraction message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Fraction.verify|verify} messages. - * @param message Fraction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.lightclients.tendermint.v1.IFraction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Fraction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Fraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.lightclients.tendermint.v1.Fraction; - - /** - * Decodes a Fraction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Fraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.lightclients.tendermint.v1.Fraction; - - /** - * Verifies a Fraction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Fraction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Fraction - */ - public static fromObject(object: { [k: string]: any }): ibc.lightclients.tendermint.v1.Fraction; - - /** - * Creates a plain object from a Fraction message. Also converts values to other types if specified. - * @param message Fraction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.lightclients.tendermint.v1.Fraction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Fraction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } -} - -/** Namespace tendermint. */ -export namespace tendermint { - - /** Namespace types. */ - namespace types { - - /** Properties of a ValidatorSet. */ - interface IValidatorSet { - - /** ValidatorSet validators */ - validators?: (tendermint.types.IValidator[]|null); - - /** ValidatorSet proposer */ - proposer?: (tendermint.types.IValidator|null); - - /** ValidatorSet total_voting_power */ - total_voting_power?: (Long|null); - } - - /** Represents a ValidatorSet. */ - class ValidatorSet implements IValidatorSet { - - /** - * Constructs a new ValidatorSet. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IValidatorSet); - - /** ValidatorSet validators. */ - public validators: tendermint.types.IValidator[]; - - /** ValidatorSet proposer. */ - public proposer?: (tendermint.types.IValidator|null); - - /** ValidatorSet total_voting_power. */ - public total_voting_power: Long; - - /** - * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @param message ValidatorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IValidatorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @param message ValidatorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IValidatorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorSet - * @throws {Error} If the payload is 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.types.ValidatorSet; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSet - * @throws {Error} If the 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.types.ValidatorSet; - - /** - * Verifies a ValidatorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSet - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.ValidatorSet; - - /** - * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. - * @param message ValidatorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.ValidatorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Validator. */ - interface IValidator { - - /** Validator address */ - address?: (Uint8Array|null); - - /** Validator pub_key */ - pub_key?: (tendermint.crypto.IPublicKey|null); - - /** Validator voting_power */ - voting_power?: (Long|null); - - /** Validator proposer_priority */ - proposer_priority?: (Long|null); - } - - /** Represents a Validator. */ - class Validator implements IValidator { - - /** - * Constructs a new Validator. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IValidator); - - /** Validator address. */ - public address: Uint8Array; - - /** Validator pub_key. */ - public pub_key?: (tendermint.crypto.IPublicKey|null); - - /** Validator voting_power. */ - public voting_power: Long; - - /** Validator proposer_priority. */ - public proposer_priority: Long; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.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.types.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.Validator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SimpleValidator. */ - interface ISimpleValidator { - - /** SimpleValidator pub_key */ - pub_key?: (tendermint.crypto.IPublicKey|null); - - /** SimpleValidator voting_power */ - voting_power?: (Long|null); - } - - /** Represents a SimpleValidator. */ - class SimpleValidator implements ISimpleValidator { - - /** - * Constructs a new SimpleValidator. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ISimpleValidator); - - /** SimpleValidator pub_key. */ - public pub_key?: (tendermint.crypto.IPublicKey|null); - - /** SimpleValidator voting_power. */ - public voting_power: Long; - - /** - * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @param message SimpleValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ISimpleValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @param message SimpleValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ISimpleValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimpleValidator - * @throws {Error} If the payload is 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.types.SimpleValidator; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimpleValidator - * @throws {Error} If the 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.types.SimpleValidator; - - /** - * Verifies a SimpleValidator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimpleValidator - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.SimpleValidator; - - /** - * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. - * @param message SimpleValidator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.SimpleValidator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimpleValidator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** BlockIDFlag enum. */ - enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3 - } - - /** SignedMsgType enum. */ - enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - SIGNED_MSG_TYPE_PROPOSAL = 32 - } - - /** 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.types.IPartSetHeader); - - /** PartSetHeader total. */ - public total: number; - - /** PartSetHeader hash. */ - public hash: Uint8Array; - - /** - * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.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.types.IPartSetHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.PartSetHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartSetHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Part. */ - interface IPart { - - /** Part index */ - index?: (number|null); - - /** Part bytes */ - bytes?: (Uint8Array|null); - - /** Part proof */ - proof?: (tendermint.crypto.IProof|null); - } - - /** Represents a Part. */ - class Part implements IPart { - - /** - * Constructs a new Part. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IPart); - - /** Part index. */ - public index: number; - - /** Part bytes. */ - public bytes: Uint8Array; - - /** Part proof. */ - public proof?: (tendermint.crypto.IProof|null); - - /** - * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @param message Part message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IPart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @param message Part message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IPart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Part message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Part - * @throws {Error} If the payload is 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.types.Part; - - /** - * Decodes a Part message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Part - * @throws {Error} If the 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.types.Part; - - /** - * Verifies a Part message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Part - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.Part; - - /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @param message Part - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.Part, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Part to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BlockID. */ - interface IBlockID { - - /** BlockID hash */ - hash?: (Uint8Array|null); - - /** BlockID part_set_header */ - part_set_header?: (tendermint.types.IPartSetHeader|null); - } - - /** Represents a BlockID. */ - class BlockID implements IBlockID { - - /** - * Constructs a new BlockID. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IBlockID); - - /** BlockID hash. */ - public hash: Uint8Array; - - /** BlockID part_set_header. */ - public part_set_header?: (tendermint.types.IPartSetHeader|null); - - /** - * Encodes the specified BlockID message. Does not implicitly {@link tendermint.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.types.IBlockID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.BlockID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Header. */ - interface IHeader { - - /** Header version */ - version?: (tendermint.version.IConsensus|null); - - /** Header chain_id */ - chain_id?: (string|null); - - /** Header height */ - height?: (Long|null); - - /** Header time */ - time?: (google.protobuf.ITimestamp|null); - - /** Header last_block_id */ - last_block_id?: (tendermint.types.IBlockID|null); - - /** Header last_commit_hash */ - last_commit_hash?: (Uint8Array|null); - - /** Header data_hash */ - data_hash?: (Uint8Array|null); - - /** Header validators_hash */ - validators_hash?: (Uint8Array|null); - - /** Header next_validators_hash */ - next_validators_hash?: (Uint8Array|null); - - /** Header consensus_hash */ - consensus_hash?: (Uint8Array|null); - - /** Header app_hash */ - app_hash?: (Uint8Array|null); - - /** Header last_results_hash */ - last_results_hash?: (Uint8Array|null); - - /** Header evidence_hash */ - evidence_hash?: (Uint8Array|null); - - /** Header proposer_address */ - proposer_address?: (Uint8Array|null); - } - - /** Represents a Header. */ - class Header implements IHeader { - - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IHeader); - - /** Header version. */ - public version?: (tendermint.version.IConsensus|null); - - /** Header chain_id. */ - public chain_id: string; - - /** Header height. */ - public height: Long; - - /** Header time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Header last_block_id. */ - public last_block_id?: (tendermint.types.IBlockID|null); - - /** Header last_commit_hash. */ - public last_commit_hash: Uint8Array; - - /** Header data_hash. */ - public data_hash: Uint8Array; - - /** Header validators_hash. */ - public validators_hash: Uint8Array; - - /** Header next_validators_hash. */ - public next_validators_hash: Uint8Array; - - /** Header consensus_hash. */ - public consensus_hash: Uint8Array; - - /** Header app_hash. */ - public app_hash: Uint8Array; - - /** Header last_results_hash. */ - public last_results_hash: Uint8Array; - - /** Header evidence_hash. */ - public evidence_hash: Uint8Array; - - /** Header proposer_address. */ - public proposer_address: Uint8Array; - - /** - * Encodes the specified Header message. Does not implicitly {@link tendermint.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.types.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Data. */ - interface IData { - - /** Data txs */ - txs?: (Uint8Array[]|null); - } - - /** Represents a Data. */ - class Data implements IData { - - /** - * Constructs a new Data. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IData); - - /** Data txs. */ - public txs: Uint8Array[]; - - /** - * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @param message Data message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @param message Data message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Data message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Data - * @throws {Error} If the payload is 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.types.Data; - - /** - * Decodes a Data message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Data - * @throws {Error} If the 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.types.Data; - - /** - * Verifies a Data message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Data message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Data - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.Data; - - /** - * Creates a plain object from a Data message. Also converts values to other types if specified. - * @param message Data - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.Data, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Data to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Vote. */ - interface IVote { - - /** Vote type */ - type?: (tendermint.types.SignedMsgType|null); - - /** Vote height */ - height?: (Long|null); - - /** Vote round */ - round?: (number|null); - - /** Vote block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** Vote timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Vote validator_address */ - validator_address?: (Uint8Array|null); - - /** Vote validator_index */ - validator_index?: (number|null); - - /** Vote signature */ - signature?: (Uint8Array|null); - } - - /** Represents a Vote. */ - class Vote implements IVote { - - /** - * Constructs a new Vote. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IVote); - - /** Vote type. */ - public type: tendermint.types.SignedMsgType; - - /** Vote height. */ - public height: Long; - - /** Vote round. */ - public round: number; - - /** Vote block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** Vote timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Vote validator_address. */ - public validator_address: Uint8Array; - - /** Vote validator_index. */ - public validator_index: number; - - /** Vote signature. */ - public signature: Uint8Array; - - /** - * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.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: tendermint.types.IVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.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: tendermint.types.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): tendermint.types.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)): tendermint.types.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 }): tendermint.types.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: tendermint.types.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Commit. */ - interface ICommit { - - /** Commit height */ - height?: (Long|null); - - /** Commit round */ - round?: (number|null); - - /** Commit block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** Commit signatures */ - signatures?: (tendermint.types.ICommitSig[]|null); - } - - /** Represents a Commit. */ - class Commit implements ICommit { - - /** - * Constructs a new Commit. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ICommit); - - /** Commit height. */ - public height: Long; - - /** Commit round. */ - public round: number; - - /** Commit block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** Commit signatures. */ - public signatures: tendermint.types.ICommitSig[]; - - /** - * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @param message Commit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ICommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @param message Commit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ICommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Commit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Commit - * @throws {Error} If the payload is 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.types.Commit; - - /** - * Decodes a Commit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Commit - * @throws {Error} If the 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.types.Commit; - - /** - * Verifies a Commit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Commit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Commit - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.Commit; - - /** - * Creates a plain object from a Commit message. Also converts values to other types if specified. - * @param message Commit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.Commit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Commit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitSig. */ - interface ICommitSig { - - /** CommitSig block_id_flag */ - block_id_flag?: (tendermint.types.BlockIDFlag|null); - - /** CommitSig validator_address */ - validator_address?: (Uint8Array|null); - - /** CommitSig timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** CommitSig signature */ - signature?: (Uint8Array|null); - } - - /** Represents a CommitSig. */ - class CommitSig implements ICommitSig { - - /** - * Constructs a new CommitSig. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ICommitSig); - - /** CommitSig block_id_flag. */ - public block_id_flag: tendermint.types.BlockIDFlag; - - /** CommitSig validator_address. */ - public validator_address: Uint8Array; - - /** CommitSig timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** CommitSig signature. */ - public signature: Uint8Array; - - /** - * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @param message CommitSig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ICommitSig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @param message CommitSig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ICommitSig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitSig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitSig - * @throws {Error} If the payload is 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.types.CommitSig; - - /** - * Decodes a CommitSig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitSig - * @throws {Error} If the 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.types.CommitSig; - - /** - * Verifies a CommitSig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitSig - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.CommitSig; - - /** - * Creates a plain object from a CommitSig message. Also converts values to other types if specified. - * @param message CommitSig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.CommitSig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitSig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Proposal. */ - interface IProposal { - - /** Proposal type */ - type?: (tendermint.types.SignedMsgType|null); - - /** Proposal height */ - height?: (Long|null); - - /** Proposal round */ - round?: (number|null); - - /** Proposal pol_round */ - pol_round?: (number|null); - - /** Proposal block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** Proposal timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Proposal signature */ - signature?: (Uint8Array|null); - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - - /** - * Constructs a new Proposal. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IProposal); - - /** Proposal type. */ - public type: tendermint.types.SignedMsgType; - - /** Proposal height. */ - public height: Long; - - /** Proposal round. */ - public round: number; - - /** Proposal pol_round. */ - public pol_round: number; - - /** Proposal block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** Proposal timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Proposal signature. */ - public signature: Uint8Array; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.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: tendermint.types.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.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: tendermint.types.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): tendermint.types.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)): tendermint.types.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 }): tendermint.types.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: tendermint.types.Proposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Proposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SignedHeader. */ - interface ISignedHeader { - - /** SignedHeader header */ - header?: (tendermint.types.IHeader|null); - - /** SignedHeader commit */ - commit?: (tendermint.types.ICommit|null); - } - - /** Represents a SignedHeader. */ - class SignedHeader implements ISignedHeader { - - /** - * Constructs a new SignedHeader. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ISignedHeader); - - /** SignedHeader header. */ - public header?: (tendermint.types.IHeader|null); - - /** SignedHeader commit. */ - public commit?: (tendermint.types.ICommit|null); - - /** - * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @param message SignedHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ISignedHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @param message SignedHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ISignedHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignedHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignedHeader - * @throws {Error} If the payload is 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.types.SignedHeader; - - /** - * Decodes a SignedHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignedHeader - * @throws {Error} If the 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.types.SignedHeader; - - /** - * Verifies a SignedHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignedHeader - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.SignedHeader; - - /** - * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. - * @param message SignedHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.SignedHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignedHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LightBlock. */ - interface ILightBlock { - - /** LightBlock signed_header */ - signed_header?: (tendermint.types.ISignedHeader|null); - - /** LightBlock validator_set */ - validator_set?: (tendermint.types.IValidatorSet|null); - } - - /** Represents a LightBlock. */ - class LightBlock implements ILightBlock { - - /** - * Constructs a new LightBlock. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ILightBlock); - - /** LightBlock signed_header. */ - public signed_header?: (tendermint.types.ISignedHeader|null); - - /** LightBlock validator_set. */ - public validator_set?: (tendermint.types.IValidatorSet|null); - - /** - * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @param message LightBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ILightBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @param message LightBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ILightBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LightBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LightBlock - * @throws {Error} If the payload is 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.types.LightBlock; - - /** - * Decodes a LightBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LightBlock - * @throws {Error} If the 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.types.LightBlock; - - /** - * Verifies a LightBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LightBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.LightBlock; - - /** - * Creates a plain object from a LightBlock message. Also converts values to other types if specified. - * @param message LightBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.LightBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LightBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BlockMeta. */ - interface IBlockMeta { - - /** BlockMeta block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** BlockMeta block_size */ - block_size?: (Long|null); - - /** BlockMeta header */ - header?: (tendermint.types.IHeader|null); - - /** BlockMeta num_txs */ - num_txs?: (Long|null); - } - - /** Represents a BlockMeta. */ - class BlockMeta implements IBlockMeta { - - /** - * Constructs a new BlockMeta. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IBlockMeta); - - /** BlockMeta block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** BlockMeta block_size. */ - public block_size: Long; - - /** BlockMeta header. */ - public header?: (tendermint.types.IHeader|null); - - /** BlockMeta num_txs. */ - public num_txs: Long; - - /** - * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @param message BlockMeta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IBlockMeta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @param message BlockMeta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IBlockMeta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlockMeta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlockMeta - * @throws {Error} If the payload is 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.types.BlockMeta; - - /** - * Decodes a BlockMeta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlockMeta - * @throws {Error} If the 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.types.BlockMeta; - - /** - * Verifies a BlockMeta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockMeta - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.BlockMeta; - - /** - * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. - * @param message BlockMeta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.BlockMeta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockMeta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TxProof. */ - interface ITxProof { - - /** TxProof root_hash */ - root_hash?: (Uint8Array|null); - - /** TxProof data */ - data?: (Uint8Array|null); - - /** TxProof proof */ - proof?: (tendermint.crypto.IProof|null); - } - - /** Represents a TxProof. */ - class TxProof implements ITxProof { - - /** - * Constructs a new TxProof. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ITxProof); - - /** TxProof root_hash. */ - public root_hash: Uint8Array; - - /** TxProof data. */ - public data: Uint8Array; - - /** TxProof proof. */ - public proof?: (tendermint.crypto.IProof|null); - - /** - * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @param message TxProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ITxProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @param message TxProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ITxProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TxProof - * @throws {Error} If the payload is 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.types.TxProof; - - /** - * Decodes a TxProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TxProof - * @throws {Error} If the 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.types.TxProof; - - /** - * Verifies a TxProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TxProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxProof - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.TxProof; - - /** - * Creates a plain object from a TxProof message. Also converts values to other types if specified. - * @param message TxProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.TxProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TxProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace crypto. */ - namespace crypto { - - /** Properties of a PublicKey. */ - interface IPublicKey { - - /** PublicKey ed25519 */ - ed25519?: (Uint8Array|null); - - /** PublicKey secp256k1 */ - secp256k1?: (Uint8Array|null); - } - - /** Represents a PublicKey. */ - class PublicKey implements IPublicKey { - - /** - * Constructs a new PublicKey. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IPublicKey); - - /** PublicKey ed25519. */ - public ed25519?: (Uint8Array|null); - - /** PublicKey secp256k1. */ - public secp256k1?: (Uint8Array|null); - - /** PublicKey sum. */ - public sum?: ("ed25519"|"secp256k1"); - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.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: tendermint.crypto.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.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: tendermint.crypto.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): tendermint.crypto.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)): tendermint.crypto.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 }): tendermint.crypto.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: tendermint.crypto.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublicKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Proof. */ - interface IProof { - - /** Proof total */ - total?: (Long|null); - - /** Proof index */ - index?: (Long|null); - - /** Proof leaf_hash */ - leaf_hash?: (Uint8Array|null); - - /** Proof aunts */ - aunts?: (Uint8Array[]|null); - } - - /** Represents a Proof. */ - class Proof implements IProof { - - /** - * Constructs a new Proof. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IProof); - - /** Proof total. */ - public total: Long; - - /** Proof index. */ - public index: Long; - - /** Proof leaf_hash. */ - public leaf_hash: Uint8Array; - - /** Proof aunts. */ - public aunts: Uint8Array[]; - - /** - * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.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.IProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.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.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.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.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.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.Proof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Proof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValueOp. */ - interface IValueOp { - - /** ValueOp key */ - key?: (Uint8Array|null); - - /** ValueOp proof */ - proof?: (tendermint.crypto.IProof|null); - } - - /** Represents a ValueOp. */ - class ValueOp implements IValueOp { - - /** - * Constructs a new ValueOp. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IValueOp); - - /** ValueOp key. */ - public key: Uint8Array; - - /** ValueOp proof. */ - public proof?: (tendermint.crypto.IProof|null); - - /** - * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @param message ValueOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.crypto.IValueOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @param message ValueOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.IValueOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValueOp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValueOp - * @throws {Error} If the payload is 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.ValueOp; - - /** - * Decodes a ValueOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValueOp - * @throws {Error} If the 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.ValueOp; - - /** - * Verifies a ValueOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValueOp - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.ValueOp; - - /** - * Creates a plain object from a ValueOp message. Also converts values to other types if specified. - * @param message ValueOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.ValueOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValueOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DominoOp. */ - interface IDominoOp { - - /** DominoOp key */ - key?: (string|null); - - /** DominoOp input */ - input?: (string|null); - - /** DominoOp output */ - output?: (string|null); - } - - /** Represents a DominoOp. */ - class DominoOp implements IDominoOp { - - /** - * Constructs a new DominoOp. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IDominoOp); - - /** DominoOp key. */ - public key: string; - - /** DominoOp input. */ - public input: string; - - /** DominoOp output. */ - public output: string; - - /** - * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @param message DominoOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.crypto.IDominoOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @param message DominoOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.IDominoOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DominoOp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DominoOp - * @throws {Error} If the payload is 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.DominoOp; - - /** - * Decodes a DominoOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DominoOp - * @throws {Error} If the 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.DominoOp; - - /** - * Verifies a DominoOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DominoOp - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.DominoOp; - - /** - * Creates a plain object from a DominoOp message. Also converts values to other types if specified. - * @param message DominoOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.DominoOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DominoOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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.IProofOp); - - /** ProofOp type. */ - public type: string; - - /** ProofOp key. */ - public key: Uint8Array; - - /** ProofOp data. */ - public data: Uint8Array; - - /** - * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.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.IProofOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.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.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.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.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.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.ProofOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProofOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProofOps. */ - interface IProofOps { - - /** ProofOps ops */ - ops?: (tendermint.crypto.IProofOp[]|null); - } - - /** Represents a ProofOps. */ - class ProofOps implements IProofOps { - - /** - * Constructs a new ProofOps. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IProofOps); - - /** ProofOps ops. */ - public ops: tendermint.crypto.IProofOp[]; - - /** - * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @param message ProofOps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.crypto.IProofOps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @param message ProofOps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.IProofOps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProofOps message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProofOps - * @throws {Error} If the payload is 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.ProofOps; - - /** - * Decodes a ProofOps message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProofOps - * @throws {Error} If the 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.ProofOps; - - /** - * Verifies a ProofOps message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProofOps - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.ProofOps; - - /** - * Creates a plain object from a ProofOps message. Also converts values to other types if specified. - * @param message ProofOps - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.ProofOps, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProofOps to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace version. */ - namespace version { - - /** Properties of an App. */ - interface IApp { - - /** App protocol */ - protocol?: (Long|null); - - /** App software */ - software?: (string|null); - } - - /** Represents an App. */ - class App implements IApp { - - /** - * Constructs a new App. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.version.IApp); - - /** App protocol. */ - public protocol: Long; - - /** App software. */ - public software: string; - - /** - * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @param message App message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.version.IApp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @param message App message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.version.IApp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an App message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns App - * @throws {Error} If the payload is 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.version.App; - - /** - * Decodes an App message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns App - * @throws {Error} If the 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.version.App; - - /** - * Verifies an App message. - * @param message Plain 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 App message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns App - */ - public static fromObject(object: { [k: string]: any }): tendermint.version.App; - - /** - * Creates a plain object from an App message. Also converts values to other types if specified. - * @param message App - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.version.App, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this App to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Consensus. */ - interface IConsensus { - - /** Consensus block */ - block?: (Long|null); - - /** Consensus app */ - app?: (Long|null); - } - - /** Represents a Consensus. */ - class Consensus implements IConsensus { - - /** - * Constructs a new Consensus. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.version.IConsensus); - - /** Consensus block. */ - public block: Long; - - /** Consensus app. */ - public app: Long; - - /** - * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @param message Consensus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.version.IConsensus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @param message Consensus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.version.IConsensus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Consensus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Consensus - * @throws {Error} If the payload is 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.version.Consensus; - - /** - * Decodes a Consensus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Consensus - * @throws {Error} If the 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.version.Consensus; - - /** - * Verifies a Consensus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Consensus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Consensus - */ - public static fromObject(object: { [k: string]: any }): tendermint.version.Consensus; - - /** - * Creates a plain object from a Consensus message. Also converts values to other types if specified. - * @param message Consensus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.version.Consensus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Consensus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} diff --git a/src/generated/ibc/proto.js b/src/generated/ibc/proto.js deleted file mode 100644 index a121f032..00000000 --- a/src/generated/ibc/proto.js +++ /dev/null @@ -1,88998 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -import * as $protobuf from "protobufjs/minimal"; - -// Common aliases -const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -const $root = $protobuf.roots["@cosmos-client/ibc"] || ($protobuf.roots["@cosmos-client/ibc"] = {}); - -export const cosmos = $root.cosmos = (() => { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - const cosmos = {}; - - cosmos.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos - * @namespace - */ - const adminmodule = {}; - - adminmodule.adminmodule = (function() { - - /** - * Namespace adminmodule. - * @memberof cosmos.adminmodule - * @namespace - */ - const adminmodule = {}; - - adminmodule.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#deleteAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef DeleteAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} [response] MsgDeleteAdminResponse - */ - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.DeleteAdminCallback} callback Node-style callback called with the error, if any, and MsgDeleteAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.deleteAdmin = function deleteAdmin(request, callback) { - return this.rpcCall(deleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin, $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse, request, callback); - }, "name", { value: "DeleteAdmin" }); - - /** - * Calls DeleteAdmin. - * @function deleteAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} request MsgDeleteAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#addAdmin}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef AddAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} [response] MsgAddAdminResponse - */ - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.AddAdminCallback} callback Node-style callback called with the error, if any, and MsgAddAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.addAdmin = function addAdmin(request, callback) { - return this.rpcCall(addAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdmin, $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse, request, callback); - }, "name", { value: "AddAdmin" }); - - /** - * Calls AddAdmin. - * @function addAdmin - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} request MsgAddAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposal}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef SubmitProposalCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} [response] MsgSubmitProposalResponse - */ - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.SubmitProposalCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitProposal = function submitProposal(request, callback) { - return this.rpcCall(submitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse, request, callback); - }, "name", { value: "SubmitProposal" }); - - /** - * Calls SubmitProposal. - * @function submitProposal - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal} request MsgSubmitProposal message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Msg#submitProposalLegacy}. - * @memberof cosmos.adminmodule.adminmodule.Msg - * @typedef SubmitProposalLegacyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} [response] MsgSubmitProposalLegacyResponse - */ - - /** - * Calls SubmitProposalLegacy. - * @function submitProposalLegacy - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} request MsgSubmitProposalLegacy message or plain object - * @param {cosmos.adminmodule.adminmodule.Msg.SubmitProposalLegacyCallback} callback Node-style callback called with the error, if any, and MsgSubmitProposalLegacyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitProposalLegacy = function submitProposalLegacy(request, callback) { - return this.rpcCall(submitProposalLegacy, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy, $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse, request, callback); - }, "name", { value: "SubmitProposalLegacy" }); - - /** - * Calls SubmitProposalLegacy. - * @function submitProposalLegacy - * @memberof cosmos.adminmodule.adminmodule.Msg - * @instance - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} request MsgSubmitProposalLegacy message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - adminmodule.MsgDeleteAdmin = (function() { - - /** - * Properties of a MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdmin - * @property {string|null} [creator] MsgDeleteAdmin creator - * @property {string|null} [admin] MsgDeleteAdmin admin - */ - - /** - * Constructs a new MsgDeleteAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdmin. - * @implements IMsgDeleteAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin=} [properties] Properties to set - */ - function MsgDeleteAdmin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgDeleteAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.creator = ""; - - /** - * MsgDeleteAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - */ - MsgDeleteAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgDeleteAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdmin} message MsgDeleteAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} MsgDeleteAdmin - */ - MsgDeleteAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgDeleteAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdmin} message MsgDeleteAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgDeleteAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdmin; - })(); - - adminmodule.MsgDeleteAdminResponse = (function() { - - /** - * Properties of a MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgDeleteAdminResponse - */ - - /** - * Constructs a new MsgDeleteAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgDeleteAdminResponse. - * @implements IMsgDeleteAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse=} [properties] Properties to set - */ - function MsgDeleteAdminResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgDeleteAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgDeleteAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgDeleteAdminResponse} message MsgDeleteAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeleteAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgDeleteAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeleteAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeleteAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeleteAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgDeleteAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} MsgDeleteAdminResponse - */ - MsgDeleteAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse(); - }; - - /** - * Creates a plain object from a MsgDeleteAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse} message MsgDeleteAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeleteAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgDeleteAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgDeleteAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgDeleteAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgDeleteAdminResponse; - })(); - - adminmodule.MsgAddAdmin = (function() { - - /** - * Properties of a MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdmin - * @property {string|null} [creator] MsgAddAdmin creator - * @property {string|null} [admin] MsgAddAdmin admin - */ - - /** - * Constructs a new MsgAddAdmin. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdmin. - * @implements IMsgAddAdmin - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin=} [properties] Properties to set - */ - function MsgAddAdmin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAddAdmin creator. - * @member {string} creator - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.creator = ""; - - /** - * MsgAddAdmin admin. - * @member {string} admin - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - */ - MsgAddAdmin.prototype.admin = ""; - - /** - * Encodes the specified MsgAddAdmin message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.admin != null && Object.hasOwnProperty.call(message, "admin")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.admin); - return writer; - }; - - /** - * Encodes the specified MsgAddAdmin message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdmin} message MsgAddAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdmin message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.admin != null && message.hasOwnProperty("admin")) - if (!$util.isString(message.admin)) - return "admin: string expected"; - return null; - }; - - /** - * Creates a MsgAddAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdmin} MsgAddAdmin - */ - MsgAddAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdmin) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdmin(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.admin != null) - message.admin = String(object.admin); - return message; - }; - - /** - * Creates a plain object from a MsgAddAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdmin} message MsgAddAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.creator = ""; - object.admin = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.admin != null && message.hasOwnProperty("admin")) - object.admin = message.admin; - return object; - }; - - /** - * Converts this MsgAddAdmin to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdmin; - })(); - - adminmodule.MsgAddAdminResponse = (function() { - - /** - * Properties of a MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgAddAdminResponse - */ - - /** - * Constructs a new MsgAddAdminResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgAddAdminResponse. - * @implements IMsgAddAdminResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse=} [properties] Properties to set - */ - function MsgAddAdminResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgAddAdminResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgAddAdminResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgAddAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgAddAdminResponse} message MsgAddAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAddAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAddAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAddAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAddAdminResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAddAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgAddAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} MsgAddAdminResponse - */ - MsgAddAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse) - return object; - return new $root.cosmos.adminmodule.adminmodule.MsgAddAdminResponse(); - }; - - /** - * Creates a plain object from a MsgAddAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgAddAdminResponse} message MsgAddAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAddAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgAddAdminResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgAddAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAddAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAddAdminResponse; - })(); - - adminmodule.MsgSubmitProposalLegacy = (function() { - - /** - * Properties of a MsgSubmitProposalLegacy. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalLegacy - * @property {google.protobuf.IAny|null} [content] MsgSubmitProposalLegacy content - * @property {string|null} [proposer] MsgSubmitProposalLegacy proposer - */ - - /** - * Constructs a new MsgSubmitProposalLegacy. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalLegacy. - * @implements IMsgSubmitProposalLegacy - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy=} [properties] Properties to set - */ - function MsgSubmitProposalLegacy(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalLegacy content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @instance - */ - MsgSubmitProposalLegacy.prototype.content = null; - - /** - * MsgSubmitProposalLegacy proposer. - * @member {string} proposer - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @instance - */ - MsgSubmitProposalLegacy.prototype.proposer = ""; - - /** - * Encodes the specified MsgSubmitProposalLegacy message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} message MsgSubmitProposalLegacy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacy.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.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalLegacy message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacy} message MsgSubmitProposalLegacy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalLegacy message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} MsgSubmitProposalLegacy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.proposer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalLegacy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} MsgSubmitProposalLegacy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalLegacy message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalLegacy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) { - let error = $root.google.protobuf.Any.verify(message.content); - if (error) - return "content." + error; - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalLegacy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} MsgSubmitProposalLegacy - */ - MsgSubmitProposalLegacy.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy(); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy.content: object expected"); - message.content = $root.google.protobuf.Any.fromObject(object.content); - } - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalLegacy message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy} message MsgSubmitProposalLegacy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalLegacy.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.content = null; - object.proposer = ""; - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.protobuf.Any.toObject(message.content, options); - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposalLegacy to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalLegacy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalLegacy; - })(); - - adminmodule.MsgSubmitProposalLegacyResponse = (function() { - - /** - * Properties of a MsgSubmitProposalLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalLegacyResponse - * @property {Long|null} [proposal_id] MsgSubmitProposalLegacyResponse proposal_id - */ - - /** - * Constructs a new MsgSubmitProposalLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalLegacyResponse. - * @implements IMsgSubmitProposalLegacyResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse=} [properties] Properties to set - */ - function MsgSubmitProposalLegacyResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalLegacyResponse proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @instance - */ - MsgSubmitProposalLegacyResponse.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSubmitProposalLegacyResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse} message MsgSubmitProposalLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalLegacyResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalLegacyResponse} message MsgSubmitProposalLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalLegacyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalLegacyResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} MsgSubmitProposalLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalLegacyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} MsgSubmitProposalLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalLegacyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalLegacyResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalLegacyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalLegacyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} MsgSubmitProposalLegacyResponse - */ - MsgSubmitProposalLegacyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalLegacyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse} message MsgSubmitProposalLegacyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalLegacyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - return object; - }; - - /** - * Converts this MsgSubmitProposalLegacyResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacyResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalLegacyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalLegacyResponse; - })(); - - adminmodule.MsgSubmitProposal = (function() { - - /** - * Properties of a MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposal - * @property {Array.|null} [messages] MsgSubmitProposal messages - * @property {string|null} [proposer] MsgSubmitProposal proposer - */ - - /** - * Constructs a new MsgSubmitProposal. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposal. - * @implements IMsgSubmitProposal - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposal=} [properties] Properties to set - */ - function MsgSubmitProposal(properties) { - this.messages = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposal messages. - * @member {Array.} messages - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.messages = $util.emptyArray; - - /** - * MsgSubmitProposal proposer. - * @member {string} proposer - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.proposer = ""; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.messages != null && message.messages.length) - for (let 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.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal(); - while (reader.pos < end) { - let 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.proposer = reader.string(); - 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.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.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.adminmodule.adminmodule.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.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (let i = 0; i < message.messages.length; ++i) { - let error = $root.google.protobuf.Any.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposal} MsgSubmitProposal - */ - MsgSubmitProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposal(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposal.messages: array expected"); - message.messages = []; - for (let i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.MsgSubmitProposal.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposal} message MsgSubmitProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) - object.proposer = ""; - if (message.messages && message.messages.length) { - object.messages = []; - for (let j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposal - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposal; - })(); - - adminmodule.MsgSubmitProposalResponse = (function() { - - /** - * Properties of a MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IMsgSubmitProposalResponse - * @property {Long|null} [proposal_id] MsgSubmitProposalResponse proposal_id - */ - - /** - * Constructs a new MsgSubmitProposalResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a MsgSubmitProposalResponse. - * @implements IMsgSubmitProposalResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse=} [properties] Properties to set - */ - function MsgSubmitProposalResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitProposalResponse proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - */ - MsgSubmitProposalResponse.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSubmitProposalResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposalResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IMsgSubmitProposalResponse} message MsgSubmitProposalResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposalResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitProposalResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposalResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposalResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposalResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposalResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} MsgSubmitProposalResponse - */ - MsgSubmitProposalResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposalResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @static - * @param {cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse} message MsgSubmitProposalResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposalResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - return object; - }; - - /** - * Converts this MsgSubmitProposalResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.MsgSubmitProposalResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposalResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitProposalResponse; - })(); - - adminmodule.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof cosmos.adminmodule.adminmodule - * @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; - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#admins}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef AdminsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} [response] QueryAdminsResponse - */ - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.AdminsCallback} callback Node-style callback called with the error, if any, and QueryAdminsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.admins = function admins(request, callback) { - return this.rpcCall(admins, $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest, $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse, request, callback); - }, "name", { value: "Admins" }); - - /** - * Calls Admins. - * @function admins - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} request QueryAdminsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposals}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef ArchivedProposalsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} [response] QueryArchivedProposalsResponse - */ - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.ArchivedProposalsCallback} callback Node-style callback called with the error, if any, and QueryArchivedProposalsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.archivedProposals = function archivedProposals(request, callback) { - return this.rpcCall(archivedProposals, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse, request, callback); - }, "name", { value: "ArchivedProposals" }); - - /** - * Calls ArchivedProposals. - * @function archivedProposals - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} request QueryArchivedProposalsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos.adminmodule.adminmodule.Query#archivedProposalsLegacy}. - * @memberof cosmos.adminmodule.adminmodule.Query - * @typedef ArchivedProposalsLegacyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} [response] QueryArchivedProposalsLegacyResponse - */ - - /** - * Calls ArchivedProposalsLegacy. - * @function archivedProposalsLegacy - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} request QueryArchivedProposalsLegacyRequest message or plain object - * @param {cosmos.adminmodule.adminmodule.Query.ArchivedProposalsLegacyCallback} callback Node-style callback called with the error, if any, and QueryArchivedProposalsLegacyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.archivedProposalsLegacy = function archivedProposalsLegacy(request, callback) { - return this.rpcCall(archivedProposalsLegacy, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest, $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse, request, callback); - }, "name", { value: "ArchivedProposalsLegacy" }); - - /** - * Calls ArchivedProposalsLegacy. - * @function archivedProposalsLegacy - * @memberof cosmos.adminmodule.adminmodule.Query - * @instance - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} request QueryArchivedProposalsLegacyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - adminmodule.QueryAdminsRequest = (function() { - - /** - * Properties of a QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsRequest - */ - - /** - * Constructs a new QueryAdminsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsRequest. - * @implements IQueryAdminsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest=} [properties] Properties to set - */ - function QueryAdminsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryAdminsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryAdminsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsRequest} message QueryAdminsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryAdminsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsRequest} QueryAdminsRequest - */ - QueryAdminsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryAdminsRequest(); - }; - - /** - * Creates a plain object from a QueryAdminsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsRequest} message QueryAdminsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryAdminsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsRequest; - })(); - - adminmodule.QueryAdminsResponse = (function() { - - /** - * Properties of a QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryAdminsResponse - * @property {Array.|null} [admins] QueryAdminsResponse admins - */ - - /** - * Constructs a new QueryAdminsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryAdminsResponse. - * @implements IQueryAdminsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse=} [properties] Properties to set - */ - function QueryAdminsResponse(properties) { - this.admins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryAdminsResponse admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - */ - QueryAdminsResponse.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified QueryAdminsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (let i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified QueryAdminsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryAdminsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryAdminsResponse} message QueryAdminsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAdminsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryAdminsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAdminsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAdminsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAdminsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (let i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a QueryAdminsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryAdminsResponse} QueryAdminsResponse - */ - QueryAdminsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.QueryAdminsResponse(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryAdminsResponse.admins: array expected"); - message.admins = []; - for (let i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a QueryAdminsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryAdminsResponse} message QueryAdminsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAdminsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (let j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this QueryAdminsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryAdminsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAdminsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryAdminsResponse; - })(); - - adminmodule.QueryArchivedProposalsRequest = (function() { - - /** - * Properties of a QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsRequest - */ - - /** - * Constructs a new QueryArchivedProposalsRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsRequest. - * @implements IQueryArchivedProposalsRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest=} [properties] Properties to set - */ - function QueryArchivedProposalsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryArchivedProposalsRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsRequest} message QueryArchivedProposalsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryArchivedProposalsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} QueryArchivedProposalsRequest - */ - QueryArchivedProposalsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest(); - }; - - /** - * Creates a plain object from a QueryArchivedProposalsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest} message QueryArchivedProposalsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryArchivedProposalsRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsRequest; - })(); - - adminmodule.QueryArchivedProposalsLegacyRequest = (function() { - - /** - * Properties of a QueryArchivedProposalsLegacyRequest. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsLegacyRequest - */ - - /** - * Constructs a new QueryArchivedProposalsLegacyRequest. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsLegacyRequest. - * @implements IQueryArchivedProposalsLegacyRequest - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest=} [properties] Properties to set - */ - function QueryArchivedProposalsLegacyRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryArchivedProposalsLegacyRequest message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} message QueryArchivedProposalsLegacyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsLegacyRequest message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyRequest} message QueryArchivedProposalsLegacyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsLegacyRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} QueryArchivedProposalsLegacyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsLegacyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} QueryArchivedProposalsLegacyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsLegacyRequest message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsLegacyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryArchivedProposalsLegacyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} QueryArchivedProposalsLegacyRequest - */ - QueryArchivedProposalsLegacyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest) - return object; - return new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest(); - }; - - /** - * Creates a plain object from a QueryArchivedProposalsLegacyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest} message QueryArchivedProposalsLegacyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsLegacyRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryArchivedProposalsLegacyRequest to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyRequest - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsLegacyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsLegacyRequest; - })(); - - adminmodule.QueryProposalsResponse = (function() { - - /** - * Properties of a QueryProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryProposalsResponse - * @property {Array.|null} [proposals] QueryProposalsResponse proposals - */ - - /** - * Constructs a new QueryProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryProposalsResponse. - * @implements IQueryProposalsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryProposalsResponse=} [properties] Properties to set - */ - function QueryProposalsResponse(properties) { - this.proposals = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryProposalsResponse proposals. - * @member {Array.} proposals - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @instance - */ - QueryProposalsResponse.prototype.proposals = $util.emptyArray; - - /** - * Encodes the specified QueryProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryProposalsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryProposalsResponse} message QueryProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryProposalsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposals != null && message.proposals.length) - for (let i = 0; i < message.proposals.length; ++i) - $root.cosmos.gov.v1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryProposalsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryProposalsResponse} message QueryProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryProposalsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryProposalsResponse} QueryProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryProposalsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryProposalsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposals && message.proposals.length)) - message.proposals = []; - message.proposals.push($root.cosmos.gov.v1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryProposalsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryProposalsResponse} QueryProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryProposalsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryProposalsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryProposalsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposals != null && message.hasOwnProperty("proposals")) { - if (!Array.isArray(message.proposals)) - return "proposals: array expected"; - for (let i = 0; i < message.proposals.length; ++i) { - let error = $root.cosmos.gov.v1.Proposal.verify(message.proposals[i]); - if (error) - return "proposals." + error; - } - } - return null; - }; - - /** - * Creates a QueryProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryProposalsResponse} QueryProposalsResponse - */ - QueryProposalsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryProposalsResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.QueryProposalsResponse(); - if (object.proposals) { - if (!Array.isArray(object.proposals)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryProposalsResponse.proposals: array expected"); - message.proposals = []; - for (let i = 0; i < object.proposals.length; ++i) { - if (typeof object.proposals[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryProposalsResponse.proposals: object expected"); - message.proposals[i] = $root.cosmos.gov.v1.Proposal.fromObject(object.proposals[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryProposalsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryProposalsResponse} message QueryProposalsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryProposalsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proposals = []; - if (message.proposals && message.proposals.length) { - object.proposals = []; - for (let j = 0; j < message.proposals.length; ++j) - object.proposals[j] = $root.cosmos.gov.v1.Proposal.toObject(message.proposals[j], options); - } - return object; - }; - - /** - * Converts this QueryProposalsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryProposalsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryProposalsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryProposalsResponse; - })(); - - adminmodule.QueryArchivedProposalsResponse = (function() { - - /** - * Properties of a QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsResponse - * @property {Array.|null} [proposals] QueryArchivedProposalsResponse proposals - */ - - /** - * Constructs a new QueryArchivedProposalsResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsResponse. - * @implements IQueryArchivedProposalsResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse=} [properties] Properties to set - */ - function QueryArchivedProposalsResponse(properties) { - this.proposals = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryArchivedProposalsResponse proposals. - * @member {Array.} proposals - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - */ - QueryArchivedProposalsResponse.prototype.proposals = $util.emptyArray; - - /** - * Encodes the specified QueryArchivedProposalsResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposals != null && message.proposals.length) - for (let i = 0; i < message.proposals.length; ++i) - $root.cosmos.gov.v1.Proposal.encode(message.proposals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsResponse} message QueryArchivedProposalsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposals && message.proposals.length)) - message.proposals = []; - message.proposals.push($root.cosmos.gov.v1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposals != null && message.hasOwnProperty("proposals")) { - if (!Array.isArray(message.proposals)) - return "proposals: array expected"; - for (let i = 0; i < message.proposals.length; ++i) { - let error = $root.cosmos.gov.v1.Proposal.verify(message.proposals[i]); - if (error) - return "proposals." + error; - } - } - return null; - }; - - /** - * Creates a QueryArchivedProposalsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} QueryArchivedProposalsResponse - */ - QueryArchivedProposalsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse(); - if (object.proposals) { - if (!Array.isArray(object.proposals)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: array expected"); - message.proposals = []; - for (let i = 0; i < object.proposals.length; ++i) { - if (typeof object.proposals[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse.proposals: object expected"); - message.proposals[i] = $root.cosmos.gov.v1.Proposal.fromObject(object.proposals[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryArchivedProposalsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse} message QueryArchivedProposalsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proposals = []; - if (message.proposals && message.proposals.length) { - object.proposals = []; - for (let j = 0; j < message.proposals.length; ++j) - object.proposals[j] = $root.cosmos.gov.v1.Proposal.toObject(message.proposals[j], options); - } - return object; - }; - - /** - * Converts this QueryArchivedProposalsResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsResponse; - })(); - - adminmodule.QueryArchivedProposalsLegacyResponse = (function() { - - /** - * Properties of a QueryArchivedProposalsLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @interface IQueryArchivedProposalsLegacyResponse - * @property {Array.|null} [proposalsLegacy] QueryArchivedProposalsLegacyResponse proposalsLegacy - */ - - /** - * Constructs a new QueryArchivedProposalsLegacyResponse. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a QueryArchivedProposalsLegacyResponse. - * @implements IQueryArchivedProposalsLegacyResponse - * @constructor - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse=} [properties] Properties to set - */ - function QueryArchivedProposalsLegacyResponse(properties) { - this.proposalsLegacy = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryArchivedProposalsLegacyResponse proposalsLegacy. - * @member {Array.} proposalsLegacy - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @instance - */ - QueryArchivedProposalsLegacyResponse.prototype.proposalsLegacy = $util.emptyArray; - - /** - * Encodes the specified QueryArchivedProposalsLegacyResponse message. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse} message QueryArchivedProposalsLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalsLegacy != null && message.proposalsLegacy.length) - for (let i = 0; i < message.proposalsLegacy.length; ++i) - $root.cosmos.gov.v1beta1.Proposal.encode(message.proposalsLegacy[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryArchivedProposalsLegacyResponse message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.IQueryArchivedProposalsLegacyResponse} message QueryArchivedProposalsLegacyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryArchivedProposalsLegacyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryArchivedProposalsLegacyResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} QueryArchivedProposalsLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proposalsLegacy && message.proposalsLegacy.length)) - message.proposalsLegacy = []; - message.proposalsLegacy.push($root.cosmos.gov.v1beta1.Proposal.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryArchivedProposalsLegacyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} QueryArchivedProposalsLegacyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryArchivedProposalsLegacyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryArchivedProposalsLegacyResponse message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryArchivedProposalsLegacyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalsLegacy != null && message.hasOwnProperty("proposalsLegacy")) { - if (!Array.isArray(message.proposalsLegacy)) - return "proposalsLegacy: array expected"; - for (let i = 0; i < message.proposalsLegacy.length; ++i) { - let error = $root.cosmos.gov.v1beta1.Proposal.verify(message.proposalsLegacy[i]); - if (error) - return "proposalsLegacy." + error; - } - } - return null; - }; - - /** - * Creates a QueryArchivedProposalsLegacyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} QueryArchivedProposalsLegacyResponse - */ - QueryArchivedProposalsLegacyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse(); - if (object.proposalsLegacy) { - if (!Array.isArray(object.proposalsLegacy)) - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.proposalsLegacy: array expected"); - message.proposalsLegacy = []; - for (let i = 0; i < object.proposalsLegacy.length; ++i) { - if (typeof object.proposalsLegacy[i] !== "object") - throw TypeError(".cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse.proposalsLegacy: object expected"); - message.proposalsLegacy[i] = $root.cosmos.gov.v1beta1.Proposal.fromObject(object.proposalsLegacy[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryArchivedProposalsLegacyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @static - * @param {cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse} message QueryArchivedProposalsLegacyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryArchivedProposalsLegacyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proposalsLegacy = []; - if (message.proposalsLegacy && message.proposalsLegacy.length) { - object.proposalsLegacy = []; - for (let j = 0; j < message.proposalsLegacy.length; ++j) - object.proposalsLegacy[j] = $root.cosmos.gov.v1beta1.Proposal.toObject(message.proposalsLegacy[j], options); - } - return object; - }; - - /** - * Converts this QueryArchivedProposalsLegacyResponse to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.QueryArchivedProposalsLegacyResponse - * @instance - * @returns {Object.} JSON object - */ - QueryArchivedProposalsLegacyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryArchivedProposalsLegacyResponse; - })(); - - adminmodule.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @interface IGenesisState - * @property {Array.|null} [admins] GenesisState admins - */ - - /** - * Constructs a new GenesisState. - * @memberof cosmos.adminmodule.adminmodule - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {cosmos.adminmodule.adminmodule.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.admins = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState admins. - * @member {Array.} admins - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - */ - GenesisState.prototype.admins = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.admins != null && message.admins.length) - for (let i = 0; i < message.admins.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.admins[i]); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link cosmos.adminmodule.adminmodule.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.admins && message.admins.length)) - message.admins = []; - message.admins.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.admins != null && message.hasOwnProperty("admins")) { - if (!Array.isArray(message.admins)) - return "admins: array expected"; - for (let i = 0; i < message.admins.length; ++i) - if (!$util.isString(message.admins[i])) - return "admins: string[] expected"; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {cosmos.adminmodule.adminmodule.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.adminmodule.adminmodule.GenesisState) - return object; - let message = new $root.cosmos.adminmodule.adminmodule.GenesisState(); - if (object.admins) { - if (!Array.isArray(object.admins)) - throw TypeError(".cosmos.adminmodule.adminmodule.GenesisState.admins: array expected"); - message.admins = []; - for (let i = 0; i < object.admins.length; ++i) - message.admins[i] = String(object.admins[i]); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @static - * @param {cosmos.adminmodule.adminmodule.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.admins = []; - if (message.admins && message.admins.length) { - object.admins = []; - for (let j = 0; j < message.admins.length; ++j) - object.admins[j] = message.admins[j]; - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof cosmos.adminmodule.adminmodule.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return adminmodule; - })(); - - return adminmodule; - })(); - - cosmos.gov = (function() { - - /** - * Namespace gov. - * @memberof cosmos - * @namespace - */ - const gov = {}; - - gov.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.gov - * @namespace - */ - const v1beta1 = {}; - - /** - * VoteOption enum. - * @name cosmos.gov.v1beta1.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 - */ - v1beta1.VoteOption = (function() { - const 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; - })(); - - v1beta1.WeightedVoteOption = (function() { - - /** - * Properties of a WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @interface IWeightedVoteOption - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] WeightedVoteOption option - * @property {string|null} [weight] WeightedVoteOption weight - */ - - /** - * Constructs a new WeightedVoteOption. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a WeightedVoteOption. - * @implements IWeightedVoteOption - * @constructor - * @param {cosmos.gov.v1beta1.IWeightedVoteOption=} [properties] Properties to set - */ - function WeightedVoteOption(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeightedVoteOption option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.option = 0; - - /** - * WeightedVoteOption weight. - * @member {string} weight - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.weight = ""; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.option); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.weight); - return writer; - }; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.WeightedVoteOption.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeightedVoteOption message. - * @function verify - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeightedVoteOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isString(message.weight)) - return "weight: string expected"; - return null; - }; - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.WeightedVoteOption} WeightedVoteOption - */ - WeightedVoteOption.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.WeightedVoteOption) - return object; - let message = new $root.cosmos.gov.v1beta1.WeightedVoteOption(); - 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; - } - if (object.weight != null) - message.weight = String(object.weight); - return message; - }; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1beta1.WeightedVoteOption} message WeightedVoteOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeightedVoteOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - object.weight = ""; - } - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - return object; - }; - - /** - * Converts this WeightedVoteOption to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.WeightedVoteOption - * @instance - * @returns {Object.} JSON object - */ - WeightedVoteOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeightedVoteOption; - })(); - - v1beta1.TextProposal = (function() { - - /** - * Properties of a TextProposal. - * @memberof cosmos.gov.v1beta1 - * @interface ITextProposal - * @property {string|null} [title] TextProposal title - * @property {string|null} [description] TextProposal description - */ - - /** - * Constructs a new TextProposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TextProposal. - * @implements ITextProposal - * @constructor - * @param {cosmos.gov.v1beta1.ITextProposal=} [properties] Properties to set - */ - function TextProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TextProposal title. - * @member {string} title - * @memberof cosmos.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.title = ""; - - /** - * TextProposal description. - * @member {string} description - * @memberof cosmos.gov.v1beta1.TextProposal - * @instance - */ - TextProposal.prototype.description = ""; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TextProposal(); - while (reader.pos < end) { - let 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.gov.v1beta1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TextProposal} TextProposal - */ - TextProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TextProposal) - return object; - let message = new $root.cosmos.gov.v1beta1.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.gov.v1beta1.TextProposal - * @static - * @param {cosmos.gov.v1beta1.TextProposal} message TextProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.gov.v1beta1.TextProposal - * @instance - * @returns {Object.} JSON object - */ - TextProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TextProposal; - })(); - - v1beta1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos.gov.v1beta1 - * @interface IDeposit - * @property {Long|null} [proposal_id] Deposit proposal_id - * @property {string|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos.gov.v1beta1.IDeposit=} [properties] Properties to set - */ - function Deposit(properties) { - this.amount = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Deposit proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {string} depositor - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.depositor = ""; - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); - if (message.amount != null && message.amount.length) - for (let i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Deposit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!$util.isString(message.depositor)) - return "depositor: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (let i = 0; i < message.amount.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a Deposit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Deposit) - return object; - let message = new $root.cosmos.gov.v1beta1.Deposit(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.depositor != null) - message.depositor = String(object.depositor); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: array expected"); - message.amount = []; - for (let i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.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.gov.v1beta1.Deposit - * @static - * @param {cosmos.gov.v1beta1.Deposit} message Deposit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deposit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.depositor = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.depositor = message.depositor; - if (message.amount && message.amount.length) { - object.amount = []; - for (let j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Deposit - * @instance - * @returns {Object.} JSON object - */ - Deposit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Deposit; - })(); - - v1beta1.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof cosmos.gov.v1beta1 - * @interface IProposal - * @property {Long|null} [proposal_id] Proposal proposal_id - * @property {google.protobuf.IAny|null} [content] Proposal content - * @property {cosmos.gov.v1beta1.ProposalStatus|null} [status] Proposal status - * @property {cosmos.gov.v1beta1.ITallyResult|null} [final_tally_result] Proposal final_tally_result - * @property {google.protobuf.ITimestamp|null} [submit_time] Proposal submit_time - * @property {google.protobuf.ITimestamp|null} [deposit_end_time] Proposal deposit_end_time - * @property {Array.|null} [total_deposit] Proposal total_deposit - * @property {google.protobuf.ITimestamp|null} [voting_start_time] Proposal voting_start_time - * @property {google.protobuf.ITimestamp|null} [voting_end_time] Proposal voting_end_time - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos.gov.v1beta1.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - this.total_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Proposal proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.content = null; - - /** - * Proposal status. - * @member {cosmos.gov.v1beta1.ProposalStatus} status - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal final_tally_result. - * @member {cosmos.gov.v1beta1.ITallyResult|null|undefined} final_tally_result - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.final_tally_result = null; - - /** - * Proposal submit_time. - * @member {google.protobuf.ITimestamp|null|undefined} submit_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.submit_time = null; - - /** - * Proposal deposit_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} deposit_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.deposit_end_time = null; - - /** - * Proposal total_deposit. - * @member {Array.} total_deposit - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.total_deposit = $util.emptyArray; - - /** - * Proposal voting_start_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_start_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_start_time = null; - - /** - * Proposal voting_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_end_time - * @memberof cosmos.gov.v1beta1.Proposal - * @instance - */ - Proposal.prototype.voting_end_time = null; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - 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.final_tally_result != null && Object.hasOwnProperty.call(message, "final_tally_result")) - $root.cosmos.gov.v1beta1.TallyResult.encode(message.final_tally_result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submit_time != null && Object.hasOwnProperty.call(message, "submit_time")) - $root.google.protobuf.Timestamp.encode(message.submit_time, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deposit_end_time != null && Object.hasOwnProperty.call(message, "deposit_end_time")) - $root.google.protobuf.Timestamp.encode(message.deposit_end_time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.total_deposit != null && message.total_deposit.length) - for (let i = 0; i < message.total_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_deposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.voting_start_time != null && Object.hasOwnProperty.call(message, "voting_start_time")) - $root.google.protobuf.Timestamp.encode(message.voting_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voting_end_time != null && Object.hasOwnProperty.call(message, "voting_end_time")) - $root.google.protobuf.Timestamp.encode(message.voting_end_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Proposal(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = 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.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submit_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.deposit_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.total_deposit && message.total_deposit.length)) - message.total_deposit = []; - message.total_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.voting_end_time = $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.gov.v1beta1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.content != null && message.hasOwnProperty("content")) { - let 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.final_tally_result != null && message.hasOwnProperty("final_tally_result")) { - let error = $root.cosmos.gov.v1beta1.TallyResult.verify(message.final_tally_result); - if (error) - return "final_tally_result." + error; - } - if (message.submit_time != null && message.hasOwnProperty("submit_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.submit_time); - if (error) - return "submit_time." + error; - } - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.deposit_end_time); - if (error) - return "deposit_end_time." + error; - } - if (message.total_deposit != null && message.hasOwnProperty("total_deposit")) { - if (!Array.isArray(message.total_deposit)) - return "total_deposit: array expected"; - for (let i = 0; i < message.total_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.total_deposit[i]); - if (error) - return "total_deposit." + error; - } - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.voting_start_time); - if (error) - return "voting_start_time." + error; - } - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.voting_end_time); - if (error) - return "voting_end_time." + error; - } - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Proposal) - return object; - let message = new $root.cosmos.gov.v1beta1.Proposal(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos.gov.v1beta1.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.final_tally_result != null) { - if (typeof object.final_tally_result !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.final_tally_result: object expected"); - message.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.fromObject(object.final_tally_result); - } - if (object.submit_time != null) { - if (typeof object.submit_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.submit_time: object expected"); - message.submit_time = $root.google.protobuf.Timestamp.fromObject(object.submit_time); - } - if (object.deposit_end_time != null) { - if (typeof object.deposit_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.deposit_end_time: object expected"); - message.deposit_end_time = $root.google.protobuf.Timestamp.fromObject(object.deposit_end_time); - } - if (object.total_deposit) { - if (!Array.isArray(object.total_deposit)) - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: array expected"); - message.total_deposit = []; - for (let i = 0; i < object.total_deposit.length; ++i) { - if (typeof object.total_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.total_deposit: object expected"); - message.total_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_deposit[i]); - } - } - if (object.voting_start_time != null) { - if (typeof object.voting_start_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_start_time: object expected"); - message.voting_start_time = $root.google.protobuf.Timestamp.fromObject(object.voting_start_time); - } - if (object.voting_end_time != null) { - if (typeof object.voting_end_time !== "object") - throw TypeError(".cosmos.gov.v1beta1.Proposal.voting_end_time: object expected"); - message.voting_end_time = $root.google.protobuf.Timestamp.fromObject(object.voting_end_time); - } - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Proposal - * @static - * @param {cosmos.gov.v1beta1.Proposal} message Proposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.total_deposit = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.content = null; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.final_tally_result = null; - object.submit_time = null; - object.deposit_end_time = null; - object.voting_start_time = null; - object.voting_end_time = null; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - 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.gov.v1beta1.ProposalStatus[message.status] : message.status; - if (message.final_tally_result != null && message.hasOwnProperty("final_tally_result")) - object.final_tally_result = $root.cosmos.gov.v1beta1.TallyResult.toObject(message.final_tally_result, options); - if (message.submit_time != null && message.hasOwnProperty("submit_time")) - object.submit_time = $root.google.protobuf.Timestamp.toObject(message.submit_time, options); - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) - object.deposit_end_time = $root.google.protobuf.Timestamp.toObject(message.deposit_end_time, options); - if (message.total_deposit && message.total_deposit.length) { - object.total_deposit = []; - for (let j = 0; j < message.total_deposit.length; ++j) - object.total_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_deposit[j], options); - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) - object.voting_start_time = $root.google.protobuf.Timestamp.toObject(message.voting_start_time, options); - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) - object.voting_end_time = $root.google.protobuf.Timestamp.toObject(message.voting_end_time, options); - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.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.gov.v1beta1.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 - */ - v1beta1.ProposalStatus = (function() { - const 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; - })(); - - v1beta1.TallyResult = (function() { - - /** - * Properties of a TallyResult. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyResult - * @property {string|null} [yes] TallyResult yes - * @property {string|null} [abstain] TallyResult abstain - * @property {string|null} [no] TallyResult no - * @property {string|null} [no_with_veto] TallyResult no_with_veto - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos.gov.v1beta1.ITallyResult=} [properties] Properties to set - */ - function TallyResult(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyResult yes. - * @member {string} yes - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.yes = ""; - - /** - * TallyResult abstain. - * @member {string} abstain - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.abstain = ""; - - /** - * TallyResult no. - * @member {string} no - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no = ""; - - /** - * TallyResult no_with_veto. - * @member {string} no_with_veto - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - */ - TallyResult.prototype.no_with_veto = ""; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.no_with_veto != null && Object.hasOwnProperty.call(message, "no_with_veto")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.no_with_veto); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyResult(); - while (reader.pos < end) { - let 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.no_with_veto = 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.gov.v1beta1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - if (!$util.isString(message.no_with_veto)) - return "no_with_veto: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyResult) - return object; - let message = new $root.cosmos.gov.v1beta1.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.no_with_veto != null) - message.no_with_veto = String(object.no_with_veto); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyResult - * @static - * @param {cosmos.gov.v1beta1.TallyResult} message TallyResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.yes = ""; - object.abstain = ""; - object.no = ""; - object.no_with_veto = ""; - } - 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.no_with_veto != null && message.hasOwnProperty("no_with_veto")) - object.no_with_veto = message.no_with_veto; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyResult - * @instance - * @returns {Object.} JSON object - */ - TallyResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyResult; - })(); - - v1beta1.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof cosmos.gov.v1beta1 - * @interface IVote - * @property {Long|null} [proposal_id] Vote proposal_id - * @property {string|null} [voter] Vote voter - * @property {cosmos.gov.v1beta1.VoteOption|null} [option] Vote option - * @property {Array.|null} [options] Vote options - */ - - /** - * Constructs a new Vote. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos.gov.v1beta1.IVote=} [properties] Properties to set - */ - function Vote(properties) { - this.options = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Vote proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {string} voter - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.voter = ""; - - /** - * Vote option. - * @member {cosmos.gov.v1beta1.VoteOption} option - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.option = 0; - - /** - * Vote options. - * @member {Array.} options - * @memberof cosmos.gov.v1beta1.Vote - * @instance - */ - Vote.prototype.options = $util.emptyArray; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); - if (message.options != null && message.options.length) - for (let i = 0; i < message.options.length; ++i) - $root.cosmos.gov.v1beta1.WeightedVoteOption.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.Vote(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 3: - message.option = reader.int32(); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.cosmos.gov.v1beta1.WeightedVoteOption.decode(reader, reader.uint32())); - 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.gov.v1beta1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.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.gov.v1beta1.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!$util.isString(message.voter)) - return "voter: string 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; - } - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (let i = 0; i < message.options.length; ++i) { - let error = $root.cosmos.gov.v1beta1.WeightedVoteOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.Vote) - return object; - let message = new $root.cosmos.gov.v1beta1.Vote(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.voter != null) - message.voter = String(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; - } - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".cosmos.gov.v1beta1.Vote.options: array expected"); - message.options = []; - for (let i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.Vote.options: object expected"); - message.options[i] = $root.cosmos.gov.v1beta1.WeightedVoteOption.fromObject(object.options[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.Vote - * @static - * @param {cosmos.gov.v1beta1.Vote} message Vote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vote.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.voter = ""; - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = message.voter; - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1beta1.VoteOption[message.option] : message.option; - if (message.options && message.options.length) { - object.options = []; - for (let j = 0; j < message.options.length; ++j) - object.options[j] = $root.cosmos.gov.v1beta1.WeightedVoteOption.toObject(message.options[j], options); - } - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - v1beta1.DepositParams = (function() { - - /** - * Properties of a DepositParams. - * @memberof cosmos.gov.v1beta1 - * @interface IDepositParams - * @property {Array.|null} [min_deposit] DepositParams min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] DepositParams max_deposit_period - */ - - /** - * Constructs a new DepositParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a DepositParams. - * @implements IDepositParams - * @constructor - * @param {cosmos.gov.v1beta1.IDepositParams=} [properties] Properties to set - */ - function DepositParams(properties) { - this.min_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DepositParams min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.min_deposit = $util.emptyArray; - - /** - * DepositParams max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - */ - DepositParams.prototype.max_deposit_period = null; - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min_deposit != null && message.min_deposit.length) - for (let i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.DepositParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.DepositParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DepositParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DepositParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (let i = 0; i < message.min_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - let error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - return null; - }; - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.DepositParams} DepositParams - */ - DepositParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.DepositParams) - return object; - let message = new $root.cosmos.gov.v1beta1.DepositParams(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: array expected"); - message.min_deposit = []; - for (let i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.DepositParams.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - return message; - }; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.DepositParams - * @static - * @param {cosmos.gov.v1beta1.DepositParams} message DepositParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DepositParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) - object.max_deposit_period = null; - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (let j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - return object; - }; - - /** - * Converts this DepositParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.DepositParams - * @instance - * @returns {Object.} JSON object - */ - DepositParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DepositParams; - })(); - - v1beta1.VotingParams = (function() { - - /** - * Properties of a VotingParams. - * @memberof cosmos.gov.v1beta1 - * @interface IVotingParams - * @property {google.protobuf.IDuration|null} [voting_period] VotingParams voting_period - */ - - /** - * Constructs a new VotingParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a VotingParams. - * @implements IVotingParams - * @constructor - * @param {cosmos.gov.v1beta1.IVotingParams=} [properties] Properties to set - */ - function VotingParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VotingParams voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - */ - VotingParams.prototype.voting_period = null; - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.VotingParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.VotingParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VotingParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VotingParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - let error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - return null; - }; - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.VotingParams} VotingParams - */ - VotingParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.VotingParams) - return object; - let message = new $root.cosmos.gov.v1beta1.VotingParams(); - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1beta1.VotingParams.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - return message; - }; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.VotingParams - * @static - * @param {cosmos.gov.v1beta1.VotingParams} message VotingParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VotingParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.voting_period = null; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - return object; - }; - - /** - * Converts this VotingParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.VotingParams - * @instance - * @returns {Object.} JSON object - */ - VotingParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VotingParams; - })(); - - v1beta1.TallyParams = (function() { - - /** - * Properties of a TallyParams. - * @memberof cosmos.gov.v1beta1 - * @interface ITallyParams - * @property {Uint8Array|null} [quorum] TallyParams quorum - * @property {Uint8Array|null} [threshold] TallyParams threshold - * @property {Uint8Array|null} [veto_threshold] TallyParams veto_threshold - */ - - /** - * Constructs a new TallyParams. - * @memberof cosmos.gov.v1beta1 - * @classdesc Represents a TallyParams. - * @implements ITallyParams - * @constructor - * @param {cosmos.gov.v1beta1.ITallyParams=} [properties] Properties to set - */ - function TallyParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyParams quorum. - * @member {Uint8Array} quorum - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.quorum = $util.newBuffer([]); - - /** - * TallyParams threshold. - * @member {Uint8Array} threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.threshold = $util.newBuffer([]); - - /** - * TallyParams veto_threshold. - * @member {Uint8Array} veto_threshold - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - */ - TallyParams.prototype.veto_threshold = $util.newBuffer([]); - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.veto_threshold); - return writer; - }; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1beta1.TallyParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1beta1.TallyParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.bytes(); - break; - case 2: - message.threshold = reader.bytes(); - break; - case 3: - message.veto_threshold = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyParams message. - * @function verify - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!(message.quorum && typeof message.quorum.length === "number" || $util.isString(message.quorum))) - return "quorum: buffer expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!(message.threshold && typeof message.threshold.length === "number" || $util.isString(message.threshold))) - return "threshold: buffer expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!(message.veto_threshold && typeof message.veto_threshold.length === "number" || $util.isString(message.veto_threshold))) - return "veto_threshold: buffer expected"; - return null; - }; - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1beta1.TallyParams} TallyParams - */ - TallyParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1beta1.TallyParams) - return object; - let message = new $root.cosmos.gov.v1beta1.TallyParams(); - if (object.quorum != null) - if (typeof object.quorum === "string") - $util.base64.decode(object.quorum, message.quorum = $util.newBuffer($util.base64.length(object.quorum)), 0); - else if (object.quorum.length) - message.quorum = object.quorum; - if (object.threshold != null) - if (typeof object.threshold === "string") - $util.base64.decode(object.threshold, message.threshold = $util.newBuffer($util.base64.length(object.threshold)), 0); - else if (object.threshold.length) - message.threshold = object.threshold; - if (object.veto_threshold != null) - if (typeof object.veto_threshold === "string") - $util.base64.decode(object.veto_threshold, message.veto_threshold = $util.newBuffer($util.base64.length(object.veto_threshold)), 0); - else if (object.veto_threshold.length) - message.veto_threshold = object.veto_threshold; - return message; - }; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1beta1.TallyParams - * @static - * @param {cosmos.gov.v1beta1.TallyParams} message TallyParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.quorum = ""; - else { - object.quorum = []; - if (options.bytes !== Array) - object.quorum = $util.newBuffer(object.quorum); - } - if (options.bytes === String) - object.threshold = ""; - else { - object.threshold = []; - if (options.bytes !== Array) - object.threshold = $util.newBuffer(object.threshold); - } - if (options.bytes === String) - object.veto_threshold = ""; - else { - object.veto_threshold = []; - if (options.bytes !== Array) - object.veto_threshold = $util.newBuffer(object.veto_threshold); - } - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = options.bytes === String ? $util.base64.encode(message.quorum, 0, message.quorum.length) : options.bytes === Array ? Array.prototype.slice.call(message.quorum) : message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = options.bytes === String ? $util.base64.encode(message.threshold, 0, message.threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.threshold) : message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = options.bytes === String ? $util.base64.encode(message.veto_threshold, 0, message.veto_threshold.length) : options.bytes === Array ? Array.prototype.slice.call(message.veto_threshold) : message.veto_threshold; - return object; - }; - - /** - * Converts this TallyParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1beta1.TallyParams - * @instance - * @returns {Object.} JSON object - */ - TallyParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyParams; - })(); - - return v1beta1; - })(); - - gov.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos.gov - * @namespace - */ - const v1 = {}; - - /** - * VoteOption enum. - * @name cosmos.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() { - const 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.WeightedVoteOption = (function() { - - /** - * Properties of a WeightedVoteOption. - * @memberof cosmos.gov.v1 - * @interface IWeightedVoteOption - * @property {cosmos.gov.v1.VoteOption|null} [option] WeightedVoteOption option - * @property {string|null} [weight] WeightedVoteOption weight - */ - - /** - * Constructs a new WeightedVoteOption. - * @memberof cosmos.gov.v1 - * @classdesc Represents a WeightedVoteOption. - * @implements IWeightedVoteOption - * @constructor - * @param {cosmos.gov.v1.IWeightedVoteOption=} [properties] Properties to set - */ - function WeightedVoteOption(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WeightedVoteOption option. - * @member {cosmos.gov.v1.VoteOption} option - * @memberof cosmos.gov.v1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.option = 0; - - /** - * WeightedVoteOption weight. - * @member {string} weight - * @memberof cosmos.gov.v1.WeightedVoteOption - * @instance - */ - WeightedVoteOption.prototype.weight = ""; - - /** - * Encodes the specified WeightedVoteOption message. Does not implicitly {@link cosmos.gov.v1.WeightedVoteOption.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.option); - if (message.weight != null && Object.hasOwnProperty.call(message, "weight")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.weight); - return writer; - }; - - /** - * Encodes the specified WeightedVoteOption message, length delimited. Does not implicitly {@link cosmos.gov.v1.WeightedVoteOption.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1.IWeightedVoteOption} message WeightedVoteOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WeightedVoteOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.WeightedVoteOption(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.option = reader.int32(); - break; - case 2: - message.weight = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WeightedVoteOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.WeightedVoteOption} WeightedVoteOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WeightedVoteOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WeightedVoteOption message. - * @function verify - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WeightedVoteOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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; - } - if (message.weight != null && message.hasOwnProperty("weight")) - if (!$util.isString(message.weight)) - return "weight: string expected"; - return null; - }; - - /** - * Creates a WeightedVoteOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.WeightedVoteOption} WeightedVoteOption - */ - WeightedVoteOption.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.WeightedVoteOption) - return object; - let message = new $root.cosmos.gov.v1.WeightedVoteOption(); - 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; - } - if (object.weight != null) - message.weight = String(object.weight); - return message; - }; - - /** - * Creates a plain object from a WeightedVoteOption message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.WeightedVoteOption - * @static - * @param {cosmos.gov.v1.WeightedVoteOption} message WeightedVoteOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WeightedVoteOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - object.weight = ""; - } - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos.gov.v1.VoteOption[message.option] : message.option; - if (message.weight != null && message.hasOwnProperty("weight")) - object.weight = message.weight; - return object; - }; - - /** - * Converts this WeightedVoteOption to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.WeightedVoteOption - * @instance - * @returns {Object.} JSON object - */ - WeightedVoteOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return WeightedVoteOption; - })(); - - v1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos.gov.v1 - * @interface IDeposit - * @property {Long|null} [proposal_id] Deposit proposal_id - * @property {string|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos.gov.v1.IDeposit=} [properties] Properties to set - */ - function Deposit(properties) { - this.amount = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Deposit proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1.Deposit - * @instance - */ - Deposit.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {string} depositor - * @memberof cosmos.gov.v1.Deposit - * @instance - */ - Deposit.prototype.depositor = ""; - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos.gov.v1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos.gov.v1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {cosmos.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.depositor); - if (message.amount != null && message.amount.length) - for (let i = 0; i < message.amount.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos.gov.v1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {cosmos.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.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.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.Deposit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.depositor = reader.string(); - break; - case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!$util.isString(message.depositor)) - return "depositor: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (let i = 0; i < message.amount.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a Deposit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Deposit) - return object; - let message = new $root.cosmos.gov.v1.Deposit(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.depositor != null) - message.depositor = String(object.depositor); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos.gov.v1.Deposit.amount: array expected"); - message.amount = []; - for (let i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos.gov.v1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos.base.v1beta1.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.gov.v1.Deposit - * @static - * @param {cosmos.gov.v1.Deposit} message Deposit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deposit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.depositor = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.depositor = message.depositor; - if (message.amount && message.amount.length) { - object.amount = []; - for (let j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos.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.gov.v1 - * @interface IProposal - * @property {Long|null} [id] Proposal id - * @property {Array.|null} [messages] Proposal messages - * @property {cosmos.gov.v1.ProposalStatus|null} [status] Proposal status - * @property {cosmos.gov.v1.ITallyResult|null} [final_tally_result] Proposal final_tally_result - * @property {google.protobuf.ITimestamp|null} [submit_time] Proposal submit_time - * @property {google.protobuf.ITimestamp|null} [deposit_end_time] Proposal deposit_end_time - * @property {Array.|null} [total_deposit] Proposal total_deposit - * @property {google.protobuf.ITimestamp|null} [voting_start_time] Proposal voting_start_time - * @property {google.protobuf.ITimestamp|null} [voting_end_time] Proposal voting_end_time - * @property {string|null} [metadata] Proposal metadata - * @property {string|null} [title] Proposal title - * @property {string|null} [summary] Proposal summary - * @property {string|null} [proposer] Proposal proposer - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos.gov.v1.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - this.messages = []; - this.total_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Proposal id. - * @member {Long} id - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal messages. - * @member {Array.} messages - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.messages = $util.emptyArray; - - /** - * Proposal status. - * @member {cosmos.gov.v1.ProposalStatus} status - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal final_tally_result. - * @member {cosmos.gov.v1.ITallyResult|null|undefined} final_tally_result - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.final_tally_result = null; - - /** - * Proposal submit_time. - * @member {google.protobuf.ITimestamp|null|undefined} submit_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.submit_time = null; - - /** - * Proposal deposit_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} deposit_end_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.deposit_end_time = null; - - /** - * Proposal total_deposit. - * @member {Array.} total_deposit - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.total_deposit = $util.emptyArray; - - /** - * Proposal voting_start_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_start_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.voting_start_time = null; - - /** - * Proposal voting_end_time. - * @member {google.protobuf.ITimestamp|null|undefined} voting_end_time - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.voting_end_time = null; - - /** - * Proposal metadata. - * @member {string} metadata - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.metadata = ""; - - /** - * Proposal title. - * @member {string} title - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.title = ""; - - /** - * Proposal summary. - * @member {string} summary - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.summary = ""; - - /** - * Proposal proposer. - * @member {string} proposer - * @memberof cosmos.gov.v1.Proposal - * @instance - */ - Proposal.prototype.proposer = ""; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos.gov.v1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {cosmos.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.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - if (message.messages != null && message.messages.length) - for (let i = 0; i < message.messages.length; ++i) - $root.google.protobuf.Any.encode(message.messages[i], 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.final_tally_result != null && Object.hasOwnProperty.call(message, "final_tally_result")) - $root.cosmos.gov.v1.TallyResult.encode(message.final_tally_result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submit_time != null && Object.hasOwnProperty.call(message, "submit_time")) - $root.google.protobuf.Timestamp.encode(message.submit_time, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.deposit_end_time != null && Object.hasOwnProperty.call(message, "deposit_end_time")) - $root.google.protobuf.Timestamp.encode(message.deposit_end_time, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.total_deposit != null && message.total_deposit.length) - for (let i = 0; i < message.total_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_deposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.voting_start_time != null && Object.hasOwnProperty.call(message, "voting_start_time")) - $root.google.protobuf.Timestamp.encode(message.voting_start_time, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.voting_end_time != null && Object.hasOwnProperty.call(message, "voting_end_time")) - $root.google.protobuf.Timestamp.encode(message.voting_end_time, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.metadata); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.title); - if (message.summary != null && Object.hasOwnProperty.call(message, "summary")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.summary); - if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.proposer); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos.gov.v1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {cosmos.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.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.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.Proposal(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - case 3: - message.status = reader.int32(); - break; - case 4: - message.final_tally_result = $root.cosmos.gov.v1.TallyResult.decode(reader, reader.uint32()); - break; - case 5: - message.submit_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.deposit_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - if (!(message.total_deposit && message.total_deposit.length)) - message.total_deposit = []; - message.total_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 8: - message.voting_start_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 9: - message.voting_end_time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 10: - message.metadata = reader.string(); - break; - case 11: - message.title = reader.string(); - break; - case 12: - message.summary = reader.string(); - break; - case 13: - message.proposer = reader.string(); - 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.gov.v1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (let i = 0; i < message.messages.length; ++i) { - let error = $root.google.protobuf.Any.verify(message.messages[i]); - if (error) - return "messages." + 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.final_tally_result != null && message.hasOwnProperty("final_tally_result")) { - let error = $root.cosmos.gov.v1.TallyResult.verify(message.final_tally_result); - if (error) - return "final_tally_result." + error; - } - if (message.submit_time != null && message.hasOwnProperty("submit_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.submit_time); - if (error) - return "submit_time." + error; - } - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.deposit_end_time); - if (error) - return "deposit_end_time." + error; - } - if (message.total_deposit != null && message.hasOwnProperty("total_deposit")) { - if (!Array.isArray(message.total_deposit)) - return "total_deposit: array expected"; - for (let i = 0; i < message.total_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.total_deposit[i]); - if (error) - return "total_deposit." + error; - } - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.voting_start_time); - if (error) - return "voting_start_time." + error; - } - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) { - let error = $root.google.protobuf.Timestamp.verify(message.voting_end_time); - if (error) - return "voting_end_time." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - if (!$util.isString(message.metadata)) - return "metadata: string expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.summary != null && message.hasOwnProperty("summary")) - if (!$util.isString(message.summary)) - return "summary: string expected"; - if (message.proposer != null && message.hasOwnProperty("proposer")) - if (!$util.isString(message.proposer)) - return "proposer: string expected"; - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Proposal) - return object; - let message = new $root.cosmos.gov.v1.Proposal(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".cosmos.gov.v1.Proposal.messages: array expected"); - message.messages = []; - for (let i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - 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.final_tally_result != null) { - if (typeof object.final_tally_result !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.final_tally_result: object expected"); - message.final_tally_result = $root.cosmos.gov.v1.TallyResult.fromObject(object.final_tally_result); - } - if (object.submit_time != null) { - if (typeof object.submit_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.submit_time: object expected"); - message.submit_time = $root.google.protobuf.Timestamp.fromObject(object.submit_time); - } - if (object.deposit_end_time != null) { - if (typeof object.deposit_end_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.deposit_end_time: object expected"); - message.deposit_end_time = $root.google.protobuf.Timestamp.fromObject(object.deposit_end_time); - } - if (object.total_deposit) { - if (!Array.isArray(object.total_deposit)) - throw TypeError(".cosmos.gov.v1.Proposal.total_deposit: array expected"); - message.total_deposit = []; - for (let i = 0; i < object.total_deposit.length; ++i) { - if (typeof object.total_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.total_deposit: object expected"); - message.total_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_deposit[i]); - } - } - if (object.voting_start_time != null) { - if (typeof object.voting_start_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.voting_start_time: object expected"); - message.voting_start_time = $root.google.protobuf.Timestamp.fromObject(object.voting_start_time); - } - if (object.voting_end_time != null) { - if (typeof object.voting_end_time !== "object") - throw TypeError(".cosmos.gov.v1.Proposal.voting_end_time: object expected"); - message.voting_end_time = $root.google.protobuf.Timestamp.fromObject(object.voting_end_time); - } - if (object.metadata != null) - message.metadata = String(object.metadata); - if (object.title != null) - message.title = String(object.title); - if (object.summary != null) - message.summary = String(object.summary); - if (object.proposer != null) - message.proposer = String(object.proposer); - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.Proposal - * @static - * @param {cosmos.gov.v1.Proposal} message Proposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.total_deposit = []; - } - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.final_tally_result = null; - object.submit_time = null; - object.deposit_end_time = null; - object.voting_start_time = null; - object.voting_end_time = null; - object.metadata = ""; - object.title = ""; - object.summary = ""; - object.proposer = ""; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - if (message.messages && message.messages.length) { - object.messages = []; - for (let j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); - } - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.cosmos.gov.v1.ProposalStatus[message.status] : message.status; - if (message.final_tally_result != null && message.hasOwnProperty("final_tally_result")) - object.final_tally_result = $root.cosmos.gov.v1.TallyResult.toObject(message.final_tally_result, options); - if (message.submit_time != null && message.hasOwnProperty("submit_time")) - object.submit_time = $root.google.protobuf.Timestamp.toObject(message.submit_time, options); - if (message.deposit_end_time != null && message.hasOwnProperty("deposit_end_time")) - object.deposit_end_time = $root.google.protobuf.Timestamp.toObject(message.deposit_end_time, options); - if (message.total_deposit && message.total_deposit.length) { - object.total_deposit = []; - for (let j = 0; j < message.total_deposit.length; ++j) - object.total_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_deposit[j], options); - } - if (message.voting_start_time != null && message.hasOwnProperty("voting_start_time")) - object.voting_start_time = $root.google.protobuf.Timestamp.toObject(message.voting_start_time, options); - if (message.voting_end_time != null && message.hasOwnProperty("voting_end_time")) - object.voting_end_time = $root.google.protobuf.Timestamp.toObject(message.voting_end_time, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = message.metadata; - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.summary != null && message.hasOwnProperty("summary")) - object.summary = message.summary; - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = message.proposer; - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos.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.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() { - const 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.gov.v1 - * @interface ITallyResult - * @property {string|null} [yes_count] TallyResult yes_count - * @property {string|null} [abstain_count] TallyResult abstain_count - * @property {string|null} [no_count] TallyResult no_count - * @property {string|null} [no_with_veto_count] TallyResult no_with_veto_count - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos.gov.v1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos.gov.v1.ITallyResult=} [properties] Properties to set - */ - function TallyResult(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyResult yes_count. - * @member {string} yes_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.yes_count = ""; - - /** - * TallyResult abstain_count. - * @member {string} abstain_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.abstain_count = ""; - - /** - * TallyResult no_count. - * @member {string} no_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.no_count = ""; - - /** - * TallyResult no_with_veto_count. - * @member {string} no_with_veto_count - * @memberof cosmos.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.no_with_veto_count = ""; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos.gov.v1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {cosmos.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_count != null && Object.hasOwnProperty.call(message, "yes_count")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes_count); - if (message.abstain_count != null && Object.hasOwnProperty.call(message, "abstain_count")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain_count); - if (message.no_count != null && Object.hasOwnProperty.call(message, "no_count")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.no_count); - if (message.no_with_veto_count != null && Object.hasOwnProperty.call(message, "no_with_veto_count")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.no_with_veto_count); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos.gov.v1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {cosmos.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.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.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.TallyResult(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.yes_count = reader.string(); - break; - case 2: - message.abstain_count = reader.string(); - break; - case 3: - message.no_count = reader.string(); - break; - case 4: - message.no_with_veto_count = 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.gov.v1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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_count != null && message.hasOwnProperty("yes_count")) - if (!$util.isString(message.yes_count)) - return "yes_count: string expected"; - if (message.abstain_count != null && message.hasOwnProperty("abstain_count")) - if (!$util.isString(message.abstain_count)) - return "abstain_count: string expected"; - if (message.no_count != null && message.hasOwnProperty("no_count")) - if (!$util.isString(message.no_count)) - return "no_count: string expected"; - if (message.no_with_veto_count != null && message.hasOwnProperty("no_with_veto_count")) - if (!$util.isString(message.no_with_veto_count)) - return "no_with_veto_count: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.TallyResult) - return object; - let message = new $root.cosmos.gov.v1.TallyResult(); - if (object.yes_count != null) - message.yes_count = String(object.yes_count); - if (object.abstain_count != null) - message.abstain_count = String(object.abstain_count); - if (object.no_count != null) - message.no_count = String(object.no_count); - if (object.no_with_veto_count != null) - message.no_with_veto_count = String(object.no_with_veto_count); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.TallyResult - * @static - * @param {cosmos.gov.v1.TallyResult} message TallyResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.yes_count = ""; - object.abstain_count = ""; - object.no_count = ""; - object.no_with_veto_count = ""; - } - if (message.yes_count != null && message.hasOwnProperty("yes_count")) - object.yes_count = message.yes_count; - if (message.abstain_count != null && message.hasOwnProperty("abstain_count")) - object.abstain_count = message.abstain_count; - if (message.no_count != null && message.hasOwnProperty("no_count")) - object.no_count = message.no_count; - if (message.no_with_veto_count != null && message.hasOwnProperty("no_with_veto_count")) - object.no_with_veto_count = message.no_with_veto_count; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos.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.gov.v1 - * @interface IVote - * @property {Long|null} [proposal_id] Vote proposal_id - * @property {string|null} [voter] Vote voter - * @property {Array.|null} [options] Vote options - * @property {string|null} [metadata] Vote metadata - */ - - /** - * Constructs a new Vote. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos.gov.v1.IVote=} [properties] Properties to set - */ - function Vote(properties) { - this.options = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Vote proposal_id. - * @member {Long} proposal_id - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.proposal_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {string} voter - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.voter = ""; - - /** - * Vote options. - * @member {Array.} options - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.options = $util.emptyArray; - - /** - * Vote metadata. - * @member {string} metadata - * @memberof cosmos.gov.v1.Vote - * @instance - */ - Vote.prototype.metadata = ""; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos.gov.v1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Vote - * @static - * @param {cosmos.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.proposal_id != null && Object.hasOwnProperty.call(message, "proposal_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposal_id); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.voter); - if (message.options != null && message.options.length) - for (let i = 0; i < message.options.length; ++i) - $root.cosmos.gov.v1.WeightedVoteOption.encode(message.options[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.metadata); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos.gov.v1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Vote - * @static - * @param {cosmos.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.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.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.Vote(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.proposal_id = reader.uint64(); - break; - case 2: - message.voter = reader.string(); - break; - case 4: - if (!(message.options && message.options.length)) - message.options = []; - message.options.push($root.cosmos.gov.v1.WeightedVoteOption.decode(reader, reader.uint32())); - break; - case 5: - message.metadata = reader.string(); - 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.gov.v1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.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.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.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (!$util.isInteger(message.proposal_id) && !(message.proposal_id && $util.isInteger(message.proposal_id.low) && $util.isInteger(message.proposal_id.high))) - return "proposal_id: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!$util.isString(message.voter)) - return "voter: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - if (!Array.isArray(message.options)) - return "options: array expected"; - for (let i = 0; i < message.options.length; ++i) { - let error = $root.cosmos.gov.v1.WeightedVoteOption.verify(message.options[i]); - if (error) - return "options." + error; - } - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - if (!$util.isString(message.metadata)) - return "metadata: string expected"; - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Vote) - return object; - let message = new $root.cosmos.gov.v1.Vote(); - if (object.proposal_id != null) - if ($util.Long) - (message.proposal_id = $util.Long.fromValue(object.proposal_id)).unsigned = true; - else if (typeof object.proposal_id === "string") - message.proposal_id = parseInt(object.proposal_id, 10); - else if (typeof object.proposal_id === "number") - message.proposal_id = object.proposal_id; - else if (typeof object.proposal_id === "object") - message.proposal_id = new $util.LongBits(object.proposal_id.low >>> 0, object.proposal_id.high >>> 0).toNumber(true); - if (object.voter != null) - message.voter = String(object.voter); - if (object.options) { - if (!Array.isArray(object.options)) - throw TypeError(".cosmos.gov.v1.Vote.options: array expected"); - message.options = []; - for (let i = 0; i < object.options.length; ++i) { - if (typeof object.options[i] !== "object") - throw TypeError(".cosmos.gov.v1.Vote.options: object expected"); - message.options[i] = $root.cosmos.gov.v1.WeightedVoteOption.fromObject(object.options[i]); - } - } - if (object.metadata != null) - message.metadata = String(object.metadata); - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.Vote - * @static - * @param {cosmos.gov.v1.Vote} message Vote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vote.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.options = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.proposal_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposal_id = options.longs === String ? "0" : 0; - object.voter = ""; - object.metadata = ""; - } - if (message.proposal_id != null && message.hasOwnProperty("proposal_id")) - if (typeof message.proposal_id === "number") - object.proposal_id = options.longs === String ? String(message.proposal_id) : message.proposal_id; - else - object.proposal_id = options.longs === String ? $util.Long.prototype.toString.call(message.proposal_id) : options.longs === Number ? new $util.LongBits(message.proposal_id.low >>> 0, message.proposal_id.high >>> 0).toNumber(true) : message.proposal_id; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = message.voter; - if (message.options && message.options.length) { - object.options = []; - for (let j = 0; j < message.options.length; ++j) - object.options[j] = $root.cosmos.gov.v1.WeightedVoteOption.toObject(message.options[j], options); - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = message.metadata; - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - v1.DepositParams = (function() { - - /** - * Properties of a DepositParams. - * @memberof cosmos.gov.v1 - * @interface IDepositParams - * @property {Array.|null} [min_deposit] DepositParams min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] DepositParams max_deposit_period - */ - - /** - * Constructs a new DepositParams. - * @memberof cosmos.gov.v1 - * @classdesc Represents a DepositParams. - * @implements IDepositParams - * @constructor - * @param {cosmos.gov.v1.IDepositParams=} [properties] Properties to set - */ - function DepositParams(properties) { - this.min_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DepositParams min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1.DepositParams - * @instance - */ - DepositParams.prototype.min_deposit = $util.emptyArray; - - /** - * DepositParams max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1.DepositParams - * @instance - */ - DepositParams.prototype.max_deposit_period = null; - - /** - * Encodes the specified DepositParams message. Does not implicitly {@link cosmos.gov.v1.DepositParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {cosmos.gov.v1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min_deposit != null && message.min_deposit.length) - for (let i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DepositParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.DepositParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {cosmos.gov.v1.IDepositParams} message DepositParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DepositParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.DepositParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DepositParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.DepositParams} DepositParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DepositParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DepositParams message. - * @function verify - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DepositParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (let i = 0; i < message.min_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - let error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - return null; - }; - - /** - * Creates a DepositParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.DepositParams} DepositParams - */ - DepositParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.DepositParams) - return object; - let message = new $root.cosmos.gov.v1.DepositParams(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1.DepositParams.min_deposit: array expected"); - message.min_deposit = []; - for (let i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1.DepositParams.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1.DepositParams.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - return message; - }; - - /** - * Creates a plain object from a DepositParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.DepositParams - * @static - * @param {cosmos.gov.v1.DepositParams} message DepositParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DepositParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) - object.max_deposit_period = null; - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (let j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - return object; - }; - - /** - * Converts this DepositParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.DepositParams - * @instance - * @returns {Object.} JSON object - */ - DepositParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DepositParams; - })(); - - v1.VotingParams = (function() { - - /** - * Properties of a VotingParams. - * @memberof cosmos.gov.v1 - * @interface IVotingParams - * @property {google.protobuf.IDuration|null} [voting_period] VotingParams voting_period - */ - - /** - * Constructs a new VotingParams. - * @memberof cosmos.gov.v1 - * @classdesc Represents a VotingParams. - * @implements IVotingParams - * @constructor - * @param {cosmos.gov.v1.IVotingParams=} [properties] Properties to set - */ - function VotingParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VotingParams voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1.VotingParams - * @instance - */ - VotingParams.prototype.voting_period = null; - - /** - * Encodes the specified VotingParams message. Does not implicitly {@link cosmos.gov.v1.VotingParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {cosmos.gov.v1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified VotingParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.VotingParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {cosmos.gov.v1.IVotingParams} message VotingParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VotingParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.VotingParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VotingParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.VotingParams} VotingParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VotingParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VotingParams message. - * @function verify - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VotingParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - let error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - return null; - }; - - /** - * Creates a VotingParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.VotingParams} VotingParams - */ - VotingParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.VotingParams) - return object; - let message = new $root.cosmos.gov.v1.VotingParams(); - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1.VotingParams.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - return message; - }; - - /** - * Creates a plain object from a VotingParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.VotingParams - * @static - * @param {cosmos.gov.v1.VotingParams} message VotingParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VotingParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.voting_period = null; - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - return object; - }; - - /** - * Converts this VotingParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.VotingParams - * @instance - * @returns {Object.} JSON object - */ - VotingParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VotingParams; - })(); - - v1.TallyParams = (function() { - - /** - * Properties of a TallyParams. - * @memberof cosmos.gov.v1 - * @interface ITallyParams - * @property {string|null} [quorum] TallyParams quorum - * @property {string|null} [threshold] TallyParams threshold - * @property {string|null} [veto_threshold] TallyParams veto_threshold - */ - - /** - * Constructs a new TallyParams. - * @memberof cosmos.gov.v1 - * @classdesc Represents a TallyParams. - * @implements ITallyParams - * @constructor - * @param {cosmos.gov.v1.ITallyParams=} [properties] Properties to set - */ - function TallyParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TallyParams quorum. - * @member {string} quorum - * @memberof cosmos.gov.v1.TallyParams - * @instance - */ - TallyParams.prototype.quorum = ""; - - /** - * TallyParams threshold. - * @member {string} threshold - * @memberof cosmos.gov.v1.TallyParams - * @instance - */ - TallyParams.prototype.threshold = ""; - - /** - * TallyParams veto_threshold. - * @member {string} veto_threshold - * @memberof cosmos.gov.v1.TallyParams - * @instance - */ - TallyParams.prototype.veto_threshold = ""; - - /** - * Encodes the specified TallyParams message. Does not implicitly {@link cosmos.gov.v1.TallyParams.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {cosmos.gov.v1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.veto_threshold); - return writer; - }; - - /** - * Encodes the specified TallyParams message, length delimited. Does not implicitly {@link cosmos.gov.v1.TallyParams.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {cosmos.gov.v1.ITallyParams} message TallyParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer. - * @function decode - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.v1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.TallyParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.quorum = reader.string(); - break; - case 2: - message.threshold = reader.string(); - break; - case 3: - message.veto_threshold = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TallyParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.v1.TallyParams} TallyParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyParams message. - * @function verify - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!$util.isString(message.quorum)) - return "quorum: string expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!$util.isString(message.threshold)) - return "threshold: string expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!$util.isString(message.veto_threshold)) - return "veto_threshold: string expected"; - return null; - }; - - /** - * Creates a TallyParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.TallyParams} TallyParams - */ - TallyParams.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.TallyParams) - return object; - let message = new $root.cosmos.gov.v1.TallyParams(); - if (object.quorum != null) - message.quorum = String(object.quorum); - if (object.threshold != null) - message.threshold = String(object.threshold); - if (object.veto_threshold != null) - message.veto_threshold = String(object.veto_threshold); - return message; - }; - - /** - * Creates a plain object from a TallyParams message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.TallyParams - * @static - * @param {cosmos.gov.v1.TallyParams} message TallyParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.quorum = ""; - object.threshold = ""; - object.veto_threshold = ""; - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = message.veto_threshold; - return object; - }; - - /** - * Converts this TallyParams to JSON. - * @function toJSON - * @memberof cosmos.gov.v1.TallyParams - * @instance - * @returns {Object.} JSON object - */ - TallyParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TallyParams; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos.gov.v1 - * @interface IParams - * @property {Array.|null} [min_deposit] Params min_deposit - * @property {google.protobuf.IDuration|null} [max_deposit_period] Params max_deposit_period - * @property {google.protobuf.IDuration|null} [voting_period] Params voting_period - * @property {string|null} [quorum] Params quorum - * @property {string|null} [threshold] Params threshold - * @property {string|null} [veto_threshold] Params veto_threshold - * @property {string|null} [min_initial_deposit_ratio] Params min_initial_deposit_ratio - * @property {boolean|null} [burn_vote_quorum] Params burn_vote_quorum - * @property {boolean|null} [burn_proposal_deposit_prevote] Params burn_proposal_deposit_prevote - * @property {boolean|null} [burn_vote_veto] Params burn_vote_veto - */ - - /** - * Constructs a new Params. - * @memberof cosmos.gov.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.gov.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.min_deposit = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params min_deposit. - * @member {Array.} min_deposit - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.min_deposit = $util.emptyArray; - - /** - * Params max_deposit_period. - * @member {google.protobuf.IDuration|null|undefined} max_deposit_period - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.max_deposit_period = null; - - /** - * Params voting_period. - * @member {google.protobuf.IDuration|null|undefined} voting_period - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.voting_period = null; - - /** - * Params quorum. - * @member {string} quorum - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.quorum = ""; - - /** - * Params threshold. - * @member {string} threshold - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.threshold = ""; - - /** - * Params veto_threshold. - * @member {string} veto_threshold - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.veto_threshold = ""; - - /** - * Params min_initial_deposit_ratio. - * @member {string} min_initial_deposit_ratio - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.min_initial_deposit_ratio = ""; - - /** - * Params burn_vote_quorum. - * @member {boolean} burn_vote_quorum - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.burn_vote_quorum = false; - - /** - * Params burn_proposal_deposit_prevote. - * @member {boolean} burn_proposal_deposit_prevote - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.burn_proposal_deposit_prevote = false; - - /** - * Params burn_vote_veto. - * @member {boolean} burn_vote_veto - * @memberof cosmos.gov.v1.Params - * @instance - */ - Params.prototype.burn_vote_veto = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.gov.v1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.gov.v1.Params - * @static - * @param {cosmos.gov.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.min_deposit != null && message.min_deposit.length) - for (let i = 0; i < message.min_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.min_deposit[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.max_deposit_period != null && Object.hasOwnProperty.call(message, "max_deposit_period")) - $root.google.protobuf.Duration.encode(message.max_deposit_period, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.voting_period != null && Object.hasOwnProperty.call(message, "voting_period")) - $root.google.protobuf.Duration.encode(message.voting_period, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.quorum != null && Object.hasOwnProperty.call(message, "quorum")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.quorum); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.threshold); - if (message.veto_threshold != null && Object.hasOwnProperty.call(message, "veto_threshold")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.veto_threshold); - if (message.min_initial_deposit_ratio != null && Object.hasOwnProperty.call(message, "min_initial_deposit_ratio")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.min_initial_deposit_ratio); - if (message.burn_vote_quorum != null && Object.hasOwnProperty.call(message, "burn_vote_quorum")) - writer.uint32(/* id 13, wireType 0 =*/104).bool(message.burn_vote_quorum); - if (message.burn_proposal_deposit_prevote != null && Object.hasOwnProperty.call(message, "burn_proposal_deposit_prevote")) - writer.uint32(/* id 14, wireType 0 =*/112).bool(message.burn_proposal_deposit_prevote); - if (message.burn_vote_veto != null && Object.hasOwnProperty.call(message, "burn_vote_veto")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.burn_vote_veto); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.gov.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.gov.v1.Params - * @static - * @param {cosmos.gov.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.gov.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.gov.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.gov.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.min_deposit && message.min_deposit.length)) - message.min_deposit = []; - message.min_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.max_deposit_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.voting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.quorum = reader.string(); - break; - case 5: - message.threshold = reader.string(); - break; - case 6: - message.veto_threshold = reader.string(); - break; - case 7: - message.min_initial_deposit_ratio = reader.string(); - break; - case 13: - message.burn_vote_quorum = reader.bool(); - break; - case 14: - message.burn_proposal_deposit_prevote = reader.bool(); - break; - case 15: - message.burn_vote_veto = 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.gov.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.gov.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.gov.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.min_deposit != null && message.hasOwnProperty("min_deposit")) { - if (!Array.isArray(message.min_deposit)) - return "min_deposit: array expected"; - for (let i = 0; i < message.min_deposit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.min_deposit[i]); - if (error) - return "min_deposit." + error; - } - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) { - let error = $root.google.protobuf.Duration.verify(message.max_deposit_period); - if (error) - return "max_deposit_period." + error; - } - if (message.voting_period != null && message.hasOwnProperty("voting_period")) { - let error = $root.google.protobuf.Duration.verify(message.voting_period); - if (error) - return "voting_period." + error; - } - if (message.quorum != null && message.hasOwnProperty("quorum")) - if (!$util.isString(message.quorum)) - return "quorum: string expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!$util.isString(message.threshold)) - return "threshold: string expected"; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - if (!$util.isString(message.veto_threshold)) - return "veto_threshold: string expected"; - if (message.min_initial_deposit_ratio != null && message.hasOwnProperty("min_initial_deposit_ratio")) - if (!$util.isString(message.min_initial_deposit_ratio)) - return "min_initial_deposit_ratio: string expected"; - if (message.burn_vote_quorum != null && message.hasOwnProperty("burn_vote_quorum")) - if (typeof message.burn_vote_quorum !== "boolean") - return "burn_vote_quorum: boolean expected"; - if (message.burn_proposal_deposit_prevote != null && message.hasOwnProperty("burn_proposal_deposit_prevote")) - if (typeof message.burn_proposal_deposit_prevote !== "boolean") - return "burn_proposal_deposit_prevote: boolean expected"; - if (message.burn_vote_veto != null && message.hasOwnProperty("burn_vote_veto")) - if (typeof message.burn_vote_veto !== "boolean") - return "burn_vote_veto: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.gov.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.gov.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.gov.v1.Params) - return object; - let message = new $root.cosmos.gov.v1.Params(); - if (object.min_deposit) { - if (!Array.isArray(object.min_deposit)) - throw TypeError(".cosmos.gov.v1.Params.min_deposit: array expected"); - message.min_deposit = []; - for (let i = 0; i < object.min_deposit.length; ++i) { - if (typeof object.min_deposit[i] !== "object") - throw TypeError(".cosmos.gov.v1.Params.min_deposit: object expected"); - message.min_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_deposit[i]); - } - } - if (object.max_deposit_period != null) { - if (typeof object.max_deposit_period !== "object") - throw TypeError(".cosmos.gov.v1.Params.max_deposit_period: object expected"); - message.max_deposit_period = $root.google.protobuf.Duration.fromObject(object.max_deposit_period); - } - if (object.voting_period != null) { - if (typeof object.voting_period !== "object") - throw TypeError(".cosmos.gov.v1.Params.voting_period: object expected"); - message.voting_period = $root.google.protobuf.Duration.fromObject(object.voting_period); - } - if (object.quorum != null) - message.quorum = String(object.quorum); - if (object.threshold != null) - message.threshold = String(object.threshold); - if (object.veto_threshold != null) - message.veto_threshold = String(object.veto_threshold); - if (object.min_initial_deposit_ratio != null) - message.min_initial_deposit_ratio = String(object.min_initial_deposit_ratio); - if (object.burn_vote_quorum != null) - message.burn_vote_quorum = Boolean(object.burn_vote_quorum); - if (object.burn_proposal_deposit_prevote != null) - message.burn_proposal_deposit_prevote = Boolean(object.burn_proposal_deposit_prevote); - if (object.burn_vote_veto != null) - message.burn_vote_veto = Boolean(object.burn_vote_veto); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.gov.v1.Params - * @static - * @param {cosmos.gov.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.min_deposit = []; - if (options.defaults) { - object.max_deposit_period = null; - object.voting_period = null; - object.quorum = ""; - object.threshold = ""; - object.veto_threshold = ""; - object.min_initial_deposit_ratio = ""; - object.burn_vote_quorum = false; - object.burn_proposal_deposit_prevote = false; - object.burn_vote_veto = false; - } - if (message.min_deposit && message.min_deposit.length) { - object.min_deposit = []; - for (let j = 0; j < message.min_deposit.length; ++j) - object.min_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.min_deposit[j], options); - } - if (message.max_deposit_period != null && message.hasOwnProperty("max_deposit_period")) - object.max_deposit_period = $root.google.protobuf.Duration.toObject(message.max_deposit_period, options); - if (message.voting_period != null && message.hasOwnProperty("voting_period")) - object.voting_period = $root.google.protobuf.Duration.toObject(message.voting_period, options); - if (message.quorum != null && message.hasOwnProperty("quorum")) - object.quorum = message.quorum; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = message.threshold; - if (message.veto_threshold != null && message.hasOwnProperty("veto_threshold")) - object.veto_threshold = message.veto_threshold; - if (message.min_initial_deposit_ratio != null && message.hasOwnProperty("min_initial_deposit_ratio")) - object.min_initial_deposit_ratio = message.min_initial_deposit_ratio; - if (message.burn_vote_quorum != null && message.hasOwnProperty("burn_vote_quorum")) - object.burn_vote_quorum = message.burn_vote_quorum; - if (message.burn_proposal_deposit_prevote != null && message.hasOwnProperty("burn_proposal_deposit_prevote")) - object.burn_proposal_deposit_prevote = message.burn_proposal_deposit_prevote; - if (message.burn_vote_veto != null && message.hasOwnProperty("burn_vote_veto")) - object.burn_vote_veto = message.burn_vote_veto; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.gov.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 gov; - })(); - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - const base = {}; - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - const v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set - */ - function Coin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Coin denom. - * @member {string} denom - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); - while (reader.pos < end) { - let 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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.Coin} message Coin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Coin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set - */ - function DecCoin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DecCoin denom. - * @member {string} denom - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); - while (reader.pos < end) { - let 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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.DecCoin} message DecCoin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecCoin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set - */ - function IntProto(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntProto int. - * @member {string} int - * @memberof cosmos.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); - while (reader.pos < end) { - let 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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.IntProto} message IntProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set - */ - function DecProto(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DecProto dec. - * @member {string} dec - * @memberof cosmos.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); - while (reader.pos < end) { - let 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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.DecProto} message DecProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - base.query = (function() { - - /** - * Namespace query. - * @memberof cosmos.base - * @namespace - */ - const query = {}; - - query.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base.query - * @namespace - */ - const v1beta1 = {}; - - v1beta1.PageRequest = (function() { - - /** - * Properties of a PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageRequest - * @property {Uint8Array|null} [key] PageRequest key - * @property {Long|null} [offset] PageRequest offset - * @property {Long|null} [limit] PageRequest limit - * @property {boolean|null} [count_total] PageRequest count_total - * @property {boolean|null} [reverse] PageRequest reverse - */ - - /** - * Constructs a new PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageRequest. - * @implements IPageRequest - * @constructor - * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set - */ - function PageRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageRequest key. - * @member {Uint8Array} key - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.key = $util.newBuffer([]); - - /** - * PageRequest offset. - * @member {Long} offset - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest limit. - * @member {Long} limit - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest count_total. - * @member {boolean} count_total - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.count_total = false; - - /** - * PageRequest reverse. - * @member {boolean} reverse - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.reverse = false; - - /** - * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); - if (message.count_total != null && Object.hasOwnProperty.call(message, "count_total")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.count_total); - if (message.reverse != null && Object.hasOwnProperty.call(message, "reverse")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reverse); - return writer; - }; - - /** - * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = reader.uint64(); - break; - case 3: - message.limit = reader.uint64(); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageRequest message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.count_total != null && message.hasOwnProperty("count_total")) - if (typeof message.count_total !== "boolean") - return "count_total: boolean expected"; - if (message.reverse != null && message.hasOwnProperty("reverse")) - if (typeof message.reverse !== "boolean") - return "reverse: boolean expected"; - return null; - }; - - /** - * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - */ - PageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) - return object; - let message = new $root.cosmos.base.query.v1beta1.PageRequest(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - if (object.count_total != null) - message.count_total = Boolean(object.count_total); - if (object.reverse != null) - message.reverse = Boolean(object.reverse); - return message; - }; - - /** - * Creates a plain object from a PageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.count_total = false; - object.reverse = false; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - if (message.count_total != null && message.hasOwnProperty("count_total")) - object.count_total = message.count_total; - if (message.reverse != null && message.hasOwnProperty("reverse")) - object.reverse = message.reverse; - return object; - }; - - /** - * Converts this PageRequest to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - * @returns {Object.} JSON object - */ - PageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageRequest; - })(); - - v1beta1.PageResponse = (function() { - - /** - * Properties of a PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageResponse - * @property {Uint8Array|null} [next_key] PageResponse next_key - * @property {Long|null} [total] PageResponse total - */ - - /** - * Constructs a new PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageResponse. - * @implements IPageResponse - * @constructor - * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set - */ - function PageResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageResponse next_key. - * @member {Uint8Array} next_key - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.next_key = $util.newBuffer([]); - - /** - * PageResponse total. - * @member {Long} total - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.next_key != null && Object.hasOwnProperty.call(message, "next_key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.next_key); - if (message.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); - return writer; - }; - - /** - * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageResponse message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.next_key != null && message.hasOwnProperty("next_key")) - if (!(message.next_key && typeof message.next_key.length === "number" || $util.isString(message.next_key))) - return "next_key: buffer expected"; - if (message.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - return null; - }; - - /** - * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - */ - PageResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageResponse) - return object; - let message = new $root.cosmos.base.query.v1beta1.PageResponse(); - if (object.next_key != null) - if (typeof object.next_key === "string") - $util.base64.decode(object.next_key, message.next_key = $util.newBuffer($util.base64.length(object.next_key)), 0); - else if (object.next_key.length) - message.next_key = object.next_key; - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = true; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a PageResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.PageResponse} message PageResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.next_key = ""; - else { - object.next_key = []; - if (options.bytes !== Array) - object.next_key = $util.newBuffer(object.next_key); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - } - if (message.next_key != null && message.hasOwnProperty("next_key")) - object.next_key = options.bytes === String ? $util.base64.encode(message.next_key, 0, message.next_key.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_key) : message.next_key; - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; - return object; - }; - - /** - * Converts this PageResponse to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - * @returns {Object.} JSON object - */ - PageResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageResponse; - })(); - - return v1beta1; - })(); - - return query; - })(); - - return base; - })(); - - cosmos.upgrade = (function() { - - /** - * Namespace upgrade. - * @memberof cosmos - * @namespace - */ - const upgrade = {}; - - upgrade.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.upgrade - * @namespace - */ - const v1beta1 = {}; - - v1beta1.Plan = (function() { - - /** - * Properties of a Plan. - * @memberof cosmos.upgrade.v1beta1 - * @interface IPlan - * @property {string|null} [name] Plan name - * @property {google.protobuf.ITimestamp|null} [time] Plan time - * @property {Long|null} [height] Plan height - * @property {string|null} [info] Plan info - * @property {google.protobuf.IAny|null} [upgraded_client_state] Plan upgraded_client_state - */ - - /** - * Constructs a new Plan. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a Plan. - * @implements IPlan - * @constructor - * @param {cosmos.upgrade.v1beta1.IPlan=} [properties] Properties to set - */ - function Plan(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Plan name. - * @member {string} name - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.name = ""; - - /** - * Plan time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.time = null; - - /** - * Plan height. - * @member {Long} height - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Plan info. - * @member {string} info - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.info = ""; - - /** - * Plan upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.upgraded_client_state = null; - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.Plan(); - while (reader.pos < end) { - let 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; - case 5: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - 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.upgrade.v1beta1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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")) { - let 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"; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - let error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates a Plan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.Plan} Plan - */ - Plan.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.Plan) - return object; - let message = new $root.cosmos.upgrade.v1beta1.Plan(); - if (object.name != null) - message.name = String(object.name); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".cosmos.upgrade.v1beta1.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); - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".cosmos.upgrade.v1beta1.Plan.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from a Plan message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.Plan} message Plan - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Plan.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.time = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.info = ""; - object.upgraded_client_state = null; - } - 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; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this Plan to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - * @returns {Object.} JSON object - */ - Plan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Plan; - })(); - - v1beta1.SoftwareUpgradeProposal = (function() { - - /** - * Properties of a SoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @interface ISoftwareUpgradeProposal - * @property {string|null} [title] SoftwareUpgradeProposal title - * @property {string|null} [description] SoftwareUpgradeProposal description - * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] SoftwareUpgradeProposal plan - */ - - /** - * Constructs a new SoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a SoftwareUpgradeProposal. - * @implements ISoftwareUpgradeProposal - * @constructor - * @param {cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal=} [properties] Properties to set - */ - function SoftwareUpgradeProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SoftwareUpgradeProposal title. - * @member {string} title - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.title = ""; - - /** - * SoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.description = ""; - - /** - * SoftwareUpgradeProposal plan. - * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.plan = null; - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal(); - while (reader.pos < end) { - let 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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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")) { - let error = $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal - */ - SoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) - return object; - let message = new $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal.plan: object expected"); - message.plan = $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} message SoftwareUpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoftwareUpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.upgrade.v1beta1.Plan.toObject(message.plan, options); - return object; - }; - - /** - * Converts this SoftwareUpgradeProposal to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - SoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SoftwareUpgradeProposal; - })(); - - v1beta1.CancelSoftwareUpgradeProposal = (function() { - - /** - * Properties of a CancelSoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @interface ICancelSoftwareUpgradeProposal - * @property {string|null} [title] CancelSoftwareUpgradeProposal title - * @property {string|null} [description] CancelSoftwareUpgradeProposal description - */ - - /** - * Constructs a new CancelSoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a CancelSoftwareUpgradeProposal. - * @implements ICancelSoftwareUpgradeProposal - * @constructor - * @param {cosmos.upgrade.v1beta1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set - */ - function CancelSoftwareUpgradeProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CancelSoftwareUpgradeProposal title. - * @member {string} title - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.title = ""; - - /** - * CancelSoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.description = ""; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal(); - while (reader.pos < end) { - let 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal - */ - CancelSoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) - return object; - let message = new $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelSoftwareUpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - CancelSoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CancelSoftwareUpgradeProposal; - })(); - - v1beta1.ModuleVersion = (function() { - - /** - * Properties of a ModuleVersion. - * @memberof cosmos.upgrade.v1beta1 - * @interface IModuleVersion - * @property {string|null} [name] ModuleVersion name - * @property {Long|null} [version] ModuleVersion version - */ - - /** - * Constructs a new ModuleVersion. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a ModuleVersion. - * @implements IModuleVersion - * @constructor - * @param {cosmos.upgrade.v1beta1.IModuleVersion=} [properties] Properties to set - */ - function ModuleVersion(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleVersion name. - * @member {string} name - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - */ - ModuleVersion.prototype.name = ""; - - /** - * ModuleVersion version. - * @member {Long} version - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - */ - ModuleVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ModuleVersion message. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.IModuleVersion} message ModuleVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleVersion.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.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version); - return writer; - }; - - /** - * Encodes the specified ModuleVersion message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.IModuleVersion} message ModuleVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer. - * @function decode - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.ModuleVersion(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.version = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleVersion message. - * @function verify - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleVersion.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.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) - return "version: integer|Long expected"; - return null; - }; - - /** - * Creates a ModuleVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - */ - ModuleVersion.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.ModuleVersion) - return object; - let message = new $root.cosmos.upgrade.v1beta1.ModuleVersion(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = true; - else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); - else if (typeof object.version === "number") - message.version = object.version; - else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ModuleVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.ModuleVersion} message ModuleVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.version = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; - else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; - return object; - }; - - /** - * Converts this ModuleVersion to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - * @returns {Object.} JSON object - */ - ModuleVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleVersion; - })(); - - return v1beta1; - })(); - - return upgrade; - })(); - - cosmos.auth = (function() { - - /** - * Namespace auth. - * @memberof cosmos - * @namespace - */ - const auth = {}; - - auth.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.auth - * @namespace - */ - const v1beta1 = {}; - - v1beta1.BaseAccount = (function() { - - /** - * Properties of a BaseAccount. - * @memberof cosmos.auth.v1beta1 - * @interface IBaseAccount - * @property {string|null} [address] BaseAccount address - * @property {google.protobuf.IAny|null} [pub_key] BaseAccount pub_key - * @property {Long|null} [account_number] BaseAccount account_number - * @property {Long|null} [sequence] BaseAccount sequence - */ - - /** - * Constructs a new BaseAccount. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a BaseAccount. - * @implements IBaseAccount - * @constructor - * @param {cosmos.auth.v1beta1.IBaseAccount=} [properties] Properties to set - */ - function BaseAccount(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BaseAccount address. - * @member {string} address - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.address = ""; - - /** - * BaseAccount pub_key. - * @member {google.protobuf.IAny|null|undefined} pub_key - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.pub_key = null; - - /** - * BaseAccount account_number. - * @member {Long} account_number - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.account_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BaseAccount sequence. - * @member {Long} sequence - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - */ - BaseAccount.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.google.protobuf.Any.encode(message.pub_key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.account_number != null && Object.hasOwnProperty.call(message, "account_number")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.account_number); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.BaseAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.BaseAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pub_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.account_number = reader.uint64(); - break; - case 4: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BaseAccount message. - * @function verify - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BaseAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) { - let error = $root.google.protobuf.Any.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.account_number != null && message.hasOwnProperty("account_number")) - if (!$util.isInteger(message.account_number) && !(message.account_number && $util.isInteger(message.account_number.low) && $util.isInteger(message.account_number.high))) - return "account_number: integer|Long expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) - return "sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.BaseAccount} BaseAccount - */ - BaseAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.BaseAccount) - return object; - let message = new $root.cosmos.auth.v1beta1.BaseAccount(); - if (object.address != null) - message.address = String(object.address); - if (object.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".cosmos.auth.v1beta1.BaseAccount.pub_key: object expected"); - message.pub_key = $root.google.protobuf.Any.fromObject(object.pub_key); - } - if (object.account_number != null) - if ($util.Long) - (message.account_number = $util.Long.fromValue(object.account_number)).unsigned = true; - else if (typeof object.account_number === "string") - message.account_number = parseInt(object.account_number, 10); - else if (typeof object.account_number === "number") - message.account_number = object.account_number; - else if (typeof object.account_number === "object") - message.account_number = new $util.LongBits(object.account_number.low >>> 0, object.account_number.high >>> 0).toNumber(true); - if (object.sequence != null) - if ($util.Long) - (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; - else if (typeof object.sequence === "string") - message.sequence = parseInt(object.sequence, 10); - else if (typeof object.sequence === "number") - message.sequence = object.sequence; - else if (typeof object.sequence === "object") - message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.BaseAccount - * @static - * @param {cosmos.auth.v1beta1.BaseAccount} message BaseAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BaseAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.address = ""; - object.pub_key = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.account_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.account_number = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.google.protobuf.Any.toObject(message.pub_key, options); - if (message.account_number != null && message.hasOwnProperty("account_number")) - if (typeof message.account_number === "number") - object.account_number = options.longs === String ? String(message.account_number) : message.account_number; - else - object.account_number = options.longs === String ? $util.Long.prototype.toString.call(message.account_number) : options.longs === Number ? new $util.LongBits(message.account_number.low >>> 0, message.account_number.high >>> 0).toNumber(true) : message.account_number; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (typeof message.sequence === "number") - object.sequence = options.longs === String ? String(message.sequence) : message.sequence; - else - object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; - return object; - }; - - /** - * Converts this BaseAccount to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.BaseAccount - * @instance - * @returns {Object.} JSON object - */ - BaseAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BaseAccount; - })(); - - v1beta1.ModuleAccount = (function() { - - /** - * Properties of a ModuleAccount. - * @memberof cosmos.auth.v1beta1 - * @interface IModuleAccount - * @property {cosmos.auth.v1beta1.IBaseAccount|null} [base_account] ModuleAccount base_account - * @property {string|null} [name] ModuleAccount name - * @property {Array.|null} [permissions] ModuleAccount permissions - */ - - /** - * Constructs a new ModuleAccount. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a ModuleAccount. - * @implements IModuleAccount - * @constructor - * @param {cosmos.auth.v1beta1.IModuleAccount=} [properties] Properties to set - */ - function ModuleAccount(properties) { - this.permissions = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleAccount base_account. - * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} base_account - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.base_account = null; - - /** - * ModuleAccount name. - * @member {string} name - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.name = ""; - - /** - * ModuleAccount permissions. - * @member {Array.} permissions - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.permissions = $util.emptyArray; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.base_account != null && Object.hasOwnProperty.call(message, "base_account")) - $root.cosmos.auth.v1beta1.BaseAccount.encode(message.base_account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.permissions != null && message.permissions.length) - for (let i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.ModuleAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.ModuleAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.name = reader.string(); - break; - case 3: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleAccount message. - * @function verify - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.base_account != null && message.hasOwnProperty("base_account")) { - let error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.base_account); - if (error) - return "base_account." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (let i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.ModuleAccount} ModuleAccount - */ - ModuleAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.ModuleAccount) - return object; - let message = new $root.cosmos.auth.v1beta1.ModuleAccount(); - if (object.base_account != null) { - if (typeof object.base_account !== "object") - throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.base_account: object expected"); - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.base_account); - } - if (object.name != null) - message.name = String(object.name); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".cosmos.auth.v1beta1.ModuleAccount.permissions: array expected"); - message.permissions = []; - for (let i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @static - * @param {cosmos.auth.v1beta1.ModuleAccount} message ModuleAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) { - object.base_account = null; - object.name = ""; - } - if (message.base_account != null && message.hasOwnProperty("base_account")) - object.base_account = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.base_account, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (let j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this ModuleAccount to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.ModuleAccount - * @instance - * @returns {Object.} JSON object - */ - ModuleAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleAccount; - })(); - - v1beta1.ModuleCredential = (function() { - - /** - * Properties of a ModuleCredential. - * @memberof cosmos.auth.v1beta1 - * @interface IModuleCredential - * @property {string|null} [module_name] ModuleCredential module_name - * @property {Array.|null} [derivation_keys] ModuleCredential derivation_keys - */ - - /** - * Constructs a new ModuleCredential. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a ModuleCredential. - * @implements IModuleCredential - * @constructor - * @param {cosmos.auth.v1beta1.IModuleCredential=} [properties] Properties to set - */ - function ModuleCredential(properties) { - this.derivation_keys = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleCredential module_name. - * @member {string} module_name - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @instance - */ - ModuleCredential.prototype.module_name = ""; - - /** - * ModuleCredential derivation_keys. - * @member {Array.} derivation_keys - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @instance - */ - ModuleCredential.prototype.derivation_keys = $util.emptyArray; - - /** - * Encodes the specified ModuleCredential message. Does not implicitly {@link cosmos.auth.v1beta1.ModuleCredential.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {cosmos.auth.v1beta1.IModuleCredential} message ModuleCredential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleCredential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.module_name != null && Object.hasOwnProperty.call(message, "module_name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.module_name); - if (message.derivation_keys != null && message.derivation_keys.length) - for (let i = 0; i < message.derivation_keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.derivation_keys[i]); - return writer; - }; - - /** - * Encodes the specified ModuleCredential message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.ModuleCredential.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {cosmos.auth.v1beta1.IModuleCredential} message ModuleCredential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleCredential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleCredential message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.ModuleCredential} ModuleCredential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleCredential.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.ModuleCredential(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.module_name = reader.string(); - break; - case 2: - if (!(message.derivation_keys && message.derivation_keys.length)) - message.derivation_keys = []; - message.derivation_keys.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleCredential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.ModuleCredential} ModuleCredential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleCredential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleCredential message. - * @function verify - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleCredential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.module_name != null && message.hasOwnProperty("module_name")) - if (!$util.isString(message.module_name)) - return "module_name: string expected"; - if (message.derivation_keys != null && message.hasOwnProperty("derivation_keys")) { - if (!Array.isArray(message.derivation_keys)) - return "derivation_keys: array expected"; - for (let i = 0; i < message.derivation_keys.length; ++i) - if (!(message.derivation_keys[i] && typeof message.derivation_keys[i].length === "number" || $util.isString(message.derivation_keys[i]))) - return "derivation_keys: buffer[] expected"; - } - return null; - }; - - /** - * Creates a ModuleCredential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.ModuleCredential} ModuleCredential - */ - ModuleCredential.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.ModuleCredential) - return object; - let message = new $root.cosmos.auth.v1beta1.ModuleCredential(); - if (object.module_name != null) - message.module_name = String(object.module_name); - if (object.derivation_keys) { - if (!Array.isArray(object.derivation_keys)) - throw TypeError(".cosmos.auth.v1beta1.ModuleCredential.derivation_keys: array expected"); - message.derivation_keys = []; - for (let i = 0; i < object.derivation_keys.length; ++i) - if (typeof object.derivation_keys[i] === "string") - $util.base64.decode(object.derivation_keys[i], message.derivation_keys[i] = $util.newBuffer($util.base64.length(object.derivation_keys[i])), 0); - else if (object.derivation_keys[i].length) - message.derivation_keys[i] = object.derivation_keys[i]; - } - return message; - }; - - /** - * Creates a plain object from a ModuleCredential message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @static - * @param {cosmos.auth.v1beta1.ModuleCredential} message ModuleCredential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleCredential.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.derivation_keys = []; - if (options.defaults) - object.module_name = ""; - if (message.module_name != null && message.hasOwnProperty("module_name")) - object.module_name = message.module_name; - if (message.derivation_keys && message.derivation_keys.length) { - object.derivation_keys = []; - for (let j = 0; j < message.derivation_keys.length; ++j) - object.derivation_keys[j] = options.bytes === String ? $util.base64.encode(message.derivation_keys[j], 0, message.derivation_keys[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.derivation_keys[j]) : message.derivation_keys[j]; - } - return object; - }; - - /** - * Converts this ModuleCredential to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.ModuleCredential - * @instance - * @returns {Object.} JSON object - */ - ModuleCredential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleCredential; - })(); - - v1beta1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos.auth.v1beta1 - * @interface IParams - * @property {Long|null} [max_memo_characters] Params max_memo_characters - * @property {Long|null} [tx_sig_limit] Params tx_sig_limit - * @property {Long|null} [tx_size_cost_per_byte] Params tx_size_cost_per_byte - * @property {Long|null} [sig_verify_cost_ed25519] Params sig_verify_cost_ed25519 - * @property {Long|null} [sig_verify_cost_secp256k1] Params sig_verify_cost_secp256k1 - */ - - /** - * Constructs a new Params. - * @memberof cosmos.auth.v1beta1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.auth.v1beta1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params max_memo_characters. - * @member {Long} max_memo_characters - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.max_memo_characters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params tx_sig_limit. - * @member {Long} tx_sig_limit - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.tx_sig_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params tx_size_cost_per_byte. - * @member {Long} tx_size_cost_per_byte - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.tx_size_cost_per_byte = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sig_verify_cost_ed25519. - * @member {Long} sig_verify_cost_ed25519 - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.sig_verify_cost_ed25519 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sig_verify_cost_secp256k1. - * @member {Long} sig_verify_cost_secp256k1 - * @memberof cosmos.auth.v1beta1.Params - * @instance - */ - Params.prototype.sig_verify_cost_secp256k1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.max_memo_characters != null && Object.hasOwnProperty.call(message, "max_memo_characters")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.max_memo_characters); - if (message.tx_sig_limit != null && Object.hasOwnProperty.call(message, "tx_sig_limit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.tx_sig_limit); - if (message.tx_size_cost_per_byte != null && Object.hasOwnProperty.call(message, "tx_size_cost_per_byte")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.tx_size_cost_per_byte); - if (message.sig_verify_cost_ed25519 != null && Object.hasOwnProperty.call(message, "sig_verify_cost_ed25519")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sig_verify_cost_ed25519); - if (message.sig_verify_cost_secp256k1 != null && Object.hasOwnProperty.call(message, "sig_verify_cost_secp256k1")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.sig_verify_cost_secp256k1); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.auth.v1beta1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.auth.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.auth.v1beta1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_memo_characters = reader.uint64(); - break; - case 2: - message.tx_sig_limit = reader.uint64(); - break; - case 3: - message.tx_size_cost_per_byte = reader.uint64(); - break; - case 4: - message.sig_verify_cost_ed25519 = reader.uint64(); - break; - case 5: - message.sig_verify_cost_secp256k1 = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.auth.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.max_memo_characters != null && message.hasOwnProperty("max_memo_characters")) - if (!$util.isInteger(message.max_memo_characters) && !(message.max_memo_characters && $util.isInteger(message.max_memo_characters.low) && $util.isInteger(message.max_memo_characters.high))) - return "max_memo_characters: integer|Long expected"; - if (message.tx_sig_limit != null && message.hasOwnProperty("tx_sig_limit")) - if (!$util.isInteger(message.tx_sig_limit) && !(message.tx_sig_limit && $util.isInteger(message.tx_sig_limit.low) && $util.isInteger(message.tx_sig_limit.high))) - return "tx_sig_limit: integer|Long expected"; - if (message.tx_size_cost_per_byte != null && message.hasOwnProperty("tx_size_cost_per_byte")) - if (!$util.isInteger(message.tx_size_cost_per_byte) && !(message.tx_size_cost_per_byte && $util.isInteger(message.tx_size_cost_per_byte.low) && $util.isInteger(message.tx_size_cost_per_byte.high))) - return "tx_size_cost_per_byte: integer|Long expected"; - if (message.sig_verify_cost_ed25519 != null && message.hasOwnProperty("sig_verify_cost_ed25519")) - if (!$util.isInteger(message.sig_verify_cost_ed25519) && !(message.sig_verify_cost_ed25519 && $util.isInteger(message.sig_verify_cost_ed25519.low) && $util.isInteger(message.sig_verify_cost_ed25519.high))) - return "sig_verify_cost_ed25519: integer|Long expected"; - if (message.sig_verify_cost_secp256k1 != null && message.hasOwnProperty("sig_verify_cost_secp256k1")) - if (!$util.isInteger(message.sig_verify_cost_secp256k1) && !(message.sig_verify_cost_secp256k1 && $util.isInteger(message.sig_verify_cost_secp256k1.low) && $util.isInteger(message.sig_verify_cost_secp256k1.high))) - return "sig_verify_cost_secp256k1: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.auth.v1beta1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.auth.v1beta1.Params) - return object; - let message = new $root.cosmos.auth.v1beta1.Params(); - if (object.max_memo_characters != null) - if ($util.Long) - (message.max_memo_characters = $util.Long.fromValue(object.max_memo_characters)).unsigned = true; - else if (typeof object.max_memo_characters === "string") - message.max_memo_characters = parseInt(object.max_memo_characters, 10); - else if (typeof object.max_memo_characters === "number") - message.max_memo_characters = object.max_memo_characters; - else if (typeof object.max_memo_characters === "object") - message.max_memo_characters = new $util.LongBits(object.max_memo_characters.low >>> 0, object.max_memo_characters.high >>> 0).toNumber(true); - if (object.tx_sig_limit != null) - if ($util.Long) - (message.tx_sig_limit = $util.Long.fromValue(object.tx_sig_limit)).unsigned = true; - else if (typeof object.tx_sig_limit === "string") - message.tx_sig_limit = parseInt(object.tx_sig_limit, 10); - else if (typeof object.tx_sig_limit === "number") - message.tx_sig_limit = object.tx_sig_limit; - else if (typeof object.tx_sig_limit === "object") - message.tx_sig_limit = new $util.LongBits(object.tx_sig_limit.low >>> 0, object.tx_sig_limit.high >>> 0).toNumber(true); - if (object.tx_size_cost_per_byte != null) - if ($util.Long) - (message.tx_size_cost_per_byte = $util.Long.fromValue(object.tx_size_cost_per_byte)).unsigned = true; - else if (typeof object.tx_size_cost_per_byte === "string") - message.tx_size_cost_per_byte = parseInt(object.tx_size_cost_per_byte, 10); - else if (typeof object.tx_size_cost_per_byte === "number") - message.tx_size_cost_per_byte = object.tx_size_cost_per_byte; - else if (typeof object.tx_size_cost_per_byte === "object") - message.tx_size_cost_per_byte = new $util.LongBits(object.tx_size_cost_per_byte.low >>> 0, object.tx_size_cost_per_byte.high >>> 0).toNumber(true); - if (object.sig_verify_cost_ed25519 != null) - if ($util.Long) - (message.sig_verify_cost_ed25519 = $util.Long.fromValue(object.sig_verify_cost_ed25519)).unsigned = true; - else if (typeof object.sig_verify_cost_ed25519 === "string") - message.sig_verify_cost_ed25519 = parseInt(object.sig_verify_cost_ed25519, 10); - else if (typeof object.sig_verify_cost_ed25519 === "number") - message.sig_verify_cost_ed25519 = object.sig_verify_cost_ed25519; - else if (typeof object.sig_verify_cost_ed25519 === "object") - message.sig_verify_cost_ed25519 = new $util.LongBits(object.sig_verify_cost_ed25519.low >>> 0, object.sig_verify_cost_ed25519.high >>> 0).toNumber(true); - if (object.sig_verify_cost_secp256k1 != null) - if ($util.Long) - (message.sig_verify_cost_secp256k1 = $util.Long.fromValue(object.sig_verify_cost_secp256k1)).unsigned = true; - else if (typeof object.sig_verify_cost_secp256k1 === "string") - message.sig_verify_cost_secp256k1 = parseInt(object.sig_verify_cost_secp256k1, 10); - else if (typeof object.sig_verify_cost_secp256k1 === "number") - message.sig_verify_cost_secp256k1 = object.sig_verify_cost_secp256k1; - else if (typeof object.sig_verify_cost_secp256k1 === "object") - message.sig_verify_cost_secp256k1 = new $util.LongBits(object.sig_verify_cost_secp256k1.low >>> 0, object.sig_verify_cost_secp256k1.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.auth.v1beta1.Params - * @static - * @param {cosmos.auth.v1beta1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.max_memo_characters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_memo_characters = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.tx_sig_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tx_sig_limit = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.tx_size_cost_per_byte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tx_size_cost_per_byte = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sig_verify_cost_ed25519 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sig_verify_cost_ed25519 = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sig_verify_cost_secp256k1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sig_verify_cost_secp256k1 = options.longs === String ? "0" : 0; - } - if (message.max_memo_characters != null && message.hasOwnProperty("max_memo_characters")) - if (typeof message.max_memo_characters === "number") - object.max_memo_characters = options.longs === String ? String(message.max_memo_characters) : message.max_memo_characters; - else - object.max_memo_characters = options.longs === String ? $util.Long.prototype.toString.call(message.max_memo_characters) : options.longs === Number ? new $util.LongBits(message.max_memo_characters.low >>> 0, message.max_memo_characters.high >>> 0).toNumber(true) : message.max_memo_characters; - if (message.tx_sig_limit != null && message.hasOwnProperty("tx_sig_limit")) - if (typeof message.tx_sig_limit === "number") - object.tx_sig_limit = options.longs === String ? String(message.tx_sig_limit) : message.tx_sig_limit; - else - object.tx_sig_limit = options.longs === String ? $util.Long.prototype.toString.call(message.tx_sig_limit) : options.longs === Number ? new $util.LongBits(message.tx_sig_limit.low >>> 0, message.tx_sig_limit.high >>> 0).toNumber(true) : message.tx_sig_limit; - if (message.tx_size_cost_per_byte != null && message.hasOwnProperty("tx_size_cost_per_byte")) - if (typeof message.tx_size_cost_per_byte === "number") - object.tx_size_cost_per_byte = options.longs === String ? String(message.tx_size_cost_per_byte) : message.tx_size_cost_per_byte; - else - object.tx_size_cost_per_byte = options.longs === String ? $util.Long.prototype.toString.call(message.tx_size_cost_per_byte) : options.longs === Number ? new $util.LongBits(message.tx_size_cost_per_byte.low >>> 0, message.tx_size_cost_per_byte.high >>> 0).toNumber(true) : message.tx_size_cost_per_byte; - if (message.sig_verify_cost_ed25519 != null && message.hasOwnProperty("sig_verify_cost_ed25519")) - if (typeof message.sig_verify_cost_ed25519 === "number") - object.sig_verify_cost_ed25519 = options.longs === String ? String(message.sig_verify_cost_ed25519) : message.sig_verify_cost_ed25519; - else - object.sig_verify_cost_ed25519 = options.longs === String ? $util.Long.prototype.toString.call(message.sig_verify_cost_ed25519) : options.longs === Number ? new $util.LongBits(message.sig_verify_cost_ed25519.low >>> 0, message.sig_verify_cost_ed25519.high >>> 0).toNumber(true) : message.sig_verify_cost_ed25519; - if (message.sig_verify_cost_secp256k1 != null && message.hasOwnProperty("sig_verify_cost_secp256k1")) - if (typeof message.sig_verify_cost_secp256k1 === "number") - object.sig_verify_cost_secp256k1 = options.longs === String ? String(message.sig_verify_cost_secp256k1) : message.sig_verify_cost_secp256k1; - else - object.sig_verify_cost_secp256k1 = options.longs === String ? $util.Long.prototype.toString.call(message.sig_verify_cost_secp256k1) : options.longs === Number ? new $util.LongBits(message.sig_verify_cost_secp256k1.low >>> 0, message.sig_verify_cost_secp256k1.high >>> 0).toNumber(true) : message.sig_verify_cost_secp256k1; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.auth.v1beta1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - return v1beta1; - })(); - - return auth; - })(); - - cosmos.ics23 = (function() { - - /** - * Namespace ics23. - * @memberof cosmos - * @namespace - */ - const ics23 = {}; - - ics23.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos.ics23 - * @namespace - */ - const v1 = {}; - - /** - * HashOp enum. - * @name cosmos.ics23.v1.HashOp - * @enum {number} - * @property {number} NO_HASH=0 NO_HASH value - * @property {number} SHA256=1 SHA256 value - * @property {number} SHA512=2 SHA512 value - * @property {number} KECCAK=3 KECCAK value - * @property {number} RIPEMD160=4 RIPEMD160 value - * @property {number} BITCOIN=5 BITCOIN value - * @property {number} SHA512_256=6 SHA512_256 value - */ - v1.HashOp = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NO_HASH"] = 0; - values[valuesById[1] = "SHA256"] = 1; - values[valuesById[2] = "SHA512"] = 2; - values[valuesById[3] = "KECCAK"] = 3; - values[valuesById[4] = "RIPEMD160"] = 4; - values[valuesById[5] = "BITCOIN"] = 5; - values[valuesById[6] = "SHA512_256"] = 6; - return values; - })(); - - /** - * LengthOp defines how to process the key and value of the LeafOp - * to include length information. After encoding the length with the given - * algorithm, the length will be prepended to the key and value bytes. - * (Each one with it's own encoded length) - * @name cosmos.ics23.v1.LengthOp - * @enum {number} - * @property {number} NO_PREFIX=0 NO_PREFIX value - * @property {number} VAR_PROTO=1 VAR_PROTO value - * @property {number} VAR_RLP=2 VAR_RLP value - * @property {number} FIXED32_BIG=3 FIXED32_BIG value - * @property {number} FIXED32_LITTLE=4 FIXED32_LITTLE value - * @property {number} FIXED64_BIG=5 FIXED64_BIG value - * @property {number} FIXED64_LITTLE=6 FIXED64_LITTLE value - * @property {number} REQUIRE_32_BYTES=7 REQUIRE_32_BYTES value - * @property {number} REQUIRE_64_BYTES=8 REQUIRE_64_BYTES value - */ - v1.LengthOp = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NO_PREFIX"] = 0; - values[valuesById[1] = "VAR_PROTO"] = 1; - values[valuesById[2] = "VAR_RLP"] = 2; - values[valuesById[3] = "FIXED32_BIG"] = 3; - values[valuesById[4] = "FIXED32_LITTLE"] = 4; - values[valuesById[5] = "FIXED64_BIG"] = 5; - values[valuesById[6] = "FIXED64_LITTLE"] = 6; - values[valuesById[7] = "REQUIRE_32_BYTES"] = 7; - values[valuesById[8] = "REQUIRE_64_BYTES"] = 8; - return values; - })(); - - v1.ExistenceProof = (function() { - - /** - * Properties of an ExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface IExistenceProof - * @property {Uint8Array|null} [key] ExistenceProof key - * @property {Uint8Array|null} [value] ExistenceProof value - * @property {cosmos.ics23.v1.ILeafOp|null} [leaf] ExistenceProof leaf - * @property {Array.|null} [path] ExistenceProof path - */ - - /** - * Constructs a new ExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc ExistenceProof takes a key and a value and a set of steps to perform on it. - * The result of peforming all these steps will provide a "root hash", which can - * be compared to the value in a header. - * - * Since it is computationally infeasible to produce a hash collission for any of the used - * cryptographic hash functions, if someone can provide a series of operations to transform - * a given key and value into a root hash that matches some trusted root, these key and values - * must be in the referenced merkle tree. - * - * The only possible issue is maliablity in LeafOp, such as providing extra prefix data, - * which should be controlled by a spec. Eg. with lengthOp as NONE, - * prefix = FOO, key = BAR, value = CHOICE - * and - * prefix = F, key = OOBAR, value = CHOICE - * would produce the same value. - * - * With LengthOp this is tricker but not impossible. Which is why the "leafPrefixEqual" field - * in the ProofSpec is valuable to prevent this mutability. And why all trees should - * length-prefix the data before hashing it. - * @implements IExistenceProof - * @constructor - * @param {cosmos.ics23.v1.IExistenceProof=} [properties] Properties to set - */ - function ExistenceProof(properties) { - this.path = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * ExistenceProof value. - * @member {Uint8Array} value - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.value = $util.newBuffer([]); - - /** - * ExistenceProof leaf. - * @member {cosmos.ics23.v1.ILeafOp|null|undefined} leaf - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.leaf = null; - - /** - * ExistenceProof path. - * @member {Array.} path - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - */ - ExistenceProof.prototype.path = $util.emptyArray; - - /** - * Encodes the specified ExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.ExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {cosmos.ics23.v1.IExistenceProof} message ExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExistenceProof.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); - if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) - $root.cosmos.ics23.v1.LeafOp.encode(message.leaf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.path != null && message.path.length) - for (let i = 0; i < message.path.length; ++i) - $root.cosmos.ics23.v1.InnerOp.encode(message.path[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.ExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {cosmos.ics23.v1.IExistenceProof} message ExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.ExistenceProof} ExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.ExistenceProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = $root.cosmos.ics23.v1.LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.path && message.path.length)) - message.path = []; - message.path.push($root.cosmos.ics23.v1.InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.ExistenceProof} ExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExistenceProof.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"; - if (message.leaf != null && message.hasOwnProperty("leaf")) { - let error = $root.cosmos.ics23.v1.LeafOp.verify(message.leaf); - if (error) - return "leaf." + error; - } - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (let i = 0; i < message.path.length; ++i) { - let error = $root.cosmos.ics23.v1.InnerOp.verify(message.path[i]); - if (error) - return "path." + error; - } - } - return null; - }; - - /** - * Creates an ExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.ExistenceProof} ExistenceProof - */ - ExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.ExistenceProof) - return object; - let message = new $root.cosmos.ics23.v1.ExistenceProof(); - 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.leaf != null) { - if (typeof object.leaf !== "object") - throw TypeError(".cosmos.ics23.v1.ExistenceProof.leaf: object expected"); - message.leaf = $root.cosmos.ics23.v1.LeafOp.fromObject(object.leaf); - } - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".cosmos.ics23.v1.ExistenceProof.path: array expected"); - message.path = []; - for (let i = 0; i < object.path.length; ++i) { - if (typeof object.path[i] !== "object") - throw TypeError(".cosmos.ics23.v1.ExistenceProof.path: object expected"); - message.path[i] = $root.cosmos.ics23.v1.InnerOp.fromObject(object.path[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an ExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.ExistenceProof - * @static - * @param {cosmos.ics23.v1.ExistenceProof} message ExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExistenceProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.path = []; - 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); - } - object.leaf = null; - } - 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.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.cosmos.ics23.v1.LeafOp.toObject(message.leaf, options); - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = $root.cosmos.ics23.v1.InnerOp.toObject(message.path[j], options); - } - return object; - }; - - /** - * Converts this ExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.ExistenceProof - * @instance - * @returns {Object.} JSON object - */ - ExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExistenceProof; - })(); - - v1.NonExistenceProof = (function() { - - /** - * Properties of a NonExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface INonExistenceProof - * @property {Uint8Array|null} [key] NonExistenceProof key - * @property {cosmos.ics23.v1.IExistenceProof|null} [left] NonExistenceProof left - * @property {cosmos.ics23.v1.IExistenceProof|null} [right] NonExistenceProof right - */ - - /** - * Constructs a new NonExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a NonExistenceProof. - * @implements INonExistenceProof - * @constructor - * @param {cosmos.ics23.v1.INonExistenceProof=} [properties] Properties to set - */ - function NonExistenceProof(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NonExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - */ - NonExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * NonExistenceProof left. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} left - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - */ - NonExistenceProof.prototype.left = null; - - /** - * NonExistenceProof right. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} right - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - */ - NonExistenceProof.prototype.right = null; - - /** - * Encodes the specified NonExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.NonExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {cosmos.ics23.v1.INonExistenceProof} message NonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NonExistenceProof.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.left != null && Object.hasOwnProperty.call(message, "left")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.left, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.right != null && Object.hasOwnProperty.call(message, "right")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.right, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NonExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.NonExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {cosmos.ics23.v1.INonExistenceProof} message NonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NonExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NonExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.NonExistenceProof} NonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NonExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.NonExistenceProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NonExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.NonExistenceProof} NonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NonExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NonExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NonExistenceProof.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.left != null && message.hasOwnProperty("left")) { - let error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.left); - if (error) - return "left." + error; - } - if (message.right != null && message.hasOwnProperty("right")) { - let error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.right); - if (error) - return "right." + error; - } - return null; - }; - - /** - * Creates a NonExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.NonExistenceProof} NonExistenceProof - */ - NonExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.NonExistenceProof) - return object; - let message = new $root.cosmos.ics23.v1.NonExistenceProof(); - 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.left != null) { - if (typeof object.left !== "object") - throw TypeError(".cosmos.ics23.v1.NonExistenceProof.left: object expected"); - message.left = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.left); - } - if (object.right != null) { - if (typeof object.right !== "object") - throw TypeError(".cosmos.ics23.v1.NonExistenceProof.right: object expected"); - message.right = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.right); - } - return message; - }; - - /** - * Creates a plain object from a NonExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.NonExistenceProof - * @static - * @param {cosmos.ics23.v1.NonExistenceProof} message NonExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NonExistenceProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - object.left = null; - object.right = null; - } - 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.left != null && message.hasOwnProperty("left")) - object.left = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.left, options); - if (message.right != null && message.hasOwnProperty("right")) - object.right = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.right, options); - return object; - }; - - /** - * Converts this NonExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.NonExistenceProof - * @instance - * @returns {Object.} JSON object - */ - NonExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NonExistenceProof; - })(); - - v1.CommitmentProof = (function() { - - /** - * Properties of a CommitmentProof. - * @memberof cosmos.ics23.v1 - * @interface ICommitmentProof - * @property {cosmos.ics23.v1.IExistenceProof|null} [exist] CommitmentProof exist - * @property {cosmos.ics23.v1.INonExistenceProof|null} [nonexist] CommitmentProof nonexist - * @property {cosmos.ics23.v1.IBatchProof|null} [batch] CommitmentProof batch - * @property {cosmos.ics23.v1.ICompressedBatchProof|null} [compressed] CommitmentProof compressed - */ - - /** - * Constructs a new CommitmentProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CommitmentProof. - * @implements ICommitmentProof - * @constructor - * @param {cosmos.ics23.v1.ICommitmentProof=} [properties] Properties to set - */ - function CommitmentProof(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitmentProof exist. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} exist - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.exist = null; - - /** - * CommitmentProof nonexist. - * @member {cosmos.ics23.v1.INonExistenceProof|null|undefined} nonexist - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.nonexist = null; - - /** - * CommitmentProof batch. - * @member {cosmos.ics23.v1.IBatchProof|null|undefined} batch - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.batch = null; - - /** - * CommitmentProof compressed. - * @member {cosmos.ics23.v1.ICompressedBatchProof|null|undefined} compressed - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - CommitmentProof.prototype.compressed = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * CommitmentProof proof. - * @member {"exist"|"nonexist"|"batch"|"compressed"|undefined} proof - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - */ - Object.defineProperty(CommitmentProof.prototype, "proof", { - get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist", "batch", "compressed"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified CommitmentProof message. Does not implicitly {@link cosmos.ics23.v1.CommitmentProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {cosmos.ics23.v1.ICommitmentProof} message CommitmentProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitmentProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) - $root.cosmos.ics23.v1.NonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.batch != null && Object.hasOwnProperty.call(message, "batch")) - $root.cosmos.ics23.v1.BatchProof.encode(message.batch, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.compressed != null && Object.hasOwnProperty.call(message, "compressed")) - $root.cosmos.ics23.v1.CompressedBatchProof.encode(message.compressed, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CommitmentProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CommitmentProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {cosmos.ics23.v1.ICommitmentProof} message CommitmentProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitmentProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitmentProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CommitmentProof} CommitmentProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitmentProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CommitmentProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.batch = $root.cosmos.ics23.v1.BatchProof.decode(reader, reader.uint32()); - break; - case 4: - message.compressed = $root.cosmos.ics23.v1.CompressedBatchProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitmentProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CommitmentProof} CommitmentProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitmentProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitmentProof message. - * @function verify - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitmentProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.exist); - if (error) - return "exist." + error; - } - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.NonExistenceProof.verify(message.nonexist); - if (error) - return "nonexist." + error; - } - } - if (message.batch != null && message.hasOwnProperty("batch")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.BatchProof.verify(message.batch); - if (error) - return "batch." + error; - } - } - if (message.compressed != null && message.hasOwnProperty("compressed")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.CompressedBatchProof.verify(message.compressed); - if (error) - return "compressed." + error; - } - } - return null; - }; - - /** - * Creates a CommitmentProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CommitmentProof} CommitmentProof - */ - CommitmentProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CommitmentProof) - return object; - let message = new $root.cosmos.ics23.v1.CommitmentProof(); - if (object.exist != null) { - if (typeof object.exist !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.exist: object expected"); - message.exist = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.exist); - } - if (object.nonexist != null) { - if (typeof object.nonexist !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.nonexist: object expected"); - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.fromObject(object.nonexist); - } - if (object.batch != null) { - if (typeof object.batch !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.batch: object expected"); - message.batch = $root.cosmos.ics23.v1.BatchProof.fromObject(object.batch); - } - if (object.compressed != null) { - if (typeof object.compressed !== "object") - throw TypeError(".cosmos.ics23.v1.CommitmentProof.compressed: object expected"); - message.compressed = $root.cosmos.ics23.v1.CompressedBatchProof.fromObject(object.compressed); - } - return message; - }; - - /** - * Creates a plain object from a CommitmentProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CommitmentProof - * @static - * @param {cosmos.ics23.v1.CommitmentProof} message CommitmentProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitmentProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - object.exist = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.exist, options); - if (options.oneofs) - object.proof = "exist"; - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - object.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.toObject(message.nonexist, options); - if (options.oneofs) - object.proof = "nonexist"; - } - if (message.batch != null && message.hasOwnProperty("batch")) { - object.batch = $root.cosmos.ics23.v1.BatchProof.toObject(message.batch, options); - if (options.oneofs) - object.proof = "batch"; - } - if (message.compressed != null && message.hasOwnProperty("compressed")) { - object.compressed = $root.cosmos.ics23.v1.CompressedBatchProof.toObject(message.compressed, options); - if (options.oneofs) - object.proof = "compressed"; - } - return object; - }; - - /** - * Converts this CommitmentProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CommitmentProof - * @instance - * @returns {Object.} JSON object - */ - CommitmentProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitmentProof; - })(); - - v1.LeafOp = (function() { - - /** - * Properties of a LeafOp. - * @memberof cosmos.ics23.v1 - * @interface ILeafOp - * @property {cosmos.ics23.v1.HashOp|null} [hash] LeafOp hash - * @property {cosmos.ics23.v1.HashOp|null} [prehash_key] LeafOp prehash_key - * @property {cosmos.ics23.v1.HashOp|null} [prehash_value] LeafOp prehash_value - * @property {cosmos.ics23.v1.LengthOp|null} [length] LeafOp length - * @property {Uint8Array|null} [prefix] LeafOp prefix - */ - - /** - * Constructs a new LeafOp. - * @memberof cosmos.ics23.v1 - * @classdesc LeafOp represents the raw key-value data we wish to prove, and - * must be flexible to represent the internal transformation from - * the original key-value pairs into the basis hash, for many existing - * merkle trees. - * - * key and value are passed in. So that the signature of this operation is: - * leafOp(key, value) -> output - * - * To process this, first prehash the keys and values if needed (ANY means no hash in this case): - * hkey = prehashKey(key) - * hvalue = prehashValue(value) - * - * Then combine the bytes, and hash it - * output = hash(prefix || length(hkey) || hkey || length(hvalue) || hvalue) - * @implements ILeafOp - * @constructor - * @param {cosmos.ics23.v1.ILeafOp=} [properties] Properties to set - */ - function LeafOp(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LeafOp hash. - * @member {cosmos.ics23.v1.HashOp} hash - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.hash = 0; - - /** - * LeafOp prehash_key. - * @member {cosmos.ics23.v1.HashOp} prehash_key - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.prehash_key = 0; - - /** - * LeafOp prehash_value. - * @member {cosmos.ics23.v1.HashOp} prehash_value - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.prehash_value = 0; - - /** - * LeafOp length. - * @member {cosmos.ics23.v1.LengthOp} length - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.length = 0; - - /** - * LeafOp prefix. - * @member {Uint8Array} prefix - * @memberof cosmos.ics23.v1.LeafOp - * @instance - */ - LeafOp.prototype.prefix = $util.newBuffer([]); - - /** - * Encodes the specified LeafOp message. Does not implicitly {@link cosmos.ics23.v1.LeafOp.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {cosmos.ics23.v1.ILeafOp} message LeafOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LeafOp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hash); - if (message.prehash_key != null && Object.hasOwnProperty.call(message, "prehash_key")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.prehash_key); - if (message.prehash_value != null && Object.hasOwnProperty.call(message, "prehash_value")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.prehash_value); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.length); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.prefix); - return writer; - }; - - /** - * Encodes the specified LeafOp message, length delimited. Does not implicitly {@link cosmos.ics23.v1.LeafOp.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {cosmos.ics23.v1.ILeafOp} message LeafOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LeafOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LeafOp message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.LeafOp} LeafOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LeafOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.LeafOp(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32(); - break; - case 2: - message.prehash_key = reader.int32(); - break; - case 3: - message.prehash_value = reader.int32(); - break; - case 4: - message.length = reader.int32(); - break; - case 5: - message.prefix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LeafOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.LeafOp} LeafOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LeafOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LeafOp message. - * @function verify - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LeafOp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - switch (message.hash) { - default: - return "hash: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.prehash_key != null && message.hasOwnProperty("prehash_key")) - switch (message.prehash_key) { - default: - return "prehash_key: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.prehash_value != null && message.hasOwnProperty("prehash_value")) - switch (message.prehash_value) { - default: - return "prehash_value: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.length != null && message.hasOwnProperty("length")) - switch (message.length) { - default: - return "length: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.prefix != null && message.hasOwnProperty("prefix")) - if (!(message.prefix && typeof message.prefix.length === "number" || $util.isString(message.prefix))) - return "prefix: buffer expected"; - return null; - }; - - /** - * Creates a LeafOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.LeafOp} LeafOp - */ - LeafOp.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.LeafOp) - return object; - let message = new $root.cosmos.ics23.v1.LeafOp(); - switch (object.hash) { - case "NO_HASH": - case 0: - message.hash = 0; - break; - case "SHA256": - case 1: - message.hash = 1; - break; - case "SHA512": - case 2: - message.hash = 2; - break; - case "KECCAK": - case 3: - message.hash = 3; - break; - case "RIPEMD160": - case 4: - message.hash = 4; - break; - case "BITCOIN": - case 5: - message.hash = 5; - break; - case "SHA512_256": - case 6: - message.hash = 6; - break; - } - switch (object.prehash_key) { - case "NO_HASH": - case 0: - message.prehash_key = 0; - break; - case "SHA256": - case 1: - message.prehash_key = 1; - break; - case "SHA512": - case 2: - message.prehash_key = 2; - break; - case "KECCAK": - case 3: - message.prehash_key = 3; - break; - case "RIPEMD160": - case 4: - message.prehash_key = 4; - break; - case "BITCOIN": - case 5: - message.prehash_key = 5; - break; - case "SHA512_256": - case 6: - message.prehash_key = 6; - break; - } - switch (object.prehash_value) { - case "NO_HASH": - case 0: - message.prehash_value = 0; - break; - case "SHA256": - case 1: - message.prehash_value = 1; - break; - case "SHA512": - case 2: - message.prehash_value = 2; - break; - case "KECCAK": - case 3: - message.prehash_value = 3; - break; - case "RIPEMD160": - case 4: - message.prehash_value = 4; - break; - case "BITCOIN": - case 5: - message.prehash_value = 5; - break; - case "SHA512_256": - case 6: - message.prehash_value = 6; - break; - } - switch (object.length) { - case "NO_PREFIX": - case 0: - message.length = 0; - break; - case "VAR_PROTO": - case 1: - message.length = 1; - break; - case "VAR_RLP": - case 2: - message.length = 2; - break; - case "FIXED32_BIG": - case 3: - message.length = 3; - break; - case "FIXED32_LITTLE": - case 4: - message.length = 4; - break; - case "FIXED64_BIG": - case 5: - message.length = 5; - break; - case "FIXED64_LITTLE": - case 6: - message.length = 6; - break; - case "REQUIRE_32_BYTES": - case 7: - message.length = 7; - break; - case "REQUIRE_64_BYTES": - case 8: - message.length = 8; - break; - } - if (object.prefix != null) - if (typeof object.prefix === "string") - $util.base64.decode(object.prefix, message.prefix = $util.newBuffer($util.base64.length(object.prefix)), 0); - else if (object.prefix.length) - message.prefix = object.prefix; - return message; - }; - - /** - * Creates a plain object from a LeafOp message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.LeafOp - * @static - * @param {cosmos.ics23.v1.LeafOp} message LeafOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LeafOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.hash = options.enums === String ? "NO_HASH" : 0; - object.prehash_key = options.enums === String ? "NO_HASH" : 0; - object.prehash_value = options.enums === String ? "NO_HASH" : 0; - object.length = options.enums === String ? "NO_PREFIX" : 0; - if (options.bytes === String) - object.prefix = ""; - else { - object.prefix = []; - if (options.bytes !== Array) - object.prefix = $util.newBuffer(object.prefix); - } - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.hash] : message.hash; - if (message.prehash_key != null && message.hasOwnProperty("prehash_key")) - object.prehash_key = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.prehash_key] : message.prehash_key; - if (message.prehash_value != null && message.hasOwnProperty("prehash_value")) - object.prehash_value = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.prehash_value] : message.prehash_value; - if (message.length != null && message.hasOwnProperty("length")) - object.length = options.enums === String ? $root.cosmos.ics23.v1.LengthOp[message.length] : message.length; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = options.bytes === String ? $util.base64.encode(message.prefix, 0, message.prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.prefix) : message.prefix; - return object; - }; - - /** - * Converts this LeafOp to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.LeafOp - * @instance - * @returns {Object.} JSON object - */ - LeafOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LeafOp; - })(); - - v1.InnerOp = (function() { - - /** - * Properties of an InnerOp. - * @memberof cosmos.ics23.v1 - * @interface IInnerOp - * @property {cosmos.ics23.v1.HashOp|null} [hash] InnerOp hash - * @property {Uint8Array|null} [prefix] InnerOp prefix - * @property {Uint8Array|null} [suffix] InnerOp suffix - */ - - /** - * Constructs a new InnerOp. - * @memberof cosmos.ics23.v1 - * @classdesc InnerOp represents a merkle-proof step that is not a leaf. - * It represents concatenating two children and hashing them to provide the next result. - * - * The result of the previous step is passed in, so the signature of this op is: - * innerOp(child) -> output - * - * The result of applying InnerOp should be: - * output = op.hash(op.prefix || child || op.suffix) - * - * where the || operator is concatenation of binary data, - * and child is the result of hashing all the tree below this step. - * - * Any special data, like prepending child with the length, or prepending the entire operation with - * some value to differentiate from leaf nodes, should be included in prefix and suffix. - * If either of prefix or suffix is empty, we just treat it as an empty string - * @implements IInnerOp - * @constructor - * @param {cosmos.ics23.v1.IInnerOp=} [properties] Properties to set - */ - function InnerOp(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InnerOp hash. - * @member {cosmos.ics23.v1.HashOp} hash - * @memberof cosmos.ics23.v1.InnerOp - * @instance - */ - InnerOp.prototype.hash = 0; - - /** - * InnerOp prefix. - * @member {Uint8Array} prefix - * @memberof cosmos.ics23.v1.InnerOp - * @instance - */ - InnerOp.prototype.prefix = $util.newBuffer([]); - - /** - * InnerOp suffix. - * @member {Uint8Array} suffix - * @memberof cosmos.ics23.v1.InnerOp - * @instance - */ - InnerOp.prototype.suffix = $util.newBuffer([]); - - /** - * Encodes the specified InnerOp message. Does not implicitly {@link cosmos.ics23.v1.InnerOp.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {cosmos.ics23.v1.IInnerOp} message InnerOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerOp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hash); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.prefix); - if (message.suffix != null && Object.hasOwnProperty.call(message, "suffix")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.suffix); - return writer; - }; - - /** - * Encodes the specified InnerOp message, length delimited. Does not implicitly {@link cosmos.ics23.v1.InnerOp.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {cosmos.ics23.v1.IInnerOp} message InnerOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InnerOp message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.InnerOp} InnerOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.InnerOp(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.int32(); - break; - case 2: - message.prefix = reader.bytes(); - break; - case 3: - message.suffix = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InnerOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.InnerOp} InnerOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InnerOp message. - * @function verify - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InnerOp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - switch (message.hash) { - default: - return "hash: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.prefix != null && message.hasOwnProperty("prefix")) - if (!(message.prefix && typeof message.prefix.length === "number" || $util.isString(message.prefix))) - return "prefix: buffer expected"; - if (message.suffix != null && message.hasOwnProperty("suffix")) - if (!(message.suffix && typeof message.suffix.length === "number" || $util.isString(message.suffix))) - return "suffix: buffer expected"; - return null; - }; - - /** - * Creates an InnerOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.InnerOp} InnerOp - */ - InnerOp.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.InnerOp) - return object; - let message = new $root.cosmos.ics23.v1.InnerOp(); - switch (object.hash) { - case "NO_HASH": - case 0: - message.hash = 0; - break; - case "SHA256": - case 1: - message.hash = 1; - break; - case "SHA512": - case 2: - message.hash = 2; - break; - case "KECCAK": - case 3: - message.hash = 3; - break; - case "RIPEMD160": - case 4: - message.hash = 4; - break; - case "BITCOIN": - case 5: - message.hash = 5; - break; - case "SHA512_256": - case 6: - message.hash = 6; - break; - } - if (object.prefix != null) - if (typeof object.prefix === "string") - $util.base64.decode(object.prefix, message.prefix = $util.newBuffer($util.base64.length(object.prefix)), 0); - else if (object.prefix.length) - message.prefix = object.prefix; - if (object.suffix != null) - if (typeof object.suffix === "string") - $util.base64.decode(object.suffix, message.suffix = $util.newBuffer($util.base64.length(object.suffix)), 0); - else if (object.suffix.length) - message.suffix = object.suffix; - return message; - }; - - /** - * Creates a plain object from an InnerOp message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.InnerOp - * @static - * @param {cosmos.ics23.v1.InnerOp} message InnerOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InnerOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.hash = options.enums === String ? "NO_HASH" : 0; - if (options.bytes === String) - object.prefix = ""; - else { - object.prefix = []; - if (options.bytes !== Array) - object.prefix = $util.newBuffer(object.prefix); - } - if (options.bytes === String) - object.suffix = ""; - else { - object.suffix = []; - if (options.bytes !== Array) - object.suffix = $util.newBuffer(object.suffix); - } - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.hash] : message.hash; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = options.bytes === String ? $util.base64.encode(message.prefix, 0, message.prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.prefix) : message.prefix; - if (message.suffix != null && message.hasOwnProperty("suffix")) - object.suffix = options.bytes === String ? $util.base64.encode(message.suffix, 0, message.suffix.length) : options.bytes === Array ? Array.prototype.slice.call(message.suffix) : message.suffix; - return object; - }; - - /** - * Converts this InnerOp to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.InnerOp - * @instance - * @returns {Object.} JSON object - */ - InnerOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InnerOp; - })(); - - v1.ProofSpec = (function() { - - /** - * Properties of a ProofSpec. - * @memberof cosmos.ics23.v1 - * @interface IProofSpec - * @property {cosmos.ics23.v1.ILeafOp|null} [leaf_spec] ProofSpec leaf_spec - * @property {cosmos.ics23.v1.IInnerSpec|null} [inner_spec] ProofSpec inner_spec - * @property {number|null} [max_depth] ProofSpec max_depth - * @property {number|null} [min_depth] ProofSpec min_depth - */ - - /** - * Constructs a new ProofSpec. - * @memberof cosmos.ics23.v1 - * @classdesc ProofSpec defines what the expected parameters are for a given proof type. - * This can be stored in the client and used to validate any incoming proofs. - * - * verify(ProofSpec, Proof) -> Proof | Error - * - * As demonstrated in tests, if we don't fix the algorithm used to calculate the - * LeafHash for a given tree, there are many possible key-value pairs that can - * generate a given hash (by interpretting the preimage differently). - * We need this for proper security, requires client knows a priori what - * tree format server uses. But not in code, rather a configuration object. - * @implements IProofSpec - * @constructor - * @param {cosmos.ics23.v1.IProofSpec=} [properties] Properties to set - */ - function ProofSpec(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProofSpec leaf_spec. - * @member {cosmos.ics23.v1.ILeafOp|null|undefined} leaf_spec - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.leaf_spec = null; - - /** - * ProofSpec inner_spec. - * @member {cosmos.ics23.v1.IInnerSpec|null|undefined} inner_spec - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.inner_spec = null; - - /** - * ProofSpec max_depth. - * @member {number} max_depth - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.max_depth = 0; - - /** - * ProofSpec min_depth. - * @member {number} min_depth - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - */ - ProofSpec.prototype.min_depth = 0; - - /** - * Encodes the specified ProofSpec message. Does not implicitly {@link cosmos.ics23.v1.ProofSpec.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {cosmos.ics23.v1.IProofSpec} message ProofSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.leaf_spec != null && Object.hasOwnProperty.call(message, "leaf_spec")) - $root.cosmos.ics23.v1.LeafOp.encode(message.leaf_spec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.inner_spec != null && Object.hasOwnProperty.call(message, "inner_spec")) - $root.cosmos.ics23.v1.InnerSpec.encode(message.inner_spec, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.max_depth != null && Object.hasOwnProperty.call(message, "max_depth")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.max_depth); - if (message.min_depth != null && Object.hasOwnProperty.call(message, "min_depth")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.min_depth); - return writer; - }; - - /** - * Encodes the specified ProofSpec message, length delimited. Does not implicitly {@link cosmos.ics23.v1.ProofSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {cosmos.ics23.v1.IProofSpec} message ProofSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProofSpec message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.ProofSpec} ProofSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.ProofSpec(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.leaf_spec = $root.cosmos.ics23.v1.LeafOp.decode(reader, reader.uint32()); - break; - case 2: - message.inner_spec = $root.cosmos.ics23.v1.InnerSpec.decode(reader, reader.uint32()); - break; - case 3: - message.max_depth = reader.int32(); - break; - case 4: - message.min_depth = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProofSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.ProofSpec} ProofSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProofSpec message. - * @function verify - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProofSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.leaf_spec != null && message.hasOwnProperty("leaf_spec")) { - let error = $root.cosmos.ics23.v1.LeafOp.verify(message.leaf_spec); - if (error) - return "leaf_spec." + error; - } - if (message.inner_spec != null && message.hasOwnProperty("inner_spec")) { - let error = $root.cosmos.ics23.v1.InnerSpec.verify(message.inner_spec); - if (error) - return "inner_spec." + error; - } - if (message.max_depth != null && message.hasOwnProperty("max_depth")) - if (!$util.isInteger(message.max_depth)) - return "max_depth: integer expected"; - if (message.min_depth != null && message.hasOwnProperty("min_depth")) - if (!$util.isInteger(message.min_depth)) - return "min_depth: integer expected"; - return null; - }; - - /** - * Creates a ProofSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.ProofSpec} ProofSpec - */ - ProofSpec.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.ProofSpec) - return object; - let message = new $root.cosmos.ics23.v1.ProofSpec(); - if (object.leaf_spec != null) { - if (typeof object.leaf_spec !== "object") - throw TypeError(".cosmos.ics23.v1.ProofSpec.leaf_spec: object expected"); - message.leaf_spec = $root.cosmos.ics23.v1.LeafOp.fromObject(object.leaf_spec); - } - if (object.inner_spec != null) { - if (typeof object.inner_spec !== "object") - throw TypeError(".cosmos.ics23.v1.ProofSpec.inner_spec: object expected"); - message.inner_spec = $root.cosmos.ics23.v1.InnerSpec.fromObject(object.inner_spec); - } - if (object.max_depth != null) - message.max_depth = object.max_depth | 0; - if (object.min_depth != null) - message.min_depth = object.min_depth | 0; - return message; - }; - - /** - * Creates a plain object from a ProofSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.ProofSpec - * @static - * @param {cosmos.ics23.v1.ProofSpec} message ProofSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.leaf_spec = null; - object.inner_spec = null; - object.max_depth = 0; - object.min_depth = 0; - } - if (message.leaf_spec != null && message.hasOwnProperty("leaf_spec")) - object.leaf_spec = $root.cosmos.ics23.v1.LeafOp.toObject(message.leaf_spec, options); - if (message.inner_spec != null && message.hasOwnProperty("inner_spec")) - object.inner_spec = $root.cosmos.ics23.v1.InnerSpec.toObject(message.inner_spec, options); - if (message.max_depth != null && message.hasOwnProperty("max_depth")) - object.max_depth = message.max_depth; - if (message.min_depth != null && message.hasOwnProperty("min_depth")) - object.min_depth = message.min_depth; - return object; - }; - - /** - * Converts this ProofSpec to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.ProofSpec - * @instance - * @returns {Object.} JSON object - */ - ProofSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofSpec; - })(); - - v1.InnerSpec = (function() { - - /** - * Properties of an InnerSpec. - * @memberof cosmos.ics23.v1 - * @interface IInnerSpec - * @property {Array.|null} [child_order] InnerSpec child_order - * @property {number|null} [child_size] InnerSpec child_size - * @property {number|null} [min_prefix_length] InnerSpec min_prefix_length - * @property {number|null} [max_prefix_length] InnerSpec max_prefix_length - * @property {Uint8Array|null} [empty_child] InnerSpec empty_child - * @property {cosmos.ics23.v1.HashOp|null} [hash] InnerSpec hash - */ - - /** - * Constructs a new InnerSpec. - * @memberof cosmos.ics23.v1 - * @classdesc Represents an InnerSpec. - * @implements IInnerSpec - * @constructor - * @param {cosmos.ics23.v1.IInnerSpec=} [properties] Properties to set - */ - function InnerSpec(properties) { - this.child_order = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InnerSpec child_order. - * @member {Array.} child_order - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.child_order = $util.emptyArray; - - /** - * InnerSpec child_size. - * @member {number} child_size - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.child_size = 0; - - /** - * InnerSpec min_prefix_length. - * @member {number} min_prefix_length - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.min_prefix_length = 0; - - /** - * InnerSpec max_prefix_length. - * @member {number} max_prefix_length - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.max_prefix_length = 0; - - /** - * InnerSpec empty_child. - * @member {Uint8Array} empty_child - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.empty_child = $util.newBuffer([]); - - /** - * InnerSpec hash. - * @member {cosmos.ics23.v1.HashOp} hash - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - */ - InnerSpec.prototype.hash = 0; - - /** - * Encodes the specified InnerSpec message. Does not implicitly {@link cosmos.ics23.v1.InnerSpec.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {cosmos.ics23.v1.IInnerSpec} message InnerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.child_order != null && message.child_order.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (let i = 0; i < message.child_order.length; ++i) - writer.int32(message.child_order[i]); - writer.ldelim(); - } - if (message.child_size != null && Object.hasOwnProperty.call(message, "child_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.child_size); - if (message.min_prefix_length != null && Object.hasOwnProperty.call(message, "min_prefix_length")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.min_prefix_length); - if (message.max_prefix_length != null && Object.hasOwnProperty.call(message, "max_prefix_length")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.max_prefix_length); - if (message.empty_child != null && Object.hasOwnProperty.call(message, "empty_child")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.empty_child); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.hash); - return writer; - }; - - /** - * Encodes the specified InnerSpec message, length delimited. Does not implicitly {@link cosmos.ics23.v1.InnerSpec.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {cosmos.ics23.v1.IInnerSpec} message InnerSpec message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InnerSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InnerSpec message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.InnerSpec} InnerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerSpec.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.InnerSpec(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.child_order && message.child_order.length)) - message.child_order = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.child_order.push(reader.int32()); - } else - message.child_order.push(reader.int32()); - break; - case 2: - message.child_size = reader.int32(); - break; - case 3: - message.min_prefix_length = reader.int32(); - break; - case 4: - message.max_prefix_length = reader.int32(); - break; - case 5: - message.empty_child = reader.bytes(); - break; - case 6: - message.hash = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InnerSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.InnerSpec} InnerSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InnerSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InnerSpec message. - * @function verify - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InnerSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.child_order != null && message.hasOwnProperty("child_order")) { - if (!Array.isArray(message.child_order)) - return "child_order: array expected"; - for (let i = 0; i < message.child_order.length; ++i) - if (!$util.isInteger(message.child_order[i])) - return "child_order: integer[] expected"; - } - if (message.child_size != null && message.hasOwnProperty("child_size")) - if (!$util.isInteger(message.child_size)) - return "child_size: integer expected"; - if (message.min_prefix_length != null && message.hasOwnProperty("min_prefix_length")) - if (!$util.isInteger(message.min_prefix_length)) - return "min_prefix_length: integer expected"; - if (message.max_prefix_length != null && message.hasOwnProperty("max_prefix_length")) - if (!$util.isInteger(message.max_prefix_length)) - return "max_prefix_length: integer expected"; - if (message.empty_child != null && message.hasOwnProperty("empty_child")) - if (!(message.empty_child && typeof message.empty_child.length === "number" || $util.isString(message.empty_child))) - return "empty_child: buffer expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - switch (message.hash) { - default: - return "hash: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - return null; - }; - - /** - * Creates an InnerSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.InnerSpec} InnerSpec - */ - InnerSpec.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.InnerSpec) - return object; - let message = new $root.cosmos.ics23.v1.InnerSpec(); - if (object.child_order) { - if (!Array.isArray(object.child_order)) - throw TypeError(".cosmos.ics23.v1.InnerSpec.child_order: array expected"); - message.child_order = []; - for (let i = 0; i < object.child_order.length; ++i) - message.child_order[i] = object.child_order[i] | 0; - } - if (object.child_size != null) - message.child_size = object.child_size | 0; - if (object.min_prefix_length != null) - message.min_prefix_length = object.min_prefix_length | 0; - if (object.max_prefix_length != null) - message.max_prefix_length = object.max_prefix_length | 0; - if (object.empty_child != null) - if (typeof object.empty_child === "string") - $util.base64.decode(object.empty_child, message.empty_child = $util.newBuffer($util.base64.length(object.empty_child)), 0); - else if (object.empty_child.length) - message.empty_child = object.empty_child; - switch (object.hash) { - case "NO_HASH": - case 0: - message.hash = 0; - break; - case "SHA256": - case 1: - message.hash = 1; - break; - case "SHA512": - case 2: - message.hash = 2; - break; - case "KECCAK": - case 3: - message.hash = 3; - break; - case "RIPEMD160": - case 4: - message.hash = 4; - break; - case "BITCOIN": - case 5: - message.hash = 5; - break; - case "SHA512_256": - case 6: - message.hash = 6; - break; - } - return message; - }; - - /** - * Creates a plain object from an InnerSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.InnerSpec - * @static - * @param {cosmos.ics23.v1.InnerSpec} message InnerSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InnerSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.child_order = []; - if (options.defaults) { - object.child_size = 0; - object.min_prefix_length = 0; - object.max_prefix_length = 0; - if (options.bytes === String) - object.empty_child = ""; - else { - object.empty_child = []; - if (options.bytes !== Array) - object.empty_child = $util.newBuffer(object.empty_child); - } - object.hash = options.enums === String ? "NO_HASH" : 0; - } - if (message.child_order && message.child_order.length) { - object.child_order = []; - for (let j = 0; j < message.child_order.length; ++j) - object.child_order[j] = message.child_order[j]; - } - if (message.child_size != null && message.hasOwnProperty("child_size")) - object.child_size = message.child_size; - if (message.min_prefix_length != null && message.hasOwnProperty("min_prefix_length")) - object.min_prefix_length = message.min_prefix_length; - if (message.max_prefix_length != null && message.hasOwnProperty("max_prefix_length")) - object.max_prefix_length = message.max_prefix_length; - if (message.empty_child != null && message.hasOwnProperty("empty_child")) - object.empty_child = options.bytes === String ? $util.base64.encode(message.empty_child, 0, message.empty_child.length) : options.bytes === Array ? Array.prototype.slice.call(message.empty_child) : message.empty_child; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.enums === String ? $root.cosmos.ics23.v1.HashOp[message.hash] : message.hash; - return object; - }; - - /** - * Converts this InnerSpec to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.InnerSpec - * @instance - * @returns {Object.} JSON object - */ - InnerSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InnerSpec; - })(); - - v1.BatchProof = (function() { - - /** - * Properties of a BatchProof. - * @memberof cosmos.ics23.v1 - * @interface IBatchProof - * @property {Array.|null} [entries] BatchProof entries - */ - - /** - * Constructs a new BatchProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a BatchProof. - * @implements IBatchProof - * @constructor - * @param {cosmos.ics23.v1.IBatchProof=} [properties] Properties to set - */ - function BatchProof(properties) { - this.entries = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchProof entries. - * @member {Array.} entries - * @memberof cosmos.ics23.v1.BatchProof - * @instance - */ - BatchProof.prototype.entries = $util.emptyArray; - - /** - * Encodes the specified BatchProof message. Does not implicitly {@link cosmos.ics23.v1.BatchProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {cosmos.ics23.v1.IBatchProof} message BatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (let i = 0; i < message.entries.length; ++i) - $root.cosmos.ics23.v1.BatchEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.BatchProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {cosmos.ics23.v1.IBatchProof} message BatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.BatchProof} BatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.BatchProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.cosmos.ics23.v1.BatchEntry.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.BatchProof} BatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchProof message. - * @function verify - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (let i = 0; i < message.entries.length; ++i) { - let error = $root.cosmos.ics23.v1.BatchEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - return null; - }; - - /** - * Creates a BatchProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.BatchProof} BatchProof - */ - BatchProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.BatchProof) - return object; - let message = new $root.cosmos.ics23.v1.BatchProof(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".cosmos.ics23.v1.BatchProof.entries: array expected"); - message.entries = []; - for (let i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".cosmos.ics23.v1.BatchProof.entries: object expected"); - message.entries[i] = $root.cosmos.ics23.v1.BatchEntry.fromObject(object.entries[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BatchProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.BatchProof - * @static - * @param {cosmos.ics23.v1.BatchProof} message BatchProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (message.entries && message.entries.length) { - object.entries = []; - for (let j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.cosmos.ics23.v1.BatchEntry.toObject(message.entries[j], options); - } - return object; - }; - - /** - * Converts this BatchProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.BatchProof - * @instance - * @returns {Object.} JSON object - */ - BatchProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BatchProof; - })(); - - v1.BatchEntry = (function() { - - /** - * Properties of a BatchEntry. - * @memberof cosmos.ics23.v1 - * @interface IBatchEntry - * @property {cosmos.ics23.v1.IExistenceProof|null} [exist] BatchEntry exist - * @property {cosmos.ics23.v1.INonExistenceProof|null} [nonexist] BatchEntry nonexist - */ - - /** - * Constructs a new BatchEntry. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a BatchEntry. - * @implements IBatchEntry - * @constructor - * @param {cosmos.ics23.v1.IBatchEntry=} [properties] Properties to set - */ - function BatchEntry(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BatchEntry exist. - * @member {cosmos.ics23.v1.IExistenceProof|null|undefined} exist - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - */ - BatchEntry.prototype.exist = null; - - /** - * BatchEntry nonexist. - * @member {cosmos.ics23.v1.INonExistenceProof|null|undefined} nonexist - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - */ - BatchEntry.prototype.nonexist = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * BatchEntry proof. - * @member {"exist"|"nonexist"|undefined} proof - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - */ - Object.defineProperty(BatchEntry.prototype, "proof", { - get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified BatchEntry message. Does not implicitly {@link cosmos.ics23.v1.BatchEntry.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {cosmos.ics23.v1.IBatchEntry} message BatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) - $root.cosmos.ics23.v1.ExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) - $root.cosmos.ics23.v1.NonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BatchEntry message, length delimited. Does not implicitly {@link cosmos.ics23.v1.BatchEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {cosmos.ics23.v1.IBatchEntry} message BatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BatchEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BatchEntry message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.BatchEntry} BatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.BatchEntry(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = $root.cosmos.ics23.v1.ExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BatchEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.BatchEntry} BatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BatchEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BatchEntry message. - * @function verify - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BatchEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.ExistenceProof.verify(message.exist); - if (error) - return "exist." + error; - } - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.NonExistenceProof.verify(message.nonexist); - if (error) - return "nonexist." + error; - } - } - return null; - }; - - /** - * Creates a BatchEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.BatchEntry} BatchEntry - */ - BatchEntry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.BatchEntry) - return object; - let message = new $root.cosmos.ics23.v1.BatchEntry(); - if (object.exist != null) { - if (typeof object.exist !== "object") - throw TypeError(".cosmos.ics23.v1.BatchEntry.exist: object expected"); - message.exist = $root.cosmos.ics23.v1.ExistenceProof.fromObject(object.exist); - } - if (object.nonexist != null) { - if (typeof object.nonexist !== "object") - throw TypeError(".cosmos.ics23.v1.BatchEntry.nonexist: object expected"); - message.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.fromObject(object.nonexist); - } - return message; - }; - - /** - * Creates a plain object from a BatchEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.BatchEntry - * @static - * @param {cosmos.ics23.v1.BatchEntry} message BatchEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BatchEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - object.exist = $root.cosmos.ics23.v1.ExistenceProof.toObject(message.exist, options); - if (options.oneofs) - object.proof = "exist"; - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - object.nonexist = $root.cosmos.ics23.v1.NonExistenceProof.toObject(message.nonexist, options); - if (options.oneofs) - object.proof = "nonexist"; - } - return object; - }; - - /** - * Converts this BatchEntry to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.BatchEntry - * @instance - * @returns {Object.} JSON object - */ - BatchEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BatchEntry; - })(); - - v1.CompressedBatchProof = (function() { - - /** - * Properties of a CompressedBatchProof. - * @memberof cosmos.ics23.v1 - * @interface ICompressedBatchProof - * @property {Array.|null} [entries] CompressedBatchProof entries - * @property {Array.|null} [lookup_inners] CompressedBatchProof lookup_inners - */ - - /** - * Constructs a new CompressedBatchProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedBatchProof. - * @implements ICompressedBatchProof - * @constructor - * @param {cosmos.ics23.v1.ICompressedBatchProof=} [properties] Properties to set - */ - function CompressedBatchProof(properties) { - this.entries = []; - this.lookup_inners = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedBatchProof entries. - * @member {Array.} entries - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @instance - */ - CompressedBatchProof.prototype.entries = $util.emptyArray; - - /** - * CompressedBatchProof lookup_inners. - * @member {Array.} lookup_inners - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @instance - */ - CompressedBatchProof.prototype.lookup_inners = $util.emptyArray; - - /** - * Encodes the specified CompressedBatchProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {cosmos.ics23.v1.ICompressedBatchProof} message CompressedBatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.entries != null && message.entries.length) - for (let i = 0; i < message.entries.length; ++i) - $root.cosmos.ics23.v1.CompressedBatchEntry.encode(message.entries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.lookup_inners != null && message.lookup_inners.length) - for (let i = 0; i < message.lookup_inners.length; ++i) - $root.cosmos.ics23.v1.InnerOp.encode(message.lookup_inners[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompressedBatchProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {cosmos.ics23.v1.ICompressedBatchProof} message CompressedBatchProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedBatchProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedBatchProof} CompressedBatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedBatchProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.cosmos.ics23.v1.CompressedBatchEntry.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.lookup_inners && message.lookup_inners.length)) - message.lookup_inners = []; - message.lookup_inners.push($root.cosmos.ics23.v1.InnerOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedBatchProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedBatchProof} CompressedBatchProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedBatchProof message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedBatchProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (let i = 0; i < message.entries.length; ++i) { - let error = $root.cosmos.ics23.v1.CompressedBatchEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - if (message.lookup_inners != null && message.hasOwnProperty("lookup_inners")) { - if (!Array.isArray(message.lookup_inners)) - return "lookup_inners: array expected"; - for (let i = 0; i < message.lookup_inners.length; ++i) { - let error = $root.cosmos.ics23.v1.InnerOp.verify(message.lookup_inners[i]); - if (error) - return "lookup_inners." + error; - } - } - return null; - }; - - /** - * Creates a CompressedBatchProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedBatchProof} CompressedBatchProof - */ - CompressedBatchProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedBatchProof) - return object; - let message = new $root.cosmos.ics23.v1.CompressedBatchProof(); - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.entries: array expected"); - message.entries = []; - for (let i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.entries: object expected"); - message.entries[i] = $root.cosmos.ics23.v1.CompressedBatchEntry.fromObject(object.entries[i]); - } - } - if (object.lookup_inners) { - if (!Array.isArray(object.lookup_inners)) - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.lookup_inners: array expected"); - message.lookup_inners = []; - for (let i = 0; i < object.lookup_inners.length; ++i) { - if (typeof object.lookup_inners[i] !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchProof.lookup_inners: object expected"); - message.lookup_inners[i] = $root.cosmos.ics23.v1.InnerOp.fromObject(object.lookup_inners[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CompressedBatchProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @static - * @param {cosmos.ics23.v1.CompressedBatchProof} message CompressedBatchProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedBatchProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.entries = []; - object.lookup_inners = []; - } - if (message.entries && message.entries.length) { - object.entries = []; - for (let j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.cosmos.ics23.v1.CompressedBatchEntry.toObject(message.entries[j], options); - } - if (message.lookup_inners && message.lookup_inners.length) { - object.lookup_inners = []; - for (let j = 0; j < message.lookup_inners.length; ++j) - object.lookup_inners[j] = $root.cosmos.ics23.v1.InnerOp.toObject(message.lookup_inners[j], options); - } - return object; - }; - - /** - * Converts this CompressedBatchProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedBatchProof - * @instance - * @returns {Object.} JSON object - */ - CompressedBatchProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedBatchProof; - })(); - - v1.CompressedBatchEntry = (function() { - - /** - * Properties of a CompressedBatchEntry. - * @memberof cosmos.ics23.v1 - * @interface ICompressedBatchEntry - * @property {cosmos.ics23.v1.ICompressedExistenceProof|null} [exist] CompressedBatchEntry exist - * @property {cosmos.ics23.v1.ICompressedNonExistenceProof|null} [nonexist] CompressedBatchEntry nonexist - */ - - /** - * Constructs a new CompressedBatchEntry. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedBatchEntry. - * @implements ICompressedBatchEntry - * @constructor - * @param {cosmos.ics23.v1.ICompressedBatchEntry=} [properties] Properties to set - */ - function CompressedBatchEntry(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedBatchEntry exist. - * @member {cosmos.ics23.v1.ICompressedExistenceProof|null|undefined} exist - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - */ - CompressedBatchEntry.prototype.exist = null; - - /** - * CompressedBatchEntry nonexist. - * @member {cosmos.ics23.v1.ICompressedNonExistenceProof|null|undefined} nonexist - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - */ - CompressedBatchEntry.prototype.nonexist = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * CompressedBatchEntry proof. - * @member {"exist"|"nonexist"|undefined} proof - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - */ - Object.defineProperty(CompressedBatchEntry.prototype, "proof", { - get: $util.oneOfGetter($oneOfFields = ["exist", "nonexist"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified CompressedBatchEntry message. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchEntry.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {cosmos.ics23.v1.ICompressedBatchEntry} message CompressedBatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exist != null && Object.hasOwnProperty.call(message, "exist")) - $root.cosmos.ics23.v1.CompressedExistenceProof.encode(message.exist, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nonexist != null && Object.hasOwnProperty.call(message, "nonexist")) - $root.cosmos.ics23.v1.CompressedNonExistenceProof.encode(message.nonexist, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompressedBatchEntry message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedBatchEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {cosmos.ics23.v1.ICompressedBatchEntry} message CompressedBatchEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedBatchEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedBatchEntry message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedBatchEntry} CompressedBatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedBatchEntry(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exist = $root.cosmos.ics23.v1.CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 2: - message.nonexist = $root.cosmos.ics23.v1.CompressedNonExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedBatchEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedBatchEntry} CompressedBatchEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedBatchEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedBatchEntry message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedBatchEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.CompressedExistenceProof.verify(message.exist); - if (error) - return "exist." + error; - } - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - if (properties.proof === 1) - return "proof: multiple values"; - properties.proof = 1; - { - let error = $root.cosmos.ics23.v1.CompressedNonExistenceProof.verify(message.nonexist); - if (error) - return "nonexist." + error; - } - } - return null; - }; - - /** - * Creates a CompressedBatchEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedBatchEntry} CompressedBatchEntry - */ - CompressedBatchEntry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedBatchEntry) - return object; - let message = new $root.cosmos.ics23.v1.CompressedBatchEntry(); - if (object.exist != null) { - if (typeof object.exist !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchEntry.exist: object expected"); - message.exist = $root.cosmos.ics23.v1.CompressedExistenceProof.fromObject(object.exist); - } - if (object.nonexist != null) { - if (typeof object.nonexist !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedBatchEntry.nonexist: object expected"); - message.nonexist = $root.cosmos.ics23.v1.CompressedNonExistenceProof.fromObject(object.nonexist); - } - return message; - }; - - /** - * Creates a plain object from a CompressedBatchEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @static - * @param {cosmos.ics23.v1.CompressedBatchEntry} message CompressedBatchEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedBatchEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.exist != null && message.hasOwnProperty("exist")) { - object.exist = $root.cosmos.ics23.v1.CompressedExistenceProof.toObject(message.exist, options); - if (options.oneofs) - object.proof = "exist"; - } - if (message.nonexist != null && message.hasOwnProperty("nonexist")) { - object.nonexist = $root.cosmos.ics23.v1.CompressedNonExistenceProof.toObject(message.nonexist, options); - if (options.oneofs) - object.proof = "nonexist"; - } - return object; - }; - - /** - * Converts this CompressedBatchEntry to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedBatchEntry - * @instance - * @returns {Object.} JSON object - */ - CompressedBatchEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedBatchEntry; - })(); - - v1.CompressedExistenceProof = (function() { - - /** - * Properties of a CompressedExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface ICompressedExistenceProof - * @property {Uint8Array|null} [key] CompressedExistenceProof key - * @property {Uint8Array|null} [value] CompressedExistenceProof value - * @property {cosmos.ics23.v1.ILeafOp|null} [leaf] CompressedExistenceProof leaf - * @property {Array.|null} [path] CompressedExistenceProof path - */ - - /** - * Constructs a new CompressedExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedExistenceProof. - * @implements ICompressedExistenceProof - * @constructor - * @param {cosmos.ics23.v1.ICompressedExistenceProof=} [properties] Properties to set - */ - function CompressedExistenceProof(properties) { - this.path = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * CompressedExistenceProof value. - * @member {Uint8Array} value - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.value = $util.newBuffer([]); - - /** - * CompressedExistenceProof leaf. - * @member {cosmos.ics23.v1.ILeafOp|null|undefined} leaf - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.leaf = null; - - /** - * CompressedExistenceProof path. - * @member {Array.} path - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - */ - CompressedExistenceProof.prototype.path = $util.emptyArray; - - /** - * Encodes the specified CompressedExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedExistenceProof} message CompressedExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedExistenceProof.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); - if (message.leaf != null && Object.hasOwnProperty.call(message, "leaf")) - $root.cosmos.ics23.v1.LeafOp.encode(message.leaf, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (let i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified CompressedExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedExistenceProof} message CompressedExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedExistenceProof} CompressedExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedExistenceProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - case 3: - message.leaf = $root.cosmos.ics23.v1.LeafOp.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedExistenceProof} CompressedExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedExistenceProof.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"; - if (message.leaf != null && message.hasOwnProperty("leaf")) { - let error = $root.cosmos.ics23.v1.LeafOp.verify(message.leaf); - if (error) - return "leaf." + error; - } - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (let i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - return null; - }; - - /** - * Creates a CompressedExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedExistenceProof} CompressedExistenceProof - */ - CompressedExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedExistenceProof) - return object; - let message = new $root.cosmos.ics23.v1.CompressedExistenceProof(); - 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.leaf != null) { - if (typeof object.leaf !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedExistenceProof.leaf: object expected"); - message.leaf = $root.cosmos.ics23.v1.LeafOp.fromObject(object.leaf); - } - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".cosmos.ics23.v1.CompressedExistenceProof.path: array expected"); - message.path = []; - for (let i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - return message; - }; - - /** - * Creates a plain object from a CompressedExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @static - * @param {cosmos.ics23.v1.CompressedExistenceProof} message CompressedExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedExistenceProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.path = []; - 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); - } - object.leaf = null; - } - 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.leaf != null && message.hasOwnProperty("leaf")) - object.leaf = $root.cosmos.ics23.v1.LeafOp.toObject(message.leaf, options); - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - return object; - }; - - /** - * Converts this CompressedExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedExistenceProof - * @instance - * @returns {Object.} JSON object - */ - CompressedExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedExistenceProof; - })(); - - v1.CompressedNonExistenceProof = (function() { - - /** - * Properties of a CompressedNonExistenceProof. - * @memberof cosmos.ics23.v1 - * @interface ICompressedNonExistenceProof - * @property {Uint8Array|null} [key] CompressedNonExistenceProof key - * @property {cosmos.ics23.v1.ICompressedExistenceProof|null} [left] CompressedNonExistenceProof left - * @property {cosmos.ics23.v1.ICompressedExistenceProof|null} [right] CompressedNonExistenceProof right - */ - - /** - * Constructs a new CompressedNonExistenceProof. - * @memberof cosmos.ics23.v1 - * @classdesc Represents a CompressedNonExistenceProof. - * @implements ICompressedNonExistenceProof - * @constructor - * @param {cosmos.ics23.v1.ICompressedNonExistenceProof=} [properties] Properties to set - */ - function CompressedNonExistenceProof(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CompressedNonExistenceProof key. - * @member {Uint8Array} key - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - */ - CompressedNonExistenceProof.prototype.key = $util.newBuffer([]); - - /** - * CompressedNonExistenceProof left. - * @member {cosmos.ics23.v1.ICompressedExistenceProof|null|undefined} left - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - */ - CompressedNonExistenceProof.prototype.left = null; - - /** - * CompressedNonExistenceProof right. - * @member {cosmos.ics23.v1.ICompressedExistenceProof|null|undefined} right - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - */ - CompressedNonExistenceProof.prototype.right = null; - - /** - * Encodes the specified CompressedNonExistenceProof message. Does not implicitly {@link cosmos.ics23.v1.CompressedNonExistenceProof.verify|verify} messages. - * @function encode - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedNonExistenceProof} message CompressedNonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedNonExistenceProof.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.left != null && Object.hasOwnProperty.call(message, "left")) - $root.cosmos.ics23.v1.CompressedExistenceProof.encode(message.left, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.right != null && Object.hasOwnProperty.call(message, "right")) - $root.cosmos.ics23.v1.CompressedExistenceProof.encode(message.right, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CompressedNonExistenceProof message, length delimited. Does not implicitly {@link cosmos.ics23.v1.CompressedNonExistenceProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {cosmos.ics23.v1.ICompressedNonExistenceProof} message CompressedNonExistenceProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompressedNonExistenceProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CompressedNonExistenceProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.ics23.v1.CompressedNonExistenceProof} CompressedNonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedNonExistenceProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.ics23.v1.CompressedNonExistenceProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.left = $root.cosmos.ics23.v1.CompressedExistenceProof.decode(reader, reader.uint32()); - break; - case 3: - message.right = $root.cosmos.ics23.v1.CompressedExistenceProof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CompressedNonExistenceProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.ics23.v1.CompressedNonExistenceProof} CompressedNonExistenceProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompressedNonExistenceProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompressedNonExistenceProof message. - * @function verify - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompressedNonExistenceProof.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.left != null && message.hasOwnProperty("left")) { - let error = $root.cosmos.ics23.v1.CompressedExistenceProof.verify(message.left); - if (error) - return "left." + error; - } - if (message.right != null && message.hasOwnProperty("right")) { - let error = $root.cosmos.ics23.v1.CompressedExistenceProof.verify(message.right); - if (error) - return "right." + error; - } - return null; - }; - - /** - * Creates a CompressedNonExistenceProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos.ics23.v1.CompressedNonExistenceProof} CompressedNonExistenceProof - */ - CompressedNonExistenceProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.ics23.v1.CompressedNonExistenceProof) - return object; - let message = new $root.cosmos.ics23.v1.CompressedNonExistenceProof(); - 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.left != null) { - if (typeof object.left !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedNonExistenceProof.left: object expected"); - message.left = $root.cosmos.ics23.v1.CompressedExistenceProof.fromObject(object.left); - } - if (object.right != null) { - if (typeof object.right !== "object") - throw TypeError(".cosmos.ics23.v1.CompressedNonExistenceProof.right: object expected"); - message.right = $root.cosmos.ics23.v1.CompressedExistenceProof.fromObject(object.right); - } - return message; - }; - - /** - * Creates a plain object from a CompressedNonExistenceProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @static - * @param {cosmos.ics23.v1.CompressedNonExistenceProof} message CompressedNonExistenceProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompressedNonExistenceProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - object.left = null; - object.right = null; - } - 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.left != null && message.hasOwnProperty("left")) - object.left = $root.cosmos.ics23.v1.CompressedExistenceProof.toObject(message.left, options); - if (message.right != null && message.hasOwnProperty("right")) - object.right = $root.cosmos.ics23.v1.CompressedExistenceProof.toObject(message.right, options); - return object; - }; - - /** - * Converts this CompressedNonExistenceProof to JSON. - * @function toJSON - * @memberof cosmos.ics23.v1.CompressedNonExistenceProof - * @instance - * @returns {Object.} JSON object - */ - CompressedNonExistenceProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CompressedNonExistenceProof; - })(); - - return v1; - })(); - - return ics23; - })(); - - return cosmos; -})(); - -export const gogoproto = $root.gogoproto = (() => { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - const gogoproto = {}; - - return gogoproto; -})(); - -export const cosmos_proto = $root.cosmos_proto = (() => { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - const cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - let message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (let i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (let i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - let message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (let i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (let j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; -})(); - -export const amino = $root.amino = (() => { - - /** - * Namespace amino. - * @exports amino - * @namespace - */ - const amino = {}; - - return amino; -})(); - -export const google = $root.google = (() => { - - /** - * Namespace google. - * @exports google - * @namespace - */ - const google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - const protobuf = {}; - - 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.file.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (let 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - this.service = []; - this.extension = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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 (let i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.message_type != null && message.message_type.length) - for (let i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (let i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (let 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 (let 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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (let i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (let i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - let 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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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 (let i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (let i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (let i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (let i = 0; i < message.message_type.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (let i = 0; i < message.enum_type.length; ++i) { - let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (let i = 0; i < message.service.length; ++i) { - let 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 (let i = 0; i < message.extension.length; ++i) { - let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - let error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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; - let 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 (let i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (let i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (let i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (let i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (let i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (let 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 (let 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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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 (let j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.message_type && message.message_type.length) { - object.message_type = []; - for (let j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (let j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (let 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 (let 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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (let j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (let j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_name = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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 (let 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.nested_type != null && message.nested_type.length) - for (let i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (let i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (let i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (let 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.oneof_decl != null && message.oneof_decl.length) - for (let i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (let i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (let i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - let 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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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 (let i = 0; i < message.field.length; ++i) { - let 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 (let i = 0; i < message.extension.length; ++i) { - let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (let i = 0; i < message.nested_type.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (let i = 0; i < message.enum_type.length; ++i) { - let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (let i = 0; i < message.extension_range.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (let i = 0; i < message.oneof_decl.length; ++i) { - let error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (let i = 0; i < message.reserved_range.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (let i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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; - let 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 (let 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 (let 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (let i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (let i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (let i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (let i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (let i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (let i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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 (let j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nested_type && message.nested_type.length) { - object.nested_type = []; - for (let j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (let j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (let j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (let 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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (let j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (let j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (let j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 (let 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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - let 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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 = {}; - let 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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() { - const 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() { - const 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - let 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")) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.value.length; ++i) { - let error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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 (let 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 = {}; - let 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 (let 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - let 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")) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.method.length; ++i) { - let error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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 (let 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 = {}; - let 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 (let 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 (let 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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; - let message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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 = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (let i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (let i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (let i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - let error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (let i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - let error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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; - let message = new $root.google.protobuf.FileOptions(); - if (object.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (let i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (let i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (let j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (let j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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() { - const 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - * @property {string|null} [".amino.name"] MessageOptions .amino.name - * @property {string|null} [".amino.message_encoding"] MessageOptions .amino.message_encoding - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * MessageOptions .amino.name. - * @member {string} .amino.name - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".amino.name"] = ""; - - /** - * MessageOptions .amino.message_encoding. - * @member {string} .amino.message_encoding - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".amino.message_encoding"] = ""; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (let i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - if (message[".amino.name"] != null && Object.hasOwnProperty.call(message, ".amino.name")) - writer.uint32(/* id 11110001, wireType 2 =*/88880010).string(message[".amino.name"]); - if (message[".amino.message_encoding"] != null && Object.hasOwnProperty.call(message, ".amino.message_encoding")) - writer.uint32(/* id 11110002, wireType 2 =*/88880018).string(message[".amino.message_encoding"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - break; - case 11110001: - message[".amino.name"] = reader.string(); - break; - case 11110002: - message[".amino.message_encoding"] = reader.string(); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (let i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] expected"; - } - if (message[".amino.name"] != null && message.hasOwnProperty(".amino.name")) - if (!$util.isString(message[".amino.name"])) - return ".amino.name: string expected"; - if (message[".amino.message_encoding"] != null && message.hasOwnProperty(".amino.message_encoding")) - if (!$util.isString(message[".amino.message_encoding"])) - return ".amino.message_encoding: string 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; - let message = new $root.google.protobuf.MessageOptions(); - if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (let i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - if (object[".amino.name"] != null) - message[".amino.name"] = String(object[".amino.name"]); - if (object[".amino.message_encoding"] != null) - message[".amino.message_encoding"] = String(object[".amino.message_encoding"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - object[".amino.name"] = ""; - object[".amino.message_encoding"] = ""; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (let j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - if (message[".amino.name"] != null && message.hasOwnProperty(".amino.name")) - object[".amino.name"] = message[".amino.name"]; - if (message[".amino.message_encoding"] != null && message.hasOwnProperty(".amino.message_encoding")) - object[".amino.message_encoding"] = message[".amino.message_encoding"]; - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - * @property {string|null} [".amino.encoding"] FieldOptions .amino.encoding - * @property {string|null} [".amino.field_name"] FieldOptions .amino.field_name - * @property {boolean|null} [".amino.dont_omitempty"] FieldOptions .amino.dont_omitempty - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * FieldOptions .amino.encoding. - * @member {string} .amino.encoding - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".amino.encoding"] = ""; - - /** - * FieldOptions .amino.field_name. - * @member {string} .amino.field_name - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".amino.field_name"] = ""; - - /** - * FieldOptions .amino.dont_omitempty. - * @member {boolean} .amino.dont_omitempty - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".amino.dont_omitempty"] = false; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - if (message[".amino.encoding"] != null && Object.hasOwnProperty.call(message, ".amino.encoding")) - writer.uint32(/* id 11110003, wireType 2 =*/88880026).string(message[".amino.encoding"]); - if (message[".amino.field_name"] != null && Object.hasOwnProperty.call(message, ".amino.field_name")) - writer.uint32(/* id 11110004, wireType 2 =*/88880034).string(message[".amino.field_name"]); - if (message[".amino.dont_omitempty"] != null && Object.hasOwnProperty.call(message, ".amino.dont_omitempty")) - writer.uint32(/* id 11110005, wireType 0 =*/88880040).bool(message[".amino.dont_omitempty"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - let 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = reader.string(); - break; - case 11110003: - message[".amino.encoding"] = reader.string(); - break; - case 11110004: - message[".amino.field_name"] = reader.string(); - break; - case 11110005: - message[".amino.dont_omitempty"] = reader.bool(); - 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: string expected"; - if (message[".amino.encoding"] != null && message.hasOwnProperty(".amino.encoding")) - if (!$util.isString(message[".amino.encoding"])) - return ".amino.encoding: string expected"; - if (message[".amino.field_name"] != null && message.hasOwnProperty(".amino.field_name")) - if (!$util.isString(message[".amino.field_name"])) - return ".amino.field_name: string expected"; - if (message[".amino.dont_omitempty"] != null && message.hasOwnProperty(".amino.dont_omitempty")) - if (typeof message[".amino.dont_omitempty"] !== "boolean") - return ".amino.dont_omitempty: boolean 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; - let 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - if (object[".amino.encoding"] != null) - message[".amino.encoding"] = String(object[".amino.encoding"]); - if (object[".amino.field_name"] != null) - message[".amino.field_name"] = String(object[".amino.field_name"]); - if (object[".amino.dont_omitempty"] != null) - message[".amino.dont_omitempty"] = Boolean(object[".amino.dont_omitempty"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - object[".amino.encoding"] = ""; - object[".amino.field_name"] = ""; - object[".amino.dont_omitempty"] = false; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - if (message[".amino.encoding"] != null && message.hasOwnProperty(".amino.encoding")) - object[".amino.encoding"] = message[".amino.encoding"]; - if (message[".amino.field_name"] != null && message.hasOwnProperty(".amino.field_name")) - object[".amino.field_name"] = message[".amino.field_name"]; - if (message[".amino.dont_omitempty"] != null && message.hasOwnProperty(".amino.dont_omitempty")) - object[".amino.dont_omitempty"] = message[".amino.dont_omitempty"]; - 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() { - const 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() { - const 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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; - let message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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; - let message = new $root.google.protobuf.EnumOptions(); - if (object.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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; - let message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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; - let message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - let error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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; - let message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 (let 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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 (let 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - let 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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 (let i = 0; i < message.name.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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; - let 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 (let 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifier_value = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (let j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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; - let message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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 = {}; - let object = {}; - if (options.defaults) { - object.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.location.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (let 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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 (let 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 (let i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (let i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let 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) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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 (let 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 (let i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (let i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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; - let 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 (let 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 (let i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (let i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (let j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (let j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.annotation.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (let 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} [source_file] Annotation source_file - * @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 (let 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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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 (let i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.source_file = 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 (let i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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; - let 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 (let i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.source_file != null) - message.source_file = String(object.source_file); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.source_file = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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.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 (let 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([]); - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let 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 {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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let 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; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - const api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (let i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (let i = 0; i < message.rules.length; ++i) { - let error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - let message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (let i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (let j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (let i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - let error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (let i = 0; i < message.additional_bindings.length; ++i) { - let error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - let message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (let i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (let j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - let message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; -})(); - -export const ibc = $root.ibc = (() => { - - /** - * Namespace ibc. - * @exports ibc - * @namespace - */ - const ibc = {}; - - ibc.applications = (function() { - - /** - * Namespace applications. - * @memberof ibc - * @namespace - */ - const applications = {}; - - applications.fee = (function() { - - /** - * Namespace fee. - * @memberof ibc.applications - * @namespace - */ - const fee = {}; - - fee.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.fee - * @namespace - */ - const v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#registerPayee}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef RegisterPayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgRegisterPayeeResponse} [response] MsgRegisterPayeeResponse - */ - - /** - * Calls RegisterPayee. - * @function registerPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} request MsgRegisterPayee message or plain object - * @param {ibc.applications.fee.v1.Msg.RegisterPayeeCallback} callback Node-style callback called with the error, if any, and MsgRegisterPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerPayee = function registerPayee(request, callback) { - return this.rpcCall(registerPayee, $root.ibc.applications.fee.v1.MsgRegisterPayee, $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse, request, callback); - }, "name", { value: "RegisterPayee" }); - - /** - * Calls RegisterPayee. - * @function registerPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} request MsgRegisterPayee message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#registerCounterpartyPayee}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef RegisterCounterpartyPayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} [response] MsgRegisterCounterpartyPayeeResponse - */ - - /** - * Calls RegisterCounterpartyPayee. - * @function registerCounterpartyPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} request MsgRegisterCounterpartyPayee message or plain object - * @param {ibc.applications.fee.v1.Msg.RegisterCounterpartyPayeeCallback} callback Node-style callback called with the error, if any, and MsgRegisterCounterpartyPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerCounterpartyPayee = function registerCounterpartyPayee(request, callback) { - return this.rpcCall(registerCounterpartyPayee, $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee, $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse, request, callback); - }, "name", { value: "RegisterCounterpartyPayee" }); - - /** - * Calls RegisterCounterpartyPayee. - * @function registerCounterpartyPayee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} request MsgRegisterCounterpartyPayee message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#payPacketFee}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef PayPacketFeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgPayPacketFeeResponse} [response] MsgPayPacketFeeResponse - */ - - /** - * Calls PayPacketFee. - * @function payPacketFee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} request MsgPayPacketFee message or plain object - * @param {ibc.applications.fee.v1.Msg.PayPacketFeeCallback} callback Node-style callback called with the error, if any, and MsgPayPacketFeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.payPacketFee = function payPacketFee(request, callback) { - return this.rpcCall(payPacketFee, $root.ibc.applications.fee.v1.MsgPayPacketFee, $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse, request, callback); - }, "name", { value: "PayPacketFee" }); - - /** - * Calls PayPacketFee. - * @function payPacketFee - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} request MsgPayPacketFee message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Msg#payPacketFeeAsync}. - * @memberof ibc.applications.fee.v1.Msg - * @typedef PayPacketFeeAsyncCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} [response] MsgPayPacketFeeAsyncResponse - */ - - /** - * Calls PayPacketFeeAsync. - * @function payPacketFeeAsync - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} request MsgPayPacketFeeAsync message or plain object - * @param {ibc.applications.fee.v1.Msg.PayPacketFeeAsyncCallback} callback Node-style callback called with the error, if any, and MsgPayPacketFeeAsyncResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.payPacketFeeAsync = function payPacketFeeAsync(request, callback) { - return this.rpcCall(payPacketFeeAsync, $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync, $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse, request, callback); - }, "name", { value: "PayPacketFeeAsync" }); - - /** - * Calls PayPacketFeeAsync. - * @function payPacketFeeAsync - * @memberof ibc.applications.fee.v1.Msg - * @instance - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} request MsgPayPacketFeeAsync message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgRegisterPayee = (function() { - - /** - * Properties of a MsgRegisterPayee. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterPayee - * @property {string|null} [port_id] MsgRegisterPayee port_id - * @property {string|null} [channel_id] MsgRegisterPayee channel_id - * @property {string|null} [relayer] MsgRegisterPayee relayer - * @property {string|null} [payee] MsgRegisterPayee payee - */ - - /** - * Constructs a new MsgRegisterPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterPayee. - * @implements IMsgRegisterPayee - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterPayee=} [properties] Properties to set - */ - function MsgRegisterPayee(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterPayee port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.port_id = ""; - - /** - * MsgRegisterPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.channel_id = ""; - - /** - * MsgRegisterPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.relayer = ""; - - /** - * MsgRegisterPayee payee. - * @member {string} payee - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - */ - MsgRegisterPayee.prototype.payee = ""; - - /** - * Encodes the specified MsgRegisterPayee message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} message MsgRegisterPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relayer); - if (message.payee != null && Object.hasOwnProperty.call(message, "payee")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.payee); - return writer; - }; - - /** - * Encodes the specified MsgRegisterPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayee} message MsgRegisterPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterPayee} MsgRegisterPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterPayee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.relayer = reader.string(); - break; - case 4: - message.payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterPayee} MsgRegisterPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.payee != null && message.hasOwnProperty("payee")) - if (!$util.isString(message.payee)) - return "payee: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterPayee} MsgRegisterPayee - */ - MsgRegisterPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterPayee) - return object; - let message = new $root.ibc.applications.fee.v1.MsgRegisterPayee(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.payee != null) - message.payee = String(object.payee); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @static - * @param {ibc.applications.fee.v1.MsgRegisterPayee} message MsgRegisterPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.relayer = ""; - object.payee = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.payee != null && message.hasOwnProperty("payee")) - object.payee = message.payee; - return object; - }; - - /** - * Converts this MsgRegisterPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterPayee - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterPayee; - })(); - - v1.MsgRegisterPayeeResponse = (function() { - - /** - * Properties of a MsgRegisterPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterPayeeResponse - */ - - /** - * Constructs a new MsgRegisterPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterPayeeResponse. - * @implements IMsgRegisterPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterPayeeResponse=} [properties] Properties to set - */ - function MsgRegisterPayeeResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgRegisterPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayeeResponse} message MsgRegisterPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgRegisterPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterPayeeResponse} message MsgRegisterPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterPayeeResponse} MsgRegisterPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterPayeeResponse} MsgRegisterPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgRegisterPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterPayeeResponse} MsgRegisterPayeeResponse - */ - MsgRegisterPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgRegisterPayeeResponse(); - }; - - /** - * Creates a plain object from a MsgRegisterPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @static - * @param {ibc.applications.fee.v1.MsgRegisterPayeeResponse} message MsgRegisterPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterPayeeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgRegisterPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterPayeeResponse; - })(); - - v1.MsgRegisterCounterpartyPayee = (function() { - - /** - * Properties of a MsgRegisterCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterCounterpartyPayee - * @property {string|null} [port_id] MsgRegisterCounterpartyPayee port_id - * @property {string|null} [channel_id] MsgRegisterCounterpartyPayee channel_id - * @property {string|null} [relayer] MsgRegisterCounterpartyPayee relayer - * @property {string|null} [counterparty_payee] MsgRegisterCounterpartyPayee counterparty_payee - */ - - /** - * Constructs a new MsgRegisterCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterCounterpartyPayee. - * @implements IMsgRegisterCounterpartyPayee - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee=} [properties] Properties to set - */ - function MsgRegisterCounterpartyPayee(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterCounterpartyPayee port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.port_id = ""; - - /** - * MsgRegisterCounterpartyPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.channel_id = ""; - - /** - * MsgRegisterCounterpartyPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.relayer = ""; - - /** - * MsgRegisterCounterpartyPayee counterparty_payee. - * @member {string} counterparty_payee - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - */ - MsgRegisterCounterpartyPayee.prototype.counterparty_payee = ""; - - /** - * Encodes the specified MsgRegisterCounterpartyPayee message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} message MsgRegisterCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relayer); - if (message.counterparty_payee != null && Object.hasOwnProperty.call(message, "counterparty_payee")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterparty_payee); - return writer; - }; - - /** - * Encodes the specified MsgRegisterCounterpartyPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayee} message MsgRegisterCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterCounterpartyPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} MsgRegisterCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.relayer = reader.string(); - break; - case 4: - message.counterparty_payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterCounterpartyPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} MsgRegisterCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterCounterpartyPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterCounterpartyPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - if (!$util.isString(message.counterparty_payee)) - return "counterparty_payee: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterCounterpartyPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} MsgRegisterCounterpartyPayee - */ - MsgRegisterCounterpartyPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee) - return object; - let message = new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayee(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.counterparty_payee != null) - message.counterparty_payee = String(object.counterparty_payee); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterCounterpartyPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.MsgRegisterCounterpartyPayee} message MsgRegisterCounterpartyPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterCounterpartyPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.relayer = ""; - object.counterparty_payee = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - object.counterparty_payee = message.counterparty_payee; - return object; - }; - - /** - * Converts this MsgRegisterCounterpartyPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayee - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterCounterpartyPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterCounterpartyPayee; - })(); - - v1.MsgRegisterCounterpartyPayeeResponse = (function() { - - /** - * Properties of a MsgRegisterCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgRegisterCounterpartyPayeeResponse - */ - - /** - * Constructs a new MsgRegisterCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgRegisterCounterpartyPayeeResponse. - * @implements IMsgRegisterCounterpartyPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse=} [properties] Properties to set - */ - function MsgRegisterCounterpartyPayeeResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgRegisterCounterpartyPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse} message MsgRegisterCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgRegisterCounterpartyPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgRegisterCounterpartyPayeeResponse} message MsgRegisterCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterCounterpartyPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterCounterpartyPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} MsgRegisterCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterCounterpartyPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} MsgRegisterCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterCounterpartyPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterCounterpartyPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterCounterpartyPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgRegisterCounterpartyPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} MsgRegisterCounterpartyPayeeResponse - */ - MsgRegisterCounterpartyPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse(); - }; - - /** - * Creates a plain object from a MsgRegisterCounterpartyPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse} message MsgRegisterCounterpartyPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterCounterpartyPayeeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgRegisterCounterpartyPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgRegisterCounterpartyPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterCounterpartyPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterCounterpartyPayeeResponse; - })(); - - v1.MsgPayPacketFee = (function() { - - /** - * Properties of a MsgPayPacketFee. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFee - * @property {ibc.applications.fee.v1.IFee|null} [fee] MsgPayPacketFee fee - * @property {string|null} [source_port_id] MsgPayPacketFee source_port_id - * @property {string|null} [source_channel_id] MsgPayPacketFee source_channel_id - * @property {string|null} [signer] MsgPayPacketFee signer - * @property {Array.|null} [relayers] MsgPayPacketFee relayers - */ - - /** - * Constructs a new MsgPayPacketFee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFee. - * @implements IMsgPayPacketFee - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFee=} [properties] Properties to set - */ - function MsgPayPacketFee(properties) { - this.relayers = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgPayPacketFee fee. - * @member {ibc.applications.fee.v1.IFee|null|undefined} fee - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.fee = null; - - /** - * MsgPayPacketFee source_port_id. - * @member {string} source_port_id - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.source_port_id = ""; - - /** - * MsgPayPacketFee source_channel_id. - * @member {string} source_channel_id - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.source_channel_id = ""; - - /** - * MsgPayPacketFee signer. - * @member {string} signer - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.signer = ""; - - /** - * MsgPayPacketFee relayers. - * @member {Array.} relayers - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - */ - MsgPayPacketFee.prototype.relayers = $util.emptyArray; - - /** - * Encodes the specified MsgPayPacketFee message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} message MsgPayPacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.ibc.applications.fee.v1.Fee.encode(message.fee, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.source_port_id != null && Object.hasOwnProperty.call(message, "source_port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_port_id); - if (message.source_channel_id != null && Object.hasOwnProperty.call(message, "source_channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.source_channel_id); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.signer); - if (message.relayers != null && message.relayers.length) - for (let i = 0; i < message.relayers.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.relayers[i]); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFee} message MsgPayPacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFee} MsgPayPacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee = $root.ibc.applications.fee.v1.Fee.decode(reader, reader.uint32()); - break; - case 2: - message.source_port_id = reader.string(); - break; - case 3: - message.source_channel_id = reader.string(); - break; - case 4: - message.signer = reader.string(); - break; - case 5: - if (!(message.relayers && message.relayers.length)) - message.relayers = []; - message.relayers.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFee} MsgPayPacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFee message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee != null && message.hasOwnProperty("fee")) { - let error = $root.ibc.applications.fee.v1.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - if (message.source_port_id != null && message.hasOwnProperty("source_port_id")) - if (!$util.isString(message.source_port_id)) - return "source_port_id: string expected"; - if (message.source_channel_id != null && message.hasOwnProperty("source_channel_id")) - if (!$util.isString(message.source_channel_id)) - return "source_channel_id: string expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - if (message.relayers != null && message.hasOwnProperty("relayers")) { - if (!Array.isArray(message.relayers)) - return "relayers: array expected"; - for (let i = 0; i < message.relayers.length; ++i) - if (!$util.isString(message.relayers[i])) - return "relayers: string[] expected"; - } - return null; - }; - - /** - * Creates a MsgPayPacketFee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFee} MsgPayPacketFee - */ - MsgPayPacketFee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFee) - return object; - let message = new $root.ibc.applications.fee.v1.MsgPayPacketFee(); - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFee.fee: object expected"); - message.fee = $root.ibc.applications.fee.v1.Fee.fromObject(object.fee); - } - if (object.source_port_id != null) - message.source_port_id = String(object.source_port_id); - if (object.source_channel_id != null) - message.source_channel_id = String(object.source_channel_id); - if (object.signer != null) - message.signer = String(object.signer); - if (object.relayers) { - if (!Array.isArray(object.relayers)) - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFee.relayers: array expected"); - message.relayers = []; - for (let i = 0; i < object.relayers.length; ++i) - message.relayers[i] = String(object.relayers[i]); - } - return message; - }; - - /** - * Creates a plain object from a MsgPayPacketFee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFee} message MsgPayPacketFee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.relayers = []; - if (options.defaults) { - object.fee = null; - object.source_port_id = ""; - object.source_channel_id = ""; - object.signer = ""; - } - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.ibc.applications.fee.v1.Fee.toObject(message.fee, options); - if (message.source_port_id != null && message.hasOwnProperty("source_port_id")) - object.source_port_id = message.source_port_id; - if (message.source_channel_id != null && message.hasOwnProperty("source_channel_id")) - object.source_channel_id = message.source_channel_id; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - if (message.relayers && message.relayers.length) { - object.relayers = []; - for (let j = 0; j < message.relayers.length; ++j) - object.relayers[j] = message.relayers[j]; - } - return object; - }; - - /** - * Converts this MsgPayPacketFee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFee - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFee; - })(); - - v1.MsgPayPacketFeeResponse = (function() { - - /** - * Properties of a MsgPayPacketFeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFeeResponse - */ - - /** - * Constructs a new MsgPayPacketFeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFeeResponse. - * @implements IMsgPayPacketFeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeResponse=} [properties] Properties to set - */ - function MsgPayPacketFeeResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgPayPacketFeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeResponse} message MsgPayPacketFeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeResponse} message MsgPayPacketFeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeResponse} MsgPayPacketFeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeResponse} MsgPayPacketFeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgPayPacketFeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeResponse} MsgPayPacketFeeResponse - */ - MsgPayPacketFeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgPayPacketFeeResponse(); - }; - - /** - * Creates a plain object from a MsgPayPacketFeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFeeResponse} message MsgPayPacketFeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFeeResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgPayPacketFeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeResponse - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFeeResponse; - })(); - - v1.MsgPayPacketFeeAsync = (function() { - - /** - * Properties of a MsgPayPacketFeeAsync. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFeeAsync - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] MsgPayPacketFeeAsync packet_id - * @property {ibc.applications.fee.v1.IPacketFee|null} [packet_fee] MsgPayPacketFeeAsync packet_fee - */ - - /** - * Constructs a new MsgPayPacketFeeAsync. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFeeAsync. - * @implements IMsgPayPacketFeeAsync - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync=} [properties] Properties to set - */ - function MsgPayPacketFeeAsync(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgPayPacketFeeAsync packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @instance - */ - MsgPayPacketFeeAsync.prototype.packet_id = null; - - /** - * MsgPayPacketFeeAsync packet_fee. - * @member {ibc.applications.fee.v1.IPacketFee|null|undefined} packet_fee - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @instance - */ - MsgPayPacketFeeAsync.prototype.packet_fee = null; - - /** - * Encodes the specified MsgPayPacketFeeAsync message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsync.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} message MsgPayPacketFeeAsync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsync.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.packet_fee != null && Object.hasOwnProperty.call(message, "packet_fee")) - $root.ibc.applications.fee.v1.PacketFee.encode(message.packet_fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFeeAsync message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsync.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsync} message MsgPayPacketFeeAsync message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsync.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFeeAsync message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsync} MsgPayPacketFeeAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsync.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - case 2: - message.packet_fee = $root.ibc.applications.fee.v1.PacketFee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFeeAsync message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsync} MsgPayPacketFeeAsync - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsync.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFeeAsync message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFeeAsync.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.packet_fee != null && message.hasOwnProperty("packet_fee")) { - let error = $root.ibc.applications.fee.v1.PacketFee.verify(message.packet_fee); - if (error) - return "packet_fee." + error; - } - return null; - }; - - /** - * Creates a MsgPayPacketFeeAsync message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsync} MsgPayPacketFeeAsync - */ - MsgPayPacketFeeAsync.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync) - return object; - let message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsync(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFeeAsync.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - if (object.packet_fee != null) { - if (typeof object.packet_fee !== "object") - throw TypeError(".ibc.applications.fee.v1.MsgPayPacketFeeAsync.packet_fee: object expected"); - message.packet_fee = $root.ibc.applications.fee.v1.PacketFee.fromObject(object.packet_fee); - } - return message; - }; - - /** - * Creates a plain object from a MsgPayPacketFeeAsync message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFeeAsync} message MsgPayPacketFeeAsync - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFeeAsync.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.packet_id = null; - object.packet_fee = null; - } - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - if (message.packet_fee != null && message.hasOwnProperty("packet_fee")) - object.packet_fee = $root.ibc.applications.fee.v1.PacketFee.toObject(message.packet_fee, options); - return object; - }; - - /** - * Converts this MsgPayPacketFeeAsync to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsync - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFeeAsync.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFeeAsync; - })(); - - v1.MsgPayPacketFeeAsyncResponse = (function() { - - /** - * Properties of a MsgPayPacketFeeAsyncResponse. - * @memberof ibc.applications.fee.v1 - * @interface IMsgPayPacketFeeAsyncResponse - */ - - /** - * Constructs a new MsgPayPacketFeeAsyncResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a MsgPayPacketFeeAsyncResponse. - * @implements IMsgPayPacketFeeAsyncResponse - * @constructor - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse=} [properties] Properties to set - */ - function MsgPayPacketFeeAsyncResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgPayPacketFeeAsyncResponse message. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse} message MsgPayPacketFeeAsyncResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsyncResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgPayPacketFeeAsyncResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {ibc.applications.fee.v1.IMsgPayPacketFeeAsyncResponse} message MsgPayPacketFeeAsyncResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPayPacketFeeAsyncResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgPayPacketFeeAsyncResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} MsgPayPacketFeeAsyncResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsyncResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgPayPacketFeeAsyncResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} MsgPayPacketFeeAsyncResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPayPacketFeeAsyncResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPayPacketFeeAsyncResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPayPacketFeeAsyncResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgPayPacketFeeAsyncResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} MsgPayPacketFeeAsyncResponse - */ - MsgPayPacketFeeAsyncResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse) - return object; - return new $root.ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse(); - }; - - /** - * Creates a plain object from a MsgPayPacketFeeAsyncResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @static - * @param {ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse} message MsgPayPacketFeeAsyncResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPayPacketFeeAsyncResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgPayPacketFeeAsyncResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.MsgPayPacketFeeAsyncResponse - * @instance - * @returns {Object.} JSON object - */ - MsgPayPacketFeeAsyncResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgPayPacketFeeAsyncResponse; - })(); - - v1.Fee = (function() { - - /** - * Properties of a Fee. - * @memberof ibc.applications.fee.v1 - * @interface IFee - * @property {Array.|null} [recv_fee] Fee recv_fee - * @property {Array.|null} [ack_fee] Fee ack_fee - * @property {Array.|null} [timeout_fee] Fee timeout_fee - */ - - /** - * Constructs a new Fee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a Fee. - * @implements IFee - * @constructor - * @param {ibc.applications.fee.v1.IFee=} [properties] Properties to set - */ - function Fee(properties) { - this.recv_fee = []; - this.ack_fee = []; - this.timeout_fee = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Fee recv_fee. - * @member {Array.} recv_fee - * @memberof ibc.applications.fee.v1.Fee - * @instance - */ - Fee.prototype.recv_fee = $util.emptyArray; - - /** - * Fee ack_fee. - * @member {Array.} ack_fee - * @memberof ibc.applications.fee.v1.Fee - * @instance - */ - Fee.prototype.ack_fee = $util.emptyArray; - - /** - * Fee timeout_fee. - * @member {Array.} timeout_fee - * @memberof ibc.applications.fee.v1.Fee - * @instance - */ - Fee.prototype.timeout_fee = $util.emptyArray; - - /** - * Encodes the specified Fee message. Does not implicitly {@link ibc.applications.fee.v1.Fee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {ibc.applications.fee.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.recv_fee != null && message.recv_fee.length) - for (let i = 0; i < message.recv_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.recv_fee[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.ack_fee != null && message.ack_fee.length) - for (let i = 0; i < message.ack_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.ack_fee[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timeout_fee != null && message.timeout_fee.length) - for (let i = 0; i < message.timeout_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.timeout_fee[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.Fee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {ibc.applications.fee.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 ibc.applications.fee.v1.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.Fee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.recv_fee && message.recv_fee.length)) - message.recv_fee = []; - message.recv_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.ack_fee && message.ack_fee.length)) - message.ack_fee = []; - message.ack_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.timeout_fee && message.timeout_fee.length)) - message.timeout_fee = []; - message.timeout_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.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 ibc.applications.fee.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.recv_fee != null && message.hasOwnProperty("recv_fee")) { - if (!Array.isArray(message.recv_fee)) - return "recv_fee: array expected"; - for (let i = 0; i < message.recv_fee.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.recv_fee[i]); - if (error) - return "recv_fee." + error; - } - } - if (message.ack_fee != null && message.hasOwnProperty("ack_fee")) { - if (!Array.isArray(message.ack_fee)) - return "ack_fee: array expected"; - for (let i = 0; i < message.ack_fee.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.ack_fee[i]); - if (error) - return "ack_fee." + error; - } - } - if (message.timeout_fee != null && message.hasOwnProperty("timeout_fee")) { - if (!Array.isArray(message.timeout_fee)) - return "timeout_fee: array expected"; - for (let i = 0; i < message.timeout_fee.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.timeout_fee[i]); - if (error) - return "timeout_fee." + error; - } - } - return null; - }; - - /** - * Creates a Fee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.Fee} Fee - */ - Fee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.Fee) - return object; - let message = new $root.ibc.applications.fee.v1.Fee(); - if (object.recv_fee) { - if (!Array.isArray(object.recv_fee)) - throw TypeError(".ibc.applications.fee.v1.Fee.recv_fee: array expected"); - message.recv_fee = []; - for (let i = 0; i < object.recv_fee.length; ++i) { - if (typeof object.recv_fee[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.Fee.recv_fee: object expected"); - message.recv_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.recv_fee[i]); - } - } - if (object.ack_fee) { - if (!Array.isArray(object.ack_fee)) - throw TypeError(".ibc.applications.fee.v1.Fee.ack_fee: array expected"); - message.ack_fee = []; - for (let i = 0; i < object.ack_fee.length; ++i) { - if (typeof object.ack_fee[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.Fee.ack_fee: object expected"); - message.ack_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.ack_fee[i]); - } - } - if (object.timeout_fee) { - if (!Array.isArray(object.timeout_fee)) - throw TypeError(".ibc.applications.fee.v1.Fee.timeout_fee: array expected"); - message.timeout_fee = []; - for (let i = 0; i < object.timeout_fee.length; ++i) { - if (typeof object.timeout_fee[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.Fee.timeout_fee: object expected"); - message.timeout_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.timeout_fee[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Fee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.Fee - * @static - * @param {ibc.applications.fee.v1.Fee} message Fee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.recv_fee = []; - object.ack_fee = []; - object.timeout_fee = []; - } - if (message.recv_fee && message.recv_fee.length) { - object.recv_fee = []; - for (let j = 0; j < message.recv_fee.length; ++j) - object.recv_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.recv_fee[j], options); - } - if (message.ack_fee && message.ack_fee.length) { - object.ack_fee = []; - for (let j = 0; j < message.ack_fee.length; ++j) - object.ack_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.ack_fee[j], options); - } - if (message.timeout_fee && message.timeout_fee.length) { - object.timeout_fee = []; - for (let j = 0; j < message.timeout_fee.length; ++j) - object.timeout_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.timeout_fee[j], options); - } - return object; - }; - - /** - * Converts this Fee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.Fee - * @instance - * @returns {Object.} JSON object - */ - Fee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Fee; - })(); - - v1.PacketFee = (function() { - - /** - * Properties of a PacketFee. - * @memberof ibc.applications.fee.v1 - * @interface IPacketFee - * @property {ibc.applications.fee.v1.IFee|null} [fee] PacketFee fee - * @property {string|null} [refund_address] PacketFee refund_address - * @property {Array.|null} [relayers] PacketFee relayers - */ - - /** - * Constructs a new PacketFee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a PacketFee. - * @implements IPacketFee - * @constructor - * @param {ibc.applications.fee.v1.IPacketFee=} [properties] Properties to set - */ - function PacketFee(properties) { - this.relayers = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketFee fee. - * @member {ibc.applications.fee.v1.IFee|null|undefined} fee - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - */ - PacketFee.prototype.fee = null; - - /** - * PacketFee refund_address. - * @member {string} refund_address - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - */ - PacketFee.prototype.refund_address = ""; - - /** - * PacketFee relayers. - * @member {Array.} relayers - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - */ - PacketFee.prototype.relayers = $util.emptyArray; - - /** - * Encodes the specified PacketFee message. Does not implicitly {@link ibc.applications.fee.v1.PacketFee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {ibc.applications.fee.v1.IPacketFee} message PacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.ibc.applications.fee.v1.Fee.encode(message.fee, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.refund_address != null && Object.hasOwnProperty.call(message, "refund_address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.refund_address); - if (message.relayers != null && message.relayers.length) - for (let i = 0; i < message.relayers.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relayers[i]); - return writer; - }; - - /** - * Encodes the specified PacketFee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.PacketFee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {ibc.applications.fee.v1.IPacketFee} message PacketFee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketFee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.PacketFee} PacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.PacketFee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee = $root.ibc.applications.fee.v1.Fee.decode(reader, reader.uint32()); - break; - case 2: - message.refund_address = reader.string(); - break; - case 3: - if (!(message.relayers && message.relayers.length)) - message.relayers = []; - message.relayers.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketFee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.PacketFee} PacketFee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketFee message. - * @function verify - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketFee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee != null && message.hasOwnProperty("fee")) { - let error = $root.ibc.applications.fee.v1.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - if (message.refund_address != null && message.hasOwnProperty("refund_address")) - if (!$util.isString(message.refund_address)) - return "refund_address: string expected"; - if (message.relayers != null && message.hasOwnProperty("relayers")) { - if (!Array.isArray(message.relayers)) - return "relayers: array expected"; - for (let i = 0; i < message.relayers.length; ++i) - if (!$util.isString(message.relayers[i])) - return "relayers: string[] expected"; - } - return null; - }; - - /** - * Creates a PacketFee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.PacketFee} PacketFee - */ - PacketFee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.PacketFee) - return object; - let message = new $root.ibc.applications.fee.v1.PacketFee(); - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".ibc.applications.fee.v1.PacketFee.fee: object expected"); - message.fee = $root.ibc.applications.fee.v1.Fee.fromObject(object.fee); - } - if (object.refund_address != null) - message.refund_address = String(object.refund_address); - if (object.relayers) { - if (!Array.isArray(object.relayers)) - throw TypeError(".ibc.applications.fee.v1.PacketFee.relayers: array expected"); - message.relayers = []; - for (let i = 0; i < object.relayers.length; ++i) - message.relayers[i] = String(object.relayers[i]); - } - return message; - }; - - /** - * Creates a plain object from a PacketFee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.PacketFee - * @static - * @param {ibc.applications.fee.v1.PacketFee} message PacketFee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketFee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.relayers = []; - if (options.defaults) { - object.fee = null; - object.refund_address = ""; - } - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.ibc.applications.fee.v1.Fee.toObject(message.fee, options); - if (message.refund_address != null && message.hasOwnProperty("refund_address")) - object.refund_address = message.refund_address; - if (message.relayers && message.relayers.length) { - object.relayers = []; - for (let j = 0; j < message.relayers.length; ++j) - object.relayers[j] = message.relayers[j]; - } - return object; - }; - - /** - * Converts this PacketFee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.PacketFee - * @instance - * @returns {Object.} JSON object - */ - PacketFee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketFee; - })(); - - v1.PacketFees = (function() { - - /** - * Properties of a PacketFees. - * @memberof ibc.applications.fee.v1 - * @interface IPacketFees - * @property {Array.|null} [packet_fees] PacketFees packet_fees - */ - - /** - * Constructs a new PacketFees. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a PacketFees. - * @implements IPacketFees - * @constructor - * @param {ibc.applications.fee.v1.IPacketFees=} [properties] Properties to set - */ - function PacketFees(properties) { - this.packet_fees = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketFees packet_fees. - * @member {Array.} packet_fees - * @memberof ibc.applications.fee.v1.PacketFees - * @instance - */ - PacketFees.prototype.packet_fees = $util.emptyArray; - - /** - * Encodes the specified PacketFees message. Does not implicitly {@link ibc.applications.fee.v1.PacketFees.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {ibc.applications.fee.v1.IPacketFees} message PacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFees.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_fees != null && message.packet_fees.length) - for (let i = 0; i < message.packet_fees.length; ++i) - $root.ibc.applications.fee.v1.PacketFee.encode(message.packet_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PacketFees message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.PacketFees.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {ibc.applications.fee.v1.IPacketFees} message PacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketFees.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketFees message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.PacketFees} PacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFees.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.PacketFees(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.packet_fees && message.packet_fees.length)) - message.packet_fees = []; - message.packet_fees.push($root.ibc.applications.fee.v1.PacketFee.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketFees message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.PacketFees} PacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketFees.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketFees message. - * @function verify - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketFees.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_fees != null && message.hasOwnProperty("packet_fees")) { - if (!Array.isArray(message.packet_fees)) - return "packet_fees: array expected"; - for (let i = 0; i < message.packet_fees.length; ++i) { - let error = $root.ibc.applications.fee.v1.PacketFee.verify(message.packet_fees[i]); - if (error) - return "packet_fees." + error; - } - } - return null; - }; - - /** - * Creates a PacketFees message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.PacketFees} PacketFees - */ - PacketFees.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.PacketFees) - return object; - let message = new $root.ibc.applications.fee.v1.PacketFees(); - if (object.packet_fees) { - if (!Array.isArray(object.packet_fees)) - throw TypeError(".ibc.applications.fee.v1.PacketFees.packet_fees: array expected"); - message.packet_fees = []; - for (let i = 0; i < object.packet_fees.length; ++i) { - if (typeof object.packet_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.PacketFees.packet_fees: object expected"); - message.packet_fees[i] = $root.ibc.applications.fee.v1.PacketFee.fromObject(object.packet_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PacketFees message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.PacketFees - * @static - * @param {ibc.applications.fee.v1.PacketFees} message PacketFees - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketFees.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.packet_fees = []; - if (message.packet_fees && message.packet_fees.length) { - object.packet_fees = []; - for (let j = 0; j < message.packet_fees.length; ++j) - object.packet_fees[j] = $root.ibc.applications.fee.v1.PacketFee.toObject(message.packet_fees[j], options); - } - return object; - }; - - /** - * Converts this PacketFees to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.PacketFees - * @instance - * @returns {Object.} JSON object - */ - PacketFees.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketFees; - })(); - - v1.IdentifiedPacketFees = (function() { - - /** - * Properties of an IdentifiedPacketFees. - * @memberof ibc.applications.fee.v1 - * @interface IIdentifiedPacketFees - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] IdentifiedPacketFees packet_id - * @property {Array.|null} [packet_fees] IdentifiedPacketFees packet_fees - */ - - /** - * Constructs a new IdentifiedPacketFees. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents an IdentifiedPacketFees. - * @implements IIdentifiedPacketFees - * @constructor - * @param {ibc.applications.fee.v1.IIdentifiedPacketFees=} [properties] Properties to set - */ - function IdentifiedPacketFees(properties) { - this.packet_fees = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedPacketFees packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @instance - */ - IdentifiedPacketFees.prototype.packet_id = null; - - /** - * IdentifiedPacketFees packet_fees. - * @member {Array.} packet_fees - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @instance - */ - IdentifiedPacketFees.prototype.packet_fees = $util.emptyArray; - - /** - * Encodes the specified IdentifiedPacketFees message. Does not implicitly {@link ibc.applications.fee.v1.IdentifiedPacketFees.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {ibc.applications.fee.v1.IIdentifiedPacketFees} message IdentifiedPacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedPacketFees.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.packet_fees != null && message.packet_fees.length) - for (let i = 0; i < message.packet_fees.length; ++i) - $root.ibc.applications.fee.v1.PacketFee.encode(message.packet_fees[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedPacketFees message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.IdentifiedPacketFees.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {ibc.applications.fee.v1.IIdentifiedPacketFees} message IdentifiedPacketFees message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedPacketFees.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedPacketFees message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.IdentifiedPacketFees} IdentifiedPacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedPacketFees.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.IdentifiedPacketFees(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.packet_fees && message.packet_fees.length)) - message.packet_fees = []; - message.packet_fees.push($root.ibc.applications.fee.v1.PacketFee.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedPacketFees message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.IdentifiedPacketFees} IdentifiedPacketFees - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedPacketFees.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedPacketFees message. - * @function verify - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedPacketFees.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.packet_fees != null && message.hasOwnProperty("packet_fees")) { - if (!Array.isArray(message.packet_fees)) - return "packet_fees: array expected"; - for (let i = 0; i < message.packet_fees.length; ++i) { - let error = $root.ibc.applications.fee.v1.PacketFee.verify(message.packet_fees[i]); - if (error) - return "packet_fees." + error; - } - } - return null; - }; - - /** - * Creates an IdentifiedPacketFees message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.IdentifiedPacketFees} IdentifiedPacketFees - */ - IdentifiedPacketFees.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.IdentifiedPacketFees) - return object; - let message = new $root.ibc.applications.fee.v1.IdentifiedPacketFees(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.IdentifiedPacketFees.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - if (object.packet_fees) { - if (!Array.isArray(object.packet_fees)) - throw TypeError(".ibc.applications.fee.v1.IdentifiedPacketFees.packet_fees: array expected"); - message.packet_fees = []; - for (let i = 0; i < object.packet_fees.length; ++i) { - if (typeof object.packet_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.IdentifiedPacketFees.packet_fees: object expected"); - message.packet_fees[i] = $root.ibc.applications.fee.v1.PacketFee.fromObject(object.packet_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedPacketFees message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @static - * @param {ibc.applications.fee.v1.IdentifiedPacketFees} message IdentifiedPacketFees - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedPacketFees.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.packet_fees = []; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - if (message.packet_fees && message.packet_fees.length) { - object.packet_fees = []; - for (let j = 0; j < message.packet_fees.length; ++j) - object.packet_fees[j] = $root.ibc.applications.fee.v1.PacketFee.toObject(message.packet_fees[j], options); - } - return object; - }; - - /** - * Converts this IdentifiedPacketFees to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.IdentifiedPacketFees - * @instance - * @returns {Object.} JSON object - */ - IdentifiedPacketFees.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedPacketFees; - })(); - - v1.IncentivizedAcknowledgement = (function() { - - /** - * Properties of an IncentivizedAcknowledgement. - * @memberof ibc.applications.fee.v1 - * @interface IIncentivizedAcknowledgement - * @property {Uint8Array|null} [app_acknowledgement] IncentivizedAcknowledgement app_acknowledgement - * @property {string|null} [forward_relayer_address] IncentivizedAcknowledgement forward_relayer_address - * @property {boolean|null} [underlying_app_success] IncentivizedAcknowledgement underlying_app_success - */ - - /** - * Constructs a new IncentivizedAcknowledgement. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents an IncentivizedAcknowledgement. - * @implements IIncentivizedAcknowledgement - * @constructor - * @param {ibc.applications.fee.v1.IIncentivizedAcknowledgement=} [properties] Properties to set - */ - function IncentivizedAcknowledgement(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IncentivizedAcknowledgement app_acknowledgement. - * @member {Uint8Array} app_acknowledgement - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - */ - IncentivizedAcknowledgement.prototype.app_acknowledgement = $util.newBuffer([]); - - /** - * IncentivizedAcknowledgement forward_relayer_address. - * @member {string} forward_relayer_address - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - */ - IncentivizedAcknowledgement.prototype.forward_relayer_address = ""; - - /** - * IncentivizedAcknowledgement underlying_app_success. - * @member {boolean} underlying_app_success - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - */ - IncentivizedAcknowledgement.prototype.underlying_app_success = false; - - /** - * Encodes the specified IncentivizedAcknowledgement message. Does not implicitly {@link ibc.applications.fee.v1.IncentivizedAcknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {ibc.applications.fee.v1.IIncentivizedAcknowledgement} message IncentivizedAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncentivizedAcknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.app_acknowledgement != null && Object.hasOwnProperty.call(message, "app_acknowledgement")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.app_acknowledgement); - if (message.forward_relayer_address != null && Object.hasOwnProperty.call(message, "forward_relayer_address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.forward_relayer_address); - if (message.underlying_app_success != null && Object.hasOwnProperty.call(message, "underlying_app_success")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.underlying_app_success); - return writer; - }; - - /** - * Encodes the specified IncentivizedAcknowledgement message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.IncentivizedAcknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {ibc.applications.fee.v1.IIncentivizedAcknowledgement} message IncentivizedAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IncentivizedAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IncentivizedAcknowledgement message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.IncentivizedAcknowledgement} IncentivizedAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncentivizedAcknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.IncentivizedAcknowledgement(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_acknowledgement = reader.bytes(); - break; - case 2: - message.forward_relayer_address = reader.string(); - break; - case 3: - message.underlying_app_success = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IncentivizedAcknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.IncentivizedAcknowledgement} IncentivizedAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IncentivizedAcknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IncentivizedAcknowledgement message. - * @function verify - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IncentivizedAcknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.app_acknowledgement != null && message.hasOwnProperty("app_acknowledgement")) - if (!(message.app_acknowledgement && typeof message.app_acknowledgement.length === "number" || $util.isString(message.app_acknowledgement))) - return "app_acknowledgement: buffer expected"; - if (message.forward_relayer_address != null && message.hasOwnProperty("forward_relayer_address")) - if (!$util.isString(message.forward_relayer_address)) - return "forward_relayer_address: string expected"; - if (message.underlying_app_success != null && message.hasOwnProperty("underlying_app_success")) - if (typeof message.underlying_app_success !== "boolean") - return "underlying_app_success: boolean expected"; - return null; - }; - - /** - * Creates an IncentivizedAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.IncentivizedAcknowledgement} IncentivizedAcknowledgement - */ - IncentivizedAcknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.IncentivizedAcknowledgement) - return object; - let message = new $root.ibc.applications.fee.v1.IncentivizedAcknowledgement(); - if (object.app_acknowledgement != null) - if (typeof object.app_acknowledgement === "string") - $util.base64.decode(object.app_acknowledgement, message.app_acknowledgement = $util.newBuffer($util.base64.length(object.app_acknowledgement)), 0); - else if (object.app_acknowledgement.length) - message.app_acknowledgement = object.app_acknowledgement; - if (object.forward_relayer_address != null) - message.forward_relayer_address = String(object.forward_relayer_address); - if (object.underlying_app_success != null) - message.underlying_app_success = Boolean(object.underlying_app_success); - return message; - }; - - /** - * Creates a plain object from an IncentivizedAcknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @static - * @param {ibc.applications.fee.v1.IncentivizedAcknowledgement} message IncentivizedAcknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IncentivizedAcknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.app_acknowledgement = ""; - else { - object.app_acknowledgement = []; - if (options.bytes !== Array) - object.app_acknowledgement = $util.newBuffer(object.app_acknowledgement); - } - object.forward_relayer_address = ""; - object.underlying_app_success = false; - } - if (message.app_acknowledgement != null && message.hasOwnProperty("app_acknowledgement")) - object.app_acknowledgement = options.bytes === String ? $util.base64.encode(message.app_acknowledgement, 0, message.app_acknowledgement.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_acknowledgement) : message.app_acknowledgement; - if (message.forward_relayer_address != null && message.hasOwnProperty("forward_relayer_address")) - object.forward_relayer_address = message.forward_relayer_address; - if (message.underlying_app_success != null && message.hasOwnProperty("underlying_app_success")) - object.underlying_app_success = message.underlying_app_success; - return object; - }; - - /** - * Converts this IncentivizedAcknowledgement to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.IncentivizedAcknowledgement - * @instance - * @returns {Object.} JSON object - */ - IncentivizedAcknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IncentivizedAcknowledgement; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.fee.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; - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPackets}. - * @memberof ibc.applications.fee.v1.Query - * @typedef IncentivizedPacketsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} [response] QueryIncentivizedPacketsResponse - */ - - /** - * Calls IncentivizedPackets. - * @function incentivizedPackets - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} request QueryIncentivizedPacketsRequest message or plain object - * @param {ibc.applications.fee.v1.Query.IncentivizedPacketsCallback} callback Node-style callback called with the error, if any, and QueryIncentivizedPacketsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.incentivizedPackets = function incentivizedPackets(request, callback) { - return this.rpcCall(incentivizedPackets, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse, request, callback); - }, "name", { value: "IncentivizedPackets" }); - - /** - * Calls IncentivizedPackets. - * @function incentivizedPackets - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} request QueryIncentivizedPacketsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPacket}. - * @memberof ibc.applications.fee.v1.Query - * @typedef IncentivizedPacketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} [response] QueryIncentivizedPacketResponse - */ - - /** - * Calls IncentivizedPacket. - * @function incentivizedPacket - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} request QueryIncentivizedPacketRequest message or plain object - * @param {ibc.applications.fee.v1.Query.IncentivizedPacketCallback} callback Node-style callback called with the error, if any, and QueryIncentivizedPacketResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.incentivizedPacket = function incentivizedPacket(request, callback) { - return this.rpcCall(incentivizedPacket, $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest, $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse, request, callback); - }, "name", { value: "IncentivizedPacket" }); - - /** - * Calls IncentivizedPacket. - * @function incentivizedPacket - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} request QueryIncentivizedPacketRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#incentivizedPacketsForChannel}. - * @memberof ibc.applications.fee.v1.Query - * @typedef IncentivizedPacketsForChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} [response] QueryIncentivizedPacketsForChannelResponse - */ - - /** - * Calls IncentivizedPacketsForChannel. - * @function incentivizedPacketsForChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} request QueryIncentivizedPacketsForChannelRequest message or plain object - * @param {ibc.applications.fee.v1.Query.IncentivizedPacketsForChannelCallback} callback Node-style callback called with the error, if any, and QueryIncentivizedPacketsForChannelResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.incentivizedPacketsForChannel = function incentivizedPacketsForChannel(request, callback) { - return this.rpcCall(incentivizedPacketsForChannel, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest, $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse, request, callback); - }, "name", { value: "IncentivizedPacketsForChannel" }); - - /** - * Calls IncentivizedPacketsForChannel. - * @function incentivizedPacketsForChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} request QueryIncentivizedPacketsForChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalRecvFees}. - * @memberof ibc.applications.fee.v1.Query - * @typedef TotalRecvFeesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} [response] QueryTotalRecvFeesResponse - */ - - /** - * Calls TotalRecvFees. - * @function totalRecvFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} request QueryTotalRecvFeesRequest message or plain object - * @param {ibc.applications.fee.v1.Query.TotalRecvFeesCallback} callback Node-style callback called with the error, if any, and QueryTotalRecvFeesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalRecvFees = function totalRecvFees(request, callback) { - return this.rpcCall(totalRecvFees, $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest, $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse, request, callback); - }, "name", { value: "TotalRecvFees" }); - - /** - * Calls TotalRecvFees. - * @function totalRecvFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} request QueryTotalRecvFeesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalAckFees}. - * @memberof ibc.applications.fee.v1.Query - * @typedef TotalAckFeesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryTotalAckFeesResponse} [response] QueryTotalAckFeesResponse - */ - - /** - * Calls TotalAckFees. - * @function totalAckFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} request QueryTotalAckFeesRequest message or plain object - * @param {ibc.applications.fee.v1.Query.TotalAckFeesCallback} callback Node-style callback called with the error, if any, and QueryTotalAckFeesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalAckFees = function totalAckFees(request, callback) { - return this.rpcCall(totalAckFees, $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest, $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse, request, callback); - }, "name", { value: "TotalAckFees" }); - - /** - * Calls TotalAckFees. - * @function totalAckFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} request QueryTotalAckFeesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#totalTimeoutFees}. - * @memberof ibc.applications.fee.v1.Query - * @typedef TotalTimeoutFeesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} [response] QueryTotalTimeoutFeesResponse - */ - - /** - * Calls TotalTimeoutFees. - * @function totalTimeoutFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} request QueryTotalTimeoutFeesRequest message or plain object - * @param {ibc.applications.fee.v1.Query.TotalTimeoutFeesCallback} callback Node-style callback called with the error, if any, and QueryTotalTimeoutFeesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalTimeoutFees = function totalTimeoutFees(request, callback) { - return this.rpcCall(totalTimeoutFees, $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest, $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse, request, callback); - }, "name", { value: "TotalTimeoutFees" }); - - /** - * Calls TotalTimeoutFees. - * @function totalTimeoutFees - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} request QueryTotalTimeoutFeesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#payee}. - * @memberof ibc.applications.fee.v1.Query - * @typedef PayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryPayeeResponse} [response] QueryPayeeResponse - */ - - /** - * Calls Payee. - * @function payee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} request QueryPayeeRequest message or plain object - * @param {ibc.applications.fee.v1.Query.PayeeCallback} callback Node-style callback called with the error, if any, and QueryPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.payee = function payee(request, callback) { - return this.rpcCall(payee, $root.ibc.applications.fee.v1.QueryPayeeRequest, $root.ibc.applications.fee.v1.QueryPayeeResponse, request, callback); - }, "name", { value: "Payee" }); - - /** - * Calls Payee. - * @function payee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} request QueryPayeeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#counterpartyPayee}. - * @memberof ibc.applications.fee.v1.Query - * @typedef CounterpartyPayeeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} [response] QueryCounterpartyPayeeResponse - */ - - /** - * Calls CounterpartyPayee. - * @function counterpartyPayee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} request QueryCounterpartyPayeeRequest message or plain object - * @param {ibc.applications.fee.v1.Query.CounterpartyPayeeCallback} callback Node-style callback called with the error, if any, and QueryCounterpartyPayeeResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.counterpartyPayee = function counterpartyPayee(request, callback) { - return this.rpcCall(counterpartyPayee, $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest, $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse, request, callback); - }, "name", { value: "CounterpartyPayee" }); - - /** - * Calls CounterpartyPayee. - * @function counterpartyPayee - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} request QueryCounterpartyPayeeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#feeEnabledChannels}. - * @memberof ibc.applications.fee.v1.Query - * @typedef FeeEnabledChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} [response] QueryFeeEnabledChannelsResponse - */ - - /** - * Calls FeeEnabledChannels. - * @function feeEnabledChannels - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} request QueryFeeEnabledChannelsRequest message or plain object - * @param {ibc.applications.fee.v1.Query.FeeEnabledChannelsCallback} callback Node-style callback called with the error, if any, and QueryFeeEnabledChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.feeEnabledChannels = function feeEnabledChannels(request, callback) { - return this.rpcCall(feeEnabledChannels, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse, request, callback); - }, "name", { value: "FeeEnabledChannels" }); - - /** - * Calls FeeEnabledChannels. - * @function feeEnabledChannels - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} request QueryFeeEnabledChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.fee.v1.Query#feeEnabledChannel}. - * @memberof ibc.applications.fee.v1.Query - * @typedef FeeEnabledChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} [response] QueryFeeEnabledChannelResponse - */ - - /** - * Calls FeeEnabledChannel. - * @function feeEnabledChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} request QueryFeeEnabledChannelRequest message or plain object - * @param {ibc.applications.fee.v1.Query.FeeEnabledChannelCallback} callback Node-style callback called with the error, if any, and QueryFeeEnabledChannelResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.feeEnabledChannel = function feeEnabledChannel(request, callback) { - return this.rpcCall(feeEnabledChannel, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest, $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse, request, callback); - }, "name", { value: "FeeEnabledChannel" }); - - /** - * Calls FeeEnabledChannel. - * @function feeEnabledChannel - * @memberof ibc.applications.fee.v1.Query - * @instance - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} request QueryFeeEnabledChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryIncentivizedPacketsRequest = (function() { - - /** - * Properties of a QueryIncentivizedPacketsRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryIncentivizedPacketsRequest pagination - * @property {Long|null} [query_height] QueryIncentivizedPacketsRequest query_height - */ - - /** - * Constructs a new QueryIncentivizedPacketsRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsRequest. - * @implements IQueryIncentivizedPacketsRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest=} [properties] Properties to set - */ - function QueryIncentivizedPacketsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @instance - */ - QueryIncentivizedPacketsRequest.prototype.pagination = null; - - /** - * QueryIncentivizedPacketsRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @instance - */ - QueryIncentivizedPacketsRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryIncentivizedPacketsRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} message QueryIncentivizedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsRequest} message QueryIncentivizedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} QueryIncentivizedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} QueryIncentivizedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} QueryIncentivizedPacketsRequest - */ - QueryIncentivizedPacketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsRequest} message QueryIncentivizedPacketsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.pagination = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsRequest; - })(); - - v1.QueryIncentivizedPacketsResponse = (function() { - - /** - * Properties of a QueryIncentivizedPacketsResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsResponse - * @property {Array.|null} [incentivized_packets] QueryIncentivizedPacketsResponse incentivized_packets - */ - - /** - * Constructs a new QueryIncentivizedPacketsResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsResponse. - * @implements IQueryIncentivizedPacketsResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse=} [properties] Properties to set - */ - function QueryIncentivizedPacketsResponse(properties) { - this.incentivized_packets = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsResponse incentivized_packets. - * @member {Array.} incentivized_packets - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @instance - */ - QueryIncentivizedPacketsResponse.prototype.incentivized_packets = $util.emptyArray; - - /** - * Encodes the specified QueryIncentivizedPacketsResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse} message QueryIncentivizedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incentivized_packets != null && message.incentivized_packets.length) - for (let i = 0; i < message.incentivized_packets.length; ++i) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.incentivized_packets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsResponse} message QueryIncentivizedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} QueryIncentivizedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.incentivized_packets && message.incentivized_packets.length)) - message.incentivized_packets = []; - message.incentivized_packets.push($root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} QueryIncentivizedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.incentivized_packets != null && message.hasOwnProperty("incentivized_packets")) { - if (!Array.isArray(message.incentivized_packets)) - return "incentivized_packets: array expected"; - for (let i = 0; i < message.incentivized_packets.length; ++i) { - let error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.incentivized_packets[i]); - if (error) - return "incentivized_packets." + error; - } - } - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} QueryIncentivizedPacketsResponse - */ - QueryIncentivizedPacketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsResponse(); - if (object.incentivized_packets) { - if (!Array.isArray(object.incentivized_packets)) - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.incentivized_packets: array expected"); - message.incentivized_packets = []; - for (let i = 0; i < object.incentivized_packets.length; ++i) { - if (typeof object.incentivized_packets[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsResponse.incentivized_packets: object expected"); - message.incentivized_packets[i] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.incentivized_packets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsResponse} message QueryIncentivizedPacketsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.incentivized_packets = []; - if (message.incentivized_packets && message.incentivized_packets.length) { - object.incentivized_packets = []; - for (let j = 0; j < message.incentivized_packets.length; ++j) - object.incentivized_packets[j] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.incentivized_packets[j], options); - } - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsResponse; - })(); - - v1.QueryIncentivizedPacketRequest = (function() { - - /** - * Properties of a QueryIncentivizedPacketRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryIncentivizedPacketRequest packet_id - * @property {Long|null} [query_height] QueryIncentivizedPacketRequest query_height - */ - - /** - * Constructs a new QueryIncentivizedPacketRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketRequest. - * @implements IQueryIncentivizedPacketRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest=} [properties] Properties to set - */ - function QueryIncentivizedPacketRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @instance - */ - QueryIncentivizedPacketRequest.prototype.packet_id = null; - - /** - * QueryIncentivizedPacketRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @instance - */ - QueryIncentivizedPacketRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryIncentivizedPacketRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} message QueryIncentivizedPacketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketRequest} message QueryIncentivizedPacketRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} QueryIncentivizedPacketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - case 2: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} QueryIncentivizedPacketRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryIncentivizedPacketRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} QueryIncentivizedPacketRequest - */ - QueryIncentivizedPacketRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketRequest} message QueryIncentivizedPacketRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.packet_id = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryIncentivizedPacketRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketRequest - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketRequest; - })(); - - v1.QueryIncentivizedPacketResponse = (function() { - - /** - * Properties of a QueryIncentivizedPacketResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketResponse - * @property {ibc.applications.fee.v1.IIdentifiedPacketFees|null} [incentivized_packet] QueryIncentivizedPacketResponse incentivized_packet - */ - - /** - * Constructs a new QueryIncentivizedPacketResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketResponse. - * @implements IQueryIncentivizedPacketResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketResponse=} [properties] Properties to set - */ - function QueryIncentivizedPacketResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketResponse incentivized_packet. - * @member {ibc.applications.fee.v1.IIdentifiedPacketFees|null|undefined} incentivized_packet - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @instance - */ - QueryIncentivizedPacketResponse.prototype.incentivized_packet = null; - - /** - * Encodes the specified QueryIncentivizedPacketResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketResponse} message QueryIncentivizedPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incentivized_packet != null && Object.hasOwnProperty.call(message, "incentivized_packet")) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.incentivized_packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketResponse} message QueryIncentivizedPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} QueryIncentivizedPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.incentivized_packet = $root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} QueryIncentivizedPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.incentivized_packet != null && message.hasOwnProperty("incentivized_packet")) { - let error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.incentivized_packet); - if (error) - return "incentivized_packet." + error; - } - return null; - }; - - /** - * Creates a QueryIncentivizedPacketResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} QueryIncentivizedPacketResponse - */ - QueryIncentivizedPacketResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketResponse(); - if (object.incentivized_packet != null) { - if (typeof object.incentivized_packet !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketResponse.incentivized_packet: object expected"); - message.incentivized_packet = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.incentivized_packet); - } - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketResponse} message QueryIncentivizedPacketResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.incentivized_packet = null; - if (message.incentivized_packet != null && message.hasOwnProperty("incentivized_packet")) - object.incentivized_packet = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.incentivized_packet, options); - return object; - }; - - /** - * Converts this QueryIncentivizedPacketResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketResponse - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketResponse; - })(); - - v1.QueryIncentivizedPacketsForChannelRequest = (function() { - - /** - * Properties of a QueryIncentivizedPacketsForChannelRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsForChannelRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryIncentivizedPacketsForChannelRequest pagination - * @property {string|null} [port_id] QueryIncentivizedPacketsForChannelRequest port_id - * @property {string|null} [channel_id] QueryIncentivizedPacketsForChannelRequest channel_id - * @property {Long|null} [query_height] QueryIncentivizedPacketsForChannelRequest query_height - */ - - /** - * Constructs a new QueryIncentivizedPacketsForChannelRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsForChannelRequest. - * @implements IQueryIncentivizedPacketsForChannelRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest=} [properties] Properties to set - */ - function QueryIncentivizedPacketsForChannelRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsForChannelRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.pagination = null; - - /** - * QueryIncentivizedPacketsForChannelRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.port_id = ""; - - /** - * QueryIncentivizedPacketsForChannelRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.channel_id = ""; - - /** - * QueryIncentivizedPacketsForChannelRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - */ - QueryIncentivizedPacketsForChannelRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} message QueryIncentivizedPacketsForChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channel_id); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelRequest} message QueryIncentivizedPacketsForChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} QueryIncentivizedPacketsForChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.channel_id = reader.string(); - break; - case 4: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} QueryIncentivizedPacketsForChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsForChannelRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsForChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsForChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} QueryIncentivizedPacketsForChannelRequest - */ - QueryIncentivizedPacketsForChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsForChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest} message QueryIncentivizedPacketsForChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsForChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.pagination = null; - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsForChannelRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelRequest - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsForChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsForChannelRequest; - })(); - - v1.QueryIncentivizedPacketsForChannelResponse = (function() { - - /** - * Properties of a QueryIncentivizedPacketsForChannelResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryIncentivizedPacketsForChannelResponse - * @property {Array.|null} [incentivized_packets] QueryIncentivizedPacketsForChannelResponse incentivized_packets - */ - - /** - * Constructs a new QueryIncentivizedPacketsForChannelResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryIncentivizedPacketsForChannelResponse. - * @implements IQueryIncentivizedPacketsForChannelResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse=} [properties] Properties to set - */ - function QueryIncentivizedPacketsForChannelResponse(properties) { - this.incentivized_packets = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryIncentivizedPacketsForChannelResponse incentivized_packets. - * @member {Array.} incentivized_packets - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @instance - */ - QueryIncentivizedPacketsForChannelResponse.prototype.incentivized_packets = $util.emptyArray; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse} message QueryIncentivizedPacketsForChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.incentivized_packets != null && message.incentivized_packets.length) - for (let i = 0; i < message.incentivized_packets.length; ++i) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.incentivized_packets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryIncentivizedPacketsForChannelResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryIncentivizedPacketsForChannelResponse} message QueryIncentivizedPacketsForChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryIncentivizedPacketsForChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} QueryIncentivizedPacketsForChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.incentivized_packets && message.incentivized_packets.length)) - message.incentivized_packets = []; - message.incentivized_packets.push($root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryIncentivizedPacketsForChannelResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} QueryIncentivizedPacketsForChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryIncentivizedPacketsForChannelResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryIncentivizedPacketsForChannelResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryIncentivizedPacketsForChannelResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.incentivized_packets != null && message.hasOwnProperty("incentivized_packets")) { - if (!Array.isArray(message.incentivized_packets)) - return "incentivized_packets: array expected"; - for (let i = 0; i < message.incentivized_packets.length; ++i) { - let error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.incentivized_packets[i]); - if (error) - return "incentivized_packets." + error; - } - } - return null; - }; - - /** - * Creates a QueryIncentivizedPacketsForChannelResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} QueryIncentivizedPacketsForChannelResponse - */ - QueryIncentivizedPacketsForChannelResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse(); - if (object.incentivized_packets) { - if (!Array.isArray(object.incentivized_packets)) - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.incentivized_packets: array expected"); - message.incentivized_packets = []; - for (let i = 0; i < object.incentivized_packets.length; ++i) { - if (typeof object.incentivized_packets[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse.incentivized_packets: object expected"); - message.incentivized_packets[i] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.incentivized_packets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryIncentivizedPacketsForChannelResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @static - * @param {ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse} message QueryIncentivizedPacketsForChannelResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryIncentivizedPacketsForChannelResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.incentivized_packets = []; - if (message.incentivized_packets && message.incentivized_packets.length) { - object.incentivized_packets = []; - for (let j = 0; j < message.incentivized_packets.length; ++j) - object.incentivized_packets[j] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.incentivized_packets[j], options); - } - return object; - }; - - /** - * Converts this QueryIncentivizedPacketsForChannelResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryIncentivizedPacketsForChannelResponse - * @instance - * @returns {Object.} JSON object - */ - QueryIncentivizedPacketsForChannelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryIncentivizedPacketsForChannelResponse; - })(); - - v1.QueryTotalRecvFeesRequest = (function() { - - /** - * Properties of a QueryTotalRecvFeesRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalRecvFeesRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryTotalRecvFeesRequest packet_id - */ - - /** - * Constructs a new QueryTotalRecvFeesRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalRecvFeesRequest. - * @implements IQueryTotalRecvFeesRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest=} [properties] Properties to set - */ - function QueryTotalRecvFeesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalRecvFeesRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @instance - */ - QueryTotalRecvFeesRequest.prototype.packet_id = null; - - /** - * Encodes the specified QueryTotalRecvFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} message QueryTotalRecvFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalRecvFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesRequest} message QueryTotalRecvFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalRecvFeesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} QueryTotalRecvFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalRecvFeesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} QueryTotalRecvFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalRecvFeesRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalRecvFeesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a QueryTotalRecvFeesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} QueryTotalRecvFeesRequest - */ - QueryTotalRecvFeesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalRecvFeesRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalRecvFeesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @static - * @param {ibc.applications.fee.v1.QueryTotalRecvFeesRequest} message QueryTotalRecvFeesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalRecvFeesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this QueryTotalRecvFeesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalRecvFeesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalRecvFeesRequest; - })(); - - v1.QueryTotalRecvFeesResponse = (function() { - - /** - * Properties of a QueryTotalRecvFeesResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalRecvFeesResponse - * @property {Array.|null} [recv_fees] QueryTotalRecvFeesResponse recv_fees - */ - - /** - * Constructs a new QueryTotalRecvFeesResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalRecvFeesResponse. - * @implements IQueryTotalRecvFeesResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesResponse=} [properties] Properties to set - */ - function QueryTotalRecvFeesResponse(properties) { - this.recv_fees = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalRecvFeesResponse recv_fees. - * @member {Array.} recv_fees - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @instance - */ - QueryTotalRecvFeesResponse.prototype.recv_fees = $util.emptyArray; - - /** - * Encodes the specified QueryTotalRecvFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesResponse} message QueryTotalRecvFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.recv_fees != null && message.recv_fees.length) - for (let i = 0; i < message.recv_fees.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.recv_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalRecvFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalRecvFeesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalRecvFeesResponse} message QueryTotalRecvFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalRecvFeesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalRecvFeesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} QueryTotalRecvFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.recv_fees && message.recv_fees.length)) - message.recv_fees = []; - message.recv_fees.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalRecvFeesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} QueryTotalRecvFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalRecvFeesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalRecvFeesResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalRecvFeesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.recv_fees != null && message.hasOwnProperty("recv_fees")) { - if (!Array.isArray(message.recv_fees)) - return "recv_fees: array expected"; - for (let i = 0; i < message.recv_fees.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.recv_fees[i]); - if (error) - return "recv_fees." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalRecvFeesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} QueryTotalRecvFeesResponse - */ - QueryTotalRecvFeesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryTotalRecvFeesResponse(); - if (object.recv_fees) { - if (!Array.isArray(object.recv_fees)) - throw TypeError(".ibc.applications.fee.v1.QueryTotalRecvFeesResponse.recv_fees: array expected"); - message.recv_fees = []; - for (let i = 0; i < object.recv_fees.length; ++i) { - if (typeof object.recv_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalRecvFeesResponse.recv_fees: object expected"); - message.recv_fees[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.recv_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalRecvFeesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @static - * @param {ibc.applications.fee.v1.QueryTotalRecvFeesResponse} message QueryTotalRecvFeesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalRecvFeesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.recv_fees = []; - if (message.recv_fees && message.recv_fees.length) { - object.recv_fees = []; - for (let j = 0; j < message.recv_fees.length; ++j) - object.recv_fees[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.recv_fees[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalRecvFeesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalRecvFeesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalRecvFeesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalRecvFeesResponse; - })(); - - v1.QueryTotalAckFeesRequest = (function() { - - /** - * Properties of a QueryTotalAckFeesRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalAckFeesRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryTotalAckFeesRequest packet_id - */ - - /** - * Constructs a new QueryTotalAckFeesRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalAckFeesRequest. - * @implements IQueryTotalAckFeesRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest=} [properties] Properties to set - */ - function QueryTotalAckFeesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalAckFeesRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @instance - */ - QueryTotalAckFeesRequest.prototype.packet_id = null; - - /** - * Encodes the specified QueryTotalAckFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} message QueryTotalAckFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalAckFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesRequest} message QueryTotalAckFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalAckFeesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesRequest} QueryTotalAckFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalAckFeesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesRequest} QueryTotalAckFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalAckFeesRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalAckFeesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a QueryTotalAckFeesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesRequest} QueryTotalAckFeesRequest - */ - QueryTotalAckFeesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalAckFeesRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalAckFeesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @static - * @param {ibc.applications.fee.v1.QueryTotalAckFeesRequest} message QueryTotalAckFeesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalAckFeesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this QueryTotalAckFeesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalAckFeesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalAckFeesRequest; - })(); - - v1.QueryTotalAckFeesResponse = (function() { - - /** - * Properties of a QueryTotalAckFeesResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalAckFeesResponse - * @property {Array.|null} [ack_fees] QueryTotalAckFeesResponse ack_fees - */ - - /** - * Constructs a new QueryTotalAckFeesResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalAckFeesResponse. - * @implements IQueryTotalAckFeesResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesResponse=} [properties] Properties to set - */ - function QueryTotalAckFeesResponse(properties) { - this.ack_fees = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalAckFeesResponse ack_fees. - * @member {Array.} ack_fees - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @instance - */ - QueryTotalAckFeesResponse.prototype.ack_fees = $util.emptyArray; - - /** - * Encodes the specified QueryTotalAckFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesResponse} message QueryTotalAckFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ack_fees != null && message.ack_fees.length) - for (let i = 0; i < message.ack_fees.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.ack_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalAckFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalAckFeesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalAckFeesResponse} message QueryTotalAckFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalAckFeesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalAckFeesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesResponse} QueryTotalAckFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ack_fees && message.ack_fees.length)) - message.ack_fees = []; - message.ack_fees.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalAckFeesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesResponse} QueryTotalAckFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalAckFeesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalAckFeesResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalAckFeesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ack_fees != null && message.hasOwnProperty("ack_fees")) { - if (!Array.isArray(message.ack_fees)) - return "ack_fees: array expected"; - for (let i = 0; i < message.ack_fees.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.ack_fees[i]); - if (error) - return "ack_fees." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalAckFeesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalAckFeesResponse} QueryTotalAckFeesResponse - */ - QueryTotalAckFeesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryTotalAckFeesResponse(); - if (object.ack_fees) { - if (!Array.isArray(object.ack_fees)) - throw TypeError(".ibc.applications.fee.v1.QueryTotalAckFeesResponse.ack_fees: array expected"); - message.ack_fees = []; - for (let i = 0; i < object.ack_fees.length; ++i) { - if (typeof object.ack_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalAckFeesResponse.ack_fees: object expected"); - message.ack_fees[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.ack_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalAckFeesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @static - * @param {ibc.applications.fee.v1.QueryTotalAckFeesResponse} message QueryTotalAckFeesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalAckFeesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.ack_fees = []; - if (message.ack_fees && message.ack_fees.length) { - object.ack_fees = []; - for (let j = 0; j < message.ack_fees.length; ++j) - object.ack_fees[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.ack_fees[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalAckFeesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalAckFeesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalAckFeesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalAckFeesResponse; - })(); - - v1.QueryTotalTimeoutFeesRequest = (function() { - - /** - * Properties of a QueryTotalTimeoutFeesRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalTimeoutFeesRequest - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] QueryTotalTimeoutFeesRequest packet_id - */ - - /** - * Constructs a new QueryTotalTimeoutFeesRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalTimeoutFeesRequest. - * @implements IQueryTotalTimeoutFeesRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest=} [properties] Properties to set - */ - function QueryTotalTimeoutFeesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalTimeoutFeesRequest packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @instance - */ - QueryTotalTimeoutFeesRequest.prototype.packet_id = null; - - /** - * Encodes the specified QueryTotalTimeoutFeesRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} message QueryTotalTimeoutFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalTimeoutFeesRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesRequest} message QueryTotalTimeoutFeesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalTimeoutFeesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} QueryTotalTimeoutFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalTimeoutFeesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} QueryTotalTimeoutFeesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalTimeoutFeesRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalTimeoutFeesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a QueryTotalTimeoutFeesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} QueryTotalTimeoutFeesRequest - */ - QueryTotalTimeoutFeesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest(); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalTimeoutFeesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @static - * @param {ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest} message QueryTotalTimeoutFeesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalTimeoutFeesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.packet_id = null; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this QueryTotalTimeoutFeesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalTimeoutFeesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalTimeoutFeesRequest; - })(); - - v1.QueryTotalTimeoutFeesResponse = (function() { - - /** - * Properties of a QueryTotalTimeoutFeesResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryTotalTimeoutFeesResponse - * @property {Array.|null} [timeout_fees] QueryTotalTimeoutFeesResponse timeout_fees - */ - - /** - * Constructs a new QueryTotalTimeoutFeesResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryTotalTimeoutFeesResponse. - * @implements IQueryTotalTimeoutFeesResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse=} [properties] Properties to set - */ - function QueryTotalTimeoutFeesResponse(properties) { - this.timeout_fees = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalTimeoutFeesResponse timeout_fees. - * @member {Array.} timeout_fees - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @instance - */ - QueryTotalTimeoutFeesResponse.prototype.timeout_fees = $util.emptyArray; - - /** - * Encodes the specified QueryTotalTimeoutFeesResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse} message QueryTotalTimeoutFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timeout_fees != null && message.timeout_fees.length) - for (let i = 0; i < message.timeout_fees.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.timeout_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalTimeoutFeesResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {ibc.applications.fee.v1.IQueryTotalTimeoutFeesResponse} message QueryTotalTimeoutFeesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalTimeoutFeesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalTimeoutFeesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} QueryTotalTimeoutFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.timeout_fees && message.timeout_fees.length)) - message.timeout_fees = []; - message.timeout_fees.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalTimeoutFeesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} QueryTotalTimeoutFeesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalTimeoutFeesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalTimeoutFeesResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalTimeoutFeesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timeout_fees != null && message.hasOwnProperty("timeout_fees")) { - if (!Array.isArray(message.timeout_fees)) - return "timeout_fees: array expected"; - for (let i = 0; i < message.timeout_fees.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.timeout_fees[i]); - if (error) - return "timeout_fees." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalTimeoutFeesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} QueryTotalTimeoutFeesResponse - */ - QueryTotalTimeoutFeesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse(); - if (object.timeout_fees) { - if (!Array.isArray(object.timeout_fees)) - throw TypeError(".ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.timeout_fees: array expected"); - message.timeout_fees = []; - for (let i = 0; i < object.timeout_fees.length; ++i) { - if (typeof object.timeout_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse.timeout_fees: object expected"); - message.timeout_fees[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.timeout_fees[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalTimeoutFeesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @static - * @param {ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse} message QueryTotalTimeoutFeesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalTimeoutFeesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.timeout_fees = []; - if (message.timeout_fees && message.timeout_fees.length) { - object.timeout_fees = []; - for (let j = 0; j < message.timeout_fees.length; ++j) - object.timeout_fees[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.timeout_fees[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalTimeoutFeesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryTotalTimeoutFeesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalTimeoutFeesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalTimeoutFeesResponse; - })(); - - v1.QueryPayeeRequest = (function() { - - /** - * Properties of a QueryPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryPayeeRequest - * @property {string|null} [channel_id] QueryPayeeRequest channel_id - * @property {string|null} [relayer] QueryPayeeRequest relayer - */ - - /** - * Constructs a new QueryPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryPayeeRequest. - * @implements IQueryPayeeRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryPayeeRequest=} [properties] Properties to set - */ - function QueryPayeeRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPayeeRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @instance - */ - QueryPayeeRequest.prototype.channel_id = ""; - - /** - * QueryPayeeRequest relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @instance - */ - QueryPayeeRequest.prototype.relayer = ""; - - /** - * Encodes the specified QueryPayeeRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} message QueryPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - return writer; - }; - - /** - * Encodes the specified QueryPayeeRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeRequest} message QueryPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPayeeRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryPayeeRequest} QueryPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryPayeeRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPayeeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryPayeeRequest} QueryPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPayeeRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPayeeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - return null; - }; - - /** - * Creates a QueryPayeeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryPayeeRequest} QueryPayeeRequest - */ - QueryPayeeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryPayeeRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryPayeeRequest(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - return message; - }; - - /** - * Creates a plain object from a QueryPayeeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @static - * @param {ibc.applications.fee.v1.QueryPayeeRequest} message QueryPayeeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPayeeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - return object; - }; - - /** - * Converts this QueryPayeeRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryPayeeRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPayeeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPayeeRequest; - })(); - - v1.QueryPayeeResponse = (function() { - - /** - * Properties of a QueryPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryPayeeResponse - * @property {string|null} [payee_address] QueryPayeeResponse payee_address - */ - - /** - * Constructs a new QueryPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryPayeeResponse. - * @implements IQueryPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryPayeeResponse=} [properties] Properties to set - */ - function QueryPayeeResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPayeeResponse payee_address. - * @member {string} payee_address - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @instance - */ - QueryPayeeResponse.prototype.payee_address = ""; - - /** - * Encodes the specified QueryPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeResponse} message QueryPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.payee_address != null && Object.hasOwnProperty.call(message, "payee_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.payee_address); - return writer; - }; - - /** - * Encodes the specified QueryPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryPayeeResponse} message QueryPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryPayeeResponse} QueryPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryPayeeResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payee_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryPayeeResponse} QueryPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.payee_address != null && message.hasOwnProperty("payee_address")) - if (!$util.isString(message.payee_address)) - return "payee_address: string expected"; - return null; - }; - - /** - * Creates a QueryPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryPayeeResponse} QueryPayeeResponse - */ - QueryPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryPayeeResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryPayeeResponse(); - if (object.payee_address != null) - message.payee_address = String(object.payee_address); - return message; - }; - - /** - * Creates a plain object from a QueryPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @static - * @param {ibc.applications.fee.v1.QueryPayeeResponse} message QueryPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPayeeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.payee_address = ""; - if (message.payee_address != null && message.hasOwnProperty("payee_address")) - object.payee_address = message.payee_address; - return object; - }; - - /** - * Converts this QueryPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPayeeResponse; - })(); - - v1.QueryCounterpartyPayeeRequest = (function() { - - /** - * Properties of a QueryCounterpartyPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryCounterpartyPayeeRequest - * @property {string|null} [channel_id] QueryCounterpartyPayeeRequest channel_id - * @property {string|null} [relayer] QueryCounterpartyPayeeRequest relayer - */ - - /** - * Constructs a new QueryCounterpartyPayeeRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryCounterpartyPayeeRequest. - * @implements IQueryCounterpartyPayeeRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest=} [properties] Properties to set - */ - function QueryCounterpartyPayeeRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryCounterpartyPayeeRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @instance - */ - QueryCounterpartyPayeeRequest.prototype.channel_id = ""; - - /** - * QueryCounterpartyPayeeRequest relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @instance - */ - QueryCounterpartyPayeeRequest.prototype.relayer = ""; - - /** - * Encodes the specified QueryCounterpartyPayeeRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} message QueryCounterpartyPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - return writer; - }; - - /** - * Encodes the specified QueryCounterpartyPayeeRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeRequest} message QueryCounterpartyPayeeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryCounterpartyPayeeRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} QueryCounterpartyPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryCounterpartyPayeeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} QueryCounterpartyPayeeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryCounterpartyPayeeRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryCounterpartyPayeeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - return null; - }; - - /** - * Creates a QueryCounterpartyPayeeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} QueryCounterpartyPayeeRequest - */ - QueryCounterpartyPayeeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeRequest(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - return message; - }; - - /** - * Creates a plain object from a QueryCounterpartyPayeeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @static - * @param {ibc.applications.fee.v1.QueryCounterpartyPayeeRequest} message QueryCounterpartyPayeeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryCounterpartyPayeeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - return object; - }; - - /** - * Converts this QueryCounterpartyPayeeRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeRequest - * @instance - * @returns {Object.} JSON object - */ - QueryCounterpartyPayeeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryCounterpartyPayeeRequest; - })(); - - v1.QueryCounterpartyPayeeResponse = (function() { - - /** - * Properties of a QueryCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryCounterpartyPayeeResponse - * @property {string|null} [counterparty_payee] QueryCounterpartyPayeeResponse counterparty_payee - */ - - /** - * Constructs a new QueryCounterpartyPayeeResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryCounterpartyPayeeResponse. - * @implements IQueryCounterpartyPayeeResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse=} [properties] Properties to set - */ - function QueryCounterpartyPayeeResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryCounterpartyPayeeResponse counterparty_payee. - * @member {string} counterparty_payee - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @instance - */ - QueryCounterpartyPayeeResponse.prototype.counterparty_payee = ""; - - /** - * Encodes the specified QueryCounterpartyPayeeResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse} message QueryCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.counterparty_payee != null && Object.hasOwnProperty.call(message, "counterparty_payee")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.counterparty_payee); - return writer; - }; - - /** - * Encodes the specified QueryCounterpartyPayeeResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryCounterpartyPayeeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.IQueryCounterpartyPayeeResponse} message QueryCounterpartyPayeeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryCounterpartyPayeeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryCounterpartyPayeeResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} QueryCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.counterparty_payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryCounterpartyPayeeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} QueryCounterpartyPayeeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryCounterpartyPayeeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryCounterpartyPayeeResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryCounterpartyPayeeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - if (!$util.isString(message.counterparty_payee)) - return "counterparty_payee: string expected"; - return null; - }; - - /** - * Creates a QueryCounterpartyPayeeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} QueryCounterpartyPayeeResponse - */ - QueryCounterpartyPayeeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryCounterpartyPayeeResponse(); - if (object.counterparty_payee != null) - message.counterparty_payee = String(object.counterparty_payee); - return message; - }; - - /** - * Creates a plain object from a QueryCounterpartyPayeeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @static - * @param {ibc.applications.fee.v1.QueryCounterpartyPayeeResponse} message QueryCounterpartyPayeeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryCounterpartyPayeeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.counterparty_payee = ""; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - object.counterparty_payee = message.counterparty_payee; - return object; - }; - - /** - * Converts this QueryCounterpartyPayeeResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryCounterpartyPayeeResponse - * @instance - * @returns {Object.} JSON object - */ - QueryCounterpartyPayeeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryCounterpartyPayeeResponse; - })(); - - v1.QueryFeeEnabledChannelsRequest = (function() { - - /** - * Properties of a QueryFeeEnabledChannelsRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryFeeEnabledChannelsRequest pagination - * @property {Long|null} [query_height] QueryFeeEnabledChannelsRequest query_height - */ - - /** - * Constructs a new QueryFeeEnabledChannelsRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelsRequest. - * @implements IQueryFeeEnabledChannelsRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest=} [properties] Properties to set - */ - function QueryFeeEnabledChannelsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @instance - */ - QueryFeeEnabledChannelsRequest.prototype.pagination = null; - - /** - * QueryFeeEnabledChannelsRequest query_height. - * @member {Long} query_height - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @instance - */ - QueryFeeEnabledChannelsRequest.prototype.query_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryFeeEnabledChannelsRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} message QueryFeeEnabledChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.query_height != null && Object.hasOwnProperty.call(message, "query_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.query_height); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelsRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsRequest} message QueryFeeEnabledChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} QueryFeeEnabledChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 2: - message.query_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} QueryFeeEnabledChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelsRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (!$util.isInteger(message.query_height) && !(message.query_height && $util.isInteger(message.query_height.low) && $util.isInteger(message.query_height.high))) - return "query_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} QueryFeeEnabledChannelsRequest - */ - QueryFeeEnabledChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.query_height != null) - if ($util.Long) - (message.query_height = $util.Long.fromValue(object.query_height)).unsigned = true; - else if (typeof object.query_height === "string") - message.query_height = parseInt(object.query_height, 10); - else if (typeof object.query_height === "number") - message.query_height = object.query_height; - else if (typeof object.query_height === "object") - message.query_height = new $util.LongBits(object.query_height.low >>> 0, object.query_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest} message QueryFeeEnabledChannelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.pagination = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.query_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_height = options.longs === String ? "0" : 0; - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.query_height != null && message.hasOwnProperty("query_height")) - if (typeof message.query_height === "number") - object.query_height = options.longs === String ? String(message.query_height) : message.query_height; - else - object.query_height = options.longs === String ? $util.Long.prototype.toString.call(message.query_height) : options.longs === Number ? new $util.LongBits(message.query_height.low >>> 0, message.query_height.high >>> 0).toNumber(true) : message.query_height; - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelsRequest; - })(); - - v1.QueryFeeEnabledChannelsResponse = (function() { - - /** - * Properties of a QueryFeeEnabledChannelsResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelsResponse - * @property {Array.|null} [fee_enabled_channels] QueryFeeEnabledChannelsResponse fee_enabled_channels - */ - - /** - * Constructs a new QueryFeeEnabledChannelsResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelsResponse. - * @implements IQueryFeeEnabledChannelsResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse=} [properties] Properties to set - */ - function QueryFeeEnabledChannelsResponse(properties) { - this.fee_enabled_channels = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelsResponse fee_enabled_channels. - * @member {Array.} fee_enabled_channels - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @instance - */ - QueryFeeEnabledChannelsResponse.prototype.fee_enabled_channels = $util.emptyArray; - - /** - * Encodes the specified QueryFeeEnabledChannelsResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse} message QueryFeeEnabledChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_enabled_channels != null && message.fee_enabled_channels.length) - for (let i = 0; i < message.fee_enabled_channels.length; ++i) - $root.ibc.applications.fee.v1.FeeEnabledChannel.encode(message.fee_enabled_channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelsResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelsResponse} message QueryFeeEnabledChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} QueryFeeEnabledChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.fee_enabled_channels && message.fee_enabled_channels.length)) - message.fee_enabled_channels = []; - message.fee_enabled_channels.push($root.ibc.applications.fee.v1.FeeEnabledChannel.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} QueryFeeEnabledChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelsResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_enabled_channels != null && message.hasOwnProperty("fee_enabled_channels")) { - if (!Array.isArray(message.fee_enabled_channels)) - return "fee_enabled_channels: array expected"; - for (let i = 0; i < message.fee_enabled_channels.length; ++i) { - let error = $root.ibc.applications.fee.v1.FeeEnabledChannel.verify(message.fee_enabled_channels[i]); - if (error) - return "fee_enabled_channels." + error; - } - } - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} QueryFeeEnabledChannelsResponse - */ - QueryFeeEnabledChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse(); - if (object.fee_enabled_channels) { - if (!Array.isArray(object.fee_enabled_channels)) - throw TypeError(".ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.fee_enabled_channels: array expected"); - message.fee_enabled_channels = []; - for (let i = 0; i < object.fee_enabled_channels.length; ++i) { - if (typeof object.fee_enabled_channels[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse.fee_enabled_channels: object expected"); - message.fee_enabled_channels[i] = $root.ibc.applications.fee.v1.FeeEnabledChannel.fromObject(object.fee_enabled_channels[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse} message QueryFeeEnabledChannelsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.fee_enabled_channels = []; - if (message.fee_enabled_channels && message.fee_enabled_channels.length) { - object.fee_enabled_channels = []; - for (let j = 0; j < message.fee_enabled_channels.length; ++j) - object.fee_enabled_channels[j] = $root.ibc.applications.fee.v1.FeeEnabledChannel.toObject(message.fee_enabled_channels[j], options); - } - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelsResponse; - })(); - - v1.QueryFeeEnabledChannelRequest = (function() { - - /** - * Properties of a QueryFeeEnabledChannelRequest. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelRequest - * @property {string|null} [port_id] QueryFeeEnabledChannelRequest port_id - * @property {string|null} [channel_id] QueryFeeEnabledChannelRequest channel_id - */ - - /** - * Constructs a new QueryFeeEnabledChannelRequest. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelRequest. - * @implements IQueryFeeEnabledChannelRequest - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest=} [properties] Properties to set - */ - function QueryFeeEnabledChannelRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @instance - */ - QueryFeeEnabledChannelRequest.prototype.port_id = ""; - - /** - * QueryFeeEnabledChannelRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @instance - */ - QueryFeeEnabledChannelRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryFeeEnabledChannelRequest message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} message QueryFeeEnabledChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelRequest message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelRequest} message QueryFeeEnabledChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} QueryFeeEnabledChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} QueryFeeEnabledChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelRequest message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} QueryFeeEnabledChannelRequest - */ - QueryFeeEnabledChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest) - return object; - let message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelRequest} message QueryFeeEnabledChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelRequest to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelRequest - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelRequest; - })(); - - v1.QueryFeeEnabledChannelResponse = (function() { - - /** - * Properties of a QueryFeeEnabledChannelResponse. - * @memberof ibc.applications.fee.v1 - * @interface IQueryFeeEnabledChannelResponse - * @property {boolean|null} [fee_enabled] QueryFeeEnabledChannelResponse fee_enabled - */ - - /** - * Constructs a new QueryFeeEnabledChannelResponse. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a QueryFeeEnabledChannelResponse. - * @implements IQueryFeeEnabledChannelResponse - * @constructor - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse=} [properties] Properties to set - */ - function QueryFeeEnabledChannelResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFeeEnabledChannelResponse fee_enabled. - * @member {boolean} fee_enabled - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @instance - */ - QueryFeeEnabledChannelResponse.prototype.fee_enabled = false; - - /** - * Encodes the specified QueryFeeEnabledChannelResponse message. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse} message QueryFeeEnabledChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_enabled != null && Object.hasOwnProperty.call(message, "fee_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.fee_enabled); - return writer; - }; - - /** - * Encodes the specified QueryFeeEnabledChannelResponse message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.QueryFeeEnabledChannelResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {ibc.applications.fee.v1.IQueryFeeEnabledChannelResponse} message QueryFeeEnabledChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFeeEnabledChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFeeEnabledChannelResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} QueryFeeEnabledChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFeeEnabledChannelResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} QueryFeeEnabledChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFeeEnabledChannelResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFeeEnabledChannelResponse message. - * @function verify - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFeeEnabledChannelResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_enabled != null && message.hasOwnProperty("fee_enabled")) - if (typeof message.fee_enabled !== "boolean") - return "fee_enabled: boolean expected"; - return null; - }; - - /** - * Creates a QueryFeeEnabledChannelResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} QueryFeeEnabledChannelResponse - */ - QueryFeeEnabledChannelResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse) - return object; - let message = new $root.ibc.applications.fee.v1.QueryFeeEnabledChannelResponse(); - if (object.fee_enabled != null) - message.fee_enabled = Boolean(object.fee_enabled); - return message; - }; - - /** - * Creates a plain object from a QueryFeeEnabledChannelResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @static - * @param {ibc.applications.fee.v1.QueryFeeEnabledChannelResponse} message QueryFeeEnabledChannelResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFeeEnabledChannelResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.fee_enabled = false; - if (message.fee_enabled != null && message.hasOwnProperty("fee_enabled")) - object.fee_enabled = message.fee_enabled; - return object; - }; - - /** - * Converts this QueryFeeEnabledChannelResponse to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.QueryFeeEnabledChannelResponse - * @instance - * @returns {Object.} JSON object - */ - QueryFeeEnabledChannelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFeeEnabledChannelResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.applications.fee.v1 - * @interface IGenesisState - * @property {Array.|null} [identified_fees] GenesisState identified_fees - * @property {Array.|null} [fee_enabled_channels] GenesisState fee_enabled_channels - * @property {Array.|null} [registered_payees] GenesisState registered_payees - * @property {Array.|null} [registered_counterparty_payees] GenesisState registered_counterparty_payees - * @property {Array.|null} [forward_relayers] GenesisState forward_relayers - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.applications.fee.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.identified_fees = []; - this.fee_enabled_channels = []; - this.registered_payees = []; - this.registered_counterparty_payees = []; - this.forward_relayers = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState identified_fees. - * @member {Array.} identified_fees - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.identified_fees = $util.emptyArray; - - /** - * GenesisState fee_enabled_channels. - * @member {Array.} fee_enabled_channels - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.fee_enabled_channels = $util.emptyArray; - - /** - * GenesisState registered_payees. - * @member {Array.} registered_payees - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.registered_payees = $util.emptyArray; - - /** - * GenesisState registered_counterparty_payees. - * @member {Array.} registered_counterparty_payees - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.registered_counterparty_payees = $util.emptyArray; - - /** - * GenesisState forward_relayers. - * @member {Array.} forward_relayers - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - */ - GenesisState.prototype.forward_relayers = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.fee.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {ibc.applications.fee.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identified_fees != null && message.identified_fees.length) - for (let i = 0; i < message.identified_fees.length; ++i) - $root.ibc.applications.fee.v1.IdentifiedPacketFees.encode(message.identified_fees[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fee_enabled_channels != null && message.fee_enabled_channels.length) - for (let i = 0; i < message.fee_enabled_channels.length; ++i) - $root.ibc.applications.fee.v1.FeeEnabledChannel.encode(message.fee_enabled_channels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.registered_payees != null && message.registered_payees.length) - for (let i = 0; i < message.registered_payees.length; ++i) - $root.ibc.applications.fee.v1.RegisteredPayee.encode(message.registered_payees[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.registered_counterparty_payees != null && message.registered_counterparty_payees.length) - for (let i = 0; i < message.registered_counterparty_payees.length; ++i) - $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.encode(message.registered_counterparty_payees[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.forward_relayers != null && message.forward_relayers.length) - for (let i = 0; i < message.forward_relayers.length; ++i) - $root.ibc.applications.fee.v1.ForwardRelayerAddress.encode(message.forward_relayers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {ibc.applications.fee.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.identified_fees && message.identified_fees.length)) - message.identified_fees = []; - message.identified_fees.push($root.ibc.applications.fee.v1.IdentifiedPacketFees.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.fee_enabled_channels && message.fee_enabled_channels.length)) - message.fee_enabled_channels = []; - message.fee_enabled_channels.push($root.ibc.applications.fee.v1.FeeEnabledChannel.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.registered_payees && message.registered_payees.length)) - message.registered_payees = []; - message.registered_payees.push($root.ibc.applications.fee.v1.RegisteredPayee.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.registered_counterparty_payees && message.registered_counterparty_payees.length)) - message.registered_counterparty_payees = []; - message.registered_counterparty_payees.push($root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.forward_relayers && message.forward_relayers.length)) - message.forward_relayers = []; - message.forward_relayers.push($root.ibc.applications.fee.v1.ForwardRelayerAddress.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identified_fees != null && message.hasOwnProperty("identified_fees")) { - if (!Array.isArray(message.identified_fees)) - return "identified_fees: array expected"; - for (let i = 0; i < message.identified_fees.length; ++i) { - let error = $root.ibc.applications.fee.v1.IdentifiedPacketFees.verify(message.identified_fees[i]); - if (error) - return "identified_fees." + error; - } - } - if (message.fee_enabled_channels != null && message.hasOwnProperty("fee_enabled_channels")) { - if (!Array.isArray(message.fee_enabled_channels)) - return "fee_enabled_channels: array expected"; - for (let i = 0; i < message.fee_enabled_channels.length; ++i) { - let error = $root.ibc.applications.fee.v1.FeeEnabledChannel.verify(message.fee_enabled_channels[i]); - if (error) - return "fee_enabled_channels." + error; - } - } - if (message.registered_payees != null && message.hasOwnProperty("registered_payees")) { - if (!Array.isArray(message.registered_payees)) - return "registered_payees: array expected"; - for (let i = 0; i < message.registered_payees.length; ++i) { - let error = $root.ibc.applications.fee.v1.RegisteredPayee.verify(message.registered_payees[i]); - if (error) - return "registered_payees." + error; - } - } - if (message.registered_counterparty_payees != null && message.hasOwnProperty("registered_counterparty_payees")) { - if (!Array.isArray(message.registered_counterparty_payees)) - return "registered_counterparty_payees: array expected"; - for (let i = 0; i < message.registered_counterparty_payees.length; ++i) { - let error = $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify(message.registered_counterparty_payees[i]); - if (error) - return "registered_counterparty_payees." + error; - } - } - if (message.forward_relayers != null && message.hasOwnProperty("forward_relayers")) { - if (!Array.isArray(message.forward_relayers)) - return "forward_relayers: array expected"; - for (let i = 0; i < message.forward_relayers.length; ++i) { - let error = $root.ibc.applications.fee.v1.ForwardRelayerAddress.verify(message.forward_relayers[i]); - if (error) - return "forward_relayers." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.GenesisState) - return object; - let message = new $root.ibc.applications.fee.v1.GenesisState(); - if (object.identified_fees) { - if (!Array.isArray(object.identified_fees)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.identified_fees: array expected"); - message.identified_fees = []; - for (let i = 0; i < object.identified_fees.length; ++i) { - if (typeof object.identified_fees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.identified_fees: object expected"); - message.identified_fees[i] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.fromObject(object.identified_fees[i]); - } - } - if (object.fee_enabled_channels) { - if (!Array.isArray(object.fee_enabled_channels)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.fee_enabled_channels: array expected"); - message.fee_enabled_channels = []; - for (let i = 0; i < object.fee_enabled_channels.length; ++i) { - if (typeof object.fee_enabled_channels[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.fee_enabled_channels: object expected"); - message.fee_enabled_channels[i] = $root.ibc.applications.fee.v1.FeeEnabledChannel.fromObject(object.fee_enabled_channels[i]); - } - } - if (object.registered_payees) { - if (!Array.isArray(object.registered_payees)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_payees: array expected"); - message.registered_payees = []; - for (let i = 0; i < object.registered_payees.length; ++i) { - if (typeof object.registered_payees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_payees: object expected"); - message.registered_payees[i] = $root.ibc.applications.fee.v1.RegisteredPayee.fromObject(object.registered_payees[i]); - } - } - if (object.registered_counterparty_payees) { - if (!Array.isArray(object.registered_counterparty_payees)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_counterparty_payees: array expected"); - message.registered_counterparty_payees = []; - for (let i = 0; i < object.registered_counterparty_payees.length; ++i) { - if (typeof object.registered_counterparty_payees[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.registered_counterparty_payees: object expected"); - message.registered_counterparty_payees[i] = $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.fromObject(object.registered_counterparty_payees[i]); - } - } - if (object.forward_relayers) { - if (!Array.isArray(object.forward_relayers)) - throw TypeError(".ibc.applications.fee.v1.GenesisState.forward_relayers: array expected"); - message.forward_relayers = []; - for (let i = 0; i < object.forward_relayers.length; ++i) { - if (typeof object.forward_relayers[i] !== "object") - throw TypeError(".ibc.applications.fee.v1.GenesisState.forward_relayers: object expected"); - message.forward_relayers[i] = $root.ibc.applications.fee.v1.ForwardRelayerAddress.fromObject(object.forward_relayers[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.GenesisState - * @static - * @param {ibc.applications.fee.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.identified_fees = []; - object.fee_enabled_channels = []; - object.registered_payees = []; - object.registered_counterparty_payees = []; - object.forward_relayers = []; - } - if (message.identified_fees && message.identified_fees.length) { - object.identified_fees = []; - for (let j = 0; j < message.identified_fees.length; ++j) - object.identified_fees[j] = $root.ibc.applications.fee.v1.IdentifiedPacketFees.toObject(message.identified_fees[j], options); - } - if (message.fee_enabled_channels && message.fee_enabled_channels.length) { - object.fee_enabled_channels = []; - for (let j = 0; j < message.fee_enabled_channels.length; ++j) - object.fee_enabled_channels[j] = $root.ibc.applications.fee.v1.FeeEnabledChannel.toObject(message.fee_enabled_channels[j], options); - } - if (message.registered_payees && message.registered_payees.length) { - object.registered_payees = []; - for (let j = 0; j < message.registered_payees.length; ++j) - object.registered_payees[j] = $root.ibc.applications.fee.v1.RegisteredPayee.toObject(message.registered_payees[j], options); - } - if (message.registered_counterparty_payees && message.registered_counterparty_payees.length) { - object.registered_counterparty_payees = []; - for (let j = 0; j < message.registered_counterparty_payees.length; ++j) - object.registered_counterparty_payees[j] = $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee.toObject(message.registered_counterparty_payees[j], options); - } - if (message.forward_relayers && message.forward_relayers.length) { - object.forward_relayers = []; - for (let j = 0; j < message.forward_relayers.length; ++j) - object.forward_relayers[j] = $root.ibc.applications.fee.v1.ForwardRelayerAddress.toObject(message.forward_relayers[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.FeeEnabledChannel = (function() { - - /** - * Properties of a FeeEnabledChannel. - * @memberof ibc.applications.fee.v1 - * @interface IFeeEnabledChannel - * @property {string|null} [port_id] FeeEnabledChannel port_id - * @property {string|null} [channel_id] FeeEnabledChannel channel_id - */ - - /** - * Constructs a new FeeEnabledChannel. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a FeeEnabledChannel. - * @implements IFeeEnabledChannel - * @constructor - * @param {ibc.applications.fee.v1.IFeeEnabledChannel=} [properties] Properties to set - */ - function FeeEnabledChannel(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeeEnabledChannel port_id. - * @member {string} port_id - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @instance - */ - FeeEnabledChannel.prototype.port_id = ""; - - /** - * FeeEnabledChannel channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @instance - */ - FeeEnabledChannel.prototype.channel_id = ""; - - /** - * Encodes the specified FeeEnabledChannel message. Does not implicitly {@link ibc.applications.fee.v1.FeeEnabledChannel.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {ibc.applications.fee.v1.IFeeEnabledChannel} message FeeEnabledChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeEnabledChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified FeeEnabledChannel message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.FeeEnabledChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {ibc.applications.fee.v1.IFeeEnabledChannel} message FeeEnabledChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeEnabledChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeeEnabledChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.FeeEnabledChannel} FeeEnabledChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeEnabledChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.FeeEnabledChannel(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeeEnabledChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.FeeEnabledChannel} FeeEnabledChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeEnabledChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeeEnabledChannel message. - * @function verify - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeeEnabledChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a FeeEnabledChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.FeeEnabledChannel} FeeEnabledChannel - */ - FeeEnabledChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.FeeEnabledChannel) - return object; - let message = new $root.ibc.applications.fee.v1.FeeEnabledChannel(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a FeeEnabledChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @static - * @param {ibc.applications.fee.v1.FeeEnabledChannel} message FeeEnabledChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeeEnabledChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this FeeEnabledChannel to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.FeeEnabledChannel - * @instance - * @returns {Object.} JSON object - */ - FeeEnabledChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FeeEnabledChannel; - })(); - - v1.RegisteredPayee = (function() { - - /** - * Properties of a RegisteredPayee. - * @memberof ibc.applications.fee.v1 - * @interface IRegisteredPayee - * @property {string|null} [channel_id] RegisteredPayee channel_id - * @property {string|null} [relayer] RegisteredPayee relayer - * @property {string|null} [payee] RegisteredPayee payee - */ - - /** - * Constructs a new RegisteredPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a RegisteredPayee. - * @implements IRegisteredPayee - * @constructor - * @param {ibc.applications.fee.v1.IRegisteredPayee=} [properties] Properties to set - */ - function RegisteredPayee(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - */ - RegisteredPayee.prototype.channel_id = ""; - - /** - * RegisteredPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - */ - RegisteredPayee.prototype.relayer = ""; - - /** - * RegisteredPayee payee. - * @member {string} payee - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - */ - RegisteredPayee.prototype.payee = ""; - - /** - * Encodes the specified RegisteredPayee message. Does not implicitly {@link ibc.applications.fee.v1.RegisteredPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredPayee} message RegisteredPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - if (message.payee != null && Object.hasOwnProperty.call(message, "payee")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.payee); - return writer; - }; - - /** - * Encodes the specified RegisteredPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.RegisteredPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredPayee} message RegisteredPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.RegisteredPayee} RegisteredPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.RegisteredPayee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - case 3: - message.payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.RegisteredPayee} RegisteredPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.payee != null && message.hasOwnProperty("payee")) - if (!$util.isString(message.payee)) - return "payee: string expected"; - return null; - }; - - /** - * Creates a RegisteredPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.RegisteredPayee} RegisteredPayee - */ - RegisteredPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.RegisteredPayee) - return object; - let message = new $root.ibc.applications.fee.v1.RegisteredPayee(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.payee != null) - message.payee = String(object.payee); - return message; - }; - - /** - * Creates a plain object from a RegisteredPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @static - * @param {ibc.applications.fee.v1.RegisteredPayee} message RegisteredPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - object.payee = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.payee != null && message.hasOwnProperty("payee")) - object.payee = message.payee; - return object; - }; - - /** - * Converts this RegisteredPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.RegisteredPayee - * @instance - * @returns {Object.} JSON object - */ - RegisteredPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredPayee; - })(); - - v1.RegisteredCounterpartyPayee = (function() { - - /** - * Properties of a RegisteredCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @interface IRegisteredCounterpartyPayee - * @property {string|null} [channel_id] RegisteredCounterpartyPayee channel_id - * @property {string|null} [relayer] RegisteredCounterpartyPayee relayer - * @property {string|null} [counterparty_payee] RegisteredCounterpartyPayee counterparty_payee - */ - - /** - * Constructs a new RegisteredCounterpartyPayee. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a RegisteredCounterpartyPayee. - * @implements IRegisteredCounterpartyPayee - * @constructor - * @param {ibc.applications.fee.v1.IRegisteredCounterpartyPayee=} [properties] Properties to set - */ - function RegisteredCounterpartyPayee(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredCounterpartyPayee channel_id. - * @member {string} channel_id - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - */ - RegisteredCounterpartyPayee.prototype.channel_id = ""; - - /** - * RegisteredCounterpartyPayee relayer. - * @member {string} relayer - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - */ - RegisteredCounterpartyPayee.prototype.relayer = ""; - - /** - * RegisteredCounterpartyPayee counterparty_payee. - * @member {string} counterparty_payee - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - */ - RegisteredCounterpartyPayee.prototype.counterparty_payee = ""; - - /** - * Encodes the specified RegisteredCounterpartyPayee message. Does not implicitly {@link ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredCounterpartyPayee} message RegisteredCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredCounterpartyPayee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.relayer != null && Object.hasOwnProperty.call(message, "relayer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.relayer); - if (message.counterparty_payee != null && Object.hasOwnProperty.call(message, "counterparty_payee")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterparty_payee); - return writer; - }; - - /** - * Encodes the specified RegisteredCounterpartyPayee message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.RegisteredCounterpartyPayee.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.IRegisteredCounterpartyPayee} message RegisteredCounterpartyPayee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredCounterpartyPayee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredCounterpartyPayee message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.RegisteredCounterpartyPayee} RegisteredCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredCounterpartyPayee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.relayer = reader.string(); - break; - case 3: - message.counterparty_payee = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredCounterpartyPayee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.RegisteredCounterpartyPayee} RegisteredCounterpartyPayee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredCounterpartyPayee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredCounterpartyPayee message. - * @function verify - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredCounterpartyPayee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.relayer != null && message.hasOwnProperty("relayer")) - if (!$util.isString(message.relayer)) - return "relayer: string expected"; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - if (!$util.isString(message.counterparty_payee)) - return "counterparty_payee: string expected"; - return null; - }; - - /** - * Creates a RegisteredCounterpartyPayee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.RegisteredCounterpartyPayee} RegisteredCounterpartyPayee - */ - RegisteredCounterpartyPayee.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee) - return object; - let message = new $root.ibc.applications.fee.v1.RegisteredCounterpartyPayee(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.relayer != null) - message.relayer = String(object.relayer); - if (object.counterparty_payee != null) - message.counterparty_payee = String(object.counterparty_payee); - return message; - }; - - /** - * Creates a plain object from a RegisteredCounterpartyPayee message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @static - * @param {ibc.applications.fee.v1.RegisteredCounterpartyPayee} message RegisteredCounterpartyPayee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredCounterpartyPayee.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel_id = ""; - object.relayer = ""; - object.counterparty_payee = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.relayer != null && message.hasOwnProperty("relayer")) - object.relayer = message.relayer; - if (message.counterparty_payee != null && message.hasOwnProperty("counterparty_payee")) - object.counterparty_payee = message.counterparty_payee; - return object; - }; - - /** - * Converts this RegisteredCounterpartyPayee to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.RegisteredCounterpartyPayee - * @instance - * @returns {Object.} JSON object - */ - RegisteredCounterpartyPayee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredCounterpartyPayee; - })(); - - v1.ForwardRelayerAddress = (function() { - - /** - * Properties of a ForwardRelayerAddress. - * @memberof ibc.applications.fee.v1 - * @interface IForwardRelayerAddress - * @property {string|null} [address] ForwardRelayerAddress address - * @property {ibc.core.channel.v1.IPacketId|null} [packet_id] ForwardRelayerAddress packet_id - */ - - /** - * Constructs a new ForwardRelayerAddress. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a ForwardRelayerAddress. - * @implements IForwardRelayerAddress - * @constructor - * @param {ibc.applications.fee.v1.IForwardRelayerAddress=} [properties] Properties to set - */ - function ForwardRelayerAddress(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ForwardRelayerAddress address. - * @member {string} address - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @instance - */ - ForwardRelayerAddress.prototype.address = ""; - - /** - * ForwardRelayerAddress packet_id. - * @member {ibc.core.channel.v1.IPacketId|null|undefined} packet_id - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @instance - */ - ForwardRelayerAddress.prototype.packet_id = null; - - /** - * Encodes the specified ForwardRelayerAddress message. Does not implicitly {@link ibc.applications.fee.v1.ForwardRelayerAddress.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {ibc.applications.fee.v1.IForwardRelayerAddress} message ForwardRelayerAddress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardRelayerAddress.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.ibc.core.channel.v1.PacketId.encode(message.packet_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ForwardRelayerAddress message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.ForwardRelayerAddress.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {ibc.applications.fee.v1.IForwardRelayerAddress} message ForwardRelayerAddress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ForwardRelayerAddress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ForwardRelayerAddress message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.ForwardRelayerAddress} ForwardRelayerAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardRelayerAddress.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.ForwardRelayerAddress(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.packet_id = $root.ibc.core.channel.v1.PacketId.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ForwardRelayerAddress message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.ForwardRelayerAddress} ForwardRelayerAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ForwardRelayerAddress.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ForwardRelayerAddress message. - * @function verify - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ForwardRelayerAddress.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - let error = $root.ibc.core.channel.v1.PacketId.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - return null; - }; - - /** - * Creates a ForwardRelayerAddress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.ForwardRelayerAddress} ForwardRelayerAddress - */ - ForwardRelayerAddress.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.ForwardRelayerAddress) - return object; - let message = new $root.ibc.applications.fee.v1.ForwardRelayerAddress(); - if (object.address != null) - message.address = String(object.address); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".ibc.applications.fee.v1.ForwardRelayerAddress.packet_id: object expected"); - message.packet_id = $root.ibc.core.channel.v1.PacketId.fromObject(object.packet_id); - } - return message; - }; - - /** - * Creates a plain object from a ForwardRelayerAddress message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @static - * @param {ibc.applications.fee.v1.ForwardRelayerAddress} message ForwardRelayerAddress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ForwardRelayerAddress.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.address = ""; - object.packet_id = null; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.ibc.core.channel.v1.PacketId.toObject(message.packet_id, options); - return object; - }; - - /** - * Converts this ForwardRelayerAddress to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.ForwardRelayerAddress - * @instance - * @returns {Object.} JSON object - */ - ForwardRelayerAddress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ForwardRelayerAddress; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof ibc.applications.fee.v1 - * @interface IMetadata - * @property {string|null} [fee_version] Metadata fee_version - * @property {string|null} [app_version] Metadata app_version - */ - - /** - * Constructs a new Metadata. - * @memberof ibc.applications.fee.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {ibc.applications.fee.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata fee_version. - * @member {string} fee_version - * @memberof ibc.applications.fee.v1.Metadata - * @instance - */ - Metadata.prototype.fee_version = ""; - - /** - * Metadata app_version. - * @member {string} app_version - * @memberof ibc.applications.fee.v1.Metadata - * @instance - */ - Metadata.prototype.app_version = ""; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link ibc.applications.fee.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {ibc.applications.fee.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_version != null && Object.hasOwnProperty.call(message, "fee_version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.fee_version); - if (message.app_version != null && Object.hasOwnProperty.call(message, "app_version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.app_version); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link ibc.applications.fee.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {ibc.applications.fee.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.fee.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.fee.v1.Metadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee_version = reader.string(); - break; - case 2: - message.app_version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.fee.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_version != null && message.hasOwnProperty("fee_version")) - if (!$util.isString(message.fee_version)) - return "fee_version: string expected"; - if (message.app_version != null && message.hasOwnProperty("app_version")) - if (!$util.isString(message.app_version)) - return "app_version: string expected"; - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.fee.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.fee.v1.Metadata) - return object; - let message = new $root.ibc.applications.fee.v1.Metadata(); - if (object.fee_version != null) - message.fee_version = String(object.fee_version); - if (object.app_version != null) - message.app_version = String(object.app_version); - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.fee.v1.Metadata - * @static - * @param {ibc.applications.fee.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.fee_version = ""; - object.app_version = ""; - } - if (message.fee_version != null && message.hasOwnProperty("fee_version")) - object.fee_version = message.fee_version; - if (message.app_version != null && message.hasOwnProperty("app_version")) - object.app_version = message.app_version; - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof ibc.applications.fee.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Metadata; - })(); - - return v1; - })(); - - return fee; - })(); - - applications.interchain_accounts = (function() { - - /** - * Namespace interchain_accounts. - * @memberof ibc.applications - * @namespace - */ - const interchain_accounts = {}; - - interchain_accounts.controller = (function() { - - /** - * Namespace controller. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - const controller = {}; - - controller.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts.controller - * @namespace - */ - const v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Msg#registerInterchainAccount}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @typedef RegisterInterchainAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} [response] MsgRegisterInterchainAccountResponse - */ - - /** - * Calls RegisterInterchainAccount. - * @function registerInterchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} request MsgRegisterInterchainAccount message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Msg.RegisterInterchainAccountCallback} callback Node-style callback called with the error, if any, and MsgRegisterInterchainAccountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerInterchainAccount = function registerInterchainAccount(request, callback) { - return this.rpcCall(registerInterchainAccount, $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount, $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse, request, callback); - }, "name", { value: "RegisterInterchainAccount" }); - - /** - * Calls RegisterInterchainAccount. - * @function registerInterchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} request MsgRegisterInterchainAccount message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Msg#sendTx}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @typedef SendTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} [response] MsgSendTxResponse - */ - - /** - * Calls SendTx. - * @function sendTx - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} request MsgSendTx message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Msg.SendTxCallback} callback Node-style callback called with the error, if any, and MsgSendTxResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.sendTx = function sendTx(request, callback) { - return this.rpcCall(sendTx, $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx, $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse, request, callback); - }, "name", { value: "SendTx" }); - - /** - * Calls SendTx. - * @function sendTx - * @memberof ibc.applications.interchain_accounts.controller.v1.Msg - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} request MsgSendTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgRegisterInterchainAccount = (function() { - - /** - * Properties of a MsgRegisterInterchainAccount. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgRegisterInterchainAccount - * @property {string|null} [owner] MsgRegisterInterchainAccount owner - * @property {string|null} [connection_id] MsgRegisterInterchainAccount connection_id - * @property {string|null} [version] MsgRegisterInterchainAccount version - */ - - /** - * Constructs a new MsgRegisterInterchainAccount. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgRegisterInterchainAccount. - * @implements IMsgRegisterInterchainAccount - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount=} [properties] Properties to set - */ - function MsgRegisterInterchainAccount(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterInterchainAccount owner. - * @member {string} owner - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.owner = ""; - - /** - * MsgRegisterInterchainAccount connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.connection_id = ""; - - /** - * MsgRegisterInterchainAccount version. - * @member {string} version - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.version = ""; - - /** - * Encodes the specified MsgRegisterInterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} message MsgRegisterInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.version); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccount} message MsgRegisterInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainAccount message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - */ - MsgRegisterInterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount} message MsgRegisterInterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.owner = ""; - object.connection_id = ""; - object.version = ""; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this MsgRegisterInterchainAccount to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccount - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainAccount; - })(); - - v1.MsgRegisterInterchainAccountResponse = (function() { - - /** - * Properties of a MsgRegisterInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgRegisterInterchainAccountResponse - * @property {string|null} [channel_id] MsgRegisterInterchainAccountResponse channel_id - * @property {string|null} [port_id] MsgRegisterInterchainAccountResponse port_id - */ - - /** - * Constructs a new MsgRegisterInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgRegisterInterchainAccountResponse. - * @implements IMsgRegisterInterchainAccountResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse=} [properties] Properties to set - */ - function MsgRegisterInterchainAccountResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterInterchainAccountResponse channel_id. - * @member {string} channel_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @instance - */ - MsgRegisterInterchainAccountResponse.prototype.channel_id = ""; - - /** - * MsgRegisterInterchainAccountResponse port_id. - * @member {string} port_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @instance - */ - MsgRegisterInterchainAccountResponse.prototype.port_id = ""; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainAccountResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainAccountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - */ - MsgRegisterInterchainAccountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainAccountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainAccountResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel_id = ""; - object.port_id = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - return object; - }; - - /** - * Converts this MsgRegisterInterchainAccountResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgRegisterInterchainAccountResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainAccountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainAccountResponse; - })(); - - v1.MsgSendTx = (function() { - - /** - * Properties of a MsgSendTx. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgSendTx - * @property {string|null} [owner] MsgSendTx owner - * @property {string|null} [connection_id] MsgSendTx connection_id - * @property {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData|null} [packet_data] MsgSendTx packet_data - * @property {Long|null} [relative_timeout] MsgSendTx relative_timeout - */ - - /** - * Constructs a new MsgSendTx. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgSendTx. - * @implements IMsgSendTx - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx=} [properties] Properties to set - */ - function MsgSendTx(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSendTx owner. - * @member {string} owner - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.owner = ""; - - /** - * MsgSendTx connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.connection_id = ""; - - /** - * MsgSendTx packet_data. - * @member {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData|null|undefined} packet_data - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.packet_data = null; - - /** - * MsgSendTx relative_timeout. - * @member {Long} relative_timeout - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - */ - MsgSendTx.prototype.relative_timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSendTx message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTx.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} message MsgSendTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.packet_data != null && Object.hasOwnProperty.call(message, "packet_data")) - $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.encode(message.packet_data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.relative_timeout != null && Object.hasOwnProperty.call(message, "relative_timeout")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.relative_timeout); - return writer; - }; - - /** - * Encodes the specified MsgSendTx message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTx.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTx} message MsgSendTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSendTx message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} MsgSendTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.packet_data = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.decode(reader, reader.uint32()); - break; - case 4: - message.relative_timeout = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSendTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} MsgSendTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSendTx message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSendTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.packet_data != null && message.hasOwnProperty("packet_data")) { - let error = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify(message.packet_data); - if (error) - return "packet_data." + error; - } - if (message.relative_timeout != null && message.hasOwnProperty("relative_timeout")) - if (!$util.isInteger(message.relative_timeout) && !(message.relative_timeout && $util.isInteger(message.relative_timeout.low) && $util.isInteger(message.relative_timeout.high))) - return "relative_timeout: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgSendTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} MsgSendTx - */ - MsgSendTx.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTx(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.packet_data != null) { - if (typeof object.packet_data !== "object") - throw TypeError(".ibc.applications.interchain_accounts.controller.v1.MsgSendTx.packet_data: object expected"); - message.packet_data = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.fromObject(object.packet_data); - } - if (object.relative_timeout != null) - if ($util.Long) - (message.relative_timeout = $util.Long.fromValue(object.relative_timeout)).unsigned = true; - else if (typeof object.relative_timeout === "string") - message.relative_timeout = parseInt(object.relative_timeout, 10); - else if (typeof object.relative_timeout === "number") - message.relative_timeout = object.relative_timeout; - else if (typeof object.relative_timeout === "object") - message.relative_timeout = new $util.LongBits(object.relative_timeout.low >>> 0, object.relative_timeout.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgSendTx message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgSendTx} message MsgSendTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSendTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.owner = ""; - object.connection_id = ""; - object.packet_data = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.relative_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.relative_timeout = options.longs === String ? "0" : 0; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.packet_data != null && message.hasOwnProperty("packet_data")) - object.packet_data = $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.toObject(message.packet_data, options); - if (message.relative_timeout != null && message.hasOwnProperty("relative_timeout")) - if (typeof message.relative_timeout === "number") - object.relative_timeout = options.longs === String ? String(message.relative_timeout) : message.relative_timeout; - else - object.relative_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.relative_timeout) : options.longs === Number ? new $util.LongBits(message.relative_timeout.low >>> 0, message.relative_timeout.high >>> 0).toNumber(true) : message.relative_timeout; - return object; - }; - - /** - * Converts this MsgSendTx to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTx - * @instance - * @returns {Object.} JSON object - */ - MsgSendTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSendTx; - })(); - - v1.MsgSendTxResponse = (function() { - - /** - * Properties of a MsgSendTxResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IMsgSendTxResponse - * @property {Long|null} [sequence] MsgSendTxResponse sequence - */ - - /** - * Constructs a new MsgSendTxResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a MsgSendTxResponse. - * @implements IMsgSendTxResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse=} [properties] Properties to set - */ - function MsgSendTxResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSendTxResponse sequence. - * @member {Long} sequence - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @instance - */ - MsgSendTxResponse.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgSendTxResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse} message MsgSendTxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTxResponse.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); - return writer; - }; - - /** - * Encodes the specified MsgSendTxResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IMsgSendTxResponse} message MsgSendTxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSendTxResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSendTxResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} MsgSendTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTxResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSendTxResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} MsgSendTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSendTxResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSendTxResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSendTxResponse.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"; - return null; - }; - - /** - * Creates a MsgSendTxResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} MsgSendTxResponse - */ - MsgSendTxResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse(); - 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 MsgSendTxResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse} message MsgSendTxResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSendTxResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = 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; - return object; - }; - - /** - * Converts this MsgSendTxResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.MsgSendTxResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSendTxResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSendTxResponse; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.interchain_accounts.controller.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; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Query#interchainAccount}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @typedef InterchainAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} [response] QueryInterchainAccountResponse - */ - - /** - * Calls InterchainAccount. - * @function interchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} request QueryInterchainAccountRequest message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Query.InterchainAccountCallback} callback Node-style callback called with the error, if any, and QueryInterchainAccountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.interchainAccount = function interchainAccount(request, callback) { - return this.rpcCall(interchainAccount, $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest, $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse, request, callback); - }, "name", { value: "InterchainAccount" }); - - /** - * Calls InterchainAccount. - * @function interchainAccount - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} request QueryInterchainAccountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.controller.v1.Query#params}. - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.interchain_accounts.controller.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest, $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.controller.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryInterchainAccountRequest = (function() { - - /** - * Properties of a QueryInterchainAccountRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryInterchainAccountRequest - * @property {string|null} [owner] QueryInterchainAccountRequest owner - * @property {string|null} [connection_id] QueryInterchainAccountRequest connection_id - */ - - /** - * Constructs a new QueryInterchainAccountRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryInterchainAccountRequest. - * @implements IQueryInterchainAccountRequest - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest=} [properties] Properties to set - */ - function QueryInterchainAccountRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryInterchainAccountRequest owner. - * @member {string} owner - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @instance - */ - QueryInterchainAccountRequest.prototype.owner = ""; - - /** - * QueryInterchainAccountRequest connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @instance - */ - QueryInterchainAccountRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryInterchainAccountRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} message QueryInterchainAccountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryInterchainAccountRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountRequest} message QueryInterchainAccountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryInterchainAccountRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} QueryInterchainAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryInterchainAccountRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} QueryInterchainAccountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryInterchainAccountRequest message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryInterchainAccountRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryInterchainAccountRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} QueryInterchainAccountRequest - */ - QueryInterchainAccountRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest(); - if (object.owner != null) - message.owner = String(object.owner); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryInterchainAccountRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest} message QueryInterchainAccountRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryInterchainAccountRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.owner = ""; - object.connection_id = ""; - } - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryInterchainAccountRequest to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountRequest - * @instance - * @returns {Object.} JSON object - */ - QueryInterchainAccountRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryInterchainAccountRequest; - })(); - - v1.QueryInterchainAccountResponse = (function() { - - /** - * Properties of a QueryInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryInterchainAccountResponse - * @property {string|null} [address] QueryInterchainAccountResponse address - */ - - /** - * Constructs a new QueryInterchainAccountResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryInterchainAccountResponse. - * @implements IQueryInterchainAccountResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse=} [properties] Properties to set - */ - function QueryInterchainAccountResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryInterchainAccountResponse address. - * @member {string} address - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @instance - */ - QueryInterchainAccountResponse.prototype.address = ""; - - /** - * Encodes the specified QueryInterchainAccountResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse} message QueryInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - return writer; - }; - - /** - * Encodes the specified QueryInterchainAccountResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryInterchainAccountResponse} message QueryInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryInterchainAccountResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} QueryInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} QueryInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryInterchainAccountResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryInterchainAccountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - return null; - }; - - /** - * Creates a QueryInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} QueryInterchainAccountResponse - */ - QueryInterchainAccountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse(); - if (object.address != null) - message.address = String(object.address); - return message; - }; - - /** - * Creates a plain object from a QueryInterchainAccountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse} message QueryInterchainAccountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryInterchainAccountResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - return object; - }; - - /** - * Converts this QueryInterchainAccountResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryInterchainAccountResponse - * @instance - * @returns {Object.} JSON object - */ - QueryInterchainAccountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryInterchainAccountResponse; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.interchain_accounts.controller.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.interchain_accounts.controller.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.controller.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.applications.interchain_accounts.controller.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @interface IParams - * @property {boolean|null} [controller_enabled] Params controller_enabled - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.interchain_accounts.controller.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.interchain_accounts.controller.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params controller_enabled. - * @member {boolean} controller_enabled - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @instance - */ - Params.prototype.controller_enabled = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.controller.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.controller_enabled != null && Object.hasOwnProperty.call(message, "controller_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.controller_enabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.controller.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.controller.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 ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.controller.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.controller.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.controller_enabled = 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 ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.controller.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 ibc.applications.interchain_accounts.controller.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.controller_enabled != null && message.hasOwnProperty("controller_enabled")) - if (typeof message.controller_enabled !== "boolean") - return "controller_enabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.controller.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.controller.v1.Params) - return object; - let message = new $root.ibc.applications.interchain_accounts.controller.v1.Params(); - if (object.controller_enabled != null) - message.controller_enabled = Boolean(object.controller_enabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.controller.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.controller.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.controller_enabled = false; - if (message.controller_enabled != null && message.hasOwnProperty("controller_enabled")) - object.controller_enabled = message.controller_enabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.controller.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 controller; - })(); - - interchain_accounts.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - const v1 = {}; - - /** - * Type enum. - * @name ibc.applications.interchain_accounts.v1.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} TYPE_EXECUTE_TX=1 TYPE_EXECUTE_TX value - */ - v1.Type = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "TYPE_EXECUTE_TX"] = 1; - return values; - })(); - - v1.InterchainAccountPacketData = (function() { - - /** - * Properties of an InterchainAccountPacketData. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface IInterchainAccountPacketData - * @property {ibc.applications.interchain_accounts.v1.Type|null} [type] InterchainAccountPacketData type - * @property {Uint8Array|null} [data] InterchainAccountPacketData data - * @property {string|null} [memo] InterchainAccountPacketData memo - */ - - /** - * Constructs a new InterchainAccountPacketData. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents an InterchainAccountPacketData. - * @implements IInterchainAccountPacketData - * @constructor - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData=} [properties] Properties to set - */ - function InterchainAccountPacketData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterchainAccountPacketData type. - * @member {ibc.applications.interchain_accounts.v1.Type} type - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - */ - InterchainAccountPacketData.prototype.type = 0; - - /** - * InterchainAccountPacketData data. - * @member {Uint8Array} data - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - */ - InterchainAccountPacketData.prototype.data = $util.newBuffer([]); - - /** - * InterchainAccountPacketData memo. - * @member {string} memo - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - */ - InterchainAccountPacketData.prototype.memo = ""; - - /** - * Encodes the specified InterchainAccountPacketData message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData} message InterchainAccountPacketData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccountPacketData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.memo); - return writer; - }; - - /** - * Encodes the specified InterchainAccountPacketData message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccountPacketData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccountPacketData} message InterchainAccountPacketData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccountPacketData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterchainAccountPacketData message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} InterchainAccountPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccountPacketData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.memo = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterchainAccountPacketData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} InterchainAccountPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccountPacketData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterchainAccountPacketData message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterchainAccountPacketData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - 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.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - return null; - }; - - /** - * Creates an InterchainAccountPacketData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} InterchainAccountPacketData - */ - InterchainAccountPacketData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData) - return object; - let message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccountPacketData(); - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "TYPE_EXECUTE_TX": - case 1: - message.type = 1; - break; - } - 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.memo != null) - message.memo = String(object.memo); - return message; - }; - - /** - * Creates a plain object from an InterchainAccountPacketData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @static - * @param {ibc.applications.interchain_accounts.v1.InterchainAccountPacketData} message InterchainAccountPacketData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterchainAccountPacketData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.memo = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.ibc.applications.interchain_accounts.v1.Type[message.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; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - return object; - }; - - /** - * Converts this InterchainAccountPacketData to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccountPacketData - * @instance - * @returns {Object.} JSON object - */ - InterchainAccountPacketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterchainAccountPacketData; - })(); - - v1.CosmosTx = (function() { - - /** - * Properties of a CosmosTx. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface ICosmosTx - * @property {Array.|null} [messages] CosmosTx messages - */ - - /** - * Constructs a new CosmosTx. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents a CosmosTx. - * @implements ICosmosTx - * @constructor - * @param {ibc.applications.interchain_accounts.v1.ICosmosTx=} [properties] Properties to set - */ - function CosmosTx(properties) { - this.messages = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CosmosTx messages. - * @member {Array.} messages - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @instance - */ - CosmosTx.prototype.messages = $util.emptyArray; - - /** - * Encodes the specified CosmosTx message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.CosmosTx.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {ibc.applications.interchain_accounts.v1.ICosmosTx} message CosmosTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CosmosTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messages != null && message.messages.length) - for (let i = 0; i < message.messages.length; ++i) - $root.google.protobuf.Any.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CosmosTx message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.CosmosTx.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {ibc.applications.interchain_accounts.v1.ICosmosTx} message CosmosTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CosmosTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CosmosTx message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.CosmosTx} CosmosTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CosmosTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.CosmosTx(); - while (reader.pos < end) { - let 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; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CosmosTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.CosmosTx} CosmosTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CosmosTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CosmosTx message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CosmosTx.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 (let i = 0; i < message.messages.length; ++i) { - let error = $root.google.protobuf.Any.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - return null; - }; - - /** - * Creates a CosmosTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.CosmosTx} CosmosTx - */ - CosmosTx.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.CosmosTx) - return object; - let message = new $root.ibc.applications.interchain_accounts.v1.CosmosTx(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".ibc.applications.interchain_accounts.v1.CosmosTx.messages: array expected"); - message.messages = []; - for (let i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.v1.CosmosTx.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CosmosTx message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @static - * @param {ibc.applications.interchain_accounts.v1.CosmosTx} message CosmosTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CosmosTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (message.messages && message.messages.length) { - object.messages = []; - for (let j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); - } - return object; - }; - - /** - * Converts this CosmosTx to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.CosmosTx - * @instance - * @returns {Object.} JSON object - */ - CosmosTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CosmosTx; - })(); - - v1.InterchainAccount = (function() { - - /** - * Properties of an InterchainAccount. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface IInterchainAccount - * @property {cosmos.auth.v1beta1.IBaseAccount|null} [base_account] InterchainAccount base_account - * @property {string|null} [account_owner] InterchainAccount account_owner - */ - - /** - * Constructs a new InterchainAccount. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents an InterchainAccount. - * @implements IInterchainAccount - * @constructor - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccount=} [properties] Properties to set - */ - function InterchainAccount(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterchainAccount base_account. - * @member {cosmos.auth.v1beta1.IBaseAccount|null|undefined} base_account - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @instance - */ - InterchainAccount.prototype.base_account = null; - - /** - * InterchainAccount account_owner. - * @member {string} account_owner - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @instance - */ - InterchainAccount.prototype.account_owner = ""; - - /** - * Encodes the specified InterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccount.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccount} message InterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.base_account != null && Object.hasOwnProperty.call(message, "base_account")) - $root.cosmos.auth.v1beta1.BaseAccount.encode(message.base_account, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.account_owner != null && Object.hasOwnProperty.call(message, "account_owner")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.account_owner); - return writer; - }; - - /** - * Encodes the specified InterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.InterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.v1.IInterchainAccount} message InterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccount} InterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.decode(reader, reader.uint32()); - break; - case 2: - message.account_owner = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccount} InterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterchainAccount message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.base_account != null && message.hasOwnProperty("base_account")) { - let error = $root.cosmos.auth.v1beta1.BaseAccount.verify(message.base_account); - if (error) - return "base_account." + error; - } - if (message.account_owner != null && message.hasOwnProperty("account_owner")) - if (!$util.isString(message.account_owner)) - return "account_owner: string expected"; - return null; - }; - - /** - * Creates an InterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.InterchainAccount} InterchainAccount - */ - InterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.InterchainAccount) - return object; - let message = new $root.ibc.applications.interchain_accounts.v1.InterchainAccount(); - if (object.base_account != null) { - if (typeof object.base_account !== "object") - throw TypeError(".ibc.applications.interchain_accounts.v1.InterchainAccount.base_account: object expected"); - message.base_account = $root.cosmos.auth.v1beta1.BaseAccount.fromObject(object.base_account); - } - if (object.account_owner != null) - message.account_owner = String(object.account_owner); - return message; - }; - - /** - * Creates a plain object from an InterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.v1.InterchainAccount} message InterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.base_account = null; - object.account_owner = ""; - } - if (message.base_account != null && message.hasOwnProperty("base_account")) - object.base_account = $root.cosmos.auth.v1beta1.BaseAccount.toObject(message.base_account, options); - if (message.account_owner != null && message.hasOwnProperty("account_owner")) - object.account_owner = message.account_owner; - return object; - }; - - /** - * Converts this InterchainAccount to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.InterchainAccount - * @instance - * @returns {Object.} JSON object - */ - InterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterchainAccount; - })(); - - v1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof ibc.applications.interchain_accounts.v1 - * @interface IMetadata - * @property {string|null} [version] Metadata version - * @property {string|null} [controller_connection_id] Metadata controller_connection_id - * @property {string|null} [host_connection_id] Metadata host_connection_id - * @property {string|null} [address] Metadata address - * @property {string|null} [encoding] Metadata encoding - * @property {string|null} [tx_type] Metadata tx_type - */ - - /** - * Constructs a new Metadata. - * @memberof ibc.applications.interchain_accounts.v1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {ibc.applications.interchain_accounts.v1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata version. - * @member {string} version - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.version = ""; - - /** - * Metadata controller_connection_id. - * @member {string} controller_connection_id - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.controller_connection_id = ""; - - /** - * Metadata host_connection_id. - * @member {string} host_connection_id - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.host_connection_id = ""; - - /** - * Metadata address. - * @member {string} address - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.address = ""; - - /** - * Metadata encoding. - * @member {string} encoding - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.encoding = ""; - - /** - * Metadata tx_type. - * @member {string} tx_type - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - */ - Metadata.prototype.tx_type = ""; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link ibc.applications.interchain_accounts.v1.Metadata.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {ibc.applications.interchain_accounts.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.controller_connection_id != null && Object.hasOwnProperty.call(message, "controller_connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.controller_connection_id); - if (message.host_connection_id != null && Object.hasOwnProperty.call(message, "host_connection_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.host_connection_id); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.address); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.encoding); - if (message.tx_type != null && Object.hasOwnProperty.call(message, "tx_type")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.tx_type); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.v1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {ibc.applications.interchain_accounts.v1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.v1.Metadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.controller_connection_id = reader.string(); - break; - case 3: - message.host_connection_id = reader.string(); - break; - case 4: - message.address = reader.string(); - break; - case 5: - message.encoding = reader.string(); - break; - case 6: - message.tx_type = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.v1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.controller_connection_id != null && message.hasOwnProperty("controller_connection_id")) - if (!$util.isString(message.controller_connection_id)) - return "controller_connection_id: string expected"; - if (message.host_connection_id != null && message.hasOwnProperty("host_connection_id")) - if (!$util.isString(message.host_connection_id)) - return "host_connection_id: string expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - if (message.tx_type != null && message.hasOwnProperty("tx_type")) - if (!$util.isString(message.tx_type)) - return "tx_type: string expected"; - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.v1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.v1.Metadata) - return object; - let message = new $root.ibc.applications.interchain_accounts.v1.Metadata(); - if (object.version != null) - message.version = String(object.version); - if (object.controller_connection_id != null) - message.controller_connection_id = String(object.controller_connection_id); - if (object.host_connection_id != null) - message.host_connection_id = String(object.host_connection_id); - if (object.address != null) - message.address = String(object.address); - if (object.encoding != null) - message.encoding = String(object.encoding); - if (object.tx_type != null) - message.tx_type = String(object.tx_type); - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @static - * @param {ibc.applications.interchain_accounts.v1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.version = ""; - object.controller_connection_id = ""; - object.host_connection_id = ""; - object.address = ""; - object.encoding = ""; - object.tx_type = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.controller_connection_id != null && message.hasOwnProperty("controller_connection_id")) - object.controller_connection_id = message.controller_connection_id; - if (message.host_connection_id != null && message.hasOwnProperty("host_connection_id")) - object.host_connection_id = message.host_connection_id; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.encoding != null && message.hasOwnProperty("encoding")) - object.encoding = message.encoding; - if (message.tx_type != null && message.hasOwnProperty("tx_type")) - object.tx_type = message.tx_type; - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.v1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Metadata; - })(); - - return v1; - })(); - - interchain_accounts.genesis = (function() { - - /** - * Namespace genesis. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - const genesis = {}; - - genesis.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts.genesis - * @namespace - */ - const v1 = {}; - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IGenesisState - * @property {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState|null} [controller_genesis_state] GenesisState controller_genesis_state - * @property {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState|null} [host_genesis_state] GenesisState host_genesis_state - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState controller_genesis_state. - * @member {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState|null|undefined} controller_genesis_state - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @instance - */ - GenesisState.prototype.controller_genesis_state = null; - - /** - * GenesisState host_genesis_state. - * @member {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState|null|undefined} host_genesis_state - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @instance - */ - GenesisState.prototype.host_genesis_state = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.controller_genesis_state != null && Object.hasOwnProperty.call(message, "controller_genesis_state")) - $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.encode(message.controller_genesis_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.host_genesis_state != null && Object.hasOwnProperty.call(message, "host_genesis_state")) - $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.encode(message.host_genesis_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.controller_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.decode(reader, reader.uint32()); - break; - case 2: - message.host_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.controller_genesis_state != null && message.hasOwnProperty("controller_genesis_state")) { - let error = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify(message.controller_genesis_state); - if (error) - return "controller_genesis_state." + error; - } - if (message.host_genesis_state != null && message.hasOwnProperty("host_genesis_state")) { - let error = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify(message.host_genesis_state); - if (error) - return "host_genesis_state." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.GenesisState) - return object; - let message = new $root.ibc.applications.interchain_accounts.genesis.v1.GenesisState(); - if (object.controller_genesis_state != null) { - if (typeof object.controller_genesis_state !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.GenesisState.controller_genesis_state: object expected"); - message.controller_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.fromObject(object.controller_genesis_state); - } - if (object.host_genesis_state != null) { - if (typeof object.host_genesis_state !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.GenesisState.host_genesis_state: object expected"); - message.host_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.fromObject(object.host_genesis_state); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.controller_genesis_state = null; - object.host_genesis_state = null; - } - if (message.controller_genesis_state != null && message.hasOwnProperty("controller_genesis_state")) - object.controller_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.toObject(message.controller_genesis_state, options); - if (message.host_genesis_state != null && message.hasOwnProperty("host_genesis_state")) - object.host_genesis_state = $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.toObject(message.host_genesis_state, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.ControllerGenesisState = (function() { - - /** - * Properties of a ControllerGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IControllerGenesisState - * @property {Array.|null} [active_channels] ControllerGenesisState active_channels - * @property {Array.|null} [interchain_accounts] ControllerGenesisState interchain_accounts - * @property {Array.|null} [ports] ControllerGenesisState ports - * @property {ibc.applications.interchain_accounts.controller.v1.IParams|null} [params] ControllerGenesisState params - */ - - /** - * Constructs a new ControllerGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a ControllerGenesisState. - * @implements IControllerGenesisState - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState=} [properties] Properties to set - */ - function ControllerGenesisState(properties) { - this.active_channels = []; - this.interchain_accounts = []; - this.ports = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ControllerGenesisState active_channels. - * @member {Array.} active_channels - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.active_channels = $util.emptyArray; - - /** - * ControllerGenesisState interchain_accounts. - * @member {Array.} interchain_accounts - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.interchain_accounts = $util.emptyArray; - - /** - * ControllerGenesisState ports. - * @member {Array.} ports - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.ports = $util.emptyArray; - - /** - * ControllerGenesisState params. - * @member {ibc.applications.interchain_accounts.controller.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - */ - ControllerGenesisState.prototype.params = null; - - /** - * Encodes the specified ControllerGenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState} message ControllerGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControllerGenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.active_channels != null && message.active_channels.length) - for (let i = 0; i < message.active_channels.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.encode(message.active_channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.interchain_accounts != null && message.interchain_accounts.length) - for (let i = 0; i < message.interchain_accounts.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.encode(message.interchain_accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ports != null && message.ports.length) - for (let i = 0; i < message.ports.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ports[i]); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.controller.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ControllerGenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IControllerGenesisState} message ControllerGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ControllerGenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ControllerGenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} ControllerGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControllerGenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.active_channels && message.active_channels.length)) - message.active_channels = []; - message.active_channels.push($root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.interchain_accounts && message.interchain_accounts.length)) - message.interchain_accounts = []; - message.interchain_accounts.push($root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.ports && message.ports.length)) - message.ports = []; - message.ports.push(reader.string()); - break; - case 4: - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ControllerGenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} ControllerGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ControllerGenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ControllerGenesisState message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ControllerGenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.active_channels != null && message.hasOwnProperty("active_channels")) { - if (!Array.isArray(message.active_channels)) - return "active_channels: array expected"; - for (let i = 0; i < message.active_channels.length; ++i) { - let error = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify(message.active_channels[i]); - if (error) - return "active_channels." + error; - } - } - if (message.interchain_accounts != null && message.hasOwnProperty("interchain_accounts")) { - if (!Array.isArray(message.interchain_accounts)) - return "interchain_accounts: array expected"; - for (let i = 0; i < message.interchain_accounts.length; ++i) { - let error = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify(message.interchain_accounts[i]); - if (error) - return "interchain_accounts." + error; - } - } - if (message.ports != null && message.hasOwnProperty("ports")) { - if (!Array.isArray(message.ports)) - return "ports: array expected"; - for (let i = 0; i < message.ports.length; ++i) - if (!$util.isString(message.ports[i])) - return "ports: string[] expected"; - } - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.applications.interchain_accounts.controller.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a ControllerGenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} ControllerGenesisState - */ - ControllerGenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState) - return object; - let message = new $root.ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState(); - if (object.active_channels) { - if (!Array.isArray(object.active_channels)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.active_channels: array expected"); - message.active_channels = []; - for (let i = 0; i < object.active_channels.length; ++i) { - if (typeof object.active_channels[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.active_channels: object expected"); - message.active_channels[i] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.fromObject(object.active_channels[i]); - } - } - if (object.interchain_accounts) { - if (!Array.isArray(object.interchain_accounts)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.interchain_accounts: array expected"); - message.interchain_accounts = []; - for (let i = 0; i < object.interchain_accounts.length; ++i) { - if (typeof object.interchain_accounts[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.interchain_accounts: object expected"); - message.interchain_accounts[i] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.fromObject(object.interchain_accounts[i]); - } - } - if (object.ports) { - if (!Array.isArray(object.ports)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.ports: array expected"); - message.ports = []; - for (let i = 0; i < object.ports.length; ++i) - message.ports[i] = String(object.ports[i]); - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a ControllerGenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState} message ControllerGenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ControllerGenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.active_channels = []; - object.interchain_accounts = []; - object.ports = []; - } - if (options.defaults) - object.params = null; - if (message.active_channels && message.active_channels.length) { - object.active_channels = []; - for (let j = 0; j < message.active_channels.length; ++j) - object.active_channels[j] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject(message.active_channels[j], options); - } - if (message.interchain_accounts && message.interchain_accounts.length) { - object.interchain_accounts = []; - for (let j = 0; j < message.interchain_accounts.length; ++j) - object.interchain_accounts[j] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject(message.interchain_accounts[j], options); - } - if (message.ports && message.ports.length) { - object.ports = []; - for (let j = 0; j < message.ports.length; ++j) - object.ports[j] = message.ports[j]; - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.controller.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this ControllerGenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.ControllerGenesisState - * @instance - * @returns {Object.} JSON object - */ - ControllerGenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ControllerGenesisState; - })(); - - v1.HostGenesisState = (function() { - - /** - * Properties of a HostGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IHostGenesisState - * @property {Array.|null} [active_channels] HostGenesisState active_channels - * @property {Array.|null} [interchain_accounts] HostGenesisState interchain_accounts - * @property {string|null} [port] HostGenesisState port - * @property {ibc.applications.interchain_accounts.host.v1.IParams|null} [params] HostGenesisState params - */ - - /** - * Constructs a new HostGenesisState. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a HostGenesisState. - * @implements IHostGenesisState - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState=} [properties] Properties to set - */ - function HostGenesisState(properties) { - this.active_channels = []; - this.interchain_accounts = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HostGenesisState active_channels. - * @member {Array.} active_channels - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.active_channels = $util.emptyArray; - - /** - * HostGenesisState interchain_accounts. - * @member {Array.} interchain_accounts - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.interchain_accounts = $util.emptyArray; - - /** - * HostGenesisState port. - * @member {string} port - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.port = ""; - - /** - * HostGenesisState params. - * @member {ibc.applications.interchain_accounts.host.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - */ - HostGenesisState.prototype.params = null; - - /** - * Encodes the specified HostGenesisState message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState} message HostGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostGenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.active_channels != null && message.active_channels.length) - for (let i = 0; i < message.active_channels.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.encode(message.active_channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.interchain_accounts != null && message.interchain_accounts.length) - for (let i = 0; i < message.interchain_accounts.length; ++i) - $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.encode(message.interchain_accounts[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.port != null && Object.hasOwnProperty.call(message, "port")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.port); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.host.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HostGenesisState message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IHostGenesisState} message HostGenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HostGenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HostGenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} HostGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostGenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.active_channels && message.active_channels.length)) - message.active_channels = []; - message.active_channels.push($root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.interchain_accounts && message.interchain_accounts.length)) - message.interchain_accounts = []; - message.interchain_accounts.push($root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.decode(reader, reader.uint32())); - break; - case 3: - message.port = reader.string(); - break; - case 4: - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HostGenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} HostGenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HostGenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HostGenesisState message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HostGenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.active_channels != null && message.hasOwnProperty("active_channels")) { - if (!Array.isArray(message.active_channels)) - return "active_channels: array expected"; - for (let i = 0; i < message.active_channels.length; ++i) { - let error = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify(message.active_channels[i]); - if (error) - return "active_channels." + error; - } - } - if (message.interchain_accounts != null && message.hasOwnProperty("interchain_accounts")) { - if (!Array.isArray(message.interchain_accounts)) - return "interchain_accounts: array expected"; - for (let i = 0; i < message.interchain_accounts.length; ++i) { - let error = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify(message.interchain_accounts[i]); - if (error) - return "interchain_accounts." + error; - } - } - if (message.port != null && message.hasOwnProperty("port")) - if (!$util.isString(message.port)) - return "port: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.applications.interchain_accounts.host.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a HostGenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} HostGenesisState - */ - HostGenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState) - return object; - let message = new $root.ibc.applications.interchain_accounts.genesis.v1.HostGenesisState(); - if (object.active_channels) { - if (!Array.isArray(object.active_channels)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.active_channels: array expected"); - message.active_channels = []; - for (let i = 0; i < object.active_channels.length; ++i) { - if (typeof object.active_channels[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.active_channels: object expected"); - message.active_channels[i] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.fromObject(object.active_channels[i]); - } - } - if (object.interchain_accounts) { - if (!Array.isArray(object.interchain_accounts)) - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.interchain_accounts: array expected"); - message.interchain_accounts = []; - for (let i = 0; i < object.interchain_accounts.length; ++i) { - if (typeof object.interchain_accounts[i] !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.interchain_accounts: object expected"); - message.interchain_accounts[i] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.fromObject(object.interchain_accounts[i]); - } - } - if (object.port != null) - message.port = String(object.port); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.genesis.v1.HostGenesisState.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a HostGenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.HostGenesisState} message HostGenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HostGenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.active_channels = []; - object.interchain_accounts = []; - } - if (options.defaults) { - object.port = ""; - object.params = null; - } - if (message.active_channels && message.active_channels.length) { - object.active_channels = []; - for (let j = 0; j < message.active_channels.length; ++j) - object.active_channels[j] = $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.toObject(message.active_channels[j], options); - } - if (message.interchain_accounts && message.interchain_accounts.length) { - object.interchain_accounts = []; - for (let j = 0; j < message.interchain_accounts.length; ++j) - object.interchain_accounts[j] = $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.toObject(message.interchain_accounts[j], options); - } - if (message.port != null && message.hasOwnProperty("port")) - object.port = message.port; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.host.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this HostGenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.HostGenesisState - * @instance - * @returns {Object.} JSON object - */ - HostGenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HostGenesisState; - })(); - - v1.ActiveChannel = (function() { - - /** - * Properties of an ActiveChannel. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IActiveChannel - * @property {string|null} [connection_id] ActiveChannel connection_id - * @property {string|null} [port_id] ActiveChannel port_id - * @property {string|null} [channel_id] ActiveChannel channel_id - * @property {boolean|null} [is_middleware_enabled] ActiveChannel is_middleware_enabled - */ - - /** - * Constructs a new ActiveChannel. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents an ActiveChannel. - * @implements IActiveChannel - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IActiveChannel=} [properties] Properties to set - */ - function ActiveChannel(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ActiveChannel connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.connection_id = ""; - - /** - * ActiveChannel port_id. - * @member {string} port_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.port_id = ""; - - /** - * ActiveChannel channel_id. - * @member {string} channel_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.channel_id = ""; - - /** - * ActiveChannel is_middleware_enabled. - * @member {boolean} is_middleware_enabled - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - */ - ActiveChannel.prototype.is_middleware_enabled = false; - - /** - * Encodes the specified ActiveChannel message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IActiveChannel} message ActiveChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveChannel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.channel_id); - if (message.is_middleware_enabled != null && Object.hasOwnProperty.call(message, "is_middleware_enabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.is_middleware_enabled); - return writer; - }; - - /** - * Encodes the specified ActiveChannel message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.ActiveChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IActiveChannel} message ActiveChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ActiveChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ActiveChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} ActiveChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.channel_id = reader.string(); - break; - case 4: - message.is_middleware_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ActiveChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} ActiveChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ActiveChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ActiveChannel message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ActiveChannel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.is_middleware_enabled != null && message.hasOwnProperty("is_middleware_enabled")) - if (typeof message.is_middleware_enabled !== "boolean") - return "is_middleware_enabled: boolean expected"; - return null; - }; - - /** - * Creates an ActiveChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} ActiveChannel - */ - ActiveChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel) - return object; - let message = new $root.ibc.applications.interchain_accounts.genesis.v1.ActiveChannel(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.is_middleware_enabled != null) - message.is_middleware_enabled = Boolean(object.is_middleware_enabled); - return message; - }; - - /** - * Creates a plain object from an ActiveChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.ActiveChannel} message ActiveChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ActiveChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection_id = ""; - object.port_id = ""; - object.channel_id = ""; - object.is_middleware_enabled = false; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.is_middleware_enabled != null && message.hasOwnProperty("is_middleware_enabled")) - object.is_middleware_enabled = message.is_middleware_enabled; - return object; - }; - - /** - * Converts this ActiveChannel to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.ActiveChannel - * @instance - * @returns {Object.} JSON object - */ - ActiveChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ActiveChannel; - })(); - - v1.RegisteredInterchainAccount = (function() { - - /** - * Properties of a RegisteredInterchainAccount. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @interface IRegisteredInterchainAccount - * @property {string|null} [connection_id] RegisteredInterchainAccount connection_id - * @property {string|null} [port_id] RegisteredInterchainAccount port_id - * @property {string|null} [account_address] RegisteredInterchainAccount account_address - */ - - /** - * Constructs a new RegisteredInterchainAccount. - * @memberof ibc.applications.interchain_accounts.genesis.v1 - * @classdesc Represents a RegisteredInterchainAccount. - * @implements IRegisteredInterchainAccount - * @constructor - * @param {ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount=} [properties] Properties to set - */ - function RegisteredInterchainAccount(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredInterchainAccount connection_id. - * @member {string} connection_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - */ - RegisteredInterchainAccount.prototype.connection_id = ""; - - /** - * RegisteredInterchainAccount port_id. - * @member {string} port_id - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - */ - RegisteredInterchainAccount.prototype.port_id = ""; - - /** - * RegisteredInterchainAccount account_address. - * @member {string} account_address - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - */ - RegisteredInterchainAccount.prototype.account_address = ""; - - /** - * Encodes the specified RegisteredInterchainAccount message. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount} message RegisteredInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredInterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.account_address != null && Object.hasOwnProperty.call(message, "account_address")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.account_address); - return writer; - }; - - /** - * Encodes the specified RegisteredInterchainAccount message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.IRegisteredInterchainAccount} message RegisteredInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredInterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredInterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} RegisteredInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredInterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.account_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredInterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} RegisteredInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredInterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredInterchainAccount message. - * @function verify - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredInterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.account_address != null && message.hasOwnProperty("account_address")) - if (!$util.isString(message.account_address)) - return "account_address: string expected"; - return null; - }; - - /** - * Creates a RegisteredInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} RegisteredInterchainAccount - */ - RegisteredInterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount) - return object; - let message = new $root.ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.account_address != null) - message.account_address = String(object.account_address); - return message; - }; - - /** - * Creates a plain object from a RegisteredInterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @static - * @param {ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount} message RegisteredInterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredInterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection_id = ""; - object.port_id = ""; - object.account_address = ""; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.account_address != null && message.hasOwnProperty("account_address")) - object.account_address = message.account_address; - return object; - }; - - /** - * Converts this RegisteredInterchainAccount to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.genesis.v1.RegisteredInterchainAccount - * @instance - * @returns {Object.} JSON object - */ - RegisteredInterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredInterchainAccount; - })(); - - return v1; - })(); - - return genesis; - })(); - - interchain_accounts.host = (function() { - - /** - * Namespace host. - * @memberof ibc.applications.interchain_accounts - * @namespace - */ - const host = {}; - - host.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.interchain_accounts.host - * @namespace - */ - const v1 = {}; - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @interface IParams - * @property {boolean|null} [host_enabled] Params host_enabled - * @property {Array.|null} [allow_messages] Params allow_messages - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.interchain_accounts.host.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.allow_messages = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params host_enabled. - * @member {boolean} host_enabled - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @instance - */ - Params.prototype.host_enabled = false; - - /** - * Params allow_messages. - * @member {Array.} allow_messages - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @instance - */ - Params.prototype.allow_messages = $util.emptyArray; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.host.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.host_enabled != null && Object.hasOwnProperty.call(message, "host_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.host_enabled); - if (message.allow_messages != null && message.allow_messages.length) - for (let i = 0; i < message.allow_messages.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.allow_messages[i]); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.host.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 ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.host.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.host.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.host_enabled = reader.bool(); - break; - case 2: - if (!(message.allow_messages && message.allow_messages.length)) - message.allow_messages = []; - message.allow_messages.push(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 ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.host.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 ibc.applications.interchain_accounts.host.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.host_enabled != null && message.hasOwnProperty("host_enabled")) - if (typeof message.host_enabled !== "boolean") - return "host_enabled: boolean expected"; - if (message.allow_messages != null && message.hasOwnProperty("allow_messages")) { - if (!Array.isArray(message.allow_messages)) - return "allow_messages: array expected"; - for (let i = 0; i < message.allow_messages.length; ++i) - if (!$util.isString(message.allow_messages[i])) - return "allow_messages: string[] expected"; - } - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.host.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.host.v1.Params) - return object; - let message = new $root.ibc.applications.interchain_accounts.host.v1.Params(); - if (object.host_enabled != null) - message.host_enabled = Boolean(object.host_enabled); - if (object.allow_messages) { - if (!Array.isArray(object.allow_messages)) - throw TypeError(".ibc.applications.interchain_accounts.host.v1.Params.allow_messages: array expected"); - message.allow_messages = []; - for (let i = 0; i < object.allow_messages.length; ++i) - message.allow_messages[i] = String(object.allow_messages[i]); - } - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @static - * @param {ibc.applications.interchain_accounts.host.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.allow_messages = []; - if (options.defaults) - object.host_enabled = false; - if (message.host_enabled != null && message.hasOwnProperty("host_enabled")) - object.host_enabled = message.host_enabled; - if (message.allow_messages && message.allow_messages.length) { - object.allow_messages = []; - for (let j = 0; j < message.allow_messages.length; ++j) - object.allow_messages[j] = message.allow_messages[j]; - } - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.host.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.interchain_accounts.host.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; - - /** - * Callback as used by {@link ibc.applications.interchain_accounts.host.v1.Query#params}. - * @memberof ibc.applications.interchain_accounts.host.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.host.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.interchain_accounts.host.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest, $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.interchain_accounts.host.v1.Query - * @instance - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @static - * @param {ibc.applications.interchain_accounts.host.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.interchain_accounts.host.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.interchain_accounts.host.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.interchain_accounts.host.v1.IParams|null|undefined} params - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.interchain_accounts.host.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.host.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.applications.interchain_accounts.host.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse) - return object; - let message = new $root.ibc.applications.interchain_accounts.host.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.interchain_accounts.host.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.interchain_accounts.host.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @static - * @param {ibc.applications.interchain_accounts.host.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.interchain_accounts.host.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.interchain_accounts.host.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - return v1; - })(); - - return host; - })(); - - return interchain_accounts; - })(); - - applications.transfer = (function() { - - /** - * Namespace transfer. - * @memberof ibc.applications - * @namespace - */ - const transfer = {}; - - transfer.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.transfer - * @namespace - */ - const v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Msg#transfer}. - * @memberof ibc.applications.transfer.v1.Msg - * @typedef TransferCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.MsgTransferResponse} [response] MsgTransferResponse - */ - - /** - * Calls Transfer. - * @function transfer - * @memberof ibc.applications.transfer.v1.Msg - * @instance - * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object - * @param {ibc.applications.transfer.v1.Msg.TransferCallback} callback Node-style callback called with the error, if any, and MsgTransferResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.transfer = function transfer(request, callback) { - return this.rpcCall(transfer, $root.ibc.applications.transfer.v1.MsgTransfer, $root.ibc.applications.transfer.v1.MsgTransferResponse, request, callback); - }, "name", { value: "Transfer" }); - - /** - * Calls Transfer. - * @function transfer - * @memberof ibc.applications.transfer.v1.Msg - * @instance - * @param {ibc.applications.transfer.v1.IMsgTransfer} request MsgTransfer message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgTransfer = (function() { - - /** - * Properties of a MsgTransfer. - * @memberof ibc.applications.transfer.v1 - * @interface IMsgTransfer - * @property {string|null} [source_port] MsgTransfer source_port - * @property {string|null} [source_channel] MsgTransfer source_channel - * @property {cosmos.base.v1beta1.ICoin|null} [token] MsgTransfer token - * @property {string|null} [sender] MsgTransfer sender - * @property {string|null} [receiver] MsgTransfer receiver - * @property {ibc.core.client.v1.IHeight|null} [timeout_height] MsgTransfer timeout_height - * @property {Long|null} [timeout_timestamp] MsgTransfer timeout_timestamp - * @property {string|null} [memo] MsgTransfer memo - */ - - /** - * Constructs a new MsgTransfer. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a MsgTransfer. - * @implements IMsgTransfer - * @constructor - * @param {ibc.applications.transfer.v1.IMsgTransfer=} [properties] Properties to set - */ - function MsgTransfer(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTransfer source_port. - * @member {string} source_port - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.source_port = ""; - - /** - * MsgTransfer source_channel. - * @member {string} source_channel - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.source_channel = ""; - - /** - * MsgTransfer token. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} token - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.token = null; - - /** - * MsgTransfer sender. - * @member {string} sender - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.sender = ""; - - /** - * MsgTransfer receiver. - * @member {string} receiver - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.receiver = ""; - - /** - * MsgTransfer timeout_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} timeout_height - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeout_height = null; - - /** - * MsgTransfer timeout_timestamp. - * @member {Long} timeout_timestamp - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeout_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTransfer memo. - * @member {string} memo - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.memo = ""; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {ibc.applications.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.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_channel); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - $root.cosmos.base.v1beta1.Coin.encode(message.token, 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).string(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); - if (message.timeout_height != null && Object.hasOwnProperty.call(message, "timeout_height")) - $root.ibc.core.client.v1.Height.encode(message.timeout_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.timeout_timestamp != null && Object.hasOwnProperty.call(message, "timeout_timestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeout_timestamp); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.memo); - return writer; - }; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransfer.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {ibc.applications.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 ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransfer(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_port = reader.string(); - break; - case 2: - message.source_channel = reader.string(); - break; - case 3: - message.token = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeout_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeout_timestamp = reader.uint64(); - break; - case 8: - message.memo = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.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 ibc.applications.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.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.token != null && message.hasOwnProperty("token")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.token); - if (error) - return "token." + 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"; - if (message.timeout_height != null && message.hasOwnProperty("timeout_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.timeout_height); - if (error) - return "timeout_height." + error; - } - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (!$util.isInteger(message.timeout_timestamp) && !(message.timeout_timestamp && $util.isInteger(message.timeout_timestamp.low) && $util.isInteger(message.timeout_timestamp.high))) - return "timeout_timestamp: integer|Long expected"; - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - return null; - }; - - /** - * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.MsgTransfer} MsgTransfer - */ - MsgTransfer.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.MsgTransfer) - return object; - let message = new $root.ibc.applications.transfer.v1.MsgTransfer(); - if (object.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.token != null) { - if (typeof object.token !== "object") - throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.token: object expected"); - message.token = $root.cosmos.base.v1beta1.Coin.fromObject(object.token); - } - if (object.sender != null) - message.sender = String(object.sender); - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.timeout_height != null) { - if (typeof object.timeout_height !== "object") - throw TypeError(".ibc.applications.transfer.v1.MsgTransfer.timeout_height: object expected"); - message.timeout_height = $root.ibc.core.client.v1.Height.fromObject(object.timeout_height); - } - if (object.timeout_timestamp != null) - if ($util.Long) - (message.timeout_timestamp = $util.Long.fromValue(object.timeout_timestamp)).unsigned = true; - else if (typeof object.timeout_timestamp === "string") - message.timeout_timestamp = parseInt(object.timeout_timestamp, 10); - else if (typeof object.timeout_timestamp === "number") - message.timeout_timestamp = object.timeout_timestamp; - else if (typeof object.timeout_timestamp === "object") - message.timeout_timestamp = new $util.LongBits(object.timeout_timestamp.low >>> 0, object.timeout_timestamp.high >>> 0).toNumber(true); - if (object.memo != null) - message.memo = String(object.memo); - return message; - }; - - /** - * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @static - * @param {ibc.applications.transfer.v1.MsgTransfer} message MsgTransfer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTransfer.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.source_port = ""; - object.source_channel = ""; - object.token = null; - object.sender = ""; - object.receiver = ""; - object.timeout_height = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timeout_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout_timestamp = options.longs === String ? "0" : 0; - object.memo = ""; - } - if (message.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.token != null && message.hasOwnProperty("token")) - object.token = $root.cosmos.base.v1beta1.Coin.toObject(message.token, options); - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.timeout_height != null && message.hasOwnProperty("timeout_height")) - object.timeout_height = $root.ibc.core.client.v1.Height.toObject(message.timeout_height, options); - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (typeof message.timeout_timestamp === "number") - object.timeout_timestamp = options.longs === String ? String(message.timeout_timestamp) : message.timeout_timestamp; - else - object.timeout_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeout_timestamp) : options.longs === Number ? new $util.LongBits(message.timeout_timestamp.low >>> 0, message.timeout_timestamp.high >>> 0).toNumber(true) : message.timeout_timestamp; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - return object; - }; - - /** - * Converts this MsgTransfer to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.MsgTransfer - * @instance - * @returns {Object.} JSON object - */ - MsgTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTransfer; - })(); - - v1.MsgTransferResponse = (function() { - - /** - * Properties of a MsgTransferResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IMsgTransferResponse - * @property {Long|null} [sequence] MsgTransferResponse sequence - */ - - /** - * Constructs a new MsgTransferResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a MsgTransferResponse. - * @implements IMsgTransferResponse - * @constructor - * @param {ibc.applications.transfer.v1.IMsgTransferResponse=} [properties] Properties to set - */ - function MsgTransferResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTransferResponse sequence. - * @member {Long} sequence - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @instance - */ - MsgTransferResponse.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgTransferResponse message. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransferResponse.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); - return writer; - }; - - /** - * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.MsgTransferResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {ibc.applications.transfer.v1.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransferResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransferResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTransferResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTransferResponse.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"; - return null; - }; - - /** - * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.MsgTransferResponse} MsgTransferResponse - */ - MsgTransferResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.MsgTransferResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.MsgTransferResponse(); - 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 MsgTransferResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @static - * @param {ibc.applications.transfer.v1.MsgTransferResponse} message MsgTransferResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTransferResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = 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; - return object; - }; - - /** - * Converts this MsgTransferResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.MsgTransferResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTransferResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTransferResponse; - })(); - - v1.DenomTrace = (function() { - - /** - * Properties of a DenomTrace. - * @memberof ibc.applications.transfer.v1 - * @interface IDenomTrace - * @property {string|null} [path] DenomTrace path - * @property {string|null} [base_denom] DenomTrace base_denom - */ - - /** - * Constructs a new DenomTrace. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a DenomTrace. - * @implements IDenomTrace - * @constructor - * @param {ibc.applications.transfer.v1.IDenomTrace=} [properties] Properties to set - */ - function DenomTrace(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DenomTrace path. - * @member {string} path - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - */ - DenomTrace.prototype.path = ""; - - /** - * DenomTrace base_denom. - * @member {string} base_denom - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - */ - DenomTrace.prototype.base_denom = ""; - - /** - * Encodes the specified DenomTrace message. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomTrace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.base_denom != null && Object.hasOwnProperty.call(message, "base_denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.base_denom); - return writer; - }; - - /** - * Encodes the specified DenomTrace message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomTrace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DenomTrace message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomTrace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.DenomTrace(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.base_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DenomTrace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomTrace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DenomTrace message. - * @function verify - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DenomTrace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.base_denom != null && message.hasOwnProperty("base_denom")) - if (!$util.isString(message.base_denom)) - return "base_denom: string expected"; - return null; - }; - - /** - * Creates a DenomTrace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - */ - DenomTrace.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.DenomTrace) - return object; - let message = new $root.ibc.applications.transfer.v1.DenomTrace(); - if (object.path != null) - message.path = String(object.path); - if (object.base_denom != null) - message.base_denom = String(object.base_denom); - return message; - }; - - /** - * Creates a plain object from a DenomTrace message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.DenomTrace} message DenomTrace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DenomTrace.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.path = ""; - object.base_denom = ""; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.base_denom != null && message.hasOwnProperty("base_denom")) - object.base_denom = message.base_denom; - return object; - }; - - /** - * Converts this DenomTrace to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - * @returns {Object.} JSON object - */ - DenomTrace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DenomTrace; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.transfer.v1 - * @interface IParams - * @property {boolean|null} [send_enabled] Params send_enabled - * @property {boolean|null} [receive_enabled] Params receive_enabled - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.transfer.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params send_enabled. - * @member {boolean} send_enabled - * @memberof ibc.applications.transfer.v1.Params - * @instance - */ - Params.prototype.send_enabled = false; - - /** - * Params receive_enabled. - * @member {boolean} receive_enabled - * @memberof ibc.applications.transfer.v1.Params - * @instance - */ - Params.prototype.receive_enabled = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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.send_enabled != null && Object.hasOwnProperty.call(message, "send_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.send_enabled); - if (message.receive_enabled != null && Object.hasOwnProperty.call(message, "receive_enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.receive_enabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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 ibc.applications.transfer.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.send_enabled = reader.bool(); - break; - case 2: - message.receive_enabled = 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 ibc.applications.transfer.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.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 ibc.applications.transfer.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.send_enabled != null && message.hasOwnProperty("send_enabled")) - if (typeof message.send_enabled !== "boolean") - return "send_enabled: boolean expected"; - if (message.receive_enabled != null && message.hasOwnProperty("receive_enabled")) - if (typeof message.receive_enabled !== "boolean") - return "receive_enabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.Params) - return object; - let message = new $root.ibc.applications.transfer.v1.Params(); - if (object.send_enabled != null) - message.send_enabled = Boolean(object.send_enabled); - if (object.receive_enabled != null) - message.receive_enabled = Boolean(object.receive_enabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.send_enabled = false; - object.receive_enabled = false; - } - if (message.send_enabled != null && message.hasOwnProperty("send_enabled")) - object.send_enabled = message.send_enabled; - if (message.receive_enabled != null && message.hasOwnProperty("receive_enabled")) - object.receive_enabled = message.receive_enabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.transfer.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; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTrace}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomTraceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} [response] QueryDenomTraceResponse - */ - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomTraceCallback} callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTrace = function denomTrace(request, callback) { - return this.rpcCall(denomTrace, $root.ibc.applications.transfer.v1.QueryDenomTraceRequest, $root.ibc.applications.transfer.v1.QueryDenomTraceResponse, request, callback); - }, "name", { value: "DenomTrace" }); - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTraces}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomTracesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} [response] QueryDenomTracesResponse - */ - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomTracesCallback} callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTraces = function denomTraces(request, callback) { - return this.rpcCall(denomTraces, $root.ibc.applications.transfer.v1.QueryDenomTracesRequest, $root.ibc.applications.transfer.v1.QueryDenomTracesResponse, request, callback); - }, "name", { value: "DenomTraces" }); - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#params}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.transfer.v1.QueryParamsRequest, $root.ibc.applications.transfer.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomHash}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomHashCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} [response] QueryDenomHashResponse - */ - - /** - * Calls DenomHash. - * @function denomHash - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomHashCallback} callback Node-style callback called with the error, if any, and QueryDenomHashResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomHash = function denomHash(request, callback) { - return this.rpcCall(denomHash, $root.ibc.applications.transfer.v1.QueryDenomHashRequest, $root.ibc.applications.transfer.v1.QueryDenomHashResponse, request, callback); - }, "name", { value: "DenomHash" }); - - /** - * Calls DenomHash. - * @function denomHash - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#escrowAddress}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef EscrowAddressCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryEscrowAddressResponse} [response] QueryEscrowAddressResponse - */ - - /** - * Calls EscrowAddress. - * @function escrowAddress - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} request QueryEscrowAddressRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.EscrowAddressCallback} callback Node-style callback called with the error, if any, and QueryEscrowAddressResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.escrowAddress = function escrowAddress(request, callback) { - return this.rpcCall(escrowAddress, $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest, $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse, request, callback); - }, "name", { value: "EscrowAddress" }); - - /** - * Calls EscrowAddress. - * @function escrowAddress - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} request QueryEscrowAddressRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#totalEscrowForDenom}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef TotalEscrowForDenomCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} [response] QueryTotalEscrowForDenomResponse - */ - - /** - * Calls TotalEscrowForDenom. - * @function totalEscrowForDenom - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} request QueryTotalEscrowForDenomRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.TotalEscrowForDenomCallback} callback Node-style callback called with the error, if any, and QueryTotalEscrowForDenomResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalEscrowForDenom = function totalEscrowForDenom(request, callback) { - return this.rpcCall(totalEscrowForDenom, $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest, $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse, request, callback); - }, "name", { value: "TotalEscrowForDenom" }); - - /** - * Calls TotalEscrowForDenom. - * @function totalEscrowForDenom - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} request QueryTotalEscrowForDenomRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryDenomTraceRequest = (function() { - - /** - * Properties of a QueryDenomTraceRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTraceRequest - * @property {string|null} [hash] QueryDenomTraceRequest hash - */ - - /** - * Constructs a new QueryDenomTraceRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTraceRequest. - * @implements IQueryDenomTraceRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest=} [properties] Properties to set - */ - function QueryDenomTraceRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTraceRequest hash. - * @member {string} hash - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @instance - */ - QueryDenomTraceRequest.prototype.hash = ""; - - /** - * Encodes the specified QueryDenomTraceRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceRequest.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).string(message.hash); - return writer; - }; - - /** - * Encodes the specified QueryDenomTraceRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTraceRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTraceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!$util.isString(message.hash)) - return "hash: string expected"; - return null; - }; - - /** - * Creates a QueryDenomTraceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - */ - QueryDenomTraceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceRequest) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); - if (object.hash != null) - message.hash = String(object.hash); - return message; - }; - - /** - * Creates a plain object from a QueryDenomTraceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTraceRequest} message QueryDenomTraceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTraceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.hash = ""; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = message.hash; - return object; - }; - - /** - * Converts this QueryDenomTraceRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTraceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTraceRequest; - })(); - - v1.QueryDenomTraceResponse = (function() { - - /** - * Properties of a QueryDenomTraceResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTraceResponse - * @property {ibc.applications.transfer.v1.IDenomTrace|null} [denom_trace] QueryDenomTraceResponse denom_trace - */ - - /** - * Constructs a new QueryDenomTraceResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTraceResponse. - * @implements IQueryDenomTraceResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse=} [properties] Properties to set - */ - function QueryDenomTraceResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTraceResponse denom_trace. - * @member {ibc.applications.transfer.v1.IDenomTrace|null|undefined} denom_trace - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @instance - */ - QueryDenomTraceResponse.prototype.denom_trace = null; - - /** - * Encodes the specified QueryDenomTraceResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_trace != null && Object.hasOwnProperty.call(message, "denom_trace")) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_trace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTraceResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTraceResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTraceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_trace != null && message.hasOwnProperty("denom_trace")) { - let error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_trace); - if (error) - return "denom_trace." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTraceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - */ - QueryDenomTraceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); - if (object.denom_trace != null) { - if (typeof object.denom_trace !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTraceResponse.denom_trace: object expected"); - message.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_trace); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTraceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} message QueryDenomTraceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTraceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.denom_trace = null; - if (message.denom_trace != null && message.hasOwnProperty("denom_trace")) - object.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_trace, options); - return object; - }; - - /** - * Converts this QueryDenomTraceResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTraceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTraceResponse; - })(); - - v1.QueryDenomTracesRequest = (function() { - - /** - * Properties of a QueryDenomTracesRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTracesRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDenomTracesRequest pagination - */ - - /** - * Constructs a new QueryDenomTracesRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTracesRequest. - * @implements IQueryDenomTracesRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest=} [properties] Properties to set - */ - function QueryDenomTracesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTracesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @instance - */ - QueryDenomTracesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryDenomTracesRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTracesRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTracesRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTracesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTracesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - */ - QueryDenomTracesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesRequest) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTracesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTracesRequest} message QueryDenomTracesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTracesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomTracesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTracesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTracesRequest; - })(); - - v1.QueryDenomTracesResponse = (function() { - - /** - * Properties of a QueryDenomTracesResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTracesResponse - * @property {Array.|null} [denom_traces] QueryDenomTracesResponse denom_traces - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDenomTracesResponse pagination - */ - - /** - * Constructs a new QueryDenomTracesResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTracesResponse. - * @implements IQueryDenomTracesResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse=} [properties] Properties to set - */ - function QueryDenomTracesResponse(properties) { - this.denom_traces = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTracesResponse denom_traces. - * @member {Array.} denom_traces - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - */ - QueryDenomTracesResponse.prototype.denom_traces = $util.emptyArray; - - /** - * QueryDenomTracesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - */ - QueryDenomTracesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryDenomTracesResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_traces != null && message.denom_traces.length) - for (let i = 0; i < message.denom_traces.length; ++i) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_traces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTracesResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.denom_traces && message.denom_traces.length)) - message.denom_traces = []; - message.denom_traces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTracesResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTracesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_traces != null && message.hasOwnProperty("denom_traces")) { - if (!Array.isArray(message.denom_traces)) - return "denom_traces: array expected"; - for (let i = 0; i < message.denom_traces.length; ++i) { - let error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_traces[i]); - if (error) - return "denom_traces." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTracesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - */ - QueryDenomTracesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); - if (object.denom_traces) { - if (!Array.isArray(object.denom_traces)) - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denom_traces: array expected"); - message.denom_traces = []; - for (let i = 0; i < object.denom_traces.length; ++i) { - if (typeof object.denom_traces[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denom_traces: object expected"); - message.denom_traces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_traces[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTracesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} message QueryDenomTracesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTracesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.denom_traces = []; - if (options.defaults) - object.pagination = null; - if (message.denom_traces && message.denom_traces.length) { - object.denom_traces = []; - for (let j = 0; j < message.denom_traces.length; ++j) - object.denom_traces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_traces[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomTracesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTracesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTracesResponse; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.transfer.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.transfer.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.transfer.v1.IParams|null|undefined} params - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.applications.transfer.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.QueryDenomHashRequest = (function() { - - /** - * Properties of a QueryDenomHashRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomHashRequest - * @property {string|null} [trace] QueryDenomHashRequest trace - */ - - /** - * Constructs a new QueryDenomHashRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomHashRequest. - * @implements IQueryDenomHashRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest=} [properties] Properties to set - */ - function QueryDenomHashRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomHashRequest trace. - * @member {string} trace - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @instance - */ - QueryDenomHashRequest.prototype.trace = ""; - - /** - * Encodes the specified QueryDenomHashRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} message QueryDenomHashRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.trace != null && Object.hasOwnProperty.call(message, "trace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.trace); - return writer; - }; - - /** - * Encodes the specified QueryDenomHashRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} message QueryDenomHashRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomHashRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomHashRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomHashRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - return null; - }; - - /** - * Creates a QueryDenomHashRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - */ - QueryDenomHashRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomHashRequest) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryDenomHashRequest(); - if (object.trace != null) - message.trace = String(object.trace); - return message; - }; - - /** - * Creates a plain object from a QueryDenomHashRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomHashRequest} message QueryDenomHashRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomHashRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.trace = ""; - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - return object; - }; - - /** - * Converts this QueryDenomHashRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomHashRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomHashRequest; - })(); - - v1.QueryDenomHashResponse = (function() { - - /** - * Properties of a QueryDenomHashResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomHashResponse - * @property {string|null} [hash] QueryDenomHashResponse hash - */ - - /** - * Constructs a new QueryDenomHashResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomHashResponse. - * @implements IQueryDenomHashResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse=} [properties] Properties to set - */ - function QueryDenomHashResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomHashResponse hash. - * @member {string} hash - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @instance - */ - QueryDenomHashResponse.prototype.hash = ""; - - /** - * Encodes the specified QueryDenomHashResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse} message QueryDenomHashResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashResponse.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).string(message.hash); - return writer; - }; - - /** - * Encodes the specified QueryDenomHashResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse} message QueryDenomHashResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomHashResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomHashResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomHashResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!$util.isString(message.hash)) - return "hash: string expected"; - return null; - }; - - /** - * Creates a QueryDenomHashResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - */ - QueryDenomHashResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomHashResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryDenomHashResponse(); - if (object.hash != null) - message.hash = String(object.hash); - return message; - }; - - /** - * Creates a plain object from a QueryDenomHashResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} message QueryDenomHashResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomHashResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.hash = ""; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = message.hash; - return object; - }; - - /** - * Converts this QueryDenomHashResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomHashResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomHashResponse; - })(); - - v1.QueryEscrowAddressRequest = (function() { - - /** - * Properties of a QueryEscrowAddressRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryEscrowAddressRequest - * @property {string|null} [port_id] QueryEscrowAddressRequest port_id - * @property {string|null} [channel_id] QueryEscrowAddressRequest channel_id - */ - - /** - * Constructs a new QueryEscrowAddressRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryEscrowAddressRequest. - * @implements IQueryEscrowAddressRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest=} [properties] Properties to set - */ - function QueryEscrowAddressRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryEscrowAddressRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - */ - QueryEscrowAddressRequest.prototype.port_id = ""; - - /** - * QueryEscrowAddressRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - */ - QueryEscrowAddressRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryEscrowAddressRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} message QueryEscrowAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryEscrowAddressRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} message QueryEscrowAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryEscrowAddressRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryEscrowAddressRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryEscrowAddressRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - */ - QueryEscrowAddressRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryEscrowAddressRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.QueryEscrowAddressRequest} message QueryEscrowAddressRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryEscrowAddressRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryEscrowAddressRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - * @returns {Object.} JSON object - */ - QueryEscrowAddressRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryEscrowAddressRequest; - })(); - - v1.QueryEscrowAddressResponse = (function() { - - /** - * Properties of a QueryEscrowAddressResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryEscrowAddressResponse - * @property {string|null} [escrow_address] QueryEscrowAddressResponse escrow_address - */ - - /** - * Constructs a new QueryEscrowAddressResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryEscrowAddressResponse. - * @implements IQueryEscrowAddressResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse=} [properties] Properties to set - */ - function QueryEscrowAddressResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryEscrowAddressResponse escrow_address. - * @member {string} escrow_address - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @instance - */ - QueryEscrowAddressResponse.prototype.escrow_address = ""; - - /** - * Encodes the specified QueryEscrowAddressResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse} message QueryEscrowAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.escrow_address != null && Object.hasOwnProperty.call(message, "escrow_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.escrow_address); - return writer; - }; - - /** - * Encodes the specified QueryEscrowAddressResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse} message QueryEscrowAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.escrow_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryEscrowAddressResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryEscrowAddressResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.escrow_address != null && message.hasOwnProperty("escrow_address")) - if (!$util.isString(message.escrow_address)) - return "escrow_address: string expected"; - return null; - }; - - /** - * Creates a QueryEscrowAddressResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - */ - QueryEscrowAddressResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse(); - if (object.escrow_address != null) - message.escrow_address = String(object.escrow_address); - return message; - }; - - /** - * Creates a plain object from a QueryEscrowAddressResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.QueryEscrowAddressResponse} message QueryEscrowAddressResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryEscrowAddressResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.escrow_address = ""; - if (message.escrow_address != null && message.hasOwnProperty("escrow_address")) - object.escrow_address = message.escrow_address; - return object; - }; - - /** - * Converts this QueryEscrowAddressResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @instance - * @returns {Object.} JSON object - */ - QueryEscrowAddressResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryEscrowAddressResponse; - })(); - - v1.QueryTotalEscrowForDenomRequest = (function() { - - /** - * Properties of a QueryTotalEscrowForDenomRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryTotalEscrowForDenomRequest - * @property {string|null} [denom] QueryTotalEscrowForDenomRequest denom - */ - - /** - * Constructs a new QueryTotalEscrowForDenomRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryTotalEscrowForDenomRequest. - * @implements IQueryTotalEscrowForDenomRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest=} [properties] Properties to set - */ - function QueryTotalEscrowForDenomRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalEscrowForDenomRequest denom. - * @member {string} denom - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @instance - */ - QueryTotalEscrowForDenomRequest.prototype.denom = ""; - - /** - * Encodes the specified QueryTotalEscrowForDenomRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} message QueryTotalEscrowForDenomRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomRequest.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 QueryTotalEscrowForDenomRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomRequest} message QueryTotalEscrowForDenomRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalEscrowForDenomRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} QueryTotalEscrowForDenomRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalEscrowForDenomRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} QueryTotalEscrowForDenomRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalEscrowForDenomRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalEscrowForDenomRequest.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 QueryTotalEscrowForDenomRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} QueryTotalEscrowForDenomRequest - */ - QueryTotalEscrowForDenomRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest(); - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QueryTotalEscrowForDenomRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @static - * @param {ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest} message QueryTotalEscrowForDenomRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalEscrowForDenomRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.denom = ""; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - return object; - }; - - /** - * Converts this QueryTotalEscrowForDenomRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalEscrowForDenomRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalEscrowForDenomRequest; - })(); - - v1.QueryTotalEscrowForDenomResponse = (function() { - - /** - * Properties of a QueryTotalEscrowForDenomResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryTotalEscrowForDenomResponse - * @property {cosmos.base.v1beta1.ICoin|null} [amount] QueryTotalEscrowForDenomResponse amount - */ - - /** - * Constructs a new QueryTotalEscrowForDenomResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryTotalEscrowForDenomResponse. - * @implements IQueryTotalEscrowForDenomResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse=} [properties] Properties to set - */ - function QueryTotalEscrowForDenomResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalEscrowForDenomResponse amount. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @instance - */ - QueryTotalEscrowForDenomResponse.prototype.amount = null; - - /** - * Encodes the specified QueryTotalEscrowForDenomResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse} message QueryTotalEscrowForDenomResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalEscrowForDenomResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryTotalEscrowForDenomResponse} message QueryTotalEscrowForDenomResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalEscrowForDenomResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalEscrowForDenomResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} QueryTotalEscrowForDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalEscrowForDenomResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} QueryTotalEscrowForDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalEscrowForDenomResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalEscrowForDenomResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalEscrowForDenomResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - return null; - }; - - /** - * Creates a QueryTotalEscrowForDenomResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} QueryTotalEscrowForDenomResponse - */ - QueryTotalEscrowForDenomResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse) - return object; - let message = new $root.ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse(); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse.amount: object expected"); - message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalEscrowForDenomResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @static - * @param {ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse} message QueryTotalEscrowForDenomResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalEscrowForDenomResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.amount = null; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); - return object; - }; - - /** - * Converts this QueryTotalEscrowForDenomResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryTotalEscrowForDenomResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalEscrowForDenomResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalEscrowForDenomResponse; - })(); - - v1.Allocation = (function() { - - /** - * Properties of an Allocation. - * @memberof ibc.applications.transfer.v1 - * @interface IAllocation - * @property {string|null} [source_port] Allocation source_port - * @property {string|null} [source_channel] Allocation source_channel - * @property {Array.|null} [spend_limit] Allocation spend_limit - * @property {Array.|null} [allow_list] Allocation allow_list - */ - - /** - * Constructs a new Allocation. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents an Allocation. - * @implements IAllocation - * @constructor - * @param {ibc.applications.transfer.v1.IAllocation=} [properties] Properties to set - */ - function Allocation(properties) { - this.spend_limit = []; - this.allow_list = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Allocation source_port. - * @member {string} source_port - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.source_port = ""; - - /** - * Allocation source_channel. - * @member {string} source_channel - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.source_channel = ""; - - /** - * Allocation spend_limit. - * @member {Array.} spend_limit - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.spend_limit = $util.emptyArray; - - /** - * Allocation allow_list. - * @member {Array.} allow_list - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - */ - Allocation.prototype.allow_list = $util.emptyArray; - - /** - * Encodes the specified Allocation message. Does not implicitly {@link ibc.applications.transfer.v1.Allocation.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {ibc.applications.transfer.v1.IAllocation} message Allocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Allocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_channel); - if (message.spend_limit != null && message.spend_limit.length) - for (let i = 0; i < message.spend_limit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.spend_limit[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.allow_list != null && message.allow_list.length) - for (let i = 0; i < message.allow_list.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.allow_list[i]); - return writer; - }; - - /** - * Encodes the specified Allocation message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Allocation.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {ibc.applications.transfer.v1.IAllocation} message Allocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Allocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Allocation message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.Allocation} Allocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Allocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.Allocation(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_port = reader.string(); - break; - case 2: - message.source_channel = reader.string(); - break; - case 3: - if (!(message.spend_limit && message.spend_limit.length)) - message.spend_limit = []; - message.spend_limit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.allow_list && message.allow_list.length)) - message.allow_list = []; - message.allow_list.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Allocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.Allocation} Allocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Allocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Allocation message. - * @function verify - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Allocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.spend_limit != null && message.hasOwnProperty("spend_limit")) { - if (!Array.isArray(message.spend_limit)) - return "spend_limit: array expected"; - for (let i = 0; i < message.spend_limit.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.spend_limit[i]); - if (error) - return "spend_limit." + error; - } - } - if (message.allow_list != null && message.hasOwnProperty("allow_list")) { - if (!Array.isArray(message.allow_list)) - return "allow_list: array expected"; - for (let i = 0; i < message.allow_list.length; ++i) - if (!$util.isString(message.allow_list[i])) - return "allow_list: string[] expected"; - } - return null; - }; - - /** - * Creates an Allocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.Allocation} Allocation - */ - Allocation.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.Allocation) - return object; - let message = new $root.ibc.applications.transfer.v1.Allocation(); - if (object.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.spend_limit) { - if (!Array.isArray(object.spend_limit)) - throw TypeError(".ibc.applications.transfer.v1.Allocation.spend_limit: array expected"); - message.spend_limit = []; - for (let i = 0; i < object.spend_limit.length; ++i) { - if (typeof object.spend_limit[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.Allocation.spend_limit: object expected"); - message.spend_limit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.spend_limit[i]); - } - } - if (object.allow_list) { - if (!Array.isArray(object.allow_list)) - throw TypeError(".ibc.applications.transfer.v1.Allocation.allow_list: array expected"); - message.allow_list = []; - for (let i = 0; i < object.allow_list.length; ++i) - message.allow_list[i] = String(object.allow_list[i]); - } - return message; - }; - - /** - * Creates a plain object from an Allocation message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.Allocation - * @static - * @param {ibc.applications.transfer.v1.Allocation} message Allocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Allocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.spend_limit = []; - object.allow_list = []; - } - if (options.defaults) { - object.source_port = ""; - object.source_channel = ""; - } - if (message.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.spend_limit && message.spend_limit.length) { - object.spend_limit = []; - for (let j = 0; j < message.spend_limit.length; ++j) - object.spend_limit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.spend_limit[j], options); - } - if (message.allow_list && message.allow_list.length) { - object.allow_list = []; - for (let j = 0; j < message.allow_list.length; ++j) - object.allow_list[j] = message.allow_list[j]; - } - return object; - }; - - /** - * Converts this Allocation to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.Allocation - * @instance - * @returns {Object.} JSON object - */ - Allocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Allocation; - })(); - - v1.TransferAuthorization = (function() { - - /** - * Properties of a TransferAuthorization. - * @memberof ibc.applications.transfer.v1 - * @interface ITransferAuthorization - * @property {Array.|null} [allocations] TransferAuthorization allocations - */ - - /** - * Constructs a new TransferAuthorization. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a TransferAuthorization. - * @implements ITransferAuthorization - * @constructor - * @param {ibc.applications.transfer.v1.ITransferAuthorization=} [properties] Properties to set - */ - function TransferAuthorization(properties) { - this.allocations = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TransferAuthorization allocations. - * @member {Array.} allocations - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @instance - */ - TransferAuthorization.prototype.allocations = $util.emptyArray; - - /** - * Encodes the specified TransferAuthorization message. Does not implicitly {@link ibc.applications.transfer.v1.TransferAuthorization.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {ibc.applications.transfer.v1.ITransferAuthorization} message TransferAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransferAuthorization.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allocations != null && message.allocations.length) - for (let i = 0; i < message.allocations.length; ++i) - $root.ibc.applications.transfer.v1.Allocation.encode(message.allocations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TransferAuthorization message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.TransferAuthorization.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {ibc.applications.transfer.v1.ITransferAuthorization} message TransferAuthorization message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TransferAuthorization.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TransferAuthorization message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.TransferAuthorization} TransferAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransferAuthorization.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.TransferAuthorization(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.allocations && message.allocations.length)) - message.allocations = []; - message.allocations.push($root.ibc.applications.transfer.v1.Allocation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TransferAuthorization message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.TransferAuthorization} TransferAuthorization - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TransferAuthorization.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TransferAuthorization message. - * @function verify - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TransferAuthorization.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allocations != null && message.hasOwnProperty("allocations")) { - if (!Array.isArray(message.allocations)) - return "allocations: array expected"; - for (let i = 0; i < message.allocations.length; ++i) { - let error = $root.ibc.applications.transfer.v1.Allocation.verify(message.allocations[i]); - if (error) - return "allocations." + error; - } - } - return null; - }; - - /** - * Creates a TransferAuthorization message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.TransferAuthorization} TransferAuthorization - */ - TransferAuthorization.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.TransferAuthorization) - return object; - let message = new $root.ibc.applications.transfer.v1.TransferAuthorization(); - if (object.allocations) { - if (!Array.isArray(object.allocations)) - throw TypeError(".ibc.applications.transfer.v1.TransferAuthorization.allocations: array expected"); - message.allocations = []; - for (let i = 0; i < object.allocations.length; ++i) { - if (typeof object.allocations[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.TransferAuthorization.allocations: object expected"); - message.allocations[i] = $root.ibc.applications.transfer.v1.Allocation.fromObject(object.allocations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TransferAuthorization message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @static - * @param {ibc.applications.transfer.v1.TransferAuthorization} message TransferAuthorization - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TransferAuthorization.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.allocations = []; - if (message.allocations && message.allocations.length) { - object.allocations = []; - for (let j = 0; j < message.allocations.length; ++j) - object.allocations[j] = $root.ibc.applications.transfer.v1.Allocation.toObject(message.allocations[j], options); - } - return object; - }; - - /** - * Converts this TransferAuthorization to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.TransferAuthorization - * @instance - * @returns {Object.} JSON object - */ - TransferAuthorization.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TransferAuthorization; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.applications.transfer.v1 - * @interface IGenesisState - * @property {string|null} [port_id] GenesisState port_id - * @property {Array.|null} [denom_traces] GenesisState denom_traces - * @property {ibc.applications.transfer.v1.IParams|null} [params] GenesisState params - * @property {Array.|null} [total_escrowed] GenesisState total_escrowed - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.applications.transfer.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.denom_traces = []; - this.total_escrowed = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState port_id. - * @member {string} port_id - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.port_id = ""; - - /** - * GenesisState denom_traces. - * @member {Array.} denom_traces - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.denom_traces = $util.emptyArray; - - /** - * GenesisState params. - * @member {ibc.applications.transfer.v1.IParams|null|undefined} params - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState total_escrowed. - * @member {Array.} total_escrowed - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - */ - GenesisState.prototype.total_escrowed = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {ibc.applications.transfer.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.denom_traces != null && message.denom_traces.length) - for (let i = 0; i < message.denom_traces.length; ++i) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_traces[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.total_escrowed != null && message.total_escrowed.length) - for (let i = 0; i < message.total_escrowed.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total_escrowed[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {ibc.applications.transfer.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - if (!(message.denom_traces && message.denom_traces.length)) - message.denom_traces = []; - message.denom_traces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); - break; - case 3: - message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.total_escrowed && message.total_escrowed.length)) - message.total_escrowed = []; - message.total_escrowed.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.denom_traces != null && message.hasOwnProperty("denom_traces")) { - if (!Array.isArray(message.denom_traces)) - return "denom_traces: array expected"; - for (let i = 0; i < message.denom_traces.length; ++i) { - let error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_traces[i]); - if (error) - return "denom_traces." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.applications.transfer.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.total_escrowed != null && message.hasOwnProperty("total_escrowed")) { - if (!Array.isArray(message.total_escrowed)) - return "total_escrowed: array expected"; - for (let i = 0; i < message.total_escrowed.length; ++i) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.total_escrowed[i]); - if (error) - return "total_escrowed." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.GenesisState) - return object; - let message = new $root.ibc.applications.transfer.v1.GenesisState(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.denom_traces) { - if (!Array.isArray(object.denom_traces)) - throw TypeError(".ibc.applications.transfer.v1.GenesisState.denom_traces: array expected"); - message.denom_traces = []; - for (let i = 0; i < object.denom_traces.length; ++i) { - if (typeof object.denom_traces[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.GenesisState.denom_traces: object expected"); - message.denom_traces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_traces[i]); - } - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.transfer.v1.GenesisState.params: object expected"); - message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); - } - if (object.total_escrowed) { - if (!Array.isArray(object.total_escrowed)) - throw TypeError(".ibc.applications.transfer.v1.GenesisState.total_escrowed: array expected"); - message.total_escrowed = []; - for (let i = 0; i < object.total_escrowed.length; ++i) { - if (typeof object.total_escrowed[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.GenesisState.total_escrowed: object expected"); - message.total_escrowed[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total_escrowed[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.GenesisState - * @static - * @param {ibc.applications.transfer.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.denom_traces = []; - object.total_escrowed = []; - } - if (options.defaults) { - object.port_id = ""; - object.params = null; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.denom_traces && message.denom_traces.length) { - object.denom_traces = []; - for (let j = 0; j < message.denom_traces.length; ++j) - object.denom_traces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_traces[j], options); - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); - if (message.total_escrowed && message.total_escrowed.length) { - object.total_escrowed = []; - for (let j = 0; j < message.total_escrowed.length; ++j) - object.total_escrowed[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.total_escrowed[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return v1; - })(); - - transfer.v2 = (function() { - - /** - * Namespace v2. - * @memberof ibc.applications.transfer - * @namespace - */ - const v2 = {}; - - v2.FungibleTokenPacketData = (function() { - - /** - * Properties of a FungibleTokenPacketData. - * @memberof ibc.applications.transfer.v2 - * @interface IFungibleTokenPacketData - * @property {string|null} [denom] FungibleTokenPacketData denom - * @property {string|null} [amount] FungibleTokenPacketData amount - * @property {string|null} [sender] FungibleTokenPacketData sender - * @property {string|null} [receiver] FungibleTokenPacketData receiver - * @property {string|null} [memo] FungibleTokenPacketData memo - */ - - /** - * Constructs a new FungibleTokenPacketData. - * @memberof ibc.applications.transfer.v2 - * @classdesc Represents a FungibleTokenPacketData. - * @implements IFungibleTokenPacketData - * @constructor - * @param {ibc.applications.transfer.v2.IFungibleTokenPacketData=} [properties] Properties to set - */ - function FungibleTokenPacketData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FungibleTokenPacketData denom. - * @member {string} denom - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.denom = ""; - - /** - * FungibleTokenPacketData amount. - * @member {string} amount - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.amount = ""; - - /** - * FungibleTokenPacketData sender. - * @member {string} sender - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.sender = ""; - - /** - * FungibleTokenPacketData receiver. - * @member {string} receiver - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.receiver = ""; - - /** - * FungibleTokenPacketData memo. - * @member {string} memo - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.memo = ""; - - /** - * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link ibc.applications.transfer.v2.FungibleTokenPacketData.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {ibc.applications.transfer.v2.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.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); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.receiver); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.memo); - return writer; - }; - - /** - * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link ibc.applications.transfer.v2.FungibleTokenPacketData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {ibc.applications.transfer.v2.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 ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v2.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v2.FungibleTokenPacketData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.amount = reader.string(); - break; - case 3: - message.sender = reader.string(); - break; - case 4: - message.receiver = reader.string(); - break; - case 5: - message.memo = 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 ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v2.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 ibc.applications.transfer.v2.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.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"; - 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"; - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - return null; - }; - - /** - * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v2.FungibleTokenPacketData} FungibleTokenPacketData - */ - FungibleTokenPacketData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v2.FungibleTokenPacketData) - return object; - let message = new $root.ibc.applications.transfer.v2.FungibleTokenPacketData(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.amount != null) - message.amount = String(object.amount); - if (object.sender != null) - message.sender = String(object.sender); - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.memo != null) - message.memo = String(object.memo); - return message; - }; - - /** - * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @static - * @param {ibc.applications.transfer.v2.FungibleTokenPacketData} message FungibleTokenPacketData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FungibleTokenPacketData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.denom = ""; - object.amount = ""; - object.sender = ""; - object.receiver = ""; - object.memo = ""; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = message.amount; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - return object; - }; - - /** - * Converts this FungibleTokenPacketData to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v2.FungibleTokenPacketData - * @instance - * @returns {Object.} JSON object - */ - FungibleTokenPacketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FungibleTokenPacketData; - })(); - - return v2; - })(); - - return transfer; - })(); - - return applications; - })(); - - ibc.core = (function() { - - /** - * Namespace core. - * @memberof ibc - * @namespace - */ - const core = {}; - - core.channel = (function() { - - /** - * Namespace channel. - * @memberof ibc.core - * @namespace - */ - const channel = {}; - - channel.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.channel - * @namespace - */ - const v1 = {}; - - v1.Channel = (function() { - - /** - * Properties of a Channel. - * @memberof ibc.core.channel.v1 - * @interface IChannel - * @property {ibc.core.channel.v1.State|null} [state] Channel state - * @property {ibc.core.channel.v1.Order|null} [ordering] Channel ordering - * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] Channel counterparty - * @property {Array.|null} [connection_hops] Channel connection_hops - * @property {string|null} [version] Channel version - */ - - /** - * Constructs a new Channel. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Channel. - * @implements IChannel - * @constructor - * @param {ibc.core.channel.v1.IChannel=} [properties] Properties to set - */ - function Channel(properties) { - this.connection_hops = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Channel state. - * @member {ibc.core.channel.v1.State} state - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.state = 0; - - /** - * Channel ordering. - * @member {ibc.core.channel.v1.Order} ordering - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.ordering = 0; - - /** - * Channel counterparty. - * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.counterparty = null; - - /** - * Channel connection_hops. - * @member {Array.} connection_hops - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.connection_hops = $util.emptyArray; - - /** - * Channel version. - * @member {string} version - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.version = ""; - - /** - * Encodes the specified Channel message. Does not implicitly {@link ibc.core.channel.v1.Channel.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connection_hops != null && message.connection_hops.length) - for (let i = 0; i < message.connection_hops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_hops[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 ibc.core.channel.v1.Channel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Channel(); - while (reader.pos < end) { - let 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.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.connection_hops && message.connection_hops.length)) - message.connection_hops = []; - message.connection_hops.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 ibc.core.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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")) { - let error = $root.ibc.core.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connection_hops != null && message.hasOwnProperty("connection_hops")) { - if (!Array.isArray(message.connection_hops)) - return "connection_hops: array expected"; - for (let i = 0; i < message.connection_hops.length; ++i) - if (!$util.isString(message.connection_hops[i])) - return "connection_hops: 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 ibc.core.channel.v1.Channel - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Channel} Channel - */ - Channel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Channel) - return object; - let message = new $root.ibc.core.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(".ibc.core.channel.v1.Channel.counterparty: object expected"); - message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connection_hops) { - if (!Array.isArray(object.connection_hops)) - throw TypeError(".ibc.core.channel.v1.Channel.connection_hops: array expected"); - message.connection_hops = []; - for (let i = 0; i < object.connection_hops.length; ++i) - message.connection_hops[i] = String(object.connection_hops[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 ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.channel.v1.Channel} message Channel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Channel.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.connection_hops = []; - 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.ibc.core.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connection_hops && message.connection_hops.length) { - object.connection_hops = []; - for (let j = 0; j < message.connection_hops.length; ++j) - object.connection_hops[j] = message.connection_hops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this Channel to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Channel - * @instance - * @returns {Object.} JSON object - */ - Channel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Channel; - })(); - - v1.IdentifiedChannel = (function() { - - /** - * Properties of an IdentifiedChannel. - * @memberof ibc.core.channel.v1 - * @interface IIdentifiedChannel - * @property {ibc.core.channel.v1.State|null} [state] IdentifiedChannel state - * @property {ibc.core.channel.v1.Order|null} [ordering] IdentifiedChannel ordering - * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] IdentifiedChannel counterparty - * @property {Array.|null} [connection_hops] IdentifiedChannel connection_hops - * @property {string|null} [version] IdentifiedChannel version - * @property {string|null} [port_id] IdentifiedChannel port_id - * @property {string|null} [channel_id] IdentifiedChannel channel_id - */ - - /** - * Constructs a new IdentifiedChannel. - * @memberof ibc.core.channel.v1 - * @classdesc Represents an IdentifiedChannel. - * @implements IIdentifiedChannel - * @constructor - * @param {ibc.core.channel.v1.IIdentifiedChannel=} [properties] Properties to set - */ - function IdentifiedChannel(properties) { - this.connection_hops = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedChannel state. - * @member {ibc.core.channel.v1.State} state - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.state = 0; - - /** - * IdentifiedChannel ordering. - * @member {ibc.core.channel.v1.Order} ordering - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.ordering = 0; - - /** - * IdentifiedChannel counterparty. - * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.counterparty = null; - - /** - * IdentifiedChannel connection_hops. - * @member {Array.} connection_hops - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.connection_hops = $util.emptyArray; - - /** - * IdentifiedChannel version. - * @member {string} version - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.version = ""; - - /** - * IdentifiedChannel port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.port_id = ""; - - /** - * IdentifiedChannel channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.channel_id = ""; - - /** - * Encodes the specified IdentifiedChannel message. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedChannel.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.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connection_hops != null && message.connection_hops.length) - for (let i = 0; i < message.connection_hops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_hops[i]); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified IdentifiedChannel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.IdentifiedChannel(); - while (reader.pos < end) { - let 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.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.connection_hops && message.connection_hops.length)) - message.connection_hops = []; - message.connection_hops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.port_id = reader.string(); - break; - case 7: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedChannel message. - * @function verify - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedChannel.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")) { - let error = $root.ibc.core.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connection_hops != null && message.hasOwnProperty("connection_hops")) { - if (!Array.isArray(message.connection_hops)) - return "connection_hops: array expected"; - for (let i = 0; i < message.connection_hops.length; ++i) - if (!$util.isString(message.connection_hops[i])) - return "connection_hops: string[] expected"; - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates an IdentifiedChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - */ - IdentifiedChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.IdentifiedChannel) - return object; - let message = new $root.ibc.core.channel.v1.IdentifiedChannel(); - 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(".ibc.core.channel.v1.IdentifiedChannel.counterparty: object expected"); - message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connection_hops) { - if (!Array.isArray(object.connection_hops)) - throw TypeError(".ibc.core.channel.v1.IdentifiedChannel.connection_hops: array expected"); - message.connection_hops = []; - for (let i = 0; i < object.connection_hops.length; ++i) - message.connection_hops[i] = String(object.connection_hops[i]); - } - if (object.version != null) - message.version = String(object.version); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from an IdentifiedChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IdentifiedChannel} message IdentifiedChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.connection_hops = []; - 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 = ""; - object.port_id = ""; - object.channel_id = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connection_hops && message.connection_hops.length) { - object.connection_hops = []; - for (let j = 0; j < message.connection_hops.length; ++j) - object.connection_hops[j] = message.connection_hops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this IdentifiedChannel to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - * @returns {Object.} JSON object - */ - IdentifiedChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedChannel; - })(); - - /** - * State enum. - * @name ibc.core.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() { - const 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 ibc.core.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() { - const 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 ibc.core.channel.v1 - * @interface ICounterparty - * @property {string|null} [port_id] Counterparty port_id - * @property {string|null} [channel_id] Counterparty channel_id - */ - - /** - * Constructs a new Counterparty. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {ibc.core.channel.v1.ICounterparty=} [properties] Properties to set - */ - function Counterparty(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Counterparty port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.port_id = ""; - - /** - * Counterparty channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.channel_id = ""; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Counterparty(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = 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 ibc.core.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Counterparty) - return object; - let message = new $root.ibc.core.channel.v1.Counterparty(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.channel.v1.Counterparty} message Counterparty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Counterparty.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.channel.v1 - * @interface IPacket - * @property {Long|null} [sequence] Packet sequence - * @property {string|null} [source_port] Packet source_port - * @property {string|null} [source_channel] Packet source_channel - * @property {string|null} [destination_port] Packet destination_port - * @property {string|null} [destination_channel] Packet destination_channel - * @property {Uint8Array|null} [data] Packet data - * @property {ibc.core.client.v1.IHeight|null} [timeout_height] Packet timeout_height - * @property {Long|null} [timeout_timestamp] Packet timeout_timestamp - */ - - /** - * Constructs a new Packet. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Packet. - * @implements IPacket - * @constructor - * @param {ibc.core.channel.v1.IPacket=} [properties] Properties to set - */ - function Packet(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Packet sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Packet source_port. - * @member {string} source_port - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.source_port = ""; - - /** - * Packet source_channel. - * @member {string} source_channel - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.source_channel = ""; - - /** - * Packet destination_port. - * @member {string} destination_port - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.destination_port = ""; - - /** - * Packet destination_channel. - * @member {string} destination_channel - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.destination_channel = ""; - - /** - * Packet data. - * @member {Uint8Array} data - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.data = $util.newBuffer([]); - - /** - * Packet timeout_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} timeout_height - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.timeout_height = null; - - /** - * Packet timeout_timestamp. - * @member {Long} timeout_timestamp - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.timeout_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Packet message. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.source_channel); - if (message.destination_port != null && Object.hasOwnProperty.call(message, "destination_port")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination_port); - if (message.destination_channel != null && Object.hasOwnProperty.call(message, "destination_channel")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.destination_channel); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.data); - if (message.timeout_height != null && Object.hasOwnProperty.call(message, "timeout_height")) - $root.ibc.core.client.v1.Height.encode(message.timeout_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeout_timestamp != null && Object.hasOwnProperty.call(message, "timeout_timestamp")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.timeout_timestamp); - return writer; - }; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Packet(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.source_port = reader.string(); - break; - case 3: - message.source_channel = reader.string(); - break; - case 4: - message.destination_port = reader.string(); - break; - case 5: - message.destination_channel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeout_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeout_timestamp = 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 ibc.core.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.destination_port != null && message.hasOwnProperty("destination_port")) - if (!$util.isString(message.destination_port)) - return "destination_port: string expected"; - if (message.destination_channel != null && message.hasOwnProperty("destination_channel")) - if (!$util.isString(message.destination_channel)) - return "destination_channel: 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.timeout_height != null && message.hasOwnProperty("timeout_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.timeout_height); - if (error) - return "timeout_height." + error; - } - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (!$util.isInteger(message.timeout_timestamp) && !(message.timeout_timestamp && $util.isInteger(message.timeout_timestamp.low) && $util.isInteger(message.timeout_timestamp.high))) - return "timeout_timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a Packet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Packet} Packet - */ - Packet.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Packet) - return object; - let message = new $root.ibc.core.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.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.destination_port != null) - message.destination_port = String(object.destination_port); - if (object.destination_channel != null) - message.destination_channel = String(object.destination_channel); - 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.timeout_height != null) { - if (typeof object.timeout_height !== "object") - throw TypeError(".ibc.core.channel.v1.Packet.timeout_height: object expected"); - message.timeout_height = $root.ibc.core.client.v1.Height.fromObject(object.timeout_height); - } - if (object.timeout_timestamp != null) - if ($util.Long) - (message.timeout_timestamp = $util.Long.fromValue(object.timeout_timestamp)).unsigned = true; - else if (typeof object.timeout_timestamp === "string") - message.timeout_timestamp = parseInt(object.timeout_timestamp, 10); - else if (typeof object.timeout_timestamp === "number") - message.timeout_timestamp = object.timeout_timestamp; - else if (typeof object.timeout_timestamp === "object") - message.timeout_timestamp = new $util.LongBits(object.timeout_timestamp.low >>> 0, object.timeout_timestamp.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 ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.channel.v1.Packet} message Packet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Packet.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - object.source_port = ""; - object.source_channel = ""; - object.destination_port = ""; - object.destination_channel = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.timeout_height = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timeout_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout_timestamp = 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.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.destination_port != null && message.hasOwnProperty("destination_port")) - object.destination_port = message.destination_port; - if (message.destination_channel != null && message.hasOwnProperty("destination_channel")) - object.destination_channel = message.destination_channel; - 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.timeout_height != null && message.hasOwnProperty("timeout_height")) - object.timeout_height = $root.ibc.core.client.v1.Height.toObject(message.timeout_height, options); - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (typeof message.timeout_timestamp === "number") - object.timeout_timestamp = options.longs === String ? String(message.timeout_timestamp) : message.timeout_timestamp; - else - object.timeout_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeout_timestamp) : options.longs === Number ? new $util.LongBits(message.timeout_timestamp.low >>> 0, message.timeout_timestamp.high >>> 0).toNumber(true) : message.timeout_timestamp; - return object; - }; - - /** - * Converts this Packet to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Packet - * @instance - * @returns {Object.} JSON object - */ - Packet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Packet; - })(); - - v1.PacketState = (function() { - - /** - * Properties of a PacketState. - * @memberof ibc.core.channel.v1 - * @interface IPacketState - * @property {string|null} [port_id] PacketState port_id - * @property {string|null} [channel_id] PacketState channel_id - * @property {Long|null} [sequence] PacketState sequence - * @property {Uint8Array|null} [data] PacketState data - */ - - /** - * Constructs a new PacketState. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketState. - * @implements IPacketState - * @constructor - * @param {ibc.core.channel.v1.IPacketState=} [properties] Properties to set - */ - function PacketState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketState port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.port_id = ""; - - /** - * PacketState channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.channel_id = ""; - - /** - * PacketState sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PacketState data. - * @member {Uint8Array} data - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified PacketState message. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified PacketState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketState} PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketState} PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketState message. - * @function verify - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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.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 PacketState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketState} PacketState - */ - PacketState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketState) - return object; - let message = new $root.ibc.core.channel.v1.PacketState(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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.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 PacketState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.PacketState} message PacketState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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.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 PacketState to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketState - * @instance - * @returns {Object.} JSON object - */ - PacketState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketState; - })(); - - v1.PacketId = (function() { - - /** - * Properties of a PacketId. - * @memberof ibc.core.channel.v1 - * @interface IPacketId - * @property {string|null} [port_id] PacketId port_id - * @property {string|null} [channel_id] PacketId channel_id - * @property {Long|null} [sequence] PacketId sequence - */ - - /** - * Constructs a new PacketId. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketId. - * @implements IPacketId - * @constructor - * @param {ibc.core.channel.v1.IPacketId=} [properties] Properties to set - */ - function PacketId(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketId port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.port_id = ""; - - /** - * PacketId channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.channel_id = ""; - - /** - * PacketId sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PacketId message. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.IPacketId} message PacketId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified PacketId message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.IPacketId} message PacketId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketId message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketId} PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketId.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketId(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketId} PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketId message. - * @function verify - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 PacketId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketId} PacketId - */ - PacketId.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketId) - return object; - let message = new $root.ibc.core.channel.v1.PacketId(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 PacketId message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.PacketId} message PacketId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketId.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 PacketId to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketId - * @instance - * @returns {Object.} JSON object - */ - PacketId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketId; - })(); - - v1.Acknowledgement = (function() { - - /** - * Properties of an Acknowledgement. - * @memberof ibc.core.channel.v1 - * @interface IAcknowledgement - * @property {Uint8Array|null} [result] Acknowledgement result - * @property {string|null} [error] Acknowledgement error - */ - - /** - * Constructs a new Acknowledgement. - * @memberof ibc.core.channel.v1 - * @classdesc Represents an Acknowledgement. - * @implements IAcknowledgement - * @constructor - * @param {ibc.core.channel.v1.IAcknowledgement=} [properties] Properties to set - */ - function Acknowledgement(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Acknowledgement result. - * @member {Uint8Array|null|undefined} result - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Acknowledgement.prototype.result = null; - - /** - * Acknowledgement error. - * @member {string|null|undefined} error - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Acknowledgement.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * Acknowledgement response. - * @member {"result"|"error"|undefined} response - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Object.defineProperty(Acknowledgement.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["result", "error"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified Acknowledgement message. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Acknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.result); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.error); - return writer; - }; - - /** - * Encodes the specified Acknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Acknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Acknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Acknowledgement(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Acknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Acknowledgement message. - * @function verify - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Acknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.result != null && message.hasOwnProperty("result")) { - properties.response = 1; - if (!(message.result && typeof message.result.length === "number" || $util.isString(message.result))) - return "result: buffer expected"; - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.response === 1) - return "response: multiple values"; - properties.response = 1; - if (!$util.isString(message.error)) - return "error: string expected"; - } - return null; - }; - - /** - * Creates an Acknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - */ - Acknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Acknowledgement) - return object; - let message = new $root.ibc.core.channel.v1.Acknowledgement(); - if (object.result != null) - if (typeof object.result === "string") - $util.base64.decode(object.result, message.result = $util.newBuffer($util.base64.length(object.result)), 0); - else if (object.result.length) - message.result = object.result; - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an Acknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.Acknowledgement} message Acknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Acknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (message.result != null && message.hasOwnProperty("result")) { - object.result = options.bytes === String ? $util.base64.encode(message.result, 0, message.result.length) : options.bytes === Array ? Array.prototype.slice.call(message.result) : message.result; - if (options.oneofs) - object.response = "result"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = message.error; - if (options.oneofs) - object.response = "error"; - } - return object; - }; - - /** - * Converts this Acknowledgement to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - * @returns {Object.} JSON object - */ - Acknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Acknowledgement; - })(); - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenInit}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenInitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenInitResponse} [response] MsgChannelOpenInitResponse - */ - - /** - * Calls ChannelOpenInit. - * @function channelOpenInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenInit} request MsgChannelOpenInit message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenInitCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenInitResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenInit = function channelOpenInit(request, callback) { - return this.rpcCall(channelOpenInit, $root.ibc.core.channel.v1.MsgChannelOpenInit, $root.ibc.core.channel.v1.MsgChannelOpenInitResponse, request, callback); - }, "name", { value: "ChannelOpenInit" }); - - /** - * Calls ChannelOpenInit. - * @function channelOpenInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenInit} request MsgChannelOpenInit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenTry}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenTryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenTryResponse} [response] MsgChannelOpenTryResponse - */ - - /** - * Calls ChannelOpenTry. - * @function channelOpenTry - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenTry} request MsgChannelOpenTry message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenTryCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenTryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenTry = function channelOpenTry(request, callback) { - return this.rpcCall(channelOpenTry, $root.ibc.core.channel.v1.MsgChannelOpenTry, $root.ibc.core.channel.v1.MsgChannelOpenTryResponse, request, callback); - }, "name", { value: "ChannelOpenTry" }); - - /** - * Calls ChannelOpenTry. - * @function channelOpenTry - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenTry} request MsgChannelOpenTry message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenAck}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenAckCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenAckResponse} [response] MsgChannelOpenAckResponse - */ - - /** - * Calls ChannelOpenAck. - * @function channelOpenAck - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenAck} request MsgChannelOpenAck message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenAckCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenAckResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenAck = function channelOpenAck(request, callback) { - return this.rpcCall(channelOpenAck, $root.ibc.core.channel.v1.MsgChannelOpenAck, $root.ibc.core.channel.v1.MsgChannelOpenAckResponse, request, callback); - }, "name", { value: "ChannelOpenAck" }); - - /** - * Calls ChannelOpenAck. - * @function channelOpenAck - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenAck} request MsgChannelOpenAck message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelOpenConfirm}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelOpenConfirmCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} [response] MsgChannelOpenConfirmResponse - */ - - /** - * Calls ChannelOpenConfirm. - * @function channelOpenConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} request MsgChannelOpenConfirm message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelOpenConfirmCallback} callback Node-style callback called with the error, if any, and MsgChannelOpenConfirmResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelOpenConfirm = function channelOpenConfirm(request, callback) { - return this.rpcCall(channelOpenConfirm, $root.ibc.core.channel.v1.MsgChannelOpenConfirm, $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse, request, callback); - }, "name", { value: "ChannelOpenConfirm" }); - - /** - * Calls ChannelOpenConfirm. - * @function channelOpenConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm} request MsgChannelOpenConfirm message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseInit}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelCloseInitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelCloseInitResponse} [response] MsgChannelCloseInitResponse - */ - - /** - * Calls ChannelCloseInit. - * @function channelCloseInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseInit} request MsgChannelCloseInit message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelCloseInitCallback} callback Node-style callback called with the error, if any, and MsgChannelCloseInitResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelCloseInit = function channelCloseInit(request, callback) { - return this.rpcCall(channelCloseInit, $root.ibc.core.channel.v1.MsgChannelCloseInit, $root.ibc.core.channel.v1.MsgChannelCloseInitResponse, request, callback); - }, "name", { value: "ChannelCloseInit" }); - - /** - * Calls ChannelCloseInit. - * @function channelCloseInit - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseInit} request MsgChannelCloseInit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#channelCloseConfirm}. - * @memberof ibc.core.channel.v1.Msg - * @typedef ChannelCloseConfirmCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} [response] MsgChannelCloseConfirmResponse - */ - - /** - * Calls ChannelCloseConfirm. - * @function channelCloseConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} request MsgChannelCloseConfirm message or plain object - * @param {ibc.core.channel.v1.Msg.ChannelCloseConfirmCallback} callback Node-style callback called with the error, if any, and MsgChannelCloseConfirmResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.channelCloseConfirm = function channelCloseConfirm(request, callback) { - return this.rpcCall(channelCloseConfirm, $root.ibc.core.channel.v1.MsgChannelCloseConfirm, $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse, request, callback); - }, "name", { value: "ChannelCloseConfirm" }); - - /** - * Calls ChannelCloseConfirm. - * @function channelCloseConfirm - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm} request MsgChannelCloseConfirm message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#recvPacket}. - * @memberof ibc.core.channel.v1.Msg - * @typedef RecvPacketCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgRecvPacketResponse} [response] MsgRecvPacketResponse - */ - - /** - * Calls RecvPacket. - * @function recvPacket - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgRecvPacket} request MsgRecvPacket message or plain object - * @param {ibc.core.channel.v1.Msg.RecvPacketCallback} callback Node-style callback called with the error, if any, and MsgRecvPacketResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.recvPacket = function recvPacket(request, callback) { - return this.rpcCall(recvPacket, $root.ibc.core.channel.v1.MsgRecvPacket, $root.ibc.core.channel.v1.MsgRecvPacketResponse, request, callback); - }, "name", { value: "RecvPacket" }); - - /** - * Calls RecvPacket. - * @function recvPacket - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgRecvPacket} request MsgRecvPacket message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#timeout}. - * @memberof ibc.core.channel.v1.Msg - * @typedef TimeoutCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgTimeoutResponse} [response] MsgTimeoutResponse - */ - - /** - * Calls Timeout. - * @function timeout - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeout} request MsgTimeout message or plain object - * @param {ibc.core.channel.v1.Msg.TimeoutCallback} callback Node-style callback called with the error, if any, and MsgTimeoutResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.timeout = function timeout(request, callback) { - return this.rpcCall(timeout, $root.ibc.core.channel.v1.MsgTimeout, $root.ibc.core.channel.v1.MsgTimeoutResponse, request, callback); - }, "name", { value: "Timeout" }); - - /** - * Calls Timeout. - * @function timeout - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeout} request MsgTimeout message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#timeoutOnClose}. - * @memberof ibc.core.channel.v1.Msg - * @typedef TimeoutOnCloseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} [response] MsgTimeoutOnCloseResponse - */ - - /** - * Calls TimeoutOnClose. - * @function timeoutOnClose - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} request MsgTimeoutOnClose message or plain object - * @param {ibc.core.channel.v1.Msg.TimeoutOnCloseCallback} callback Node-style callback called with the error, if any, and MsgTimeoutOnCloseResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.timeoutOnClose = function timeoutOnClose(request, callback) { - return this.rpcCall(timeoutOnClose, $root.ibc.core.channel.v1.MsgTimeoutOnClose, $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse, request, callback); - }, "name", { value: "TimeoutOnClose" }); - - /** - * Calls TimeoutOnClose. - * @function timeoutOnClose - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} request MsgTimeoutOnClose message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Msg#acknowledgement}. - * @memberof ibc.core.channel.v1.Msg - * @typedef AcknowledgementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.MsgAcknowledgementResponse} [response] MsgAcknowledgementResponse - */ - - /** - * Calls Acknowledgement. - * @function acknowledgement - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgAcknowledgement} request MsgAcknowledgement message or plain object - * @param {ibc.core.channel.v1.Msg.AcknowledgementCallback} callback Node-style callback called with the error, if any, and MsgAcknowledgementResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.acknowledgement = function acknowledgement(request, callback) { - return this.rpcCall(acknowledgement, $root.ibc.core.channel.v1.MsgAcknowledgement, $root.ibc.core.channel.v1.MsgAcknowledgementResponse, request, callback); - }, "name", { value: "Acknowledgement" }); - - /** - * Calls Acknowledgement. - * @function acknowledgement - * @memberof ibc.core.channel.v1.Msg - * @instance - * @param {ibc.core.channel.v1.IMsgAcknowledgement} request MsgAcknowledgement message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - /** - * ResponseResultType enum. - * @name ibc.core.channel.v1.ResponseResultType - * @enum {number} - * @property {number} RESPONSE_RESULT_TYPE_UNSPECIFIED=0 RESPONSE_RESULT_TYPE_UNSPECIFIED value - * @property {number} RESPONSE_RESULT_TYPE_NOOP=1 RESPONSE_RESULT_TYPE_NOOP value - * @property {number} RESPONSE_RESULT_TYPE_SUCCESS=2 RESPONSE_RESULT_TYPE_SUCCESS value - */ - v1.ResponseResultType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESPONSE_RESULT_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RESPONSE_RESULT_TYPE_NOOP"] = 1; - values[valuesById[2] = "RESPONSE_RESULT_TYPE_SUCCESS"] = 2; - return values; - })(); - - v1.MsgChannelOpenInit = (function() { - - /** - * Properties of a MsgChannelOpenInit. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenInit - * @property {string|null} [port_id] MsgChannelOpenInit port_id - * @property {ibc.core.channel.v1.IChannel|null} [channel] MsgChannelOpenInit channel - * @property {string|null} [signer] MsgChannelOpenInit signer - */ - - /** - * Constructs a new MsgChannelOpenInit. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenInit. - * @implements IMsgChannelOpenInit - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set - */ - function MsgChannelOpenInit(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenInit port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.port_id = ""; - - /** - * MsgChannelOpenInit channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.channel = null; - - /** - * MsgChannelOpenInit signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenInit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit - */ - MsgChannelOpenInit.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenInit) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelOpenInit(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenInit.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenInit} message MsgChannelOpenInit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenInit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenInit to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenInit - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenInit; - })(); - - v1.MsgChannelOpenInitResponse = (function() { - - /** - * Properties of a MsgChannelOpenInitResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenInitResponse - * @property {string|null} [channel_id] MsgChannelOpenInitResponse channel_id - * @property {string|null} [version] MsgChannelOpenInitResponse version - */ - - /** - * Constructs a new MsgChannelOpenInitResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenInitResponse. - * @implements IMsgChannelOpenInitResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse=} [properties] Properties to set - */ - function MsgChannelOpenInitResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenInitResponse channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @instance - */ - MsgChannelOpenInitResponse.prototype.channel_id = ""; - - /** - * MsgChannelOpenInitResponse version. - * @member {string} version - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @instance - */ - MsgChannelOpenInitResponse.prototype.version = ""; - - /** - * Encodes the specified MsgChannelOpenInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} message MsgChannelOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenInitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenInitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenInitResponse} message MsgChannelOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenInitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenInitResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.version = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenInitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenInitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenInitResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenInitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenInitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenInitResponse} MsgChannelOpenInitResponse - */ - MsgChannelOpenInitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenInitResponse) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelOpenInitResponse(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenInitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenInitResponse} message MsgChannelOpenInitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenInitResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel_id = ""; - object.version = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this MsgChannelOpenInitResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenInitResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenInitResponse; - })(); - - v1.MsgChannelOpenTry = (function() { - - /** - * Properties of a MsgChannelOpenTry. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenTry - * @property {string|null} [port_id] MsgChannelOpenTry port_id - * @property {string|null} [previous_channel_id] MsgChannelOpenTry previous_channel_id - * @property {ibc.core.channel.v1.IChannel|null} [channel] MsgChannelOpenTry channel - * @property {string|null} [counterparty_version] MsgChannelOpenTry counterparty_version - * @property {Uint8Array|null} [proof_init] MsgChannelOpenTry proof_init - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelOpenTry proof_height - * @property {string|null} [signer] MsgChannelOpenTry signer - */ - - /** - * Constructs a new MsgChannelOpenTry. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenTry. - * @implements IMsgChannelOpenTry - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set - */ - function MsgChannelOpenTry(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenTry port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.port_id = ""; - - /** - * MsgChannelOpenTry previous_channel_id. - * @member {string} previous_channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.previous_channel_id = ""; - - /** - * MsgChannelOpenTry channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.channel = null; - - /** - * MsgChannelOpenTry counterparty_version. - * @member {string} counterparty_version - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.counterparty_version = ""; - - /** - * MsgChannelOpenTry proof_init. - * @member {Uint8Array} proof_init - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.proof_init = $util.newBuffer([]); - - /** - * MsgChannelOpenTry proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.proof_height = null; - - /** - * MsgChannelOpenTry signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.previous_channel_id != null && Object.hasOwnProperty.call(message, "previous_channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.previous_channel_id); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.counterparty_version != null && Object.hasOwnProperty.call(message, "counterparty_version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterparty_version); - if (message.proof_init != null && Object.hasOwnProperty.call(message, "proof_init")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proof_init); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenTry(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.previous_channel_id = reader.string(); - break; - case 3: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty_version = reader.string(); - break; - case 5: - message.proof_init = reader.bytes(); - break; - case 6: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.previous_channel_id != null && message.hasOwnProperty("previous_channel_id")) - if (!$util.isString(message.previous_channel_id)) - return "previous_channel_id: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - if (!$util.isString(message.counterparty_version)) - return "counterparty_version: string expected"; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - if (!(message.proof_init && typeof message.proof_init.length === "number" || $util.isString(message.proof_init))) - return "proof_init: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry - */ - MsgChannelOpenTry.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenTry) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelOpenTry(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.previous_channel_id != null) - message.previous_channel_id = String(object.previous_channel_id); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenTry.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - if (object.counterparty_version != null) - message.counterparty_version = String(object.counterparty_version); - if (object.proof_init != null) - if (typeof object.proof_init === "string") - $util.base64.decode(object.proof_init, message.proof_init = $util.newBuffer($util.base64.length(object.proof_init)), 0); - else if (object.proof_init.length) - message.proof_init = object.proof_init; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenTry.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenTry} message MsgChannelOpenTry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenTry.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.previous_channel_id = ""; - object.channel = null; - object.counterparty_version = ""; - if (options.bytes === String) - object.proof_init = ""; - else { - object.proof_init = []; - if (options.bytes !== Array) - object.proof_init = $util.newBuffer(object.proof_init); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.previous_channel_id != null && message.hasOwnProperty("previous_channel_id")) - object.previous_channel_id = message.previous_channel_id; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - object.counterparty_version = message.counterparty_version; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - object.proof_init = options.bytes === String ? $util.base64.encode(message.proof_init, 0, message.proof_init.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_init) : message.proof_init; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenTry to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenTry - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenTry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenTry; - })(); - - v1.MsgChannelOpenTryResponse = (function() { - - /** - * Properties of a MsgChannelOpenTryResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenTryResponse - * @property {string|null} [version] MsgChannelOpenTryResponse version - * @property {string|null} [channel_id] MsgChannelOpenTryResponse channel_id - */ - - /** - * Constructs a new MsgChannelOpenTryResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenTryResponse. - * @implements IMsgChannelOpenTryResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse=} [properties] Properties to set - */ - function MsgChannelOpenTryResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenTryResponse version. - * @member {string} version - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @instance - */ - MsgChannelOpenTryResponse.prototype.version = ""; - - /** - * MsgChannelOpenTryResponse channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @instance - */ - MsgChannelOpenTryResponse.prototype.channel_id = ""; - - /** - * Encodes the specified MsgChannelOpenTryResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} message MsgChannelOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenTryResponse.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.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenTryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenTryResponse} message MsgChannelOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenTryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenTryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenTryResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenTryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenTryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenTryResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenTryResponse.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.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenTryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenTryResponse} MsgChannelOpenTryResponse - */ - MsgChannelOpenTryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenTryResponse) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelOpenTryResponse(); - if (object.version != null) - message.version = String(object.version); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenTryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenTryResponse} message MsgChannelOpenTryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenTryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.version = ""; - object.channel_id = ""; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this MsgChannelOpenTryResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenTryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenTryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenTryResponse; - })(); - - v1.MsgChannelOpenAck = (function() { - - /** - * Properties of a MsgChannelOpenAck. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenAck - * @property {string|null} [port_id] MsgChannelOpenAck port_id - * @property {string|null} [channel_id] MsgChannelOpenAck channel_id - * @property {string|null} [counterparty_channel_id] MsgChannelOpenAck counterparty_channel_id - * @property {string|null} [counterparty_version] MsgChannelOpenAck counterparty_version - * @property {Uint8Array|null} [proof_try] MsgChannelOpenAck proof_try - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelOpenAck proof_height - * @property {string|null} [signer] MsgChannelOpenAck signer - */ - - /** - * Constructs a new MsgChannelOpenAck. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenAck. - * @implements IMsgChannelOpenAck - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set - */ - function MsgChannelOpenAck(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenAck port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.port_id = ""; - - /** - * MsgChannelOpenAck channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.channel_id = ""; - - /** - * MsgChannelOpenAck counterparty_channel_id. - * @member {string} counterparty_channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.counterparty_channel_id = ""; - - /** - * MsgChannelOpenAck counterparty_version. - * @member {string} counterparty_version - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.counterparty_version = ""; - - /** - * MsgChannelOpenAck proof_try. - * @member {Uint8Array} proof_try - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.proof_try = $util.newBuffer([]); - - /** - * MsgChannelOpenAck proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.proof_height = null; - - /** - * MsgChannelOpenAck signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.counterparty_channel_id != null && Object.hasOwnProperty.call(message, "counterparty_channel_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterparty_channel_id); - if (message.counterparty_version != null && Object.hasOwnProperty.call(message, "counterparty_version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterparty_version); - if (message.proof_try != null && Object.hasOwnProperty.call(message, "proof_try")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proof_try); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenAck(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.counterparty_channel_id = reader.string(); - break; - case 4: - message.counterparty_version = reader.string(); - break; - case 5: - message.proof_try = reader.bytes(); - break; - case 6: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.counterparty_channel_id != null && message.hasOwnProperty("counterparty_channel_id")) - if (!$util.isString(message.counterparty_channel_id)) - return "counterparty_channel_id: string expected"; - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - if (!$util.isString(message.counterparty_version)) - return "counterparty_version: string expected"; - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - if (!(message.proof_try && typeof message.proof_try.length === "number" || $util.isString(message.proof_try))) - return "proof_try: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck - */ - MsgChannelOpenAck.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenAck) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelOpenAck(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.counterparty_channel_id != null) - message.counterparty_channel_id = String(object.counterparty_channel_id); - if (object.counterparty_version != null) - message.counterparty_version = String(object.counterparty_version); - if (object.proof_try != null) - if (typeof object.proof_try === "string") - $util.base64.decode(object.proof_try, message.proof_try = $util.newBuffer($util.base64.length(object.proof_try)), 0); - else if (object.proof_try.length) - message.proof_try = object.proof_try; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenAck.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenAck} message MsgChannelOpenAck - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenAck.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.counterparty_channel_id = ""; - object.counterparty_version = ""; - if (options.bytes === String) - object.proof_try = ""; - else { - object.proof_try = []; - if (options.bytes !== Array) - object.proof_try = $util.newBuffer(object.proof_try); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.counterparty_channel_id != null && message.hasOwnProperty("counterparty_channel_id")) - object.counterparty_channel_id = message.counterparty_channel_id; - if (message.counterparty_version != null && message.hasOwnProperty("counterparty_version")) - object.counterparty_version = message.counterparty_version; - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - object.proof_try = options.bytes === String ? $util.base64.encode(message.proof_try, 0, message.proof_try.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_try) : message.proof_try; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenAck to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenAck - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenAck; - })(); - - v1.MsgChannelOpenAckResponse = (function() { - - /** - * Properties of a MsgChannelOpenAckResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenAckResponse - */ - - /** - * Constructs a new MsgChannelOpenAckResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenAckResponse. - * @implements IMsgChannelOpenAckResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse=} [properties] Properties to set - */ - function MsgChannelOpenAckResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelOpenAckResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} message MsgChannelOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenAckResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenAckResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenAckResponse} message MsgChannelOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenAckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenAckResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenAckResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenAckResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenAckResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenAckResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenAckResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenAckResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenAckResponse} MsgChannelOpenAckResponse - */ - MsgChannelOpenAckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenAckResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelOpenAckResponse(); - }; - - /** - * Creates a plain object from a MsgChannelOpenAckResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenAckResponse} message MsgChannelOpenAckResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenAckResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelOpenAckResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenAckResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenAckResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenAckResponse; - })(); - - v1.MsgChannelOpenConfirm = (function() { - - /** - * Properties of a MsgChannelOpenConfirm. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenConfirm - * @property {string|null} [port_id] MsgChannelOpenConfirm port_id - * @property {string|null} [channel_id] MsgChannelOpenConfirm channel_id - * @property {Uint8Array|null} [proof_ack] MsgChannelOpenConfirm proof_ack - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelOpenConfirm proof_height - * @property {string|null} [signer] MsgChannelOpenConfirm signer - */ - - /** - * Constructs a new MsgChannelOpenConfirm. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenConfirm. - * @implements IMsgChannelOpenConfirm - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set - */ - function MsgChannelOpenConfirm(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelOpenConfirm port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.port_id = ""; - - /** - * MsgChannelOpenConfirm channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.channel_id = ""; - - /** - * MsgChannelOpenConfirm proof_ack. - * @member {Uint8Array} proof_ack - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.proof_ack = $util.newBuffer([]); - - /** - * MsgChannelOpenConfirm proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.proof_height = null; - - /** - * MsgChannelOpenConfirm signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.proof_ack != null && Object.hasOwnProperty.call(message, "proof_ack")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_ack); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirm(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.proof_ack = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - if (!(message.proof_ack && typeof message.proof_ack.length === "number" || $util.isString(message.proof_ack))) - return "proof_ack: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm - */ - MsgChannelOpenConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenConfirm) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirm(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.proof_ack != null) - if (typeof object.proof_ack === "string") - $util.base64.decode(object.proof_ack, message.proof_ack = $util.newBuffer($util.base64.length(object.proof_ack)), 0); - else if (object.proof_ack.length) - message.proof_ack = object.proof_ack; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelOpenConfirm.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenConfirm} message MsgChannelOpenConfirm - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenConfirm.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if (options.bytes === String) - object.proof_ack = ""; - else { - object.proof_ack = []; - if (options.bytes !== Array) - object.proof_ack = $util.newBuffer(object.proof_ack); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - object.proof_ack = options.bytes === String ? $util.base64.encode(message.proof_ack, 0, message.proof_ack.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_ack) : message.proof_ack; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenConfirm to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenConfirm; - })(); - - v1.MsgChannelOpenConfirmResponse = (function() { - - /** - * Properties of a MsgChannelOpenConfirmResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelOpenConfirmResponse - */ - - /** - * Constructs a new MsgChannelOpenConfirmResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelOpenConfirmResponse. - * @implements IMsgChannelOpenConfirmResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse=} [properties] Properties to set - */ - function MsgChannelOpenConfirmResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelOpenConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenConfirmResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelOpenConfirmResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenConfirmResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelOpenConfirmResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenConfirmResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenConfirmResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenConfirmResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} MsgChannelOpenConfirmResponse - */ - MsgChannelOpenConfirmResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelOpenConfirmResponse(); - }; - - /** - * Creates a plain object from a MsgChannelOpenConfirmResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelOpenConfirmResponse} message MsgChannelOpenConfirmResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenConfirmResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelOpenConfirmResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelOpenConfirmResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenConfirmResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelOpenConfirmResponse; - })(); - - v1.MsgChannelCloseInit = (function() { - - /** - * Properties of a MsgChannelCloseInit. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseInit - * @property {string|null} [port_id] MsgChannelCloseInit port_id - * @property {string|null} [channel_id] MsgChannelCloseInit channel_id - * @property {string|null} [signer] MsgChannelCloseInit signer - */ - - /** - * Constructs a new MsgChannelCloseInit. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseInit. - * @implements IMsgChannelCloseInit - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set - */ - function MsgChannelCloseInit(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelCloseInit port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.port_id = ""; - - /** - * MsgChannelCloseInit channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.channel_id = ""; - - /** - * MsgChannelCloseInit signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseInit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit - */ - MsgChannelCloseInit.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseInit) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelCloseInit(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @static - * @param {ibc.core.channel.v1.MsgChannelCloseInit} message MsgChannelCloseInit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseInit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelCloseInit to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseInit - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseInit; - })(); - - v1.MsgChannelCloseInitResponse = (function() { - - /** - * Properties of a MsgChannelCloseInitResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseInitResponse - */ - - /** - * Constructs a new MsgChannelCloseInitResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseInitResponse. - * @implements IMsgChannelCloseInitResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse=} [properties] Properties to set - */ - function MsgChannelCloseInitResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelCloseInitResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} message MsgChannelCloseInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseInitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseInitResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseInitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseInitResponse} message MsgChannelCloseInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseInitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseInitResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseInitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseInitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelCloseInitResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelCloseInitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseInitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseInitResponse} MsgChannelCloseInitResponse - */ - MsgChannelCloseInitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseInitResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelCloseInitResponse(); - }; - - /** - * Creates a plain object from a MsgChannelCloseInitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelCloseInitResponse} message MsgChannelCloseInitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseInitResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelCloseInitResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseInitResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseInitResponse; - })(); - - v1.MsgChannelCloseConfirm = (function() { - - /** - * Properties of a MsgChannelCloseConfirm. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseConfirm - * @property {string|null} [port_id] MsgChannelCloseConfirm port_id - * @property {string|null} [channel_id] MsgChannelCloseConfirm channel_id - * @property {Uint8Array|null} [proof_init] MsgChannelCloseConfirm proof_init - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgChannelCloseConfirm proof_height - * @property {string|null} [signer] MsgChannelCloseConfirm signer - */ - - /** - * Constructs a new MsgChannelCloseConfirm. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseConfirm. - * @implements IMsgChannelCloseConfirm - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set - */ - function MsgChannelCloseConfirm(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChannelCloseConfirm port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.port_id = ""; - - /** - * MsgChannelCloseConfirm channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.channel_id = ""; - - /** - * MsgChannelCloseConfirm proof_init. - * @member {Uint8Array} proof_init - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.proof_init = $util.newBuffer([]); - - /** - * MsgChannelCloseConfirm proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.proof_height = null; - - /** - * MsgChannelCloseConfirm signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.signer = ""; - - /** - * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.proof_init != null && Object.hasOwnProperty.call(message, "proof_init")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_init); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirm(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.proof_init = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - if (!(message.proof_init && typeof message.proof_init.length === "number" || $util.isString(message.proof_init))) - return "proof_init: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm - */ - MsgChannelCloseConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseConfirm) - return object; - let message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirm(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.proof_init != null) - if (typeof object.proof_init === "string") - $util.base64.decode(object.proof_init, message.proof_init = $util.newBuffer($util.base64.length(object.proof_init)), 0); - else if (object.proof_init.length) - message.proof_init = object.proof_init; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgChannelCloseConfirm.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @static - * @param {ibc.core.channel.v1.MsgChannelCloseConfirm} message MsgChannelCloseConfirm - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseConfirm.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if (options.bytes === String) - object.proof_init = ""; - else { - object.proof_init = []; - if (options.bytes !== Array) - object.proof_init = $util.newBuffer(object.proof_init); - } - object.proof_height = null; - object.signer = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - object.proof_init = options.bytes === String ? $util.base64.encode(message.proof_init, 0, message.proof_init.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_init) : message.proof_init; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgChannelCloseConfirm to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseConfirm; - })(); - - v1.MsgChannelCloseConfirmResponse = (function() { - - /** - * Properties of a MsgChannelCloseConfirmResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgChannelCloseConfirmResponse - */ - - /** - * Constructs a new MsgChannelCloseConfirmResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgChannelCloseConfirmResponse. - * @implements IMsgChannelCloseConfirmResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse=} [properties] Properties to set - */ - function MsgChannelCloseConfirmResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChannelCloseConfirmResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseConfirmResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgChannelCloseConfirmResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {ibc.core.channel.v1.IMsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseConfirmResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChannelCloseConfirmResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseConfirmResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelCloseConfirmResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelCloseConfirmResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} MsgChannelCloseConfirmResponse - */ - MsgChannelCloseConfirmResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse) - return object; - return new $root.ibc.core.channel.v1.MsgChannelCloseConfirmResponse(); - }; - - /** - * Creates a plain object from a MsgChannelCloseConfirmResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @static - * @param {ibc.core.channel.v1.MsgChannelCloseConfirmResponse} message MsgChannelCloseConfirmResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseConfirmResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChannelCloseConfirmResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgChannelCloseConfirmResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseConfirmResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChannelCloseConfirmResponse; - })(); - - v1.MsgRecvPacket = (function() { - - /** - * Properties of a MsgRecvPacket. - * @memberof ibc.core.channel.v1 - * @interface IMsgRecvPacket - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgRecvPacket packet - * @property {Uint8Array|null} [proof_commitment] MsgRecvPacket proof_commitment - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgRecvPacket proof_height - * @property {string|null} [signer] MsgRecvPacket signer - */ - - /** - * Constructs a new MsgRecvPacket. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgRecvPacket. - * @implements IMsgRecvPacket - * @constructor - * @param {ibc.core.channel.v1.IMsgRecvPacket=} [properties] Properties to set - */ - function MsgRecvPacket(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRecvPacket packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.packet = null; - - /** - * MsgRecvPacket proof_commitment. - * @member {Uint8Array} proof_commitment - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.proof_commitment = $util.newBuffer([]); - - /** - * MsgRecvPacket proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.proof_height = null; - - /** - * MsgRecvPacket signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - */ - MsgRecvPacket.prototype.signer = ""; - - /** - * Encodes the specified MsgRecvPacket message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacket} message MsgRecvPacket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof_commitment != null && Object.hasOwnProperty.call(message, "proof_commitment")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_commitment); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, 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).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgRecvPacket message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacket.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacket} message MsgRecvPacket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRecvPacket message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgRecvPacket(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_commitment = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRecvPacket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRecvPacket message. - * @function verify - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRecvPacket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof_commitment != null && message.hasOwnProperty("proof_commitment")) - if (!(message.proof_commitment && typeof message.proof_commitment.length === "number" || $util.isString(message.proof_commitment))) - return "proof_commitment: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgRecvPacket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgRecvPacket} MsgRecvPacket - */ - MsgRecvPacket.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgRecvPacket) - return object; - let message = new $root.ibc.core.channel.v1.MsgRecvPacket(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgRecvPacket.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof_commitment != null) - if (typeof object.proof_commitment === "string") - $util.base64.decode(object.proof_commitment, message.proof_commitment = $util.newBuffer($util.base64.length(object.proof_commitment)), 0); - else if (object.proof_commitment.length) - message.proof_commitment = object.proof_commitment; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgRecvPacket.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgRecvPacket message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @static - * @param {ibc.core.channel.v1.MsgRecvPacket} message MsgRecvPacket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRecvPacket.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.packet = null; - if (options.bytes === String) - object.proof_commitment = ""; - else { - object.proof_commitment = []; - if (options.bytes !== Array) - object.proof_commitment = $util.newBuffer(object.proof_commitment); - } - object.proof_height = null; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.proof_commitment != null && message.hasOwnProperty("proof_commitment")) - object.proof_commitment = options.bytes === String ? $util.base64.encode(message.proof_commitment, 0, message.proof_commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_commitment) : message.proof_commitment; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgRecvPacket to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgRecvPacket - * @instance - * @returns {Object.} JSON object - */ - MsgRecvPacket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRecvPacket; - })(); - - v1.MsgRecvPacketResponse = (function() { - - /** - * Properties of a MsgRecvPacketResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgRecvPacketResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgRecvPacketResponse result - */ - - /** - * Constructs a new MsgRecvPacketResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgRecvPacketResponse. - * @implements IMsgRecvPacketResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgRecvPacketResponse=} [properties] Properties to set - */ - function MsgRecvPacketResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRecvPacketResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @instance - */ - MsgRecvPacketResponse.prototype.result = 0; - - /** - * Encodes the specified MsgRecvPacketResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} message MsgRecvPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacketResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgRecvPacketResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgRecvPacketResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {ibc.core.channel.v1.IMsgRecvPacketResponse} message MsgRecvPacketResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRecvPacketResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRecvPacketResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacketResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgRecvPacketResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRecvPacketResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRecvPacketResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRecvPacketResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRecvPacketResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgRecvPacketResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgRecvPacketResponse} MsgRecvPacketResponse - */ - MsgRecvPacketResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgRecvPacketResponse) - return object; - let message = new $root.ibc.core.channel.v1.MsgRecvPacketResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgRecvPacketResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @static - * @param {ibc.core.channel.v1.MsgRecvPacketResponse} message MsgRecvPacketResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRecvPacketResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgRecvPacketResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgRecvPacketResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRecvPacketResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRecvPacketResponse; - })(); - - v1.MsgTimeout = (function() { - - /** - * Properties of a MsgTimeout. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeout - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgTimeout packet - * @property {Uint8Array|null} [proof_unreceived] MsgTimeout proof_unreceived - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgTimeout proof_height - * @property {Long|null} [next_sequence_recv] MsgTimeout next_sequence_recv - * @property {string|null} [signer] MsgTimeout signer - */ - - /** - * Constructs a new MsgTimeout. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeout. - * @implements IMsgTimeout - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeout=} [properties] Properties to set - */ - function MsgTimeout(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeout packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.packet = null; - - /** - * MsgTimeout proof_unreceived. - * @member {Uint8Array} proof_unreceived - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.proof_unreceived = $util.newBuffer([]); - - /** - * MsgTimeout proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.proof_height = null; - - /** - * MsgTimeout next_sequence_recv. - * @member {Long} next_sequence_recv - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.next_sequence_recv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTimeout signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.signer = ""; - - /** - * Encodes the specified MsgTimeout message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeout.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {ibc.core.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.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof_unreceived != null && Object.hasOwnProperty.call(message, "proof_unreceived")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_unreceived); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.next_sequence_recv != null && Object.hasOwnProperty.call(message, "next_sequence_recv")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.next_sequence_recv); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeout.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgTimeout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeout(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_unreceived = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.next_sequence_recv = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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")) { - let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - if (!(message.proof_unreceived && typeof message.proof_unreceived.length === "number" || $util.isString(message.proof_unreceived))) - return "proof_unreceived: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (!$util.isInteger(message.next_sequence_recv) && !(message.next_sequence_recv && $util.isInteger(message.next_sequence_recv.low) && $util.isInteger(message.next_sequence_recv.high))) - return "next_sequence_recv: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeout} MsgTimeout - */ - MsgTimeout.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeout) - return object; - let message = new $root.ibc.core.channel.v1.MsgTimeout(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeout.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof_unreceived != null) - if (typeof object.proof_unreceived === "string") - $util.base64.decode(object.proof_unreceived, message.proof_unreceived = $util.newBuffer($util.base64.length(object.proof_unreceived)), 0); - else if (object.proof_unreceived.length) - message.proof_unreceived = object.proof_unreceived; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeout.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.next_sequence_recv != null) - if ($util.Long) - (message.next_sequence_recv = $util.Long.fromValue(object.next_sequence_recv)).unsigned = true; - else if (typeof object.next_sequence_recv === "string") - message.next_sequence_recv = parseInt(object.next_sequence_recv, 10); - else if (typeof object.next_sequence_recv === "number") - message.next_sequence_recv = object.next_sequence_recv; - else if (typeof object.next_sequence_recv === "object") - message.next_sequence_recv = new $util.LongBits(object.next_sequence_recv.low >>> 0, object.next_sequence_recv.high >>> 0).toNumber(true); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeout - * @static - * @param {ibc.core.channel.v1.MsgTimeout} message MsgTimeout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeout.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.packet = null; - if (options.bytes === String) - object.proof_unreceived = ""; - else { - object.proof_unreceived = []; - if (options.bytes !== Array) - object.proof_unreceived = $util.newBuffer(object.proof_unreceived); - } - object.proof_height = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_sequence_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_sequence_recv = options.longs === String ? "0" : 0; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - object.proof_unreceived = options.bytes === String ? $util.base64.encode(message.proof_unreceived, 0, message.proof_unreceived.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_unreceived) : message.proof_unreceived; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (typeof message.next_sequence_recv === "number") - object.next_sequence_recv = options.longs === String ? String(message.next_sequence_recv) : message.next_sequence_recv; - else - object.next_sequence_recv = options.longs === String ? $util.Long.prototype.toString.call(message.next_sequence_recv) : options.longs === Number ? new $util.LongBits(message.next_sequence_recv.low >>> 0, message.next_sequence_recv.high >>> 0).toNumber(true) : message.next_sequence_recv; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgTimeout to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeout - * @instance - * @returns {Object.} JSON object - */ - MsgTimeout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeout; - })(); - - v1.MsgTimeoutResponse = (function() { - - /** - * Properties of a MsgTimeoutResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeoutResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgTimeoutResponse result - */ - - /** - * Constructs a new MsgTimeoutResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeoutResponse. - * @implements IMsgTimeoutResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeoutResponse=} [properties] Properties to set - */ - function MsgTimeoutResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeoutResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @instance - */ - MsgTimeoutResponse.prototype.result = 0; - - /** - * Encodes the specified MsgTimeoutResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutResponse} message MsgTimeoutResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgTimeoutResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutResponse} message MsgTimeoutResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTimeoutResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeoutResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeoutResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeoutResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgTimeoutResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeoutResponse} MsgTimeoutResponse - */ - MsgTimeoutResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutResponse) - return object; - let message = new $root.ibc.core.channel.v1.MsgTimeoutResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgTimeoutResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @static - * @param {ibc.core.channel.v1.MsgTimeoutResponse} message MsgTimeoutResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeoutResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgTimeoutResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeoutResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTimeoutResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeoutResponse; - })(); - - v1.MsgTimeoutOnClose = (function() { - - /** - * Properties of a MsgTimeoutOnClose. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeoutOnClose - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgTimeoutOnClose packet - * @property {Uint8Array|null} [proof_unreceived] MsgTimeoutOnClose proof_unreceived - * @property {Uint8Array|null} [proof_close] MsgTimeoutOnClose proof_close - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgTimeoutOnClose proof_height - * @property {Long|null} [next_sequence_recv] MsgTimeoutOnClose next_sequence_recv - * @property {string|null} [signer] MsgTimeoutOnClose signer - */ - - /** - * Constructs a new MsgTimeoutOnClose. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeoutOnClose. - * @implements IMsgTimeoutOnClose - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose=} [properties] Properties to set - */ - function MsgTimeoutOnClose(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeoutOnClose packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.packet = null; - - /** - * MsgTimeoutOnClose proof_unreceived. - * @member {Uint8Array} proof_unreceived - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.proof_unreceived = $util.newBuffer([]); - - /** - * MsgTimeoutOnClose proof_close. - * @member {Uint8Array} proof_close - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.proof_close = $util.newBuffer([]); - - /** - * MsgTimeoutOnClose proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.proof_height = null; - - /** - * MsgTimeoutOnClose next_sequence_recv. - * @member {Long} next_sequence_recv - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.next_sequence_recv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTimeoutOnClose signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - */ - MsgTimeoutOnClose.prototype.signer = ""; - - /** - * Encodes the specified MsgTimeoutOnClose message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} message MsgTimeoutOnClose message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnClose.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof_unreceived != null && Object.hasOwnProperty.call(message, "proof_unreceived")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_unreceived); - if (message.proof_close != null && Object.hasOwnProperty.call(message, "proof_close")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_close); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.next_sequence_recv != null && Object.hasOwnProperty.call(message, "next_sequence_recv")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.next_sequence_recv); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgTimeoutOnClose message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnClose.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnClose} message MsgTimeoutOnClose message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnClose.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTimeoutOnClose message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnClose.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutOnClose(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.proof_unreceived = reader.bytes(); - break; - case 3: - message.proof_close = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.next_sequence_recv = reader.uint64(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeoutOnClose message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnClose.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeoutOnClose message. - * @function verify - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeoutOnClose.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - let error = $root.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - if (!(message.proof_unreceived && typeof message.proof_unreceived.length === "number" || $util.isString(message.proof_unreceived))) - return "proof_unreceived: buffer expected"; - if (message.proof_close != null && message.hasOwnProperty("proof_close")) - if (!(message.proof_close && typeof message.proof_close.length === "number" || $util.isString(message.proof_close))) - return "proof_close: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (!$util.isInteger(message.next_sequence_recv) && !(message.next_sequence_recv && $util.isInteger(message.next_sequence_recv.low) && $util.isInteger(message.next_sequence_recv.high))) - return "next_sequence_recv: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgTimeoutOnClose message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeoutOnClose} MsgTimeoutOnClose - */ - MsgTimeoutOnClose.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutOnClose) - return object; - let message = new $root.ibc.core.channel.v1.MsgTimeoutOnClose(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeoutOnClose.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof_unreceived != null) - if (typeof object.proof_unreceived === "string") - $util.base64.decode(object.proof_unreceived, message.proof_unreceived = $util.newBuffer($util.base64.length(object.proof_unreceived)), 0); - else if (object.proof_unreceived.length) - message.proof_unreceived = object.proof_unreceived; - if (object.proof_close != null) - if (typeof object.proof_close === "string") - $util.base64.decode(object.proof_close, message.proof_close = $util.newBuffer($util.base64.length(object.proof_close)), 0); - else if (object.proof_close.length) - message.proof_close = object.proof_close; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgTimeoutOnClose.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.next_sequence_recv != null) - if ($util.Long) - (message.next_sequence_recv = $util.Long.fromValue(object.next_sequence_recv)).unsigned = true; - else if (typeof object.next_sequence_recv === "string") - message.next_sequence_recv = parseInt(object.next_sequence_recv, 10); - else if (typeof object.next_sequence_recv === "number") - message.next_sequence_recv = object.next_sequence_recv; - else if (typeof object.next_sequence_recv === "object") - message.next_sequence_recv = new $util.LongBits(object.next_sequence_recv.low >>> 0, object.next_sequence_recv.high >>> 0).toNumber(true); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgTimeoutOnClose message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @static - * @param {ibc.core.channel.v1.MsgTimeoutOnClose} message MsgTimeoutOnClose - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeoutOnClose.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.packet = null; - if (options.bytes === String) - object.proof_unreceived = ""; - else { - object.proof_unreceived = []; - if (options.bytes !== Array) - object.proof_unreceived = $util.newBuffer(object.proof_unreceived); - } - if (options.bytes === String) - object.proof_close = ""; - else { - object.proof_close = []; - if (options.bytes !== Array) - object.proof_close = $util.newBuffer(object.proof_close); - } - object.proof_height = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_sequence_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_sequence_recv = options.longs === String ? "0" : 0; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.proof_unreceived != null && message.hasOwnProperty("proof_unreceived")) - object.proof_unreceived = options.bytes === String ? $util.base64.encode(message.proof_unreceived, 0, message.proof_unreceived.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_unreceived) : message.proof_unreceived; - if (message.proof_close != null && message.hasOwnProperty("proof_close")) - object.proof_close = options.bytes === String ? $util.base64.encode(message.proof_close, 0, message.proof_close.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_close) : message.proof_close; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.next_sequence_recv != null && message.hasOwnProperty("next_sequence_recv")) - if (typeof message.next_sequence_recv === "number") - object.next_sequence_recv = options.longs === String ? String(message.next_sequence_recv) : message.next_sequence_recv; - else - object.next_sequence_recv = options.longs === String ? $util.Long.prototype.toString.call(message.next_sequence_recv) : options.longs === Number ? new $util.LongBits(message.next_sequence_recv.low >>> 0, message.next_sequence_recv.high >>> 0).toNumber(true) : message.next_sequence_recv; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgTimeoutOnClose to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeoutOnClose - * @instance - * @returns {Object.} JSON object - */ - MsgTimeoutOnClose.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeoutOnClose; - })(); - - v1.MsgTimeoutOnCloseResponse = (function() { - - /** - * Properties of a MsgTimeoutOnCloseResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgTimeoutOnCloseResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgTimeoutOnCloseResponse result - */ - - /** - * Constructs a new MsgTimeoutOnCloseResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgTimeoutOnCloseResponse. - * @implements IMsgTimeoutOnCloseResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse=} [properties] Properties to set - */ - function MsgTimeoutOnCloseResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTimeoutOnCloseResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @instance - */ - MsgTimeoutOnCloseResponse.prototype.result = 0; - - /** - * Encodes the specified MsgTimeoutOnCloseResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnCloseResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgTimeoutOnCloseResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgTimeoutOnCloseResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {ibc.core.channel.v1.IMsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeoutOnCloseResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnCloseResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTimeoutOnCloseResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeoutOnCloseResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeoutOnCloseResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeoutOnCloseResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgTimeoutOnCloseResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} MsgTimeoutOnCloseResponse - */ - MsgTimeoutOnCloseResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse) - return object; - let message = new $root.ibc.core.channel.v1.MsgTimeoutOnCloseResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgTimeoutOnCloseResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @static - * @param {ibc.core.channel.v1.MsgTimeoutOnCloseResponse} message MsgTimeoutOnCloseResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeoutOnCloseResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgTimeoutOnCloseResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgTimeoutOnCloseResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTimeoutOnCloseResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTimeoutOnCloseResponse; - })(); - - v1.MsgAcknowledgement = (function() { - - /** - * Properties of a MsgAcknowledgement. - * @memberof ibc.core.channel.v1 - * @interface IMsgAcknowledgement - * @property {ibc.core.channel.v1.IPacket|null} [packet] MsgAcknowledgement packet - * @property {Uint8Array|null} [acknowledgement] MsgAcknowledgement acknowledgement - * @property {Uint8Array|null} [proof_acked] MsgAcknowledgement proof_acked - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgAcknowledgement proof_height - * @property {string|null} [signer] MsgAcknowledgement signer - */ - - /** - * Constructs a new MsgAcknowledgement. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgAcknowledgement. - * @implements IMsgAcknowledgement - * @constructor - * @param {ibc.core.channel.v1.IMsgAcknowledgement=} [properties] Properties to set - */ - function MsgAcknowledgement(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAcknowledgement packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.packet = null; - - /** - * MsgAcknowledgement acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.acknowledgement = $util.newBuffer([]); - - /** - * MsgAcknowledgement proof_acked. - * @member {Uint8Array} proof_acked - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.proof_acked = $util.newBuffer([]); - - /** - * MsgAcknowledgement proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.proof_height = null; - - /** - * MsgAcknowledgement signer. - * @member {string} signer - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.signer = ""; - - /** - * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {ibc.core.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.ibc.core.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_acked != null && Object.hasOwnProperty.call(message, "proof_acked")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof_acked); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {ibc.core.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 ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgAcknowledgement(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - case 3: - message.proof_acked = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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")) { - let error = $root.ibc.core.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_acked != null && message.hasOwnProperty("proof_acked")) - if (!(message.proof_acked && typeof message.proof_acked.length === "number" || $util.isString(message.proof_acked))) - return "proof_acked: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgAcknowledgement} MsgAcknowledgement - */ - MsgAcknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgAcknowledgement) - return object; - let message = new $root.ibc.core.channel.v1.MsgAcknowledgement(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".ibc.core.channel.v1.MsgAcknowledgement.packet: object expected"); - message.packet = $root.ibc.core.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_acked != null) - if (typeof object.proof_acked === "string") - $util.base64.decode(object.proof_acked, message.proof_acked = $util.newBuffer($util.base64.length(object.proof_acked)), 0); - else if (object.proof_acked.length) - message.proof_acked = object.proof_acked; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.MsgAcknowledgement.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @static - * @param {ibc.core.channel.v1.MsgAcknowledgement} message MsgAcknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAcknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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); - } - if (options.bytes === String) - object.proof_acked = ""; - else { - object.proof_acked = []; - if (options.bytes !== Array) - object.proof_acked = $util.newBuffer(object.proof_acked); - } - object.proof_height = null; - object.signer = ""; - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.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_acked != null && message.hasOwnProperty("proof_acked")) - object.proof_acked = options.bytes === String ? $util.base64.encode(message.proof_acked, 0, message.proof_acked.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_acked) : message.proof_acked; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgAcknowledgement to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgAcknowledgement - * @instance - * @returns {Object.} JSON object - */ - MsgAcknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAcknowledgement; - })(); - - v1.MsgAcknowledgementResponse = (function() { - - /** - * Properties of a MsgAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @interface IMsgAcknowledgementResponse - * @property {ibc.core.channel.v1.ResponseResultType|null} [result] MsgAcknowledgementResponse result - */ - - /** - * Constructs a new MsgAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a MsgAcknowledgementResponse. - * @implements IMsgAcknowledgementResponse - * @constructor - * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse=} [properties] Properties to set - */ - function MsgAcknowledgementResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAcknowledgementResponse result. - * @member {ibc.core.channel.v1.ResponseResultType} result - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @instance - */ - MsgAcknowledgementResponse.prototype.result = 0; - - /** - * Encodes the specified MsgAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} message MsgAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAcknowledgementResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified MsgAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.MsgAcknowledgementResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IMsgAcknowledgementResponse} message MsgAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAcknowledgementResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAcknowledgementResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.MsgAcknowledgementResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAcknowledgementResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAcknowledgementResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAcknowledgementResponse message. - * @function verify - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAcknowledgementResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a MsgAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.MsgAcknowledgementResponse} MsgAcknowledgementResponse - */ - MsgAcknowledgementResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.MsgAcknowledgementResponse) - return object; - let message = new $root.ibc.core.channel.v1.MsgAcknowledgementResponse(); - switch (object.result) { - case "RESPONSE_RESULT_TYPE_UNSPECIFIED": - case 0: - message.result = 0; - break; - case "RESPONSE_RESULT_TYPE_NOOP": - case 1: - message.result = 1; - break; - case "RESPONSE_RESULT_TYPE_SUCCESS": - case 2: - message.result = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgAcknowledgementResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.MsgAcknowledgementResponse} message MsgAcknowledgementResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAcknowledgementResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.result = options.enums === String ? "RESPONSE_RESULT_TYPE_UNSPECIFIED" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.ibc.core.channel.v1.ResponseResultType[message.result] : message.result; - return object; - }; - - /** - * Converts this MsgAcknowledgementResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.MsgAcknowledgementResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAcknowledgementResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAcknowledgementResponse; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.core.channel.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; - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channel}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelResponse} [response] QueryChannelResponse - */ - - /** - * Calls Channel. - * @function channel - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelRequest} request QueryChannelRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelCallback} callback Node-style callback called with the error, if any, and QueryChannelResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channel = function channel(request, callback) { - return this.rpcCall(channel, $root.ibc.core.channel.v1.QueryChannelRequest, $root.ibc.core.channel.v1.QueryChannelResponse, request, callback); - }, "name", { value: "Channel" }); - - /** - * Calls Channel. - * @function channel - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelRequest} request QueryChannelRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channels}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelsResponse} [response] QueryChannelsResponse - */ - - /** - * Calls Channels. - * @function channels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelsRequest} request QueryChannelsRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelsCallback} callback Node-style callback called with the error, if any, and QueryChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channels = function channels(request, callback) { - return this.rpcCall(channels, $root.ibc.core.channel.v1.QueryChannelsRequest, $root.ibc.core.channel.v1.QueryChannelsResponse, request, callback); - }, "name", { value: "Channels" }); - - /** - * Calls Channels. - * @function channels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelsRequest} request QueryChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#connectionChannels}. - * @memberof ibc.core.channel.v1.Query - * @typedef ConnectionChannelsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryConnectionChannelsResponse} [response] QueryConnectionChannelsResponse - */ - - /** - * Calls ConnectionChannels. - * @function connectionChannels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} request QueryConnectionChannelsRequest message or plain object - * @param {ibc.core.channel.v1.Query.ConnectionChannelsCallback} callback Node-style callback called with the error, if any, and QueryConnectionChannelsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionChannels = function connectionChannels(request, callback) { - return this.rpcCall(connectionChannels, $root.ibc.core.channel.v1.QueryConnectionChannelsRequest, $root.ibc.core.channel.v1.QueryConnectionChannelsResponse, request, callback); - }, "name", { value: "ConnectionChannels" }); - - /** - * Calls ConnectionChannels. - * @function connectionChannels - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} request QueryConnectionChannelsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channelClientState}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelClientStateResponse} [response] QueryChannelClientStateResponse - */ - - /** - * Calls ChannelClientState. - * @function channelClientState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} request QueryChannelClientStateRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelClientStateCallback} callback Node-style callback called with the error, if any, and QueryChannelClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channelClientState = function channelClientState(request, callback) { - return this.rpcCall(channelClientState, $root.ibc.core.channel.v1.QueryChannelClientStateRequest, $root.ibc.core.channel.v1.QueryChannelClientStateResponse, request, callback); - }, "name", { value: "ChannelClientState" }); - - /** - * Calls ChannelClientState. - * @function channelClientState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} request QueryChannelClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#channelConsensusState}. - * @memberof ibc.core.channel.v1.Query - * @typedef ChannelConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryChannelConsensusStateResponse} [response] QueryChannelConsensusStateResponse - */ - - /** - * Calls ChannelConsensusState. - * @function channelConsensusState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} request QueryChannelConsensusStateRequest message or plain object - * @param {ibc.core.channel.v1.Query.ChannelConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryChannelConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.channelConsensusState = function channelConsensusState(request, callback) { - return this.rpcCall(channelConsensusState, $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest, $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse, request, callback); - }, "name", { value: "ChannelConsensusState" }); - - /** - * Calls ChannelConsensusState. - * @function channelConsensusState - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} request QueryChannelConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitment}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketCommitmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketCommitmentResponse} [response] QueryPacketCommitmentResponse - */ - - /** - * Calls PacketCommitment. - * @function packetCommitment - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} request QueryPacketCommitmentRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketCommitmentCallback} callback Node-style callback called with the error, if any, and QueryPacketCommitmentResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetCommitment = function packetCommitment(request, callback) { - return this.rpcCall(packetCommitment, $root.ibc.core.channel.v1.QueryPacketCommitmentRequest, $root.ibc.core.channel.v1.QueryPacketCommitmentResponse, request, callback); - }, "name", { value: "PacketCommitment" }); - - /** - * Calls PacketCommitment. - * @function packetCommitment - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} request QueryPacketCommitmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetCommitments}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketCommitmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketCommitmentsResponse} [response] QueryPacketCommitmentsResponse - */ - - /** - * Calls PacketCommitments. - * @function packetCommitments - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} request QueryPacketCommitmentsRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketCommitmentsCallback} callback Node-style callback called with the error, if any, and QueryPacketCommitmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetCommitments = function packetCommitments(request, callback) { - return this.rpcCall(packetCommitments, $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest, $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse, request, callback); - }, "name", { value: "PacketCommitments" }); - - /** - * Calls PacketCommitments. - * @function packetCommitments - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} request QueryPacketCommitmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetReceipt}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketReceiptCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketReceiptResponse} [response] QueryPacketReceiptResponse - */ - - /** - * Calls PacketReceipt. - * @function packetReceipt - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} request QueryPacketReceiptRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketReceiptCallback} callback Node-style callback called with the error, if any, and QueryPacketReceiptResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetReceipt = function packetReceipt(request, callback) { - return this.rpcCall(packetReceipt, $root.ibc.core.channel.v1.QueryPacketReceiptRequest, $root.ibc.core.channel.v1.QueryPacketReceiptResponse, request, callback); - }, "name", { value: "PacketReceipt" }); - - /** - * Calls PacketReceipt. - * @function packetReceipt - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} request QueryPacketReceiptRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgement}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketAcknowledgementCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} [response] QueryPacketAcknowledgementResponse - */ - - /** - * Calls PacketAcknowledgement. - * @function packetAcknowledgement - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} request QueryPacketAcknowledgementRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketAcknowledgementCallback} callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetAcknowledgement = function packetAcknowledgement(request, callback) { - return this.rpcCall(packetAcknowledgement, $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest, $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse, request, callback); - }, "name", { value: "PacketAcknowledgement" }); - - /** - * Calls PacketAcknowledgement. - * @function packetAcknowledgement - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} request QueryPacketAcknowledgementRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#packetAcknowledgements}. - * @memberof ibc.core.channel.v1.Query - * @typedef PacketAcknowledgementsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} [response] QueryPacketAcknowledgementsResponse - */ - - /** - * Calls PacketAcknowledgements. - * @function packetAcknowledgements - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} request QueryPacketAcknowledgementsRequest message or plain object - * @param {ibc.core.channel.v1.Query.PacketAcknowledgementsCallback} callback Node-style callback called with the error, if any, and QueryPacketAcknowledgementsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.packetAcknowledgements = function packetAcknowledgements(request, callback) { - return this.rpcCall(packetAcknowledgements, $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest, $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse, request, callback); - }, "name", { value: "PacketAcknowledgements" }); - - /** - * Calls PacketAcknowledgements. - * @function packetAcknowledgements - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} request QueryPacketAcknowledgementsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedPackets}. - * @memberof ibc.core.channel.v1.Query - * @typedef UnreceivedPacketsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} [response] QueryUnreceivedPacketsResponse - */ - - /** - * Calls UnreceivedPackets. - * @function unreceivedPackets - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} request QueryUnreceivedPacketsRequest message or plain object - * @param {ibc.core.channel.v1.Query.UnreceivedPacketsCallback} callback Node-style callback called with the error, if any, and QueryUnreceivedPacketsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.unreceivedPackets = function unreceivedPackets(request, callback) { - return this.rpcCall(unreceivedPackets, $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest, $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse, request, callback); - }, "name", { value: "UnreceivedPackets" }); - - /** - * Calls UnreceivedPackets. - * @function unreceivedPackets - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} request QueryUnreceivedPacketsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#unreceivedAcks}. - * @memberof ibc.core.channel.v1.Query - * @typedef UnreceivedAcksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryUnreceivedAcksResponse} [response] QueryUnreceivedAcksResponse - */ - - /** - * Calls UnreceivedAcks. - * @function unreceivedAcks - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} request QueryUnreceivedAcksRequest message or plain object - * @param {ibc.core.channel.v1.Query.UnreceivedAcksCallback} callback Node-style callback called with the error, if any, and QueryUnreceivedAcksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.unreceivedAcks = function unreceivedAcks(request, callback) { - return this.rpcCall(unreceivedAcks, $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest, $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse, request, callback); - }, "name", { value: "UnreceivedAcks" }); - - /** - * Calls UnreceivedAcks. - * @function unreceivedAcks - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} request QueryUnreceivedAcksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.channel.v1.Query#nextSequenceReceive}. - * @memberof ibc.core.channel.v1.Query - * @typedef NextSequenceReceiveCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} [response] QueryNextSequenceReceiveResponse - */ - - /** - * Calls NextSequenceReceive. - * @function nextSequenceReceive - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} request QueryNextSequenceReceiveRequest message or plain object - * @param {ibc.core.channel.v1.Query.NextSequenceReceiveCallback} callback Node-style callback called with the error, if any, and QueryNextSequenceReceiveResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.nextSequenceReceive = function nextSequenceReceive(request, callback) { - return this.rpcCall(nextSequenceReceive, $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest, $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse, request, callback); - }, "name", { value: "NextSequenceReceive" }); - - /** - * Calls NextSequenceReceive. - * @function nextSequenceReceive - * @memberof ibc.core.channel.v1.Query - * @instance - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} request QueryNextSequenceReceiveRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryChannelRequest = (function() { - - /** - * Properties of a QueryChannelRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelRequest - * @property {string|null} [port_id] QueryChannelRequest port_id - * @property {string|null} [channel_id] QueryChannelRequest channel_id - */ - - /** - * Constructs a new QueryChannelRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelRequest. - * @implements IQueryChannelRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelRequest=} [properties] Properties to set - */ - function QueryChannelRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @instance - */ - QueryChannelRequest.prototype.port_id = ""; - - /** - * QueryChannelRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @instance - */ - QueryChannelRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryChannelRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelRequest} message QueryChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryChannelRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelRequest} message QueryChannelRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryChannelRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelRequest} QueryChannelRequest - */ - QueryChannelRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryChannelRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelRequest} message QueryChannelRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryChannelRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelRequest; - })(); - - v1.QueryChannelResponse = (function() { - - /** - * Properties of a QueryChannelResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelResponse - * @property {ibc.core.channel.v1.IChannel|null} [channel] QueryChannelResponse channel - * @property {Uint8Array|null} [proof] QueryChannelResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryChannelResponse proof_height - */ - - /** - * Constructs a new QueryChannelResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelResponse. - * @implements IQueryChannelResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelResponse=} [properties] Properties to set - */ - function QueryChannelResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelResponse channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - */ - QueryChannelResponse.prototype.channel = null; - - /** - * QueryChannelResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - */ - QueryChannelResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryChannelResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - */ - QueryChannelResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryChannelResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelResponse} message QueryChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelResponse} message QueryChannelResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelResponse} QueryChannelResponse - */ - QueryChannelResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelResponse(); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelResponse.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelResponse} message QueryChannelResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.channel = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryChannelResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelResponse; - })(); - - v1.QueryChannelsRequest = (function() { - - /** - * Properties of a QueryChannelsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryChannelsRequest pagination - */ - - /** - * Constructs a new QueryChannelsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelsRequest. - * @implements IQueryChannelsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelsRequest=} [properties] Properties to set - */ - function QueryChannelsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @instance - */ - QueryChannelsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelsRequest} message QueryChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelsRequest} message QueryChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelsRequest} QueryChannelsRequest - */ - QueryChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelsRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelsRequest} message QueryChannelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryChannelsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelsRequest; - })(); - - v1.QueryChannelsResponse = (function() { - - /** - * Properties of a QueryChannelsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelsResponse - * @property {Array.|null} [channels] QueryChannelsResponse channels - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryChannelsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryChannelsResponse height - */ - - /** - * Constructs a new QueryChannelsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelsResponse. - * @implements IQueryChannelsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelsResponse=} [properties] Properties to set - */ - function QueryChannelsResponse(properties) { - this.channels = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelsResponse channels. - * @member {Array.} channels - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - */ - QueryChannelsResponse.prototype.channels = $util.emptyArray; - - /** - * QueryChannelsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - */ - QueryChannelsResponse.prototype.pagination = null; - - /** - * QueryChannelsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - */ - QueryChannelsResponse.prototype.height = null; - - /** - * Encodes the specified QueryChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelsResponse} message QueryChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (let i = 0; i < message.channels.length; ++i) - $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelsResponse} message QueryChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (let i = 0; i < message.channels.length; ++i) { - let error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelsResponse} QueryChannelsResponse - */ - QueryChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelsResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelsResponse(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.channels: array expected"); - message.channels = []; - for (let i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.channels: object expected"); - message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelsResponse} message QueryChannelsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.channels = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.channels && message.channels.length) { - object.channels = []; - for (let j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryChannelsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelsResponse; - })(); - - v1.QueryConnectionChannelsRequest = (function() { - - /** - * Properties of a QueryConnectionChannelsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryConnectionChannelsRequest - * @property {string|null} [connection] QueryConnectionChannelsRequest connection - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConnectionChannelsRequest pagination - */ - - /** - * Constructs a new QueryConnectionChannelsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryConnectionChannelsRequest. - * @implements IQueryConnectionChannelsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest=} [properties] Properties to set - */ - function QueryConnectionChannelsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionChannelsRequest connection. - * @member {string} connection - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @instance - */ - QueryConnectionChannelsRequest.prototype.connection = ""; - - /** - * QueryConnectionChannelsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @instance - */ - QueryConnectionChannelsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConnectionChannelsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} message QueryConnectionChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionChannelsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsRequest} message QueryConnectionChannelsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryConnectionChannelsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionChannelsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionChannelsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionChannelsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection != null && message.hasOwnProperty("connection")) - if (!$util.isString(message.connection)) - return "connection: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionChannelsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryConnectionChannelsRequest} QueryConnectionChannelsRequest - */ - QueryConnectionChannelsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryConnectionChannelsRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryConnectionChannelsRequest(); - if (object.connection != null) - message.connection = String(object.connection); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionChannelsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @static - * @param {ibc.core.channel.v1.QueryConnectionChannelsRequest} message QueryConnectionChannelsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionChannelsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection = ""; - object.pagination = null; - } - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = message.connection; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConnectionChannelsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryConnectionChannelsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionChannelsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionChannelsRequest; - })(); - - v1.QueryConnectionChannelsResponse = (function() { - - /** - * Properties of a QueryConnectionChannelsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryConnectionChannelsResponse - * @property {Array.|null} [channels] QueryConnectionChannelsResponse channels - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConnectionChannelsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryConnectionChannelsResponse height - */ - - /** - * Constructs a new QueryConnectionChannelsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryConnectionChannelsResponse. - * @implements IQueryConnectionChannelsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse=} [properties] Properties to set - */ - function QueryConnectionChannelsResponse(properties) { - this.channels = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionChannelsResponse channels. - * @member {Array.} channels - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - */ - QueryConnectionChannelsResponse.prototype.channels = $util.emptyArray; - - /** - * QueryConnectionChannelsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - */ - QueryConnectionChannelsResponse.prototype.pagination = null; - - /** - * QueryConnectionChannelsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - */ - QueryConnectionChannelsResponse.prototype.height = null; - - /** - * Encodes the specified QueryConnectionChannelsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} message QueryConnectionChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (let i = 0; i < message.channels.length; ++i) - $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionChannelsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryConnectionChannelsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {ibc.core.channel.v1.IQueryConnectionChannelsResponse} message QueryConnectionChannelsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionChannelsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryConnectionChannelsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionChannelsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionChannelsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionChannelsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionChannelsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (let i = 0; i < message.channels.length; ++i) { - let error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionChannelsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryConnectionChannelsResponse} QueryConnectionChannelsResponse - */ - QueryConnectionChannelsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryConnectionChannelsResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryConnectionChannelsResponse(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.channels: array expected"); - message.channels = []; - for (let i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.channels: object expected"); - message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryConnectionChannelsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionChannelsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @static - * @param {ibc.core.channel.v1.QueryConnectionChannelsResponse} message QueryConnectionChannelsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionChannelsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.channels = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.channels && message.channels.length) { - object.channels = []; - for (let j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryConnectionChannelsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryConnectionChannelsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionChannelsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionChannelsResponse; - })(); - - v1.QueryChannelClientStateRequest = (function() { - - /** - * Properties of a QueryChannelClientStateRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelClientStateRequest - * @property {string|null} [port_id] QueryChannelClientStateRequest port_id - * @property {string|null} [channel_id] QueryChannelClientStateRequest channel_id - */ - - /** - * Constructs a new QueryChannelClientStateRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelClientStateRequest. - * @implements IQueryChannelClientStateRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest=} [properties] Properties to set - */ - function QueryChannelClientStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelClientStateRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @instance - */ - QueryChannelClientStateRequest.prototype.port_id = ""; - - /** - * QueryChannelClientStateRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @instance - */ - QueryChannelClientStateRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryChannelClientStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} message QueryChannelClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryChannelClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateRequest} message QueryChannelClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelClientStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelClientStateRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryChannelClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelClientStateRequest} QueryChannelClientStateRequest - */ - QueryChannelClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelClientStateRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelClientStateRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryChannelClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelClientStateRequest} message QueryChannelClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelClientStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryChannelClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelClientStateRequest; - })(); - - v1.QueryChannelClientStateResponse = (function() { - - /** - * Properties of a QueryChannelClientStateResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelClientStateResponse - * @property {ibc.core.client.v1.IIdentifiedClientState|null} [identified_client_state] QueryChannelClientStateResponse identified_client_state - * @property {Uint8Array|null} [proof] QueryChannelClientStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryChannelClientStateResponse proof_height - */ - - /** - * Constructs a new QueryChannelClientStateResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelClientStateResponse. - * @implements IQueryChannelClientStateResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse=} [properties] Properties to set - */ - function QueryChannelClientStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelClientStateResponse identified_client_state. - * @member {ibc.core.client.v1.IIdentifiedClientState|null|undefined} identified_client_state - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - */ - QueryChannelClientStateResponse.prototype.identified_client_state = null; - - /** - * QueryChannelClientStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - */ - QueryChannelClientStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryChannelClientStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - */ - QueryChannelClientStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryChannelClientStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} message QueryChannelClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identified_client_state != null && Object.hasOwnProperty.call(message, "identified_client_state")) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.identified_client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelClientStateResponse} message QueryChannelClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelClientStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelClientStateResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) { - let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.identified_client_state); - if (error) - return "identified_client_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelClientStateResponse} QueryChannelClientStateResponse - */ - QueryChannelClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelClientStateResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelClientStateResponse(); - if (object.identified_client_state != null) { - if (typeof object.identified_client_state !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelClientStateResponse.identified_client_state: object expected"); - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.identified_client_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelClientStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelClientStateResponse} message QueryChannelClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.identified_client_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) - object.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.identified_client_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryChannelClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelClientStateResponse; - })(); - - v1.QueryChannelConsensusStateRequest = (function() { - - /** - * Properties of a QueryChannelConsensusStateRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelConsensusStateRequest - * @property {string|null} [port_id] QueryChannelConsensusStateRequest port_id - * @property {string|null} [channel_id] QueryChannelConsensusStateRequest channel_id - * @property {Long|null} [revision_number] QueryChannelConsensusStateRequest revision_number - * @property {Long|null} [revision_height] QueryChannelConsensusStateRequest revision_height - */ - - /** - * Constructs a new QueryChannelConsensusStateRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelConsensusStateRequest. - * @implements IQueryChannelConsensusStateRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest=} [properties] Properties to set - */ - function QueryChannelConsensusStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelConsensusStateRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.port_id = ""; - - /** - * QueryChannelConsensusStateRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.channel_id = ""; - - /** - * QueryChannelConsensusStateRequest revision_number. - * @member {Long} revision_number - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryChannelConsensusStateRequest revision_height. - * @member {Long} revision_height - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - */ - QueryChannelConsensusStateRequest.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryChannelConsensusStateRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified QueryChannelConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.revision_number = reader.uint64(); - break; - case 4: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelConsensusStateRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryChannelConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateRequest} QueryChannelConsensusStateRequest - */ - QueryChannelConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryChannelConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @static - * @param {ibc.core.channel.v1.QueryChannelConsensusStateRequest} message QueryChannelConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelConsensusStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this QueryChannelConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryChannelConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelConsensusStateRequest; - })(); - - v1.QueryChannelConsensusStateResponse = (function() { - - /** - * Properties of a QueryChannelConsensusStateResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryChannelConsensusStateResponse - * @property {google.protobuf.IAny|null} [consensus_state] QueryChannelConsensusStateResponse consensus_state - * @property {string|null} [client_id] QueryChannelConsensusStateResponse client_id - * @property {Uint8Array|null} [proof] QueryChannelConsensusStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryChannelConsensusStateResponse proof_height - */ - - /** - * Constructs a new QueryChannelConsensusStateResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryChannelConsensusStateResponse. - * @implements IQueryChannelConsensusStateResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse=} [properties] Properties to set - */ - function QueryChannelConsensusStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryChannelConsensusStateResponse consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.consensus_state = null; - - /** - * QueryChannelConsensusStateResponse client_id. - * @member {string} client_id - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.client_id = ""; - - /** - * QueryChannelConsensusStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryChannelConsensusStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - */ - QueryChannelConsensusStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryChannelConsensusStateResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.client_id); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryChannelConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryChannelConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {ibc.core.channel.v1.IQueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryChannelConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryChannelConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryChannelConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryChannelConsensusStateResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryChannelConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryChannelConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryChannelConsensusStateResponse} QueryChannelConsensusStateResponse - */ - QueryChannelConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryChannelConsensusStateResponse(); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelConsensusStateResponse.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryChannelConsensusStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryChannelConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @static - * @param {ibc.core.channel.v1.QueryChannelConsensusStateResponse} message QueryChannelConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryChannelConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.consensus_state = null; - object.client_id = ""; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryChannelConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryChannelConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryChannelConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryChannelConsensusStateResponse; - })(); - - v1.QueryPacketCommitmentRequest = (function() { - - /** - * Properties of a QueryPacketCommitmentRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentRequest - * @property {string|null} [port_id] QueryPacketCommitmentRequest port_id - * @property {string|null} [channel_id] QueryPacketCommitmentRequest channel_id - * @property {Long|null} [sequence] QueryPacketCommitmentRequest sequence - */ - - /** - * Constructs a new QueryPacketCommitmentRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentRequest. - * @implements IQueryPacketCommitmentRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest=} [properties] Properties to set - */ - function QueryPacketCommitmentRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - */ - QueryPacketCommitmentRequest.prototype.port_id = ""; - - /** - * QueryPacketCommitmentRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - */ - QueryPacketCommitmentRequest.prototype.channel_id = ""; - - /** - * QueryPacketCommitmentRequest sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - */ - QueryPacketCommitmentRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryPacketCommitmentRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} message QueryPacketCommitmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentRequest} message QueryPacketCommitmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 QueryPacketCommitmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentRequest} QueryPacketCommitmentRequest - */ - QueryPacketCommitmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 QueryPacketCommitmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentRequest} message QueryPacketCommitmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 QueryPacketCommitmentRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentRequest; - })(); - - v1.QueryPacketCommitmentResponse = (function() { - - /** - * Properties of a QueryPacketCommitmentResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentResponse - * @property {Uint8Array|null} [commitment] QueryPacketCommitmentResponse commitment - * @property {Uint8Array|null} [proof] QueryPacketCommitmentResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryPacketCommitmentResponse proof_height - */ - - /** - * Constructs a new QueryPacketCommitmentResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentResponse. - * @implements IQueryPacketCommitmentResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse=} [properties] Properties to set - */ - function QueryPacketCommitmentResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentResponse commitment. - * @member {Uint8Array} commitment - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - */ - QueryPacketCommitmentResponse.prototype.commitment = $util.newBuffer([]); - - /** - * QueryPacketCommitmentResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - */ - QueryPacketCommitmentResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryPacketCommitmentResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - */ - QueryPacketCommitmentResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryPacketCommitmentResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} message QueryPacketCommitmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.commitment); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentResponse} message QueryPacketCommitmentResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.commitment = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commitment != null && message.hasOwnProperty("commitment")) - if (!(message.commitment && typeof message.commitment.length === "number" || $util.isString(message.commitment))) - return "commitment: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketCommitmentResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentResponse} QueryPacketCommitmentResponse - */ - QueryPacketCommitmentResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentResponse(); - if (object.commitment != null) - if (typeof object.commitment === "string") - $util.base64.decode(object.commitment, message.commitment = $util.newBuffer($util.base64.length(object.commitment)), 0); - else if (object.commitment.length) - message.commitment = object.commitment; - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketCommitmentResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentResponse} message QueryPacketCommitmentResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.commitment = ""; - else { - object.commitment = []; - if (options.bytes !== Array) - object.commitment = $util.newBuffer(object.commitment); - } - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.commitment != null && message.hasOwnProperty("commitment")) - object.commitment = options.bytes === String ? $util.base64.encode(message.commitment, 0, message.commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.commitment) : message.commitment; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryPacketCommitmentResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentResponse; - })(); - - v1.QueryPacketCommitmentsRequest = (function() { - - /** - * Properties of a QueryPacketCommitmentsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentsRequest - * @property {string|null} [port_id] QueryPacketCommitmentsRequest port_id - * @property {string|null} [channel_id] QueryPacketCommitmentsRequest channel_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryPacketCommitmentsRequest pagination - */ - - /** - * Constructs a new QueryPacketCommitmentsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentsRequest. - * @implements IQueryPacketCommitmentsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest=} [properties] Properties to set - */ - function QueryPacketCommitmentsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentsRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - */ - QueryPacketCommitmentsRequest.prototype.port_id = ""; - - /** - * QueryPacketCommitmentsRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - */ - QueryPacketCommitmentsRequest.prototype.channel_id = ""; - - /** - * QueryPacketCommitmentsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - */ - QueryPacketCommitmentsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryPacketCommitmentsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryPacketCommitmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsRequest} QueryPacketCommitmentsRequest - */ - QueryPacketCommitmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketCommitmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentsRequest} message QueryPacketCommitmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.pagination = null; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryPacketCommitmentsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentsRequest; - })(); - - v1.QueryPacketCommitmentsResponse = (function() { - - /** - * Properties of a QueryPacketCommitmentsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketCommitmentsResponse - * @property {Array.|null} [commitments] QueryPacketCommitmentsResponse commitments - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryPacketCommitmentsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryPacketCommitmentsResponse height - */ - - /** - * Constructs a new QueryPacketCommitmentsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketCommitmentsResponse. - * @implements IQueryPacketCommitmentsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse=} [properties] Properties to set - */ - function QueryPacketCommitmentsResponse(properties) { - this.commitments = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketCommitmentsResponse commitments. - * @member {Array.} commitments - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - */ - QueryPacketCommitmentsResponse.prototype.commitments = $util.emptyArray; - - /** - * QueryPacketCommitmentsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - */ - QueryPacketCommitmentsResponse.prototype.pagination = null; - - /** - * QueryPacketCommitmentsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - */ - QueryPacketCommitmentsResponse.prototype.height = null; - - /** - * Encodes the specified QueryPacketCommitmentsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commitments != null && message.commitments.length) - for (let i = 0; i < message.commitments.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.commitments[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketCommitmentsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketCommitmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketCommitmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.commitments && message.commitments.length)) - message.commitments = []; - message.commitments.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketCommitmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketCommitmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketCommitmentsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketCommitmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commitments != null && message.hasOwnProperty("commitments")) { - if (!Array.isArray(message.commitments)) - return "commitments: array expected"; - for (let i = 0; i < message.commitments.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketState.verify(message.commitments[i]); - if (error) - return "commitments." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketCommitmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketCommitmentsResponse} QueryPacketCommitmentsResponse - */ - QueryPacketCommitmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketCommitmentsResponse(); - if (object.commitments) { - if (!Array.isArray(object.commitments)) - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.commitments: array expected"); - message.commitments = []; - for (let i = 0; i < object.commitments.length; ++i) { - if (typeof object.commitments[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.commitments: object expected"); - message.commitments[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.commitments[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketCommitmentsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketCommitmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketCommitmentsResponse} message QueryPacketCommitmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketCommitmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.commitments = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.commitments && message.commitments.length) { - object.commitments = []; - for (let j = 0; j < message.commitments.length; ++j) - object.commitments[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.commitments[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryPacketCommitmentsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketCommitmentsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketCommitmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketCommitmentsResponse; - })(); - - v1.QueryPacketReceiptRequest = (function() { - - /** - * Properties of a QueryPacketReceiptRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketReceiptRequest - * @property {string|null} [port_id] QueryPacketReceiptRequest port_id - * @property {string|null} [channel_id] QueryPacketReceiptRequest channel_id - * @property {Long|null} [sequence] QueryPacketReceiptRequest sequence - */ - - /** - * Constructs a new QueryPacketReceiptRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketReceiptRequest. - * @implements IQueryPacketReceiptRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest=} [properties] Properties to set - */ - function QueryPacketReceiptRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketReceiptRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - */ - QueryPacketReceiptRequest.prototype.port_id = ""; - - /** - * QueryPacketReceiptRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - */ - QueryPacketReceiptRequest.prototype.channel_id = ""; - - /** - * QueryPacketReceiptRequest sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - */ - QueryPacketReceiptRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryPacketReceiptRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} message QueryPacketReceiptRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified QueryPacketReceiptRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptRequest} message QueryPacketReceiptRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketReceiptRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketReceiptRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketReceiptRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketReceiptRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 QueryPacketReceiptRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketReceiptRequest} QueryPacketReceiptRequest - */ - QueryPacketReceiptRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketReceiptRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketReceiptRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 QueryPacketReceiptRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketReceiptRequest} message QueryPacketReceiptRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketReceiptRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 QueryPacketReceiptRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketReceiptRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketReceiptRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketReceiptRequest; - })(); - - v1.QueryPacketReceiptResponse = (function() { - - /** - * Properties of a QueryPacketReceiptResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketReceiptResponse - * @property {boolean|null} [received] QueryPacketReceiptResponse received - * @property {Uint8Array|null} [proof] QueryPacketReceiptResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryPacketReceiptResponse proof_height - */ - - /** - * Constructs a new QueryPacketReceiptResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketReceiptResponse. - * @implements IQueryPacketReceiptResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse=} [properties] Properties to set - */ - function QueryPacketReceiptResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketReceiptResponse received. - * @member {boolean} received - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - */ - QueryPacketReceiptResponse.prototype.received = false; - - /** - * QueryPacketReceiptResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - */ - QueryPacketReceiptResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryPacketReceiptResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - */ - QueryPacketReceiptResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryPacketReceiptResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} message QueryPacketReceiptResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.received != null && Object.hasOwnProperty.call(message, "received")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.received); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketReceiptResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketReceiptResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketReceiptResponse} message QueryPacketReceiptResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketReceiptResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketReceiptResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.received = reader.bool(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketReceiptResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketReceiptResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketReceiptResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketReceiptResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.received != null && message.hasOwnProperty("received")) - if (typeof message.received !== "boolean") - return "received: boolean expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketReceiptResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketReceiptResponse} QueryPacketReceiptResponse - */ - QueryPacketReceiptResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketReceiptResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketReceiptResponse(); - if (object.received != null) - message.received = Boolean(object.received); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketReceiptResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketReceiptResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketReceiptResponse} message QueryPacketReceiptResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketReceiptResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.received = false; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.received != null && message.hasOwnProperty("received")) - object.received = message.received; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryPacketReceiptResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketReceiptResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketReceiptResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketReceiptResponse; - })(); - - v1.QueryPacketAcknowledgementRequest = (function() { - - /** - * Properties of a QueryPacketAcknowledgementRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementRequest - * @property {string|null} [port_id] QueryPacketAcknowledgementRequest port_id - * @property {string|null} [channel_id] QueryPacketAcknowledgementRequest channel_id - * @property {Long|null} [sequence] QueryPacketAcknowledgementRequest sequence - */ - - /** - * Constructs a new QueryPacketAcknowledgementRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementRequest. - * @implements IQueryPacketAcknowledgementRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest=} [properties] Properties to set - */ - function QueryPacketAcknowledgementRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - */ - QueryPacketAcknowledgementRequest.prototype.port_id = ""; - - /** - * QueryPacketAcknowledgementRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - */ - QueryPacketAcknowledgementRequest.prototype.channel_id = ""; - - /** - * QueryPacketAcknowledgementRequest sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - */ - QueryPacketAcknowledgementRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryPacketAcknowledgementRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 QueryPacketAcknowledgementRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} QueryPacketAcknowledgementRequest - */ - QueryPacketAcknowledgementRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 QueryPacketAcknowledgementRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementRequest} message QueryPacketAcknowledgementRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 QueryPacketAcknowledgementRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementRequest; - })(); - - v1.QueryPacketAcknowledgementResponse = (function() { - - /** - * Properties of a QueryPacketAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementResponse - * @property {Uint8Array|null} [acknowledgement] QueryPacketAcknowledgementResponse acknowledgement - * @property {Uint8Array|null} [proof] QueryPacketAcknowledgementResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryPacketAcknowledgementResponse proof_height - */ - - /** - * Constructs a new QueryPacketAcknowledgementResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementResponse. - * @implements IQueryPacketAcknowledgementResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse=} [properties] Properties to set - */ - function QueryPacketAcknowledgementResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementResponse acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - */ - QueryPacketAcknowledgementResponse.prototype.acknowledgement = $util.newBuffer([]); - - /** - * QueryPacketAcknowledgementResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - */ - QueryPacketAcknowledgementResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryPacketAcknowledgementResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - */ - QueryPacketAcknowledgementResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryPacketAcknowledgementResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.acknowledgement); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.acknowledgement = reader.bytes(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketAcknowledgementResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} QueryPacketAcknowledgementResponse - */ - QueryPacketAcknowledgementResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementResponse(); - 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 === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketAcknowledgementResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementResponse} message QueryPacketAcknowledgementResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.acknowledgement = ""; - else { - object.acknowledgement = []; - if (options.bytes !== Array) - object.acknowledgement = $util.newBuffer(object.acknowledgement); - } - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - 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 = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryPacketAcknowledgementResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementResponse; - })(); - - v1.QueryPacketAcknowledgementsRequest = (function() { - - /** - * Properties of a QueryPacketAcknowledgementsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementsRequest - * @property {string|null} [port_id] QueryPacketAcknowledgementsRequest port_id - * @property {string|null} [channel_id] QueryPacketAcknowledgementsRequest channel_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryPacketAcknowledgementsRequest pagination - * @property {Array.|null} [packet_commitment_sequences] QueryPacketAcknowledgementsRequest packet_commitment_sequences - */ - - /** - * Constructs a new QueryPacketAcknowledgementsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementsRequest. - * @implements IQueryPacketAcknowledgementsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest=} [properties] Properties to set - */ - function QueryPacketAcknowledgementsRequest(properties) { - this.packet_commitment_sequences = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementsRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.port_id = ""; - - /** - * QueryPacketAcknowledgementsRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.channel_id = ""; - - /** - * QueryPacketAcknowledgementsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.pagination = null; - - /** - * QueryPacketAcknowledgementsRequest packet_commitment_sequences. - * @member {Array.} packet_commitment_sequences - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - */ - QueryPacketAcknowledgementsRequest.prototype.packet_commitment_sequences = $util.emptyArray; - - /** - * Encodes the specified QueryPacketAcknowledgementsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.packet_commitment_sequences != null && message.packet_commitment_sequences.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (let i = 0; i < message.packet_commitment_sequences.length; ++i) - writer.uint64(message.packet_commitment_sequences[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.packet_commitment_sequences && message.packet_commitment_sequences.length)) - message.packet_commitment_sequences = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.packet_commitment_sequences.push(reader.uint64()); - } else - message.packet_commitment_sequences.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.packet_commitment_sequences != null && message.hasOwnProperty("packet_commitment_sequences")) { - if (!Array.isArray(message.packet_commitment_sequences)) - return "packet_commitment_sequences: array expected"; - for (let i = 0; i < message.packet_commitment_sequences.length; ++i) - if (!$util.isInteger(message.packet_commitment_sequences[i]) && !(message.packet_commitment_sequences[i] && $util.isInteger(message.packet_commitment_sequences[i].low) && $util.isInteger(message.packet_commitment_sequences[i].high))) - return "packet_commitment_sequences: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a QueryPacketAcknowledgementsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} QueryPacketAcknowledgementsRequest - */ - QueryPacketAcknowledgementsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - if (object.packet_commitment_sequences) { - if (!Array.isArray(object.packet_commitment_sequences)) - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsRequest.packet_commitment_sequences: array expected"); - message.packet_commitment_sequences = []; - for (let i = 0; i < object.packet_commitment_sequences.length; ++i) - if ($util.Long) - (message.packet_commitment_sequences[i] = $util.Long.fromValue(object.packet_commitment_sequences[i])).unsigned = true; - else if (typeof object.packet_commitment_sequences[i] === "string") - message.packet_commitment_sequences[i] = parseInt(object.packet_commitment_sequences[i], 10); - else if (typeof object.packet_commitment_sequences[i] === "number") - message.packet_commitment_sequences[i] = object.packet_commitment_sequences[i]; - else if (typeof object.packet_commitment_sequences[i] === "object") - message.packet_commitment_sequences[i] = new $util.LongBits(object.packet_commitment_sequences[i].low >>> 0, object.packet_commitment_sequences[i].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketAcknowledgementsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsRequest} message QueryPacketAcknowledgementsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.packet_commitment_sequences = []; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - object.pagination = null; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - if (message.packet_commitment_sequences && message.packet_commitment_sequences.length) { - object.packet_commitment_sequences = []; - for (let j = 0; j < message.packet_commitment_sequences.length; ++j) - if (typeof message.packet_commitment_sequences[j] === "number") - object.packet_commitment_sequences[j] = options.longs === String ? String(message.packet_commitment_sequences[j]) : message.packet_commitment_sequences[j]; - else - object.packet_commitment_sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packet_commitment_sequences[j]) : options.longs === Number ? new $util.LongBits(message.packet_commitment_sequences[j].low >>> 0, message.packet_commitment_sequences[j].high >>> 0).toNumber(true) : message.packet_commitment_sequences[j]; - } - return object; - }; - - /** - * Converts this QueryPacketAcknowledgementsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementsRequest; - })(); - - v1.QueryPacketAcknowledgementsResponse = (function() { - - /** - * Properties of a QueryPacketAcknowledgementsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryPacketAcknowledgementsResponse - * @property {Array.|null} [acknowledgements] QueryPacketAcknowledgementsResponse acknowledgements - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryPacketAcknowledgementsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryPacketAcknowledgementsResponse height - */ - - /** - * Constructs a new QueryPacketAcknowledgementsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryPacketAcknowledgementsResponse. - * @implements IQueryPacketAcknowledgementsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse=} [properties] Properties to set - */ - function QueryPacketAcknowledgementsResponse(properties) { - this.acknowledgements = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryPacketAcknowledgementsResponse acknowledgements. - * @member {Array.} acknowledgements - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - */ - QueryPacketAcknowledgementsResponse.prototype.acknowledgements = $util.emptyArray; - - /** - * QueryPacketAcknowledgementsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - */ - QueryPacketAcknowledgementsResponse.prototype.pagination = null; - - /** - * QueryPacketAcknowledgementsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - */ - QueryPacketAcknowledgementsResponse.prototype.height = null; - - /** - * Encodes the specified QueryPacketAcknowledgementsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.acknowledgements != null && message.acknowledgements.length) - for (let i = 0; i < message.acknowledgements.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.acknowledgements[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryPacketAcknowledgementsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryPacketAcknowledgementsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.acknowledgements && message.acknowledgements.length)) - message.acknowledgements = []; - message.acknowledgements.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryPacketAcknowledgementsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryPacketAcknowledgementsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryPacketAcknowledgementsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryPacketAcknowledgementsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.acknowledgements != null && message.hasOwnProperty("acknowledgements")) { - if (!Array.isArray(message.acknowledgements)) - return "acknowledgements: array expected"; - for (let i = 0; i < message.acknowledgements.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketState.verify(message.acknowledgements[i]); - if (error) - return "acknowledgements." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryPacketAcknowledgementsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} QueryPacketAcknowledgementsResponse - */ - QueryPacketAcknowledgementsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryPacketAcknowledgementsResponse(); - if (object.acknowledgements) { - if (!Array.isArray(object.acknowledgements)) - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.acknowledgements: array expected"); - message.acknowledgements = []; - for (let i = 0; i < object.acknowledgements.length; ++i) { - if (typeof object.acknowledgements[i] !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.acknowledgements: object expected"); - message.acknowledgements[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.acknowledgements[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryPacketAcknowledgementsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryPacketAcknowledgementsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @static - * @param {ibc.core.channel.v1.QueryPacketAcknowledgementsResponse} message QueryPacketAcknowledgementsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryPacketAcknowledgementsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.acknowledgements = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.acknowledgements && message.acknowledgements.length) { - object.acknowledgements = []; - for (let j = 0; j < message.acknowledgements.length; ++j) - object.acknowledgements[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.acknowledgements[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryPacketAcknowledgementsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryPacketAcknowledgementsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryPacketAcknowledgementsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryPacketAcknowledgementsResponse; - })(); - - v1.QueryUnreceivedPacketsRequest = (function() { - - /** - * Properties of a QueryUnreceivedPacketsRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedPacketsRequest - * @property {string|null} [port_id] QueryUnreceivedPacketsRequest port_id - * @property {string|null} [channel_id] QueryUnreceivedPacketsRequest channel_id - * @property {Array.|null} [packet_commitment_sequences] QueryUnreceivedPacketsRequest packet_commitment_sequences - */ - - /** - * Constructs a new QueryUnreceivedPacketsRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedPacketsRequest. - * @implements IQueryUnreceivedPacketsRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest=} [properties] Properties to set - */ - function QueryUnreceivedPacketsRequest(properties) { - this.packet_commitment_sequences = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedPacketsRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - */ - QueryUnreceivedPacketsRequest.prototype.port_id = ""; - - /** - * QueryUnreceivedPacketsRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - */ - QueryUnreceivedPacketsRequest.prototype.channel_id = ""; - - /** - * QueryUnreceivedPacketsRequest packet_commitment_sequences. - * @member {Array.} packet_commitment_sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - */ - QueryUnreceivedPacketsRequest.prototype.packet_commitment_sequences = $util.emptyArray; - - /** - * Encodes the specified QueryUnreceivedPacketsRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.packet_commitment_sequences != null && message.packet_commitment_sequences.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (let i = 0; i < message.packet_commitment_sequences.length; ++i) - writer.uint64(message.packet_commitment_sequences[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedPacketsRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - if (!(message.packet_commitment_sequences && message.packet_commitment_sequences.length)) - message.packet_commitment_sequences = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.packet_commitment_sequences.push(reader.uint64()); - } else - message.packet_commitment_sequences.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedPacketsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedPacketsRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedPacketsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.packet_commitment_sequences != null && message.hasOwnProperty("packet_commitment_sequences")) { - if (!Array.isArray(message.packet_commitment_sequences)) - return "packet_commitment_sequences: array expected"; - for (let i = 0; i < message.packet_commitment_sequences.length; ++i) - if (!$util.isInteger(message.packet_commitment_sequences[i]) && !(message.packet_commitment_sequences[i] && $util.isInteger(message.packet_commitment_sequences[i].low) && $util.isInteger(message.packet_commitment_sequences[i].high))) - return "packet_commitment_sequences: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a QueryUnreceivedPacketsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} QueryUnreceivedPacketsRequest - */ - QueryUnreceivedPacketsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.packet_commitment_sequences) { - if (!Array.isArray(object.packet_commitment_sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsRequest.packet_commitment_sequences: array expected"); - message.packet_commitment_sequences = []; - for (let i = 0; i < object.packet_commitment_sequences.length; ++i) - if ($util.Long) - (message.packet_commitment_sequences[i] = $util.Long.fromValue(object.packet_commitment_sequences[i])).unsigned = true; - else if (typeof object.packet_commitment_sequences[i] === "string") - message.packet_commitment_sequences[i] = parseInt(object.packet_commitment_sequences[i], 10); - else if (typeof object.packet_commitment_sequences[i] === "number") - message.packet_commitment_sequences[i] = object.packet_commitment_sequences[i]; - else if (typeof object.packet_commitment_sequences[i] === "object") - message.packet_commitment_sequences[i] = new $util.LongBits(object.packet_commitment_sequences[i].low >>> 0, object.packet_commitment_sequences[i].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedPacketsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedPacketsRequest} message QueryUnreceivedPacketsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedPacketsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.packet_commitment_sequences = []; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.packet_commitment_sequences && message.packet_commitment_sequences.length) { - object.packet_commitment_sequences = []; - for (let j = 0; j < message.packet_commitment_sequences.length; ++j) - if (typeof message.packet_commitment_sequences[j] === "number") - object.packet_commitment_sequences[j] = options.longs === String ? String(message.packet_commitment_sequences[j]) : message.packet_commitment_sequences[j]; - else - object.packet_commitment_sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packet_commitment_sequences[j]) : options.longs === Number ? new $util.LongBits(message.packet_commitment_sequences[j].low >>> 0, message.packet_commitment_sequences[j].high >>> 0).toNumber(true) : message.packet_commitment_sequences[j]; - } - return object; - }; - - /** - * Converts this QueryUnreceivedPacketsRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedPacketsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedPacketsRequest; - })(); - - v1.QueryUnreceivedPacketsResponse = (function() { - - /** - * Properties of a QueryUnreceivedPacketsResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedPacketsResponse - * @property {Array.|null} [sequences] QueryUnreceivedPacketsResponse sequences - * @property {ibc.core.client.v1.IHeight|null} [height] QueryUnreceivedPacketsResponse height - */ - - /** - * Constructs a new QueryUnreceivedPacketsResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedPacketsResponse. - * @implements IQueryUnreceivedPacketsResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse=} [properties] Properties to set - */ - function QueryUnreceivedPacketsResponse(properties) { - this.sequences = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedPacketsResponse sequences. - * @member {Array.} sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @instance - */ - QueryUnreceivedPacketsResponse.prototype.sequences = $util.emptyArray; - - /** - * QueryUnreceivedPacketsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @instance - */ - QueryUnreceivedPacketsResponse.prototype.height = null; - - /** - * Encodes the specified QueryUnreceivedPacketsResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequences != null && message.sequences.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (let i = 0; i < message.sequences.length; ++i) - writer.uint64(message.sequences[i]); - writer.ldelim(); - } - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedPacketsResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedPacketsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedPacketsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sequences && message.sequences.length)) - message.sequences = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sequences.push(reader.uint64()); - } else - message.sequences.push(reader.uint64()); - break; - case 2: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedPacketsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedPacketsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedPacketsResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedPacketsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequences != null && message.hasOwnProperty("sequences")) { - if (!Array.isArray(message.sequences)) - return "sequences: array expected"; - for (let i = 0; i < message.sequences.length; ++i) - if (!$util.isInteger(message.sequences[i]) && !(message.sequences[i] && $util.isInteger(message.sequences[i].low) && $util.isInteger(message.sequences[i].high))) - return "sequences: integer|Long[] expected"; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryUnreceivedPacketsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} QueryUnreceivedPacketsResponse - */ - QueryUnreceivedPacketsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryUnreceivedPacketsResponse(); - if (object.sequences) { - if (!Array.isArray(object.sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsResponse.sequences: array expected"); - message.sequences = []; - for (let i = 0; i < object.sequences.length; ++i) - if ($util.Long) - (message.sequences[i] = $util.Long.fromValue(object.sequences[i])).unsigned = true; - else if (typeof object.sequences[i] === "string") - message.sequences[i] = parseInt(object.sequences[i], 10); - else if (typeof object.sequences[i] === "number") - message.sequences[i] = object.sequences[i]; - else if (typeof object.sequences[i] === "object") - message.sequences[i] = new $util.LongBits(object.sequences[i].low >>> 0, object.sequences[i].high >>> 0).toNumber(true); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedPacketsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedPacketsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedPacketsResponse} message QueryUnreceivedPacketsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedPacketsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.sequences = []; - if (options.defaults) - object.height = null; - if (message.sequences && message.sequences.length) { - object.sequences = []; - for (let j = 0; j < message.sequences.length; ++j) - if (typeof message.sequences[j] === "number") - object.sequences[j] = options.longs === String ? String(message.sequences[j]) : message.sequences[j]; - else - object.sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.sequences[j]) : options.longs === Number ? new $util.LongBits(message.sequences[j].low >>> 0, message.sequences[j].high >>> 0).toNumber(true) : message.sequences[j]; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryUnreceivedPacketsResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedPacketsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedPacketsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedPacketsResponse; - })(); - - v1.QueryUnreceivedAcksRequest = (function() { - - /** - * Properties of a QueryUnreceivedAcksRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedAcksRequest - * @property {string|null} [port_id] QueryUnreceivedAcksRequest port_id - * @property {string|null} [channel_id] QueryUnreceivedAcksRequest channel_id - * @property {Array.|null} [packet_ack_sequences] QueryUnreceivedAcksRequest packet_ack_sequences - */ - - /** - * Constructs a new QueryUnreceivedAcksRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedAcksRequest. - * @implements IQueryUnreceivedAcksRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest=} [properties] Properties to set - */ - function QueryUnreceivedAcksRequest(properties) { - this.packet_ack_sequences = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedAcksRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - */ - QueryUnreceivedAcksRequest.prototype.port_id = ""; - - /** - * QueryUnreceivedAcksRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - */ - QueryUnreceivedAcksRequest.prototype.channel_id = ""; - - /** - * QueryUnreceivedAcksRequest packet_ack_sequences. - * @member {Array.} packet_ack_sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - */ - QueryUnreceivedAcksRequest.prototype.packet_ack_sequences = $util.emptyArray; - - /** - * Encodes the specified QueryUnreceivedAcksRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.packet_ack_sequences != null && message.packet_ack_sequences.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (let i = 0; i < message.packet_ack_sequences.length; ++i) - writer.uint64(message.packet_ack_sequences[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedAcksRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - if (!(message.packet_ack_sequences && message.packet_ack_sequences.length)) - message.packet_ack_sequences = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.packet_ack_sequences.push(reader.uint64()); - } else - message.packet_ack_sequences.push(reader.uint64()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedAcksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedAcksRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedAcksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.packet_ack_sequences != null && message.hasOwnProperty("packet_ack_sequences")) { - if (!Array.isArray(message.packet_ack_sequences)) - return "packet_ack_sequences: array expected"; - for (let i = 0; i < message.packet_ack_sequences.length; ++i) - if (!$util.isInteger(message.packet_ack_sequences[i]) && !(message.packet_ack_sequences[i] && $util.isInteger(message.packet_ack_sequences[i].low) && $util.isInteger(message.packet_ack_sequences[i].high))) - return "packet_ack_sequences: integer|Long[] expected"; - } - return null; - }; - - /** - * Creates a QueryUnreceivedAcksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksRequest} QueryUnreceivedAcksRequest - */ - QueryUnreceivedAcksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.packet_ack_sequences) { - if (!Array.isArray(object.packet_ack_sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksRequest.packet_ack_sequences: array expected"); - message.packet_ack_sequences = []; - for (let i = 0; i < object.packet_ack_sequences.length; ++i) - if ($util.Long) - (message.packet_ack_sequences[i] = $util.Long.fromValue(object.packet_ack_sequences[i])).unsigned = true; - else if (typeof object.packet_ack_sequences[i] === "string") - message.packet_ack_sequences[i] = parseInt(object.packet_ack_sequences[i], 10); - else if (typeof object.packet_ack_sequences[i] === "number") - message.packet_ack_sequences[i] = object.packet_ack_sequences[i]; - else if (typeof object.packet_ack_sequences[i] === "object") - message.packet_ack_sequences[i] = new $util.LongBits(object.packet_ack_sequences[i].low >>> 0, object.packet_ack_sequences[i].high >>> 0).toNumber(true); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedAcksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedAcksRequest} message QueryUnreceivedAcksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedAcksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.packet_ack_sequences = []; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.packet_ack_sequences && message.packet_ack_sequences.length) { - object.packet_ack_sequences = []; - for (let j = 0; j < message.packet_ack_sequences.length; ++j) - if (typeof message.packet_ack_sequences[j] === "number") - object.packet_ack_sequences[j] = options.longs === String ? String(message.packet_ack_sequences[j]) : message.packet_ack_sequences[j]; - else - object.packet_ack_sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.packet_ack_sequences[j]) : options.longs === Number ? new $util.LongBits(message.packet_ack_sequences[j].low >>> 0, message.packet_ack_sequences[j].high >>> 0).toNumber(true) : message.packet_ack_sequences[j]; - } - return object; - }; - - /** - * Converts this QueryUnreceivedAcksRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedAcksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedAcksRequest; - })(); - - v1.QueryUnreceivedAcksResponse = (function() { - - /** - * Properties of a QueryUnreceivedAcksResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryUnreceivedAcksResponse - * @property {Array.|null} [sequences] QueryUnreceivedAcksResponse sequences - * @property {ibc.core.client.v1.IHeight|null} [height] QueryUnreceivedAcksResponse height - */ - - /** - * Constructs a new QueryUnreceivedAcksResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryUnreceivedAcksResponse. - * @implements IQueryUnreceivedAcksResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse=} [properties] Properties to set - */ - function QueryUnreceivedAcksResponse(properties) { - this.sequences = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUnreceivedAcksResponse sequences. - * @member {Array.} sequences - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @instance - */ - QueryUnreceivedAcksResponse.prototype.sequences = $util.emptyArray; - - /** - * QueryUnreceivedAcksResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @instance - */ - QueryUnreceivedAcksResponse.prototype.height = null; - - /** - * Encodes the specified QueryUnreceivedAcksResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequences != null && message.sequences.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (let i = 0; i < message.sequences.length; ++i) - writer.uint64(message.sequences[i]); - writer.ldelim(); - } - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUnreceivedAcksResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryUnreceivedAcksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {ibc.core.channel.v1.IQueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUnreceivedAcksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.sequences && message.sequences.length)) - message.sequences = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.sequences.push(reader.uint64()); - } else - message.sequences.push(reader.uint64()); - break; - case 2: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUnreceivedAcksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUnreceivedAcksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUnreceivedAcksResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUnreceivedAcksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequences != null && message.hasOwnProperty("sequences")) { - if (!Array.isArray(message.sequences)) - return "sequences: array expected"; - for (let i = 0; i < message.sequences.length; ++i) - if (!$util.isInteger(message.sequences[i]) && !(message.sequences[i] && $util.isInteger(message.sequences[i].low) && $util.isInteger(message.sequences[i].high))) - return "sequences: integer|Long[] expected"; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryUnreceivedAcksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryUnreceivedAcksResponse} QueryUnreceivedAcksResponse - */ - QueryUnreceivedAcksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryUnreceivedAcksResponse(); - if (object.sequences) { - if (!Array.isArray(object.sequences)) - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksResponse.sequences: array expected"); - message.sequences = []; - for (let i = 0; i < object.sequences.length; ++i) - if ($util.Long) - (message.sequences[i] = $util.Long.fromValue(object.sequences[i])).unsigned = true; - else if (typeof object.sequences[i] === "string") - message.sequences[i] = parseInt(object.sequences[i], 10); - else if (typeof object.sequences[i] === "number") - message.sequences[i] = object.sequences[i]; - else if (typeof object.sequences[i] === "object") - message.sequences[i] = new $util.LongBits(object.sequences[i].low >>> 0, object.sequences[i].high >>> 0).toNumber(true); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryUnreceivedAcksResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryUnreceivedAcksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @static - * @param {ibc.core.channel.v1.QueryUnreceivedAcksResponse} message QueryUnreceivedAcksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUnreceivedAcksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.sequences = []; - if (options.defaults) - object.height = null; - if (message.sequences && message.sequences.length) { - object.sequences = []; - for (let j = 0; j < message.sequences.length; ++j) - if (typeof message.sequences[j] === "number") - object.sequences[j] = options.longs === String ? String(message.sequences[j]) : message.sequences[j]; - else - object.sequences[j] = options.longs === String ? $util.Long.prototype.toString.call(message.sequences[j]) : options.longs === Number ? new $util.LongBits(message.sequences[j].low >>> 0, message.sequences[j].high >>> 0).toNumber(true) : message.sequences[j]; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryUnreceivedAcksResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryUnreceivedAcksResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUnreceivedAcksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUnreceivedAcksResponse; - })(); - - v1.QueryNextSequenceReceiveRequest = (function() { - - /** - * Properties of a QueryNextSequenceReceiveRequest. - * @memberof ibc.core.channel.v1 - * @interface IQueryNextSequenceReceiveRequest - * @property {string|null} [port_id] QueryNextSequenceReceiveRequest port_id - * @property {string|null} [channel_id] QueryNextSequenceReceiveRequest channel_id - */ - - /** - * Constructs a new QueryNextSequenceReceiveRequest. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryNextSequenceReceiveRequest. - * @implements IQueryNextSequenceReceiveRequest - * @constructor - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest=} [properties] Properties to set - */ - function QueryNextSequenceReceiveRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryNextSequenceReceiveRequest port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @instance - */ - QueryNextSequenceReceiveRequest.prototype.port_id = ""; - - /** - * QueryNextSequenceReceiveRequest channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @instance - */ - QueryNextSequenceReceiveRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryNextSequenceReceiveRequest message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryNextSequenceReceiveRequest message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryNextSequenceReceiveRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryNextSequenceReceiveRequest message. - * @function verify - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryNextSequenceReceiveRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryNextSequenceReceiveRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} QueryNextSequenceReceiveRequest - */ - QueryNextSequenceReceiveRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest) - return object; - let message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryNextSequenceReceiveRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @static - * @param {ibc.core.channel.v1.QueryNextSequenceReceiveRequest} message QueryNextSequenceReceiveRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryNextSequenceReceiveRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryNextSequenceReceiveRequest to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveRequest - * @instance - * @returns {Object.} JSON object - */ - QueryNextSequenceReceiveRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryNextSequenceReceiveRequest; - })(); - - v1.QueryNextSequenceReceiveResponse = (function() { - - /** - * Properties of a QueryNextSequenceReceiveResponse. - * @memberof ibc.core.channel.v1 - * @interface IQueryNextSequenceReceiveResponse - * @property {Long|null} [next_sequence_receive] QueryNextSequenceReceiveResponse next_sequence_receive - * @property {Uint8Array|null} [proof] QueryNextSequenceReceiveResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryNextSequenceReceiveResponse proof_height - */ - - /** - * Constructs a new QueryNextSequenceReceiveResponse. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a QueryNextSequenceReceiveResponse. - * @implements IQueryNextSequenceReceiveResponse - * @constructor - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse=} [properties] Properties to set - */ - function QueryNextSequenceReceiveResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryNextSequenceReceiveResponse next_sequence_receive. - * @member {Long} next_sequence_receive - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - */ - QueryNextSequenceReceiveResponse.prototype.next_sequence_receive = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryNextSequenceReceiveResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - */ - QueryNextSequenceReceiveResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryNextSequenceReceiveResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - */ - QueryNextSequenceReceiveResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryNextSequenceReceiveResponse message. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.next_sequence_receive != null && Object.hasOwnProperty.call(message, "next_sequence_receive")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.next_sequence_receive); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryNextSequenceReceiveResponse message, length delimited. Does not implicitly {@link ibc.core.channel.v1.QueryNextSequenceReceiveResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {ibc.core.channel.v1.IQueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryNextSequenceReceiveResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_sequence_receive = reader.uint64(); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryNextSequenceReceiveResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryNextSequenceReceiveResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryNextSequenceReceiveResponse message. - * @function verify - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryNextSequenceReceiveResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.next_sequence_receive != null && message.hasOwnProperty("next_sequence_receive")) - if (!$util.isInteger(message.next_sequence_receive) && !(message.next_sequence_receive && $util.isInteger(message.next_sequence_receive.low) && $util.isInteger(message.next_sequence_receive.high))) - return "next_sequence_receive: integer|Long expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryNextSequenceReceiveResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} QueryNextSequenceReceiveResponse - */ - QueryNextSequenceReceiveResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse) - return object; - let message = new $root.ibc.core.channel.v1.QueryNextSequenceReceiveResponse(); - if (object.next_sequence_receive != null) - if ($util.Long) - (message.next_sequence_receive = $util.Long.fromValue(object.next_sequence_receive)).unsigned = true; - else if (typeof object.next_sequence_receive === "string") - message.next_sequence_receive = parseInt(object.next_sequence_receive, 10); - else if (typeof object.next_sequence_receive === "number") - message.next_sequence_receive = object.next_sequence_receive; - else if (typeof object.next_sequence_receive === "object") - message.next_sequence_receive = new $util.LongBits(object.next_sequence_receive.low >>> 0, object.next_sequence_receive.high >>> 0).toNumber(true); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.channel.v1.QueryNextSequenceReceiveResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryNextSequenceReceiveResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @static - * @param {ibc.core.channel.v1.QueryNextSequenceReceiveResponse} message QueryNextSequenceReceiveResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryNextSequenceReceiveResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_sequence_receive = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_sequence_receive = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.next_sequence_receive != null && message.hasOwnProperty("next_sequence_receive")) - if (typeof message.next_sequence_receive === "number") - object.next_sequence_receive = options.longs === String ? String(message.next_sequence_receive) : message.next_sequence_receive; - else - object.next_sequence_receive = options.longs === String ? $util.Long.prototype.toString.call(message.next_sequence_receive) : options.longs === Number ? new $util.LongBits(message.next_sequence_receive.low >>> 0, message.next_sequence_receive.high >>> 0).toNumber(true) : message.next_sequence_receive; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryNextSequenceReceiveResponse to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.QueryNextSequenceReceiveResponse - * @instance - * @returns {Object.} JSON object - */ - QueryNextSequenceReceiveResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryNextSequenceReceiveResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.channel.v1 - * @interface IGenesisState - * @property {Array.|null} [channels] GenesisState channels - * @property {Array.|null} [acknowledgements] GenesisState acknowledgements - * @property {Array.|null} [commitments] GenesisState commitments - * @property {Array.|null} [receipts] GenesisState receipts - * @property {Array.|null} [send_sequences] GenesisState send_sequences - * @property {Array.|null} [recv_sequences] GenesisState recv_sequences - * @property {Array.|null} [ack_sequences] GenesisState ack_sequences - * @property {Long|null} [next_channel_sequence] GenesisState next_channel_sequence - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.channel.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.channels = []; - this.acknowledgements = []; - this.commitments = []; - this.receipts = []; - this.send_sequences = []; - this.recv_sequences = []; - this.ack_sequences = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState channels. - * @member {Array.} channels - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.channels = $util.emptyArray; - - /** - * GenesisState acknowledgements. - * @member {Array.} acknowledgements - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.acknowledgements = $util.emptyArray; - - /** - * GenesisState commitments. - * @member {Array.} commitments - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.commitments = $util.emptyArray; - - /** - * GenesisState receipts. - * @member {Array.} receipts - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.receipts = $util.emptyArray; - - /** - * GenesisState send_sequences. - * @member {Array.} send_sequences - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.send_sequences = $util.emptyArray; - - /** - * GenesisState recv_sequences. - * @member {Array.} recv_sequences - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.recv_sequences = $util.emptyArray; - - /** - * GenesisState ack_sequences. - * @member {Array.} ack_sequences - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.ack_sequences = $util.emptyArray; - - /** - * GenesisState next_channel_sequence. - * @member {Long} next_channel_sequence - * @memberof ibc.core.channel.v1.GenesisState - * @instance - */ - GenesisState.prototype.next_channel_sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {ibc.core.channel.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channels != null && message.channels.length) - for (let i = 0; i < message.channels.length; ++i) - $root.ibc.core.channel.v1.IdentifiedChannel.encode(message.channels[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.acknowledgements != null && message.acknowledgements.length) - for (let i = 0; i < message.acknowledgements.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.acknowledgements[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.commitments != null && message.commitments.length) - for (let i = 0; i < message.commitments.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.commitments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.receipts != null && message.receipts.length) - for (let i = 0; i < message.receipts.length; ++i) - $root.ibc.core.channel.v1.PacketState.encode(message.receipts[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.send_sequences != null && message.send_sequences.length) - for (let i = 0; i < message.send_sequences.length; ++i) - $root.ibc.core.channel.v1.PacketSequence.encode(message.send_sequences[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.recv_sequences != null && message.recv_sequences.length) - for (let i = 0; i < message.recv_sequences.length; ++i) - $root.ibc.core.channel.v1.PacketSequence.encode(message.recv_sequences[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.ack_sequences != null && message.ack_sequences.length) - for (let i = 0; i < message.ack_sequences.length; ++i) - $root.ibc.core.channel.v1.PacketSequence.encode(message.ack_sequences[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.next_channel_sequence != null && Object.hasOwnProperty.call(message, "next_channel_sequence")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.next_channel_sequence); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {ibc.core.channel.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.channels && message.channels.length)) - message.channels = []; - message.channels.push($root.ibc.core.channel.v1.IdentifiedChannel.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.acknowledgements && message.acknowledgements.length)) - message.acknowledgements = []; - message.acknowledgements.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.commitments && message.commitments.length)) - message.commitments = []; - message.commitments.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.receipts && message.receipts.length)) - message.receipts = []; - message.receipts.push($root.ibc.core.channel.v1.PacketState.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.send_sequences && message.send_sequences.length)) - message.send_sequences = []; - message.send_sequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.recv_sequences && message.recv_sequences.length)) - message.recv_sequences = []; - message.recv_sequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.ack_sequences && message.ack_sequences.length)) - message.ack_sequences = []; - message.ack_sequences.push($root.ibc.core.channel.v1.PacketSequence.decode(reader, reader.uint32())); - break; - case 8: - message.next_channel_sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channels != null && message.hasOwnProperty("channels")) { - if (!Array.isArray(message.channels)) - return "channels: array expected"; - for (let i = 0; i < message.channels.length; ++i) { - let error = $root.ibc.core.channel.v1.IdentifiedChannel.verify(message.channels[i]); - if (error) - return "channels." + error; - } - } - if (message.acknowledgements != null && message.hasOwnProperty("acknowledgements")) { - if (!Array.isArray(message.acknowledgements)) - return "acknowledgements: array expected"; - for (let i = 0; i < message.acknowledgements.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketState.verify(message.acknowledgements[i]); - if (error) - return "acknowledgements." + error; - } - } - if (message.commitments != null && message.hasOwnProperty("commitments")) { - if (!Array.isArray(message.commitments)) - return "commitments: array expected"; - for (let i = 0; i < message.commitments.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketState.verify(message.commitments[i]); - if (error) - return "commitments." + error; - } - } - if (message.receipts != null && message.hasOwnProperty("receipts")) { - if (!Array.isArray(message.receipts)) - return "receipts: array expected"; - for (let i = 0; i < message.receipts.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketState.verify(message.receipts[i]); - if (error) - return "receipts." + error; - } - } - if (message.send_sequences != null && message.hasOwnProperty("send_sequences")) { - if (!Array.isArray(message.send_sequences)) - return "send_sequences: array expected"; - for (let i = 0; i < message.send_sequences.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketSequence.verify(message.send_sequences[i]); - if (error) - return "send_sequences." + error; - } - } - if (message.recv_sequences != null && message.hasOwnProperty("recv_sequences")) { - if (!Array.isArray(message.recv_sequences)) - return "recv_sequences: array expected"; - for (let i = 0; i < message.recv_sequences.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketSequence.verify(message.recv_sequences[i]); - if (error) - return "recv_sequences." + error; - } - } - if (message.ack_sequences != null && message.hasOwnProperty("ack_sequences")) { - if (!Array.isArray(message.ack_sequences)) - return "ack_sequences: array expected"; - for (let i = 0; i < message.ack_sequences.length; ++i) { - let error = $root.ibc.core.channel.v1.PacketSequence.verify(message.ack_sequences[i]); - if (error) - return "ack_sequences." + error; - } - } - if (message.next_channel_sequence != null && message.hasOwnProperty("next_channel_sequence")) - if (!$util.isInteger(message.next_channel_sequence) && !(message.next_channel_sequence && $util.isInteger(message.next_channel_sequence.low) && $util.isInteger(message.next_channel_sequence.high))) - return "next_channel_sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.GenesisState) - return object; - let message = new $root.ibc.core.channel.v1.GenesisState(); - if (object.channels) { - if (!Array.isArray(object.channels)) - throw TypeError(".ibc.core.channel.v1.GenesisState.channels: array expected"); - message.channels = []; - for (let i = 0; i < object.channels.length; ++i) { - if (typeof object.channels[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.channels: object expected"); - message.channels[i] = $root.ibc.core.channel.v1.IdentifiedChannel.fromObject(object.channels[i]); - } - } - if (object.acknowledgements) { - if (!Array.isArray(object.acknowledgements)) - throw TypeError(".ibc.core.channel.v1.GenesisState.acknowledgements: array expected"); - message.acknowledgements = []; - for (let i = 0; i < object.acknowledgements.length; ++i) { - if (typeof object.acknowledgements[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.acknowledgements: object expected"); - message.acknowledgements[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.acknowledgements[i]); - } - } - if (object.commitments) { - if (!Array.isArray(object.commitments)) - throw TypeError(".ibc.core.channel.v1.GenesisState.commitments: array expected"); - message.commitments = []; - for (let i = 0; i < object.commitments.length; ++i) { - if (typeof object.commitments[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.commitments: object expected"); - message.commitments[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.commitments[i]); - } - } - if (object.receipts) { - if (!Array.isArray(object.receipts)) - throw TypeError(".ibc.core.channel.v1.GenesisState.receipts: array expected"); - message.receipts = []; - for (let i = 0; i < object.receipts.length; ++i) { - if (typeof object.receipts[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.receipts: object expected"); - message.receipts[i] = $root.ibc.core.channel.v1.PacketState.fromObject(object.receipts[i]); - } - } - if (object.send_sequences) { - if (!Array.isArray(object.send_sequences)) - throw TypeError(".ibc.core.channel.v1.GenesisState.send_sequences: array expected"); - message.send_sequences = []; - for (let i = 0; i < object.send_sequences.length; ++i) { - if (typeof object.send_sequences[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.send_sequences: object expected"); - message.send_sequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.send_sequences[i]); - } - } - if (object.recv_sequences) { - if (!Array.isArray(object.recv_sequences)) - throw TypeError(".ibc.core.channel.v1.GenesisState.recv_sequences: array expected"); - message.recv_sequences = []; - for (let i = 0; i < object.recv_sequences.length; ++i) { - if (typeof object.recv_sequences[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.recv_sequences: object expected"); - message.recv_sequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.recv_sequences[i]); - } - } - if (object.ack_sequences) { - if (!Array.isArray(object.ack_sequences)) - throw TypeError(".ibc.core.channel.v1.GenesisState.ack_sequences: array expected"); - message.ack_sequences = []; - for (let i = 0; i < object.ack_sequences.length; ++i) { - if (typeof object.ack_sequences[i] !== "object") - throw TypeError(".ibc.core.channel.v1.GenesisState.ack_sequences: object expected"); - message.ack_sequences[i] = $root.ibc.core.channel.v1.PacketSequence.fromObject(object.ack_sequences[i]); - } - } - if (object.next_channel_sequence != null) - if ($util.Long) - (message.next_channel_sequence = $util.Long.fromValue(object.next_channel_sequence)).unsigned = true; - else if (typeof object.next_channel_sequence === "string") - message.next_channel_sequence = parseInt(object.next_channel_sequence, 10); - else if (typeof object.next_channel_sequence === "number") - message.next_channel_sequence = object.next_channel_sequence; - else if (typeof object.next_channel_sequence === "object") - message.next_channel_sequence = new $util.LongBits(object.next_channel_sequence.low >>> 0, object.next_channel_sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.GenesisState - * @static - * @param {ibc.core.channel.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.channels = []; - object.acknowledgements = []; - object.commitments = []; - object.receipts = []; - object.send_sequences = []; - object.recv_sequences = []; - object.ack_sequences = []; - } - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_channel_sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_channel_sequence = options.longs === String ? "0" : 0; - if (message.channels && message.channels.length) { - object.channels = []; - for (let j = 0; j < message.channels.length; ++j) - object.channels[j] = $root.ibc.core.channel.v1.IdentifiedChannel.toObject(message.channels[j], options); - } - if (message.acknowledgements && message.acknowledgements.length) { - object.acknowledgements = []; - for (let j = 0; j < message.acknowledgements.length; ++j) - object.acknowledgements[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.acknowledgements[j], options); - } - if (message.commitments && message.commitments.length) { - object.commitments = []; - for (let j = 0; j < message.commitments.length; ++j) - object.commitments[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.commitments[j], options); - } - if (message.receipts && message.receipts.length) { - object.receipts = []; - for (let j = 0; j < message.receipts.length; ++j) - object.receipts[j] = $root.ibc.core.channel.v1.PacketState.toObject(message.receipts[j], options); - } - if (message.send_sequences && message.send_sequences.length) { - object.send_sequences = []; - for (let j = 0; j < message.send_sequences.length; ++j) - object.send_sequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.send_sequences[j], options); - } - if (message.recv_sequences && message.recv_sequences.length) { - object.recv_sequences = []; - for (let j = 0; j < message.recv_sequences.length; ++j) - object.recv_sequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.recv_sequences[j], options); - } - if (message.ack_sequences && message.ack_sequences.length) { - object.ack_sequences = []; - for (let j = 0; j < message.ack_sequences.length; ++j) - object.ack_sequences[j] = $root.ibc.core.channel.v1.PacketSequence.toObject(message.ack_sequences[j], options); - } - if (message.next_channel_sequence != null && message.hasOwnProperty("next_channel_sequence")) - if (typeof message.next_channel_sequence === "number") - object.next_channel_sequence = options.longs === String ? String(message.next_channel_sequence) : message.next_channel_sequence; - else - object.next_channel_sequence = options.longs === String ? $util.Long.prototype.toString.call(message.next_channel_sequence) : options.longs === Number ? new $util.LongBits(message.next_channel_sequence.low >>> 0, message.next_channel_sequence.high >>> 0).toNumber(true) : message.next_channel_sequence; - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.PacketSequence = (function() { - - /** - * Properties of a PacketSequence. - * @memberof ibc.core.channel.v1 - * @interface IPacketSequence - * @property {string|null} [port_id] PacketSequence port_id - * @property {string|null} [channel_id] PacketSequence channel_id - * @property {Long|null} [sequence] PacketSequence sequence - */ - - /** - * Constructs a new PacketSequence. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketSequence. - * @implements IPacketSequence - * @constructor - * @param {ibc.core.channel.v1.IPacketSequence=} [properties] Properties to set - */ - function PacketSequence(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketSequence port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - */ - PacketSequence.prototype.port_id = ""; - - /** - * PacketSequence channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - */ - PacketSequence.prototype.channel_id = ""; - - /** - * PacketSequence sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - */ - PacketSequence.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PacketSequence message. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {ibc.core.channel.v1.IPacketSequence} message PacketSequence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketSequence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified PacketSequence message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketSequence.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {ibc.core.channel.v1.IPacketSequence} message PacketSequence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketSequence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketSequence message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketSequence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketSequence(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketSequence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketSequence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketSequence message. - * @function verify - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketSequence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 PacketSequence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketSequence} PacketSequence - */ - PacketSequence.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketSequence) - return object; - let message = new $root.ibc.core.channel.v1.PacketSequence(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 PacketSequence message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketSequence - * @static - * @param {ibc.core.channel.v1.PacketSequence} message PacketSequence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketSequence.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 PacketSequence to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketSequence - * @instance - * @returns {Object.} JSON object - */ - PacketSequence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketSequence; - })(); - - return v1; - })(); - - return channel; - })(); - - core.client = (function() { - - /** - * Namespace client. - * @memberof ibc.core - * @namespace - */ - const client = {}; - - client.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.client - * @namespace - */ - const v1 = {}; - - v1.IdentifiedClientState = (function() { - - /** - * Properties of an IdentifiedClientState. - * @memberof ibc.core.client.v1 - * @interface IIdentifiedClientState - * @property {string|null} [client_id] IdentifiedClientState client_id - * @property {google.protobuf.IAny|null} [client_state] IdentifiedClientState client_state - */ - - /** - * Constructs a new IdentifiedClientState. - * @memberof ibc.core.client.v1 - * @classdesc Represents an IdentifiedClientState. - * @implements IIdentifiedClientState - * @constructor - * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set - */ - function IdentifiedClientState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedClientState client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - */ - IdentifiedClientState.prototype.client_id = ""; - - /** - * IdentifiedClientState client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - */ - IdentifiedClientState.prototype.client_state = null; - - /** - * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedClientState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedClientState message. - * @function verify - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - return null; - }; - - /** - * Creates an IdentifiedClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - */ - IdentifiedClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.IdentifiedClientState) - return object; - let message = new $root.ibc.core.client.v1.IdentifiedClientState(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.IdentifiedClientState.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IdentifiedClientState} message IdentifiedClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_state = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - return object; - }; - - /** - * Converts this IdentifiedClientState to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - * @returns {Object.} JSON object - */ - IdentifiedClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedClientState; - })(); - - v1.ConsensusStateWithHeight = (function() { - - /** - * Properties of a ConsensusStateWithHeight. - * @memberof ibc.core.client.v1 - * @interface IConsensusStateWithHeight - * @property {ibc.core.client.v1.IHeight|null} [height] ConsensusStateWithHeight height - * @property {google.protobuf.IAny|null} [consensus_state] ConsensusStateWithHeight consensus_state - */ - - /** - * Constructs a new ConsensusStateWithHeight. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ConsensusStateWithHeight. - * @implements IConsensusStateWithHeight - * @constructor - * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set - */ - function ConsensusStateWithHeight(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusStateWithHeight height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - */ - ConsensusStateWithHeight.prototype.height = null; - - /** - * ConsensusStateWithHeight consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - */ - ConsensusStateWithHeight.prototype.consensus_state = null; - - /** - * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateWithHeight.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateWithHeight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateWithHeight.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateWithHeight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusStateWithHeight message. - * @function verify - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusStateWithHeight.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - */ - ConsensusStateWithHeight.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ConsensusStateWithHeight) - return object; - let message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.ConsensusStateWithHeight} message ConsensusStateWithHeight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusStateWithHeight.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.height = null; - object.consensus_state = null; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ConsensusStateWithHeight to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - * @returns {Object.} JSON object - */ - ConsensusStateWithHeight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusStateWithHeight; - })(); - - v1.ClientConsensusStates = (function() { - - /** - * Properties of a ClientConsensusStates. - * @memberof ibc.core.client.v1 - * @interface IClientConsensusStates - * @property {string|null} [client_id] ClientConsensusStates client_id - * @property {Array.|null} [consensus_states] ClientConsensusStates consensus_states - */ - - /** - * Constructs a new ClientConsensusStates. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ClientConsensusStates. - * @implements IClientConsensusStates - * @constructor - * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set - */ - function ClientConsensusStates(properties) { - this.consensus_states = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientConsensusStates client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - */ - ClientConsensusStates.prototype.client_id = ""; - - /** - * ClientConsensusStates consensus_states. - * @member {Array.} consensus_states - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - */ - ClientConsensusStates.prototype.consensus_states = $util.emptyArray; - - /** - * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientConsensusStates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.consensus_states != null && message.consensus_states.length) - for (let i = 0; i < message.consensus_states.length; ++i) - $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensus_states[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientConsensusStates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientConsensusStates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientConsensusStates(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.consensus_states && message.consensus_states.length)) - message.consensus_states = []; - message.consensus_states.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientConsensusStates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientConsensusStates message. - * @function verify - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientConsensusStates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.consensus_states != null && message.hasOwnProperty("consensus_states")) { - if (!Array.isArray(message.consensus_states)) - return "consensus_states: array expected"; - for (let i = 0; i < message.consensus_states.length; ++i) { - let error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensus_states[i]); - if (error) - return "consensus_states." + error; - } - } - return null; - }; - - /** - * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - */ - ClientConsensusStates.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ClientConsensusStates) - return object; - let message = new $root.ibc.core.client.v1.ClientConsensusStates(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.consensus_states) { - if (!Array.isArray(object.consensus_states)) - throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensus_states: array expected"); - message.consensus_states = []; - for (let i = 0; i < object.consensus_states.length; ++i) { - if (typeof object.consensus_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensus_states: object expected"); - message.consensus_states[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensus_states[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.ClientConsensusStates} message ClientConsensusStates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientConsensusStates.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.consensus_states = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.consensus_states && message.consensus_states.length) { - object.consensus_states = []; - for (let j = 0; j < message.consensus_states.length; ++j) - object.consensus_states[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensus_states[j], options); - } - return object; - }; - - /** - * Converts this ClientConsensusStates to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - * @returns {Object.} JSON object - */ - ClientConsensusStates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientConsensusStates; - })(); - - v1.ClientUpdateProposal = (function() { - - /** - * Properties of a ClientUpdateProposal. - * @memberof ibc.core.client.v1 - * @interface IClientUpdateProposal - * @property {string|null} [title] ClientUpdateProposal title - * @property {string|null} [description] ClientUpdateProposal description - * @property {string|null} [subject_client_id] ClientUpdateProposal subject_client_id - * @property {string|null} [substitute_client_id] ClientUpdateProposal substitute_client_id - */ - - /** - * Constructs a new ClientUpdateProposal. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ClientUpdateProposal. - * @implements IClientUpdateProposal - * @constructor - * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set - */ - function ClientUpdateProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientUpdateProposal title. - * @member {string} title - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.title = ""; - - /** - * ClientUpdateProposal description. - * @member {string} description - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.description = ""; - - /** - * ClientUpdateProposal subject_client_id. - * @member {string} subject_client_id - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.subject_client_id = ""; - - /** - * ClientUpdateProposal substitute_client_id. - * @member {string} substitute_client_id - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.substitute_client_id = ""; - - /** - * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientUpdateProposal.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.subject_client_id != null && Object.hasOwnProperty.call(message, "subject_client_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subject_client_id); - if (message.substitute_client_id != null && Object.hasOwnProperty.call(message, "substitute_client_id")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.substitute_client_id); - return writer; - }; - - /** - * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientUpdateProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientUpdateProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientUpdateProposal(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.title = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - message.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientUpdateProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientUpdateProposal message. - * @function verify - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientUpdateProposal.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.subject_client_id != null && message.hasOwnProperty("subject_client_id")) - if (!$util.isString(message.subject_client_id)) - return "subject_client_id: string expected"; - if (message.substitute_client_id != null && message.hasOwnProperty("substitute_client_id")) - if (!$util.isString(message.substitute_client_id)) - return "substitute_client_id: string expected"; - return null; - }; - - /** - * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - */ - ClientUpdateProposal.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ClientUpdateProposal) - return object; - let message = new $root.ibc.core.client.v1.ClientUpdateProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.subject_client_id != null) - message.subject_client_id = String(object.subject_client_id); - if (object.substitute_client_id != null) - message.substitute_client_id = String(object.substitute_client_id); - return message; - }; - - /** - * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.ClientUpdateProposal} message ClientUpdateProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientUpdateProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.subject_client_id = ""; - object.substitute_client_id = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.subject_client_id != null && message.hasOwnProperty("subject_client_id")) - object.subject_client_id = message.subject_client_id; - if (message.substitute_client_id != null && message.hasOwnProperty("substitute_client_id")) - object.substitute_client_id = message.substitute_client_id; - return object; - }; - - /** - * Converts this ClientUpdateProposal to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - * @returns {Object.} JSON object - */ - ClientUpdateProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientUpdateProposal; - })(); - - v1.UpgradeProposal = (function() { - - /** - * Properties of an UpgradeProposal. - * @memberof ibc.core.client.v1 - * @interface IUpgradeProposal - * @property {string|null} [title] UpgradeProposal title - * @property {string|null} [description] UpgradeProposal description - * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] UpgradeProposal plan - * @property {google.protobuf.IAny|null} [upgraded_client_state] UpgradeProposal upgraded_client_state - */ - - /** - * Constructs a new UpgradeProposal. - * @memberof ibc.core.client.v1 - * @classdesc Represents an UpgradeProposal. - * @implements IUpgradeProposal - * @constructor - * @param {ibc.core.client.v1.IUpgradeProposal=} [properties] Properties to set - */ - function UpgradeProposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeProposal title. - * @member {string} title - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.title = ""; - - /** - * UpgradeProposal description. - * @member {string} description - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.description = ""; - - /** - * UpgradeProposal plan. - * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.plan = null; - - /** - * UpgradeProposal upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.upgraded_client_state = null; - - /** - * Encodes the specified UpgradeProposal message. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.IUpgradeProposal} message UpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeProposal.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.upgrade.v1beta1.Plan.encode(message.plan, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.IUpgradeProposal} message UpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.UpgradeProposal(); - while (reader.pos < end) { - let 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.upgrade.v1beta1.Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeProposal message. - * @function verify - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeProposal.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")) { - let error = $root.cosmos.upgrade.v1beta1.Plan.verify(message.plan); - if (error) - return "plan." + error; - } - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - let error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates an UpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - */ - UpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.UpgradeProposal) - return object; - let message = new $root.ibc.core.client.v1.UpgradeProposal(); - 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(".ibc.core.client.v1.UpgradeProposal.plan: object expected"); - message.plan = $root.cosmos.upgrade.v1beta1.Plan.fromObject(object.plan); - } - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".ibc.core.client.v1.UpgradeProposal.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from an UpgradeProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.UpgradeProposal} message UpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.plan = null; - object.upgraded_client_state = 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.upgrade.v1beta1.Plan.toObject(message.plan, options); - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this UpgradeProposal to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - UpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpgradeProposal; - })(); - - v1.Height = (function() { - - /** - * Properties of an Height. - * @memberof ibc.core.client.v1 - * @interface IHeight - * @property {Long|null} [revision_number] Height revision_number - * @property {Long|null} [revision_height] Height revision_height - */ - - /** - * Constructs a new Height. - * @memberof ibc.core.client.v1 - * @classdesc Represents an Height. - * @implements IHeight - * @constructor - * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set - */ - function Height(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Height revision_number. - * @member {Long} revision_number - * @memberof ibc.core.client.v1.Height - * @instance - */ - Height.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Height revision_height. - * @member {Long} revision_height - * @memberof ibc.core.client.v1.Height - * @instance - */ - Height.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Height.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Height.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Height message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.Height - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.Height} Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Height.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Height(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = reader.uint64(); - break; - case 2: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Height message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.Height - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.Height} Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Height.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Height message. - * @function verify - * @memberof ibc.core.client.v1.Height - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Height.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates an Height message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.Height - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.Height} Height - */ - Height.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.Height) - return object; - let message = new $root.ibc.core.client.v1.Height(); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an Height message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.Height} message Height - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Height.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this Height to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.Height - * @instance - * @returns {Object.} JSON object - */ - Height.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Height; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.core.client.v1 - * @interface IParams - * @property {Array.|null} [allowed_clients] Params allowed_clients - */ - - /** - * Constructs a new Params. - * @memberof ibc.core.client.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.core.client.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.allowed_clients = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params allowed_clients. - * @member {Array.} allowed_clients - * @memberof ibc.core.client.v1.Params - * @instance - */ - Params.prototype.allowed_clients = $util.emptyArray; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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.allowed_clients != null && message.allowed_clients.length) - for (let i = 0; i < message.allowed_clients.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowed_clients[i]); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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 ibc.core.client.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.allowed_clients && message.allowed_clients.length)) - message.allowed_clients = []; - message.allowed_clients.push(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 ibc.core.client.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.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 ibc.core.client.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.allowed_clients != null && message.hasOwnProperty("allowed_clients")) { - if (!Array.isArray(message.allowed_clients)) - return "allowed_clients: array expected"; - for (let i = 0; i < message.allowed_clients.length; ++i) - if (!$util.isString(message.allowed_clients[i])) - return "allowed_clients: string[] expected"; - } - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.Params) - return object; - let message = new $root.ibc.core.client.v1.Params(); - if (object.allowed_clients) { - if (!Array.isArray(object.allowed_clients)) - throw TypeError(".ibc.core.client.v1.Params.allowed_clients: array expected"); - message.allowed_clients = []; - for (let i = 0; i < object.allowed_clients.length; ++i) - message.allowed_clients[i] = String(object.allowed_clients[i]); - } - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.allowed_clients = []; - if (message.allowed_clients && message.allowed_clients.length) { - object.allowed_clients = []; - for (let j = 0; j < message.allowed_clients.length; ++j) - object.allowed_clients[j] = message.allowed_clients[j]; - } - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.core.client.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#createClient}. - * @memberof ibc.core.client.v1.Msg - * @typedef CreateClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgCreateClientResponse} [response] MsgCreateClientResponse - */ - - /** - * Calls CreateClient. - * @function createClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object - * @param {ibc.core.client.v1.Msg.CreateClientCallback} callback Node-style callback called with the error, if any, and MsgCreateClientResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.createClient = function createClient(request, callback) { - return this.rpcCall(createClient, $root.ibc.core.client.v1.MsgCreateClient, $root.ibc.core.client.v1.MsgCreateClientResponse, request, callback); - }, "name", { value: "CreateClient" }); - - /** - * Calls CreateClient. - * @function createClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgCreateClient} request MsgCreateClient message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#updateClient}. - * @memberof ibc.core.client.v1.Msg - * @typedef UpdateClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgUpdateClientResponse} [response] MsgUpdateClientResponse - */ - - /** - * Calls UpdateClient. - * @function updateClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object - * @param {ibc.core.client.v1.Msg.UpdateClientCallback} callback Node-style callback called with the error, if any, and MsgUpdateClientResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateClient = function updateClient(request, callback) { - return this.rpcCall(updateClient, $root.ibc.core.client.v1.MsgUpdateClient, $root.ibc.core.client.v1.MsgUpdateClientResponse, request, callback); - }, "name", { value: "UpdateClient" }); - - /** - * Calls UpdateClient. - * @function updateClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpdateClient} request MsgUpdateClient message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#upgradeClient}. - * @memberof ibc.core.client.v1.Msg - * @typedef UpgradeClientCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgUpgradeClientResponse} [response] MsgUpgradeClientResponse - */ - - /** - * Calls UpgradeClient. - * @function upgradeClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object - * @param {ibc.core.client.v1.Msg.UpgradeClientCallback} callback Node-style callback called with the error, if any, and MsgUpgradeClientResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.upgradeClient = function upgradeClient(request, callback) { - return this.rpcCall(upgradeClient, $root.ibc.core.client.v1.MsgUpgradeClient, $root.ibc.core.client.v1.MsgUpgradeClientResponse, request, callback); - }, "name", { value: "UpgradeClient" }); - - /** - * Calls UpgradeClient. - * @function upgradeClient - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgUpgradeClient} request MsgUpgradeClient message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Msg#submitMisbehaviour}. - * @memberof ibc.core.client.v1.Msg - * @typedef SubmitMisbehaviourCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} [response] MsgSubmitMisbehaviourResponse - */ - - /** - * Calls SubmitMisbehaviour. - * @function submitMisbehaviour - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object - * @param {ibc.core.client.v1.Msg.SubmitMisbehaviourCallback} callback Node-style callback called with the error, if any, and MsgSubmitMisbehaviourResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitMisbehaviour = function submitMisbehaviour(request, callback) { - return this.rpcCall(submitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviour, $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse, request, callback); - }, "name", { value: "SubmitMisbehaviour" }); - - /** - * Calls SubmitMisbehaviour. - * @function submitMisbehaviour - * @memberof ibc.core.client.v1.Msg - * @instance - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} request MsgSubmitMisbehaviour message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgCreateClient = (function() { - - /** - * Properties of a MsgCreateClient. - * @memberof ibc.core.client.v1 - * @interface IMsgCreateClient - * @property {google.protobuf.IAny|null} [client_state] MsgCreateClient client_state - * @property {google.protobuf.IAny|null} [consensus_state] MsgCreateClient consensus_state - * @property {string|null} [signer] MsgCreateClient signer - */ - - /** - * Constructs a new MsgCreateClient. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgCreateClient. - * @implements IMsgCreateClient - * @constructor - * @param {ibc.core.client.v1.IMsgCreateClient=} [properties] Properties to set - */ - function MsgCreateClient(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgCreateClient client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.client_state = null; - - /** - * MsgCreateClient consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.consensus_state = null; - - /** - * MsgCreateClient signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.signer = ""; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {ibc.core.client.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.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClient.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {ibc.core.client.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 ibc.core.client.v1.MsgCreateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClient(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.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 ibc.core.client.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.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgCreateClient} MsgCreateClient - */ - MsgCreateClient.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgCreateClient) - return object; - let message = new $root.ibc.core.client.v1.MsgCreateClient(); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgCreateClient.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgCreateClient.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgCreateClient - * @static - * @param {ibc.core.client.v1.MsgCreateClient} message MsgCreateClient - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateClient.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_state = null; - object.consensus_state = null; - object.signer = ""; - } - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgCreateClient to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgCreateClient - * @instance - * @returns {Object.} JSON object - */ - MsgCreateClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgCreateClient; - })(); - - v1.MsgCreateClientResponse = (function() { - - /** - * Properties of a MsgCreateClientResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgCreateClientResponse - */ - - /** - * Constructs a new MsgCreateClientResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgCreateClientResponse. - * @implements IMsgCreateClientResponse - * @constructor - * @param {ibc.core.client.v1.IMsgCreateClientResponse=} [properties] Properties to set - */ - function MsgCreateClientResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgCreateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateClientResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgCreateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgCreateClientResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgCreateClientResponse} message MsgCreateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateClientResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgCreateClientResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgCreateClientResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateClientResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgCreateClientResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgCreateClientResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgCreateClientResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgCreateClientResponse} MsgCreateClientResponse - */ - MsgCreateClientResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgCreateClientResponse) - return object; - return new $root.ibc.core.client.v1.MsgCreateClientResponse(); - }; - - /** - * Creates a plain object from a MsgCreateClientResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @static - * @param {ibc.core.client.v1.MsgCreateClientResponse} message MsgCreateClientResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateClientResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgCreateClientResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgCreateClientResponse - * @instance - * @returns {Object.} JSON object - */ - MsgCreateClientResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgCreateClientResponse; - })(); - - v1.MsgUpdateClient = (function() { - - /** - * Properties of a MsgUpdateClient. - * @memberof ibc.core.client.v1 - * @interface IMsgUpdateClient - * @property {string|null} [client_id] MsgUpdateClient client_id - * @property {google.protobuf.IAny|null} [client_message] MsgUpdateClient client_message - * @property {string|null} [signer] MsgUpdateClient signer - */ - - /** - * Constructs a new MsgUpdateClient. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpdateClient. - * @implements IMsgUpdateClient - * @constructor - * @param {ibc.core.client.v1.IMsgUpdateClient=} [properties] Properties to set - */ - function MsgUpdateClient(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateClient client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - */ - MsgUpdateClient.prototype.client_id = ""; - - /** - * MsgUpdateClient client_message. - * @member {google.protobuf.IAny|null|undefined} client_message - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - */ - MsgUpdateClient.prototype.client_message = null; - - /** - * MsgUpdateClient signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - */ - MsgUpdateClient.prototype.signer = ""; - - /** - * Encodes the specified MsgUpdateClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClient.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_message != null && Object.hasOwnProperty.call(message, "client_message")) - $root.google.protobuf.Any.encode(message.client_message, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgUpdateClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClient.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {ibc.core.client.v1.IMsgUpdateClient} message MsgUpdateClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClient.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClient(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_message = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClient.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateClient message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateClient.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_message != null && message.hasOwnProperty("client_message")) { - let error = $root.google.protobuf.Any.verify(message.client_message); - if (error) - return "client_message." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgUpdateClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpdateClient} MsgUpdateClient - */ - MsgUpdateClient.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpdateClient) - return object; - let message = new $root.ibc.core.client.v1.MsgUpdateClient(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_message != null) { - if (typeof object.client_message !== "object") - throw TypeError(".ibc.core.client.v1.MsgUpdateClient.client_message: object expected"); - message.client_message = $root.google.protobuf.Any.fromObject(object.client_message); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgUpdateClient message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpdateClient - * @static - * @param {ibc.core.client.v1.MsgUpdateClient} message MsgUpdateClient - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateClient.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_message = null; - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_message != null && message.hasOwnProperty("client_message")) - object.client_message = $root.google.protobuf.Any.toObject(message.client_message, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgUpdateClient to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpdateClient - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateClient; - })(); - - v1.MsgUpdateClientResponse = (function() { - - /** - * Properties of a MsgUpdateClientResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgUpdateClientResponse - */ - - /** - * Constructs a new MsgUpdateClientResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpdateClientResponse. - * @implements IMsgUpdateClientResponse - * @constructor - * @param {ibc.core.client.v1.IMsgUpdateClientResponse=} [properties] Properties to set - */ - function MsgUpdateClientResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClientResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpdateClientResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpdateClientResponse} message MsgUpdateClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClientResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpdateClientResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateClientResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateClientResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateClientResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateClientResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateClientResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpdateClientResponse} MsgUpdateClientResponse - */ - MsgUpdateClientResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpdateClientResponse) - return object; - return new $root.ibc.core.client.v1.MsgUpdateClientResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateClientResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @static - * @param {ibc.core.client.v1.MsgUpdateClientResponse} message MsgUpdateClientResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateClientResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateClientResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpdateClientResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateClientResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateClientResponse; - })(); - - v1.MsgUpgradeClient = (function() { - - /** - * Properties of a MsgUpgradeClient. - * @memberof ibc.core.client.v1 - * @interface IMsgUpgradeClient - * @property {string|null} [client_id] MsgUpgradeClient client_id - * @property {google.protobuf.IAny|null} [client_state] MsgUpgradeClient client_state - * @property {google.protobuf.IAny|null} [consensus_state] MsgUpgradeClient consensus_state - * @property {Uint8Array|null} [proof_upgrade_client] MsgUpgradeClient proof_upgrade_client - * @property {Uint8Array|null} [proof_upgrade_consensus_state] MsgUpgradeClient proof_upgrade_consensus_state - * @property {string|null} [signer] MsgUpgradeClient signer - */ - - /** - * Constructs a new MsgUpgradeClient. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpgradeClient. - * @implements IMsgUpgradeClient - * @constructor - * @param {ibc.core.client.v1.IMsgUpgradeClient=} [properties] Properties to set - */ - function MsgUpgradeClient(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpgradeClient client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.client_id = ""; - - /** - * MsgUpgradeClient client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.client_state = null; - - /** - * MsgUpgradeClient consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.consensus_state = null; - - /** - * MsgUpgradeClient proof_upgrade_client. - * @member {Uint8Array} proof_upgrade_client - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.proof_upgrade_client = $util.newBuffer([]); - - /** - * MsgUpgradeClient proof_upgrade_consensus_state. - * @member {Uint8Array} proof_upgrade_consensus_state - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.proof_upgrade_consensus_state = $util.newBuffer([]); - - /** - * MsgUpgradeClient signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - */ - MsgUpgradeClient.prototype.signer = ""; - - /** - * Encodes the specified MsgUpgradeClient message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClient.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.proof_upgrade_client != null && Object.hasOwnProperty.call(message, "proof_upgrade_client")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.proof_upgrade_client); - if (message.proof_upgrade_consensus_state != null && Object.hasOwnProperty.call(message, "proof_upgrade_consensus_state")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.proof_upgrade_consensus_state); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgUpgradeClient message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClient.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClient} message MsgUpgradeClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClient.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClient(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 4: - message.proof_upgrade_client = reader.bytes(); - break; - case 5: - message.proof_upgrade_consensus_state = reader.bytes(); - break; - case 6: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpgradeClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClient.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpgradeClient message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpgradeClient.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.proof_upgrade_client != null && message.hasOwnProperty("proof_upgrade_client")) - if (!(message.proof_upgrade_client && typeof message.proof_upgrade_client.length === "number" || $util.isString(message.proof_upgrade_client))) - return "proof_upgrade_client: buffer expected"; - if (message.proof_upgrade_consensus_state != null && message.hasOwnProperty("proof_upgrade_consensus_state")) - if (!(message.proof_upgrade_consensus_state && typeof message.proof_upgrade_consensus_state.length === "number" || $util.isString(message.proof_upgrade_consensus_state))) - return "proof_upgrade_consensus_state: buffer expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgUpgradeClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpgradeClient} MsgUpgradeClient - */ - MsgUpgradeClient.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClient) - return object; - let message = new $root.ibc.core.client.v1.MsgUpgradeClient(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.MsgUpgradeClient.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.proof_upgrade_client != null) - if (typeof object.proof_upgrade_client === "string") - $util.base64.decode(object.proof_upgrade_client, message.proof_upgrade_client = $util.newBuffer($util.base64.length(object.proof_upgrade_client)), 0); - else if (object.proof_upgrade_client.length) - message.proof_upgrade_client = object.proof_upgrade_client; - if (object.proof_upgrade_consensus_state != null) - if (typeof object.proof_upgrade_consensus_state === "string") - $util.base64.decode(object.proof_upgrade_consensus_state, message.proof_upgrade_consensus_state = $util.newBuffer($util.base64.length(object.proof_upgrade_consensus_state)), 0); - else if (object.proof_upgrade_consensus_state.length) - message.proof_upgrade_consensus_state = object.proof_upgrade_consensus_state; - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgUpgradeClient message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @static - * @param {ibc.core.client.v1.MsgUpgradeClient} message MsgUpgradeClient - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpgradeClient.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_state = null; - object.consensus_state = null; - if (options.bytes === String) - object.proof_upgrade_client = ""; - else { - object.proof_upgrade_client = []; - if (options.bytes !== Array) - object.proof_upgrade_client = $util.newBuffer(object.proof_upgrade_client); - } - if (options.bytes === String) - object.proof_upgrade_consensus_state = ""; - else { - object.proof_upgrade_consensus_state = []; - if (options.bytes !== Array) - object.proof_upgrade_consensus_state = $util.newBuffer(object.proof_upgrade_consensus_state); - } - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.proof_upgrade_client != null && message.hasOwnProperty("proof_upgrade_client")) - object.proof_upgrade_client = options.bytes === String ? $util.base64.encode(message.proof_upgrade_client, 0, message.proof_upgrade_client.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_upgrade_client) : message.proof_upgrade_client; - if (message.proof_upgrade_consensus_state != null && message.hasOwnProperty("proof_upgrade_consensus_state")) - object.proof_upgrade_consensus_state = options.bytes === String ? $util.base64.encode(message.proof_upgrade_consensus_state, 0, message.proof_upgrade_consensus_state.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_upgrade_consensus_state) : message.proof_upgrade_consensus_state; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgUpgradeClient to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpgradeClient - * @instance - * @returns {Object.} JSON object - */ - MsgUpgradeClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpgradeClient; - })(); - - v1.MsgUpgradeClientResponse = (function() { - - /** - * Properties of a MsgUpgradeClientResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgUpgradeClientResponse - */ - - /** - * Constructs a new MsgUpgradeClientResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgUpgradeClientResponse. - * @implements IMsgUpgradeClientResponse - * @constructor - * @param {ibc.core.client.v1.IMsgUpgradeClientResponse=} [properties] Properties to set - */ - function MsgUpgradeClientResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpgradeClientResponse message. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClientResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpgradeClientResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgUpgradeClientResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {ibc.core.client.v1.IMsgUpgradeClientResponse} message MsgUpgradeClientResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpgradeClientResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClientResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpgradeClientResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpgradeClientResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpgradeClientResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpgradeClientResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpgradeClientResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgUpgradeClientResponse} MsgUpgradeClientResponse - */ - MsgUpgradeClientResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgUpgradeClientResponse) - return object; - return new $root.ibc.core.client.v1.MsgUpgradeClientResponse(); - }; - - /** - * Creates a plain object from a MsgUpgradeClientResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @static - * @param {ibc.core.client.v1.MsgUpgradeClientResponse} message MsgUpgradeClientResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpgradeClientResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpgradeClientResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgUpgradeClientResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpgradeClientResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpgradeClientResponse; - })(); - - v1.MsgSubmitMisbehaviour = (function() { - - /** - * Properties of a MsgSubmitMisbehaviour. - * @memberof ibc.core.client.v1 - * @interface IMsgSubmitMisbehaviour - * @property {string|null} [client_id] MsgSubmitMisbehaviour client_id - * @property {google.protobuf.IAny|null} [misbehaviour] MsgSubmitMisbehaviour misbehaviour - * @property {string|null} [signer] MsgSubmitMisbehaviour signer - */ - - /** - * Constructs a new MsgSubmitMisbehaviour. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgSubmitMisbehaviour. - * @implements IMsgSubmitMisbehaviour - * @constructor - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour=} [properties] Properties to set - */ - function MsgSubmitMisbehaviour(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitMisbehaviour client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - */ - MsgSubmitMisbehaviour.prototype.client_id = ""; - - /** - * MsgSubmitMisbehaviour misbehaviour. - * @member {google.protobuf.IAny|null|undefined} misbehaviour - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - */ - MsgSubmitMisbehaviour.prototype.misbehaviour = null; - - /** - * MsgSubmitMisbehaviour signer. - * @member {string} signer - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - */ - MsgSubmitMisbehaviour.prototype.signer = ""; - - /** - * Encodes the specified MsgSubmitMisbehaviour message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviour.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.misbehaviour != null && Object.hasOwnProperty.call(message, "misbehaviour")) - $root.google.protobuf.Any.encode(message.misbehaviour, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitMisbehaviour message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviour} message MsgSubmitMisbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.misbehaviour = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitMisbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitMisbehaviour message. - * @function verify - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitMisbehaviour.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) { - let error = $root.google.protobuf.Any.verify(message.misbehaviour); - if (error) - return "misbehaviour." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitMisbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviour} MsgSubmitMisbehaviour - */ - MsgSubmitMisbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviour) - return object; - let message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviour(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.misbehaviour != null) { - if (typeof object.misbehaviour !== "object") - throw TypeError(".ibc.core.client.v1.MsgSubmitMisbehaviour.misbehaviour: object expected"); - message.misbehaviour = $root.google.protobuf.Any.fromObject(object.misbehaviour); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitMisbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @static - * @param {ibc.core.client.v1.MsgSubmitMisbehaviour} message MsgSubmitMisbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitMisbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.misbehaviour = null; - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.misbehaviour != null && message.hasOwnProperty("misbehaviour")) - object.misbehaviour = $root.google.protobuf.Any.toObject(message.misbehaviour, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgSubmitMisbehaviour to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviour - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitMisbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitMisbehaviour; - })(); - - v1.MsgSubmitMisbehaviourResponse = (function() { - - /** - * Properties of a MsgSubmitMisbehaviourResponse. - * @memberof ibc.core.client.v1 - * @interface IMsgSubmitMisbehaviourResponse - */ - - /** - * Constructs a new MsgSubmitMisbehaviourResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a MsgSubmitMisbehaviourResponse. - * @implements IMsgSubmitMisbehaviourResponse - * @constructor - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse=} [properties] Properties to set - */ - function MsgSubmitMisbehaviourResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviourResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgSubmitMisbehaviourResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.MsgSubmitMisbehaviourResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {ibc.core.client.v1.IMsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitMisbehaviourResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviourResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitMisbehaviourResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitMisbehaviourResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitMisbehaviourResponse message. - * @function verify - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitMisbehaviourResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgSubmitMisbehaviourResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} MsgSubmitMisbehaviourResponse - */ - MsgSubmitMisbehaviourResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse) - return object; - return new $root.ibc.core.client.v1.MsgSubmitMisbehaviourResponse(); - }; - - /** - * Creates a plain object from a MsgSubmitMisbehaviourResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @static - * @param {ibc.core.client.v1.MsgSubmitMisbehaviourResponse} message MsgSubmitMisbehaviourResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitMisbehaviourResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgSubmitMisbehaviourResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.MsgSubmitMisbehaviourResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitMisbehaviourResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitMisbehaviourResponse; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.core.client.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; - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientState}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientStateResponse} [response] QueryClientStateResponse - */ - - /** - * Calls ClientState. - * @function clientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientStateCallback} callback Node-style callback called with the error, if any, and QueryClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientState = function clientState(request, callback) { - return this.rpcCall(clientState, $root.ibc.core.client.v1.QueryClientStateRequest, $root.ibc.core.client.v1.QueryClientStateResponse, request, callback); - }, "name", { value: "ClientState" }); - - /** - * Calls ClientState. - * @function clientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStateRequest} request QueryClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientStates}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientStatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientStatesResponse} [response] QueryClientStatesResponse - */ - - /** - * Calls ClientStates. - * @function clientStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientStatesCallback} callback Node-style callback called with the error, if any, and QueryClientStatesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientStates = function clientStates(request, callback) { - return this.rpcCall(clientStates, $root.ibc.core.client.v1.QueryClientStatesRequest, $root.ibc.core.client.v1.QueryClientStatesResponse, request, callback); - }, "name", { value: "ClientStates" }); - - /** - * Calls ClientStates. - * @function clientStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatesRequest} request QueryClientStatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusState}. - * @memberof ibc.core.client.v1.Query - * @typedef ConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryConsensusStateResponse} [response] QueryConsensusStateResponse - */ - - /** - * Calls ConsensusState. - * @function consensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object - * @param {ibc.core.client.v1.Query.ConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.consensusState = function consensusState(request, callback) { - return this.rpcCall(consensusState, $root.ibc.core.client.v1.QueryConsensusStateRequest, $root.ibc.core.client.v1.QueryConsensusStateResponse, request, callback); - }, "name", { value: "ConsensusState" }); - - /** - * Calls ConsensusState. - * @function consensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} request QueryConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusStates}. - * @memberof ibc.core.client.v1.Query - * @typedef ConsensusStatesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryConsensusStatesResponse} [response] QueryConsensusStatesResponse - */ - - /** - * Calls ConsensusStates. - * @function consensusStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object - * @param {ibc.core.client.v1.Query.ConsensusStatesCallback} callback Node-style callback called with the error, if any, and QueryConsensusStatesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.consensusStates = function consensusStates(request, callback) { - return this.rpcCall(consensusStates, $root.ibc.core.client.v1.QueryConsensusStatesRequest, $root.ibc.core.client.v1.QueryConsensusStatesResponse, request, callback); - }, "name", { value: "ConsensusStates" }); - - /** - * Calls ConsensusStates. - * @function consensusStates - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} request QueryConsensusStatesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#consensusStateHeights}. - * @memberof ibc.core.client.v1.Query - * @typedef ConsensusStateHeightsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryConsensusStateHeightsResponse} [response] QueryConsensusStateHeightsResponse - */ - - /** - * Calls ConsensusStateHeights. - * @function consensusStateHeights - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} request QueryConsensusStateHeightsRequest message or plain object - * @param {ibc.core.client.v1.Query.ConsensusStateHeightsCallback} callback Node-style callback called with the error, if any, and QueryConsensusStateHeightsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.consensusStateHeights = function consensusStateHeights(request, callback) { - return this.rpcCall(consensusStateHeights, $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest, $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse, request, callback); - }, "name", { value: "ConsensusStateHeights" }); - - /** - * Calls ConsensusStateHeights. - * @function consensusStateHeights - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} request QueryConsensusStateHeightsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientStatus}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientStatusCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientStatusResponse} [response] QueryClientStatusResponse - */ - - /** - * Calls ClientStatus. - * @function clientStatus - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatusRequest} request QueryClientStatusRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientStatusCallback} callback Node-style callback called with the error, if any, and QueryClientStatusResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientStatus = function clientStatus(request, callback) { - return this.rpcCall(clientStatus, $root.ibc.core.client.v1.QueryClientStatusRequest, $root.ibc.core.client.v1.QueryClientStatusResponse, request, callback); - }, "name", { value: "ClientStatus" }); - - /** - * Calls ClientStatus. - * @function clientStatus - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientStatusRequest} request QueryClientStatusRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#clientParams}. - * @memberof ibc.core.client.v1.Query - * @typedef ClientParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryClientParamsResponse} [response] QueryClientParamsResponse - */ - - /** - * Calls ClientParams. - * @function clientParams - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object - * @param {ibc.core.client.v1.Query.ClientParamsCallback} callback Node-style callback called with the error, if any, and QueryClientParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientParams = function clientParams(request, callback) { - return this.rpcCall(clientParams, $root.ibc.core.client.v1.QueryClientParamsRequest, $root.ibc.core.client.v1.QueryClientParamsResponse, request, callback); - }, "name", { value: "ClientParams" }); - - /** - * Calls ClientParams. - * @function clientParams - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryClientParamsRequest} request QueryClientParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#upgradedClientState}. - * @memberof ibc.core.client.v1.Query - * @typedef UpgradedClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryUpgradedClientStateResponse} [response] QueryUpgradedClientStateResponse - */ - - /** - * Calls UpgradedClientState. - * @function upgradedClientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} request QueryUpgradedClientStateRequest message or plain object - * @param {ibc.core.client.v1.Query.UpgradedClientStateCallback} callback Node-style callback called with the error, if any, and QueryUpgradedClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.upgradedClientState = function upgradedClientState(request, callback) { - return this.rpcCall(upgradedClientState, $root.ibc.core.client.v1.QueryUpgradedClientStateRequest, $root.ibc.core.client.v1.QueryUpgradedClientStateResponse, request, callback); - }, "name", { value: "UpgradedClientState" }); - - /** - * Calls UpgradedClientState. - * @function upgradedClientState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} request QueryUpgradedClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.client.v1.Query#upgradedConsensusState}. - * @memberof ibc.core.client.v1.Query - * @typedef UpgradedConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} [response] QueryUpgradedConsensusStateResponse - */ - - /** - * Calls UpgradedConsensusState. - * @function upgradedConsensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} request QueryUpgradedConsensusStateRequest message or plain object - * @param {ibc.core.client.v1.Query.UpgradedConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryUpgradedConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.upgradedConsensusState = function upgradedConsensusState(request, callback) { - return this.rpcCall(upgradedConsensusState, $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest, $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse, request, callback); - }, "name", { value: "UpgradedConsensusState" }); - - /** - * Calls UpgradedConsensusState. - * @function upgradedConsensusState - * @memberof ibc.core.client.v1.Query - * @instance - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} request QueryUpgradedConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryClientStateRequest = (function() { - - /** - * Properties of a QueryClientStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStateRequest - * @property {string|null} [client_id] QueryClientStateRequest client_id - */ - - /** - * Constructs a new QueryClientStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStateRequest. - * @implements IQueryClientStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientStateRequest=} [properties] Properties to set - */ - function QueryClientStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStateRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @instance - */ - QueryClientStateRequest.prototype.client_id = ""; - - /** - * Encodes the specified QueryClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - return writer; - }; - - /** - * Encodes the specified QueryClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStateRequest} message QueryClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - return null; - }; - - /** - * Creates a QueryClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStateRequest} QueryClientStateRequest - */ - QueryClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStateRequest) - return object; - let message = new $root.ibc.core.client.v1.QueryClientStateRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - return message; - }; - - /** - * Creates a plain object from a QueryClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @static - * @param {ibc.core.client.v1.QueryClientStateRequest} message QueryClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - return object; - }; - - /** - * Converts this QueryClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStateRequest; - })(); - - v1.QueryClientStateResponse = (function() { - - /** - * Properties of a QueryClientStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStateResponse - * @property {google.protobuf.IAny|null} [client_state] QueryClientStateResponse client_state - * @property {Uint8Array|null} [proof] QueryClientStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryClientStateResponse proof_height - */ - - /** - * Constructs a new QueryClientStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStateResponse. - * @implements IQueryClientStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientStateResponse=} [properties] Properties to set - */ - function QueryClientStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStateResponse client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - */ - QueryClientStateResponse.prototype.client_state = null; - - /** - * QueryClientStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - */ - QueryClientStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryClientStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - */ - QueryClientStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStateResponse} message QueryClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStateResponse} QueryClientStateResponse - */ - QueryClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStateResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryClientStateResponse(); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @static - * @param {ibc.core.client.v1.QueryClientStateResponse} message QueryClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStateResponse; - })(); - - v1.QueryClientStatesRequest = (function() { - - /** - * Properties of a QueryClientStatesRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatesRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryClientStatesRequest pagination - */ - - /** - * Constructs a new QueryClientStatesRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatesRequest. - * @implements IQueryClientStatesRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatesRequest=} [properties] Properties to set - */ - function QueryClientStatesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @instance - */ - QueryClientStatesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryClientStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatesRequest} message QueryClientStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatesRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryClientStatesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatesRequest} QueryClientStatesRequest - */ - QueryClientStatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatesRequest) - return object; - let message = new $root.ibc.core.client.v1.QueryClientStatesRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStatesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientStatesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @static - * @param {ibc.core.client.v1.QueryClientStatesRequest} message QueryClientStatesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryClientStatesRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatesRequest; - })(); - - v1.QueryClientStatesResponse = (function() { - - /** - * Properties of a QueryClientStatesResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatesResponse - * @property {Array.|null} [client_states] QueryClientStatesResponse client_states - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryClientStatesResponse pagination - */ - - /** - * Constructs a new QueryClientStatesResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatesResponse. - * @implements IQueryClientStatesResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatesResponse=} [properties] Properties to set - */ - function QueryClientStatesResponse(properties) { - this.client_states = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatesResponse client_states. - * @member {Array.} client_states - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @instance - */ - QueryClientStatesResponse.prototype.client_states = $util.emptyArray; - - /** - * QueryClientStatesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @instance - */ - QueryClientStatesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryClientStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_states != null && message.client_states.length) - for (let i = 0; i < message.client_states.length; ++i) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.client_states[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatesResponse} message QueryClientStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.client_states && message.client_states.length)) - message.client_states = []; - message.client_states.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatesResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_states != null && message.hasOwnProperty("client_states")) { - if (!Array.isArray(message.client_states)) - return "client_states: array expected"; - for (let i = 0; i < message.client_states.length; ++i) { - let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.client_states[i]); - if (error) - return "client_states." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryClientStatesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatesResponse} QueryClientStatesResponse - */ - QueryClientStatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatesResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryClientStatesResponse(); - if (object.client_states) { - if (!Array.isArray(object.client_states)) - throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.client_states: array expected"); - message.client_states = []; - for (let i = 0; i < object.client_states.length; ++i) { - if (typeof object.client_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.client_states: object expected"); - message.client_states[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.client_states[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientStatesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientStatesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @static - * @param {ibc.core.client.v1.QueryClientStatesResponse} message QueryClientStatesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.client_states = []; - if (options.defaults) - object.pagination = null; - if (message.client_states && message.client_states.length) { - object.client_states = []; - for (let j = 0; j < message.client_states.length; ++j) - object.client_states[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.client_states[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryClientStatesResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatesResponse; - })(); - - v1.QueryConsensusStateRequest = (function() { - - /** - * Properties of a QueryConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateRequest - * @property {string|null} [client_id] QueryConsensusStateRequest client_id - * @property {Long|null} [revision_number] QueryConsensusStateRequest revision_number - * @property {Long|null} [revision_height] QueryConsensusStateRequest revision_height - * @property {boolean|null} [latest_height] QueryConsensusStateRequest latest_height - */ - - /** - * Constructs a new QueryConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateRequest. - * @implements IQueryConsensusStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateRequest=} [properties] Properties to set - */ - function QueryConsensusStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.client_id = ""; - - /** - * QueryConsensusStateRequest revision_number. - * @member {Long} revision_number - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryConsensusStateRequest revision_height. - * @member {Long} revision_height - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryConsensusStateRequest latest_height. - * @member {boolean} latest_height - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - */ - QueryConsensusStateRequest.prototype.latest_height = false; - - /** - * Encodes the specified QueryConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revision_height); - if (message.latest_height != null && Object.hasOwnProperty.call(message, "latest_height")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.latest_height); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateRequest} message QueryConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.revision_number = reader.uint64(); - break; - case 3: - message.revision_height = reader.uint64(); - break; - case 4: - message.latest_height = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - if (typeof message.latest_height !== "boolean") - return "latest_height: boolean expected"; - return null; - }; - - /** - * Creates a QueryConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateRequest} QueryConsensusStateRequest - */ - QueryConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateRequest) - return object; - let message = new $root.ibc.core.client.v1.QueryConsensusStateRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - if (object.latest_height != null) - message.latest_height = Boolean(object.latest_height); - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @static - * @param {ibc.core.client.v1.QueryConsensusStateRequest} message QueryConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - object.latest_height = false; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - object.latest_height = message.latest_height; - return object; - }; - - /** - * Converts this QueryConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateRequest; - })(); - - v1.QueryConsensusStateResponse = (function() { - - /** - * Properties of a QueryConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateResponse - * @property {google.protobuf.IAny|null} [consensus_state] QueryConsensusStateResponse consensus_state - * @property {Uint8Array|null} [proof] QueryConsensusStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConsensusStateResponse proof_height - */ - - /** - * Constructs a new QueryConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateResponse. - * @implements IQueryConsensusStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateResponse=} [properties] Properties to set - */ - function QueryConsensusStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateResponse consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - */ - QueryConsensusStateResponse.prototype.consensus_state = null; - - /** - * QueryConsensusStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - */ - QueryConsensusStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConsensusStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - */ - QueryConsensusStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateResponse} message QueryConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateResponse} QueryConsensusStateResponse - */ - QueryConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryConsensusStateResponse(); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @static - * @param {ibc.core.client.v1.QueryConsensusStateResponse} message QueryConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.consensus_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateResponse; - })(); - - v1.QueryConsensusStatesRequest = (function() { - - /** - * Properties of a QueryConsensusStatesRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStatesRequest - * @property {string|null} [client_id] QueryConsensusStatesRequest client_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStatesRequest pagination - */ - - /** - * Constructs a new QueryConsensusStatesRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStatesRequest. - * @implements IQueryConsensusStatesRequest - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest=} [properties] Properties to set - */ - function QueryConsensusStatesRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStatesRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @instance - */ - QueryConsensusStatesRequest.prototype.client_id = ""; - - /** - * QueryConsensusStatesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @instance - */ - QueryConsensusStatesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStatesRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStatesRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesRequest} message QueryConsensusStatesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStatesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStatesRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStatesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStatesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStatesRequest} QueryConsensusStatesRequest - */ - QueryConsensusStatesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesRequest) - return object; - let message = new $root.ibc.core.client.v1.QueryConsensusStatesRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStatesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @static - * @param {ibc.core.client.v1.QueryConsensusStatesRequest} message QueryConsensusStatesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStatesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.pagination = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStatesRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStatesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStatesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStatesRequest; - })(); - - v1.QueryConsensusStatesResponse = (function() { - - /** - * Properties of a QueryConsensusStatesResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStatesResponse - * @property {Array.|null} [consensus_states] QueryConsensusStatesResponse consensus_states - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStatesResponse pagination - */ - - /** - * Constructs a new QueryConsensusStatesResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStatesResponse. - * @implements IQueryConsensusStatesResponse - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStatesResponse=} [properties] Properties to set - */ - function QueryConsensusStatesResponse(properties) { - this.consensus_states = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStatesResponse consensus_states. - * @member {Array.} consensus_states - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @instance - */ - QueryConsensusStatesResponse.prototype.consensus_states = $util.emptyArray; - - /** - * QueryConsensusStatesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @instance - */ - QueryConsensusStatesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStatesResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_states != null && message.consensus_states.length) - for (let i = 0; i < message.consensus_states.length; ++i) - $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensus_states[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStatesResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStatesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStatesResponse} message QueryConsensusStatesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStatesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.consensus_states && message.consensus_states.length)) - message.consensus_states = []; - message.consensus_states.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStatesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStatesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStatesResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStatesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_states != null && message.hasOwnProperty("consensus_states")) { - if (!Array.isArray(message.consensus_states)) - return "consensus_states: array expected"; - for (let i = 0; i < message.consensus_states.length; ++i) { - let error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensus_states[i]); - if (error) - return "consensus_states." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStatesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStatesResponse} QueryConsensusStatesResponse - */ - QueryConsensusStatesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStatesResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryConsensusStatesResponse(); - if (object.consensus_states) { - if (!Array.isArray(object.consensus_states)) - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensus_states: array expected"); - message.consensus_states = []; - for (let i = 0; i < object.consensus_states.length; ++i) { - if (typeof object.consensus_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.consensus_states: object expected"); - message.consensus_states[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensus_states[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStatesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStatesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @static - * @param {ibc.core.client.v1.QueryConsensusStatesResponse} message QueryConsensusStatesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStatesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.consensus_states = []; - if (options.defaults) - object.pagination = null; - if (message.consensus_states && message.consensus_states.length) { - object.consensus_states = []; - for (let j = 0; j < message.consensus_states.length; ++j) - object.consensus_states[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensus_states[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStatesResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStatesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStatesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStatesResponse; - })(); - - v1.QueryConsensusStateHeightsRequest = (function() { - - /** - * Properties of a QueryConsensusStateHeightsRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateHeightsRequest - * @property {string|null} [client_id] QueryConsensusStateHeightsRequest client_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConsensusStateHeightsRequest pagination - */ - - /** - * Constructs a new QueryConsensusStateHeightsRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateHeightsRequest. - * @implements IQueryConsensusStateHeightsRequest - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest=} [properties] Properties to set - */ - function QueryConsensusStateHeightsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateHeightsRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @instance - */ - QueryConsensusStateHeightsRequest.prototype.client_id = ""; - - /** - * QueryConsensusStateHeightsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @instance - */ - QueryConsensusStateHeightsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStateHeightsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} message QueryConsensusStateHeightsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateHeightsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsRequest} message QueryConsensusStateHeightsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateHeightsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsRequest} QueryConsensusStateHeightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateHeightsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsRequest} QueryConsensusStateHeightsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateHeightsRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateHeightsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStateHeightsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsRequest} QueryConsensusStateHeightsRequest - */ - QueryConsensusStateHeightsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest) - return object; - let message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateHeightsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @static - * @param {ibc.core.client.v1.QueryConsensusStateHeightsRequest} message QueryConsensusStateHeightsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateHeightsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.pagination = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStateHeightsRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateHeightsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateHeightsRequest; - })(); - - v1.QueryConsensusStateHeightsResponse = (function() { - - /** - * Properties of a QueryConsensusStateHeightsResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryConsensusStateHeightsResponse - * @property {Array.|null} [consensus_state_heights] QueryConsensusStateHeightsResponse consensus_state_heights - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConsensusStateHeightsResponse pagination - */ - - /** - * Constructs a new QueryConsensusStateHeightsResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryConsensusStateHeightsResponse. - * @implements IQueryConsensusStateHeightsResponse - * @constructor - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsResponse=} [properties] Properties to set - */ - function QueryConsensusStateHeightsResponse(properties) { - this.consensus_state_heights = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConsensusStateHeightsResponse consensus_state_heights. - * @member {Array.} consensus_state_heights - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @instance - */ - QueryConsensusStateHeightsResponse.prototype.consensus_state_heights = $util.emptyArray; - - /** - * QueryConsensusStateHeightsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @instance - */ - QueryConsensusStateHeightsResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryConsensusStateHeightsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsResponse} message QueryConsensusStateHeightsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state_heights != null && message.consensus_state_heights.length) - for (let i = 0; i < message.consensus_state_heights.length; ++i) - $root.ibc.core.client.v1.Height.encode(message.consensus_state_heights[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConsensusStateHeightsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryConsensusStateHeightsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {ibc.core.client.v1.IQueryConsensusStateHeightsResponse} message QueryConsensusStateHeightsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConsensusStateHeightsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConsensusStateHeightsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsResponse} QueryConsensusStateHeightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.consensus_state_heights && message.consensus_state_heights.length)) - message.consensus_state_heights = []; - message.consensus_state_heights.push($root.ibc.core.client.v1.Height.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConsensusStateHeightsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsResponse} QueryConsensusStateHeightsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConsensusStateHeightsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConsensusStateHeightsResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConsensusStateHeightsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state_heights != null && message.hasOwnProperty("consensus_state_heights")) { - if (!Array.isArray(message.consensus_state_heights)) - return "consensus_state_heights: array expected"; - for (let i = 0; i < message.consensus_state_heights.length; ++i) { - let error = $root.ibc.core.client.v1.Height.verify(message.consensus_state_heights[i]); - if (error) - return "consensus_state_heights." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConsensusStateHeightsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryConsensusStateHeightsResponse} QueryConsensusStateHeightsResponse - */ - QueryConsensusStateHeightsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryConsensusStateHeightsResponse(); - if (object.consensus_state_heights) { - if (!Array.isArray(object.consensus_state_heights)) - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsResponse.consensus_state_heights: array expected"); - message.consensus_state_heights = []; - for (let i = 0; i < object.consensus_state_heights.length; ++i) { - if (typeof object.consensus_state_heights[i] !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsResponse.consensus_state_heights: object expected"); - message.consensus_state_heights[i] = $root.ibc.core.client.v1.Height.fromObject(object.consensus_state_heights[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.client.v1.QueryConsensusStateHeightsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConsensusStateHeightsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @static - * @param {ibc.core.client.v1.QueryConsensusStateHeightsResponse} message QueryConsensusStateHeightsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConsensusStateHeightsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.consensus_state_heights = []; - if (options.defaults) - object.pagination = null; - if (message.consensus_state_heights && message.consensus_state_heights.length) { - object.consensus_state_heights = []; - for (let j = 0; j < message.consensus_state_heights.length; ++j) - object.consensus_state_heights[j] = $root.ibc.core.client.v1.Height.toObject(message.consensus_state_heights[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConsensusStateHeightsResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryConsensusStateHeightsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConsensusStateHeightsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConsensusStateHeightsResponse; - })(); - - v1.QueryClientStatusRequest = (function() { - - /** - * Properties of a QueryClientStatusRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatusRequest - * @property {string|null} [client_id] QueryClientStatusRequest client_id - */ - - /** - * Constructs a new QueryClientStatusRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatusRequest. - * @implements IQueryClientStatusRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatusRequest=} [properties] Properties to set - */ - function QueryClientStatusRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatusRequest client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @instance - */ - QueryClientStatusRequest.prototype.client_id = ""; - - /** - * Encodes the specified QueryClientStatusRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatusRequest} message QueryClientStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - return writer; - }; - - /** - * Encodes the specified QueryClientStatusRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {ibc.core.client.v1.IQueryClientStatusRequest} message QueryClientStatusRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatusRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatusRequest} QueryClientStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatusRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatusRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatusRequest} QueryClientStatusRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatusRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatusRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - return null; - }; - - /** - * Creates a QueryClientStatusRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatusRequest} QueryClientStatusRequest - */ - QueryClientStatusRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatusRequest) - return object; - let message = new $root.ibc.core.client.v1.QueryClientStatusRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - return message; - }; - - /** - * Creates a plain object from a QueryClientStatusRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @static - * @param {ibc.core.client.v1.QueryClientStatusRequest} message QueryClientStatusRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatusRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - return object; - }; - - /** - * Converts this QueryClientStatusRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatusRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatusRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatusRequest; - })(); - - v1.QueryClientStatusResponse = (function() { - - /** - * Properties of a QueryClientStatusResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientStatusResponse - * @property {string|null} [status] QueryClientStatusResponse status - */ - - /** - * Constructs a new QueryClientStatusResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientStatusResponse. - * @implements IQueryClientStatusResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientStatusResponse=} [properties] Properties to set - */ - function QueryClientStatusResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientStatusResponse status. - * @member {string} status - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @instance - */ - QueryClientStatusResponse.prototype.status = ""; - - /** - * Encodes the specified QueryClientStatusResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatusResponse} message QueryClientStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.status); - return writer; - }; - - /** - * Encodes the specified QueryClientStatusResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientStatusResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {ibc.core.client.v1.IQueryClientStatusResponse} message QueryClientStatusResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientStatusResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientStatusResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientStatusResponse} QueryClientStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientStatusResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.status = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientStatusResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientStatusResponse} QueryClientStatusResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientStatusResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientStatusResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientStatusResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isString(message.status)) - return "status: string expected"; - return null; - }; - - /** - * Creates a QueryClientStatusResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientStatusResponse} QueryClientStatusResponse - */ - QueryClientStatusResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientStatusResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryClientStatusResponse(); - if (object.status != null) - message.status = String(object.status); - return message; - }; - - /** - * Creates a plain object from a QueryClientStatusResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @static - * @param {ibc.core.client.v1.QueryClientStatusResponse} message QueryClientStatusResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientStatusResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.status = ""; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - return object; - }; - - /** - * Converts this QueryClientStatusResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientStatusResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientStatusResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientStatusResponse; - })(); - - v1.QueryClientParamsRequest = (function() { - - /** - * Properties of a QueryClientParamsRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryClientParamsRequest - */ - - /** - * Constructs a new QueryClientParamsRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientParamsRequest. - * @implements IQueryClientParamsRequest - * @constructor - * @param {ibc.core.client.v1.IQueryClientParamsRequest=} [properties] Properties to set - */ - function QueryClientParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryClientParamsRequest message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryClientParamsRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {ibc.core.client.v1.IQueryClientParamsRequest} message QueryClientParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientParamsRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryClientParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientParamsRequest} QueryClientParamsRequest - */ - QueryClientParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientParamsRequest) - return object; - return new $root.ibc.core.client.v1.QueryClientParamsRequest(); - }; - - /** - * Creates a plain object from a QueryClientParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @static - * @param {ibc.core.client.v1.QueryClientParamsRequest} message QueryClientParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryClientParamsRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientParamsRequest; - })(); - - v1.QueryClientParamsResponse = (function() { - - /** - * Properties of a QueryClientParamsResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryClientParamsResponse - * @property {ibc.core.client.v1.IParams|null} [params] QueryClientParamsResponse params - */ - - /** - * Constructs a new QueryClientParamsResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryClientParamsResponse. - * @implements IQueryClientParamsResponse - * @constructor - * @param {ibc.core.client.v1.IQueryClientParamsResponse=} [properties] Properties to set - */ - function QueryClientParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientParamsResponse params. - * @member {ibc.core.client.v1.IParams|null|undefined} params - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @instance - */ - QueryClientParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryClientParamsResponse message. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientParamsResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryClientParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {ibc.core.client.v1.IQueryClientParamsResponse} message QueryClientParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientParamsResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.core.client.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryClientParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryClientParamsResponse} QueryClientParamsResponse - */ - QueryClientParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryClientParamsResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryClientParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.client.v1.QueryClientParamsResponse.params: object expected"); - message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @static - * @param {ibc.core.client.v1.QueryClientParamsResponse} message QueryClientParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryClientParamsResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryClientParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientParamsResponse; - })(); - - v1.QueryUpgradedClientStateRequest = (function() { - - /** - * Properties of a QueryUpgradedClientStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedClientStateRequest - */ - - /** - * Constructs a new QueryUpgradedClientStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedClientStateRequest. - * @implements IQueryUpgradedClientStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest=} [properties] Properties to set - */ - function QueryUpgradedClientStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryUpgradedClientStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} message QueryUpgradedClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateRequest} message QueryUpgradedClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedClientStateRequest} QueryUpgradedClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedClientStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedClientStateRequest} QueryUpgradedClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedClientStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryUpgradedClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedClientStateRequest} QueryUpgradedClientStateRequest - */ - QueryUpgradedClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedClientStateRequest) - return object; - return new $root.ibc.core.client.v1.QueryUpgradedClientStateRequest(); - }; - - /** - * Creates a plain object from a QueryUpgradedClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @static - * @param {ibc.core.client.v1.QueryUpgradedClientStateRequest} message QueryUpgradedClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedClientStateRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryUpgradedClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedClientStateRequest; - })(); - - v1.QueryUpgradedClientStateResponse = (function() { - - /** - * Properties of a QueryUpgradedClientStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedClientStateResponse - * @property {google.protobuf.IAny|null} [upgraded_client_state] QueryUpgradedClientStateResponse upgraded_client_state - */ - - /** - * Constructs a new QueryUpgradedClientStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedClientStateResponse. - * @implements IQueryUpgradedClientStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedClientStateResponse=} [properties] Properties to set - */ - function QueryUpgradedClientStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUpgradedClientStateResponse upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @instance - */ - QueryUpgradedClientStateResponse.prototype.upgraded_client_state = null; - - /** - * Encodes the specified QueryUpgradedClientStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateResponse} message QueryUpgradedClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedClientStateResponse} message QueryUpgradedClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedClientStateResponse} QueryUpgradedClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedClientStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedClientStateResponse} QueryUpgradedClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedClientStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - let error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates a QueryUpgradedClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedClientStateResponse} QueryUpgradedClientStateResponse - */ - QueryUpgradedClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedClientStateResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryUpgradedClientStateResponse(); - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryUpgradedClientStateResponse.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from a QueryUpgradedClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @static - * @param {ibc.core.client.v1.QueryUpgradedClientStateResponse} message QueryUpgradedClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.upgraded_client_state = null; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this QueryUpgradedClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedClientStateResponse; - })(); - - v1.QueryUpgradedConsensusStateRequest = (function() { - - /** - * Properties of a QueryUpgradedConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedConsensusStateRequest - */ - - /** - * Constructs a new QueryUpgradedConsensusStateRequest. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedConsensusStateRequest. - * @implements IQueryUpgradedConsensusStateRequest - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest=} [properties] Properties to set - */ - function QueryUpgradedConsensusStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryUpgradedConsensusStateRequest message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedConsensusStateRequest message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryUpgradedConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} QueryUpgradedConsensusStateRequest - */ - QueryUpgradedConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest) - return object; - return new $root.ibc.core.client.v1.QueryUpgradedConsensusStateRequest(); - }; - - /** - * Creates a plain object from a QueryUpgradedConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @static - * @param {ibc.core.client.v1.QueryUpgradedConsensusStateRequest} message QueryUpgradedConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedConsensusStateRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryUpgradedConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedConsensusStateRequest; - })(); - - v1.QueryUpgradedConsensusStateResponse = (function() { - - /** - * Properties of a QueryUpgradedConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @interface IQueryUpgradedConsensusStateResponse - * @property {google.protobuf.IAny|null} [upgraded_consensus_state] QueryUpgradedConsensusStateResponse upgraded_consensus_state - */ - - /** - * Constructs a new QueryUpgradedConsensusStateResponse. - * @memberof ibc.core.client.v1 - * @classdesc Represents a QueryUpgradedConsensusStateResponse. - * @implements IQueryUpgradedConsensusStateResponse - * @constructor - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateResponse=} [properties] Properties to set - */ - function QueryUpgradedConsensusStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryUpgradedConsensusStateResponse upgraded_consensus_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_consensus_state - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @instance - */ - QueryUpgradedConsensusStateResponse.prototype.upgraded_consensus_state = null; - - /** - * Encodes the specified QueryUpgradedConsensusStateResponse message. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.upgraded_consensus_state != null && Object.hasOwnProperty.call(message, "upgraded_consensus_state")) - $root.google.protobuf.Any.encode(message.upgraded_consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryUpgradedConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.client.v1.QueryUpgradedConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {ibc.core.client.v1.IQueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryUpgradedConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.upgraded_consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryUpgradedConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryUpgradedConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryUpgradedConsensusStateResponse message. - * @function verify - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryUpgradedConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.upgraded_consensus_state != null && message.hasOwnProperty("upgraded_consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.upgraded_consensus_state); - if (error) - return "upgraded_consensus_state." + error; - } - return null; - }; - - /** - * Creates a QueryUpgradedConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} QueryUpgradedConsensusStateResponse - */ - QueryUpgradedConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse) - return object; - let message = new $root.ibc.core.client.v1.QueryUpgradedConsensusStateResponse(); - if (object.upgraded_consensus_state != null) { - if (typeof object.upgraded_consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.QueryUpgradedConsensusStateResponse.upgraded_consensus_state: object expected"); - message.upgraded_consensus_state = $root.google.protobuf.Any.fromObject(object.upgraded_consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a QueryUpgradedConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @static - * @param {ibc.core.client.v1.QueryUpgradedConsensusStateResponse} message QueryUpgradedConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryUpgradedConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.upgraded_consensus_state = null; - if (message.upgraded_consensus_state != null && message.hasOwnProperty("upgraded_consensus_state")) - object.upgraded_consensus_state = $root.google.protobuf.Any.toObject(message.upgraded_consensus_state, options); - return object; - }; - - /** - * Converts this QueryUpgradedConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.QueryUpgradedConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryUpgradedConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryUpgradedConsensusStateResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.client.v1 - * @interface IGenesisState - * @property {Array.|null} [clients] GenesisState clients - * @property {Array.|null} [clients_consensus] GenesisState clients_consensus - * @property {Array.|null} [clients_metadata] GenesisState clients_metadata - * @property {ibc.core.client.v1.IParams|null} [params] GenesisState params - * @property {boolean|null} [create_localhost] GenesisState create_localhost - * @property {Long|null} [next_client_sequence] GenesisState next_client_sequence - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.client.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.client.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.clients = []; - this.clients_consensus = []; - this.clients_metadata = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState clients. - * @member {Array.} clients - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.clients = $util.emptyArray; - - /** - * GenesisState clients_consensus. - * @member {Array.} clients_consensus - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.clients_consensus = $util.emptyArray; - - /** - * GenesisState clients_metadata. - * @member {Array.} clients_metadata - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.clients_metadata = $util.emptyArray; - - /** - * GenesisState params. - * @member {ibc.core.client.v1.IParams|null|undefined} params - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState create_localhost. - * @member {boolean} create_localhost - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.create_localhost = false; - - /** - * GenesisState next_client_sequence. - * @member {Long} next_client_sequence - * @memberof ibc.core.client.v1.GenesisState - * @instance - */ - GenesisState.prototype.next_client_sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clients != null && message.clients.length) - for (let i = 0; i < message.clients.length; ++i) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.clients[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.clients_consensus != null && message.clients_consensus.length) - for (let i = 0; i < message.clients_consensus.length; ++i) - $root.ibc.core.client.v1.ClientConsensusStates.encode(message.clients_consensus[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.clients_metadata != null && message.clients_metadata.length) - for (let i = 0; i < message.clients_metadata.length; ++i) - $root.ibc.core.client.v1.IdentifiedGenesisMetadata.encode(message.clients_metadata[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.client.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.create_localhost != null && Object.hasOwnProperty.call(message, "create_localhost")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.create_localhost); - if (message.next_client_sequence != null && Object.hasOwnProperty.call(message, "next_client_sequence")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.next_client_sequence); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {ibc.core.client.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.clients && message.clients.length)) - message.clients = []; - message.clients.push($root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.clients_consensus && message.clients_consensus.length)) - message.clients_consensus = []; - message.clients_consensus.push($root.ibc.core.client.v1.ClientConsensusStates.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.clients_metadata && message.clients_metadata.length)) - message.clients_metadata = []; - message.clients_metadata.push($root.ibc.core.client.v1.IdentifiedGenesisMetadata.decode(reader, reader.uint32())); - break; - case 4: - message.params = $root.ibc.core.client.v1.Params.decode(reader, reader.uint32()); - break; - case 5: - message.create_localhost = reader.bool(); - break; - case 6: - message.next_client_sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clients != null && message.hasOwnProperty("clients")) { - if (!Array.isArray(message.clients)) - return "clients: array expected"; - for (let i = 0; i < message.clients.length; ++i) { - let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.clients[i]); - if (error) - return "clients." + error; - } - } - if (message.clients_consensus != null && message.hasOwnProperty("clients_consensus")) { - if (!Array.isArray(message.clients_consensus)) - return "clients_consensus: array expected"; - for (let i = 0; i < message.clients_consensus.length; ++i) { - let error = $root.ibc.core.client.v1.ClientConsensusStates.verify(message.clients_consensus[i]); - if (error) - return "clients_consensus." + error; - } - } - if (message.clients_metadata != null && message.hasOwnProperty("clients_metadata")) { - if (!Array.isArray(message.clients_metadata)) - return "clients_metadata: array expected"; - for (let i = 0; i < message.clients_metadata.length; ++i) { - let error = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.verify(message.clients_metadata[i]); - if (error) - return "clients_metadata." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.core.client.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.create_localhost != null && message.hasOwnProperty("create_localhost")) - if (typeof message.create_localhost !== "boolean") - return "create_localhost: boolean expected"; - if (message.next_client_sequence != null && message.hasOwnProperty("next_client_sequence")) - if (!$util.isInteger(message.next_client_sequence) && !(message.next_client_sequence && $util.isInteger(message.next_client_sequence.low) && $util.isInteger(message.next_client_sequence.high))) - return "next_client_sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.GenesisState) - return object; - let message = new $root.ibc.core.client.v1.GenesisState(); - if (object.clients) { - if (!Array.isArray(object.clients)) - throw TypeError(".ibc.core.client.v1.GenesisState.clients: array expected"); - message.clients = []; - for (let i = 0; i < object.clients.length; ++i) { - if (typeof object.clients[i] !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.clients: object expected"); - message.clients[i] = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.clients[i]); - } - } - if (object.clients_consensus) { - if (!Array.isArray(object.clients_consensus)) - throw TypeError(".ibc.core.client.v1.GenesisState.clients_consensus: array expected"); - message.clients_consensus = []; - for (let i = 0; i < object.clients_consensus.length; ++i) { - if (typeof object.clients_consensus[i] !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.clients_consensus: object expected"); - message.clients_consensus[i] = $root.ibc.core.client.v1.ClientConsensusStates.fromObject(object.clients_consensus[i]); - } - } - if (object.clients_metadata) { - if (!Array.isArray(object.clients_metadata)) - throw TypeError(".ibc.core.client.v1.GenesisState.clients_metadata: array expected"); - message.clients_metadata = []; - for (let i = 0; i < object.clients_metadata.length; ++i) { - if (typeof object.clients_metadata[i] !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.clients_metadata: object expected"); - message.clients_metadata[i] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.fromObject(object.clients_metadata[i]); - } - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.client.v1.GenesisState.params: object expected"); - message.params = $root.ibc.core.client.v1.Params.fromObject(object.params); - } - if (object.create_localhost != null) - message.create_localhost = Boolean(object.create_localhost); - if (object.next_client_sequence != null) - if ($util.Long) - (message.next_client_sequence = $util.Long.fromValue(object.next_client_sequence)).unsigned = true; - else if (typeof object.next_client_sequence === "string") - message.next_client_sequence = parseInt(object.next_client_sequence, 10); - else if (typeof object.next_client_sequence === "number") - message.next_client_sequence = object.next_client_sequence; - else if (typeof object.next_client_sequence === "object") - message.next_client_sequence = new $util.LongBits(object.next_client_sequence.low >>> 0, object.next_client_sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.GenesisState - * @static - * @param {ibc.core.client.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.clients = []; - object.clients_consensus = []; - object.clients_metadata = []; - } - if (options.defaults) { - object.params = null; - object.create_localhost = false; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_client_sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_client_sequence = options.longs === String ? "0" : 0; - } - if (message.clients && message.clients.length) { - object.clients = []; - for (let j = 0; j < message.clients.length; ++j) - object.clients[j] = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.clients[j], options); - } - if (message.clients_consensus && message.clients_consensus.length) { - object.clients_consensus = []; - for (let j = 0; j < message.clients_consensus.length; ++j) - object.clients_consensus[j] = $root.ibc.core.client.v1.ClientConsensusStates.toObject(message.clients_consensus[j], options); - } - if (message.clients_metadata && message.clients_metadata.length) { - object.clients_metadata = []; - for (let j = 0; j < message.clients_metadata.length; ++j) - object.clients_metadata[j] = $root.ibc.core.client.v1.IdentifiedGenesisMetadata.toObject(message.clients_metadata[j], options); - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.client.v1.Params.toObject(message.params, options); - if (message.create_localhost != null && message.hasOwnProperty("create_localhost")) - object.create_localhost = message.create_localhost; - if (message.next_client_sequence != null && message.hasOwnProperty("next_client_sequence")) - if (typeof message.next_client_sequence === "number") - object.next_client_sequence = options.longs === String ? String(message.next_client_sequence) : message.next_client_sequence; - else - object.next_client_sequence = options.longs === String ? $util.Long.prototype.toString.call(message.next_client_sequence) : options.longs === Number ? new $util.LongBits(message.next_client_sequence.low >>> 0, message.next_client_sequence.high >>> 0).toNumber(true) : message.next_client_sequence; - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.GenesisMetadata = (function() { - - /** - * Properties of a GenesisMetadata. - * @memberof ibc.core.client.v1 - * @interface IGenesisMetadata - * @property {Uint8Array|null} [key] GenesisMetadata key - * @property {Uint8Array|null} [value] GenesisMetadata value - */ - - /** - * Constructs a new GenesisMetadata. - * @memberof ibc.core.client.v1 - * @classdesc Represents a GenesisMetadata. - * @implements IGenesisMetadata - * @constructor - * @param {ibc.core.client.v1.IGenesisMetadata=} [properties] Properties to set - */ - function GenesisMetadata(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisMetadata key. - * @member {Uint8Array} key - * @memberof ibc.core.client.v1.GenesisMetadata - * @instance - */ - GenesisMetadata.prototype.key = $util.newBuffer([]); - - /** - * GenesisMetadata value. - * @member {Uint8Array} value - * @memberof ibc.core.client.v1.GenesisMetadata - * @instance - */ - GenesisMetadata.prototype.value = $util.newBuffer([]); - - /** - * Encodes the specified GenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisMetadata.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 GenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.GenesisMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {ibc.core.client.v1.IGenesisMetadata} message GenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisMetadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.GenesisMetadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.value = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisMetadata message. - * @function verify - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisMetadata.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 GenesisMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.GenesisMetadata} GenesisMetadata - */ - GenesisMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.GenesisMetadata) - return object; - let message = new $root.ibc.core.client.v1.GenesisMetadata(); - 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 GenesisMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.GenesisMetadata - * @static - * @param {ibc.core.client.v1.GenesisMetadata} message GenesisMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this GenesisMetadata to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.GenesisMetadata - * @instance - * @returns {Object.} JSON object - */ - GenesisMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisMetadata; - })(); - - v1.IdentifiedGenesisMetadata = (function() { - - /** - * Properties of an IdentifiedGenesisMetadata. - * @memberof ibc.core.client.v1 - * @interface IIdentifiedGenesisMetadata - * @property {string|null} [client_id] IdentifiedGenesisMetadata client_id - * @property {Array.|null} [client_metadata] IdentifiedGenesisMetadata client_metadata - */ - - /** - * Constructs a new IdentifiedGenesisMetadata. - * @memberof ibc.core.client.v1 - * @classdesc Represents an IdentifiedGenesisMetadata. - * @implements IIdentifiedGenesisMetadata - * @constructor - * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata=} [properties] Properties to set - */ - function IdentifiedGenesisMetadata(properties) { - this.client_metadata = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedGenesisMetadata client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @instance - */ - IdentifiedGenesisMetadata.prototype.client_id = ""; - - /** - * IdentifiedGenesisMetadata client_metadata. - * @member {Array.} client_metadata - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @instance - */ - IdentifiedGenesisMetadata.prototype.client_metadata = $util.emptyArray; - - /** - * Encodes the specified IdentifiedGenesisMetadata message. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedGenesisMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_metadata != null && message.client_metadata.length) - for (let i = 0; i < message.client_metadata.length; ++i) - $root.ibc.core.client.v1.GenesisMetadata.encode(message.client_metadata[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedGenesisMetadata message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedGenesisMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {ibc.core.client.v1.IIdentifiedGenesisMetadata} message IdentifiedGenesisMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedGenesisMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedGenesisMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.client_metadata && message.client_metadata.length)) - message.client_metadata = []; - message.client_metadata.push($root.ibc.core.client.v1.GenesisMetadata.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedGenesisMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedGenesisMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedGenesisMetadata message. - * @function verify - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedGenesisMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_metadata != null && message.hasOwnProperty("client_metadata")) { - if (!Array.isArray(message.client_metadata)) - return "client_metadata: array expected"; - for (let i = 0; i < message.client_metadata.length; ++i) { - let error = $root.ibc.core.client.v1.GenesisMetadata.verify(message.client_metadata[i]); - if (error) - return "client_metadata." + error; - } - } - return null; - }; - - /** - * Creates an IdentifiedGenesisMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.IdentifiedGenesisMetadata} IdentifiedGenesisMetadata - */ - IdentifiedGenesisMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.IdentifiedGenesisMetadata) - return object; - let message = new $root.ibc.core.client.v1.IdentifiedGenesisMetadata(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_metadata) { - if (!Array.isArray(object.client_metadata)) - throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.client_metadata: array expected"); - message.client_metadata = []; - for (let i = 0; i < object.client_metadata.length; ++i) { - if (typeof object.client_metadata[i] !== "object") - throw TypeError(".ibc.core.client.v1.IdentifiedGenesisMetadata.client_metadata: object expected"); - message.client_metadata[i] = $root.ibc.core.client.v1.GenesisMetadata.fromObject(object.client_metadata[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedGenesisMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @static - * @param {ibc.core.client.v1.IdentifiedGenesisMetadata} message IdentifiedGenesisMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedGenesisMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.client_metadata = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_metadata && message.client_metadata.length) { - object.client_metadata = []; - for (let j = 0; j < message.client_metadata.length; ++j) - object.client_metadata[j] = $root.ibc.core.client.v1.GenesisMetadata.toObject(message.client_metadata[j], options); - } - return object; - }; - - /** - * Converts this IdentifiedGenesisMetadata to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.IdentifiedGenesisMetadata - * @instance - * @returns {Object.} JSON object - */ - IdentifiedGenesisMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedGenesisMetadata; - })(); - - return v1; - })(); - - return client; - })(); - - core.commitment = (function() { - - /** - * Namespace commitment. - * @memberof ibc.core - * @namespace - */ - const commitment = {}; - - commitment.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.commitment - * @namespace - */ - const v1 = {}; - - v1.MerkleRoot = (function() { - - /** - * Properties of a MerkleRoot. - * @memberof ibc.core.commitment.v1 - * @interface IMerkleRoot - * @property {Uint8Array|null} [hash] MerkleRoot hash - */ - - /** - * Constructs a new MerkleRoot. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerkleRoot. - * @implements IMerkleRoot - * @constructor - * @param {ibc.core.commitment.v1.IMerkleRoot=} [properties] Properties to set - */ - function MerkleRoot(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MerkleRoot hash. - * @member {Uint8Array} hash - * @memberof ibc.core.commitment.v1.MerkleRoot - * @instance - */ - MerkleRoot.prototype.hash = $util.newBuffer([]); - - /** - * Encodes the specified MerkleRoot message. Does not implicitly {@link ibc.core.commitment.v1.MerkleRoot.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerkleRoot - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleRoot.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerkleRoot - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerkleRoot(); - while (reader.pos < end) { - let 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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerkleRoot} MerkleRoot - */ - MerkleRoot.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerkleRoot) - return object; - let message = new $root.ibc.core.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 ibc.core.commitment.v1.MerkleRoot - * @static - * @param {ibc.core.commitment.v1.MerkleRoot} message MerkleRoot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerkleRoot.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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 ibc.core.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 ibc.core.commitment.v1 - * @interface IMerklePrefix - * @property {Uint8Array|null} [key_prefix] MerklePrefix key_prefix - */ - - /** - * Constructs a new MerklePrefix. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerklePrefix. - * @implements IMerklePrefix - * @constructor - * @param {ibc.core.commitment.v1.IMerklePrefix=} [properties] Properties to set - */ - function MerklePrefix(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MerklePrefix key_prefix. - * @member {Uint8Array} key_prefix - * @memberof ibc.core.commitment.v1.MerklePrefix - * @instance - */ - MerklePrefix.prototype.key_prefix = $util.newBuffer([]); - - /** - * Encodes the specified MerklePrefix message. Does not implicitly {@link ibc.core.commitment.v1.MerklePrefix.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {ibc.core.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.key_prefix != null && Object.hasOwnProperty.call(message, "key_prefix")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key_prefix); - return writer; - }; - - /** - * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerklePrefix.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerklePrefix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerklePrefix(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key_prefix = 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 ibc.core.commitment.v1.MerklePrefix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.key_prefix != null && message.hasOwnProperty("key_prefix")) - if (!(message.key_prefix && typeof message.key_prefix.length === "number" || $util.isString(message.key_prefix))) - return "key_prefix: buffer expected"; - return null; - }; - - /** - * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerklePrefix} MerklePrefix - */ - MerklePrefix.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerklePrefix) - return object; - let message = new $root.ibc.core.commitment.v1.MerklePrefix(); - if (object.key_prefix != null) - if (typeof object.key_prefix === "string") - $util.base64.decode(object.key_prefix, message.key_prefix = $util.newBuffer($util.base64.length(object.key_prefix)), 0); - else if (object.key_prefix.length) - message.key_prefix = object.key_prefix; - return message; - }; - - /** - * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.commitment.v1.MerklePrefix - * @static - * @param {ibc.core.commitment.v1.MerklePrefix} message MerklePrefix - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerklePrefix.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if (options.bytes === String) - object.key_prefix = ""; - else { - object.key_prefix = []; - if (options.bytes !== Array) - object.key_prefix = $util.newBuffer(object.key_prefix); - } - if (message.key_prefix != null && message.hasOwnProperty("key_prefix")) - object.key_prefix = options.bytes === String ? $util.base64.encode(message.key_prefix, 0, message.key_prefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.key_prefix) : message.key_prefix; - return object; - }; - - /** - * Converts this MerklePrefix to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.commitment.v1 - * @interface IMerklePath - * @property {Array.|null} [key_path] MerklePath key_path - */ - - /** - * Constructs a new MerklePath. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerklePath. - * @implements IMerklePath - * @constructor - * @param {ibc.core.commitment.v1.IMerklePath=} [properties] Properties to set - */ - function MerklePath(properties) { - this.key_path = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MerklePath key_path. - * @member {Array.} key_path - * @memberof ibc.core.commitment.v1.MerklePath - * @instance - */ - MerklePath.prototype.key_path = $util.emptyArray; - - /** - * Encodes the specified MerklePath message. Does not implicitly {@link ibc.core.commitment.v1.MerklePath.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {ibc.core.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.key_path != null && message.key_path.length) - for (let i = 0; i < message.key_path.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key_path[i]); - return writer; - }; - - /** - * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerklePath.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerklePath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerklePath(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.key_path && message.key_path.length)) - message.key_path = []; - message.key_path.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MerklePath message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.key_path != null && message.hasOwnProperty("key_path")) { - if (!Array.isArray(message.key_path)) - return "key_path: array expected"; - for (let i = 0; i < message.key_path.length; ++i) - if (!$util.isString(message.key_path[i])) - return "key_path: string[] expected"; - } - return null; - }; - - /** - * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerklePath} MerklePath - */ - MerklePath.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerklePath) - return object; - let message = new $root.ibc.core.commitment.v1.MerklePath(); - if (object.key_path) { - if (!Array.isArray(object.key_path)) - throw TypeError(".ibc.core.commitment.v1.MerklePath.key_path: array expected"); - message.key_path = []; - for (let i = 0; i < object.key_path.length; ++i) - message.key_path[i] = String(object.key_path[i]); - } - return message; - }; - - /** - * Creates a plain object from a MerklePath message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.commitment.v1.MerklePath - * @static - * @param {ibc.core.commitment.v1.MerklePath} message MerklePath - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerklePath.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.key_path = []; - if (message.key_path && message.key_path.length) { - object.key_path = []; - for (let j = 0; j < message.key_path.length; ++j) - object.key_path[j] = message.key_path[j]; - } - return object; - }; - - /** - * Converts this MerklePath to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.commitment.v1 - * @interface IMerkleProof - * @property {Array.|null} [proofs] MerkleProof proofs - */ - - /** - * Constructs a new MerkleProof. - * @memberof ibc.core.commitment.v1 - * @classdesc Represents a MerkleProof. - * @implements IMerkleProof - * @constructor - * @param {ibc.core.commitment.v1.IMerkleProof=} [properties] Properties to set - */ - function MerkleProof(properties) { - this.proofs = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MerkleProof proofs. - * @member {Array.} proofs - * @memberof ibc.core.commitment.v1.MerkleProof - * @instance - */ - MerkleProof.prototype.proofs = $util.emptyArray; - - /** - * Encodes the specified MerkleProof message. Does not implicitly {@link ibc.core.commitment.v1.MerkleProof.verify|verify} messages. - * @function encode - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {ibc.core.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.proofs != null && message.proofs.length) - for (let i = 0; i < message.proofs.length; ++i) - $root.cosmos.ics23.v1.CommitmentProof.encode(message.proofs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link ibc.core.commitment.v1.MerkleProof.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {ibc.core.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 ibc.core.commitment.v1.MerkleProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.commitment.v1.MerkleProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.proofs && message.proofs.length)) - message.proofs = []; - message.proofs.push($root.cosmos.ics23.v1.CommitmentProof.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 ibc.core.commitment.v1.MerkleProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.proofs != null && message.hasOwnProperty("proofs")) { - if (!Array.isArray(message.proofs)) - return "proofs: array expected"; - for (let i = 0; i < message.proofs.length; ++i) { - let error = $root.cosmos.ics23.v1.CommitmentProof.verify(message.proofs[i]); - if (error) - return "proofs." + error; - } - } - return null; - }; - - /** - * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.commitment.v1.MerkleProof} MerkleProof - */ - MerkleProof.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.commitment.v1.MerkleProof) - return object; - let message = new $root.ibc.core.commitment.v1.MerkleProof(); - if (object.proofs) { - if (!Array.isArray(object.proofs)) - throw TypeError(".ibc.core.commitment.v1.MerkleProof.proofs: array expected"); - message.proofs = []; - for (let i = 0; i < object.proofs.length; ++i) { - if (typeof object.proofs[i] !== "object") - throw TypeError(".ibc.core.commitment.v1.MerkleProof.proofs: object expected"); - message.proofs[i] = $root.cosmos.ics23.v1.CommitmentProof.fromObject(object.proofs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.commitment.v1.MerkleProof - * @static - * @param {ibc.core.commitment.v1.MerkleProof} message MerkleProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerkleProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.proofs = []; - if (message.proofs && message.proofs.length) { - object.proofs = []; - for (let j = 0; j < message.proofs.length; ++j) - object.proofs[j] = $root.cosmos.ics23.v1.CommitmentProof.toObject(message.proofs[j], options); - } - return object; - }; - - /** - * Converts this MerkleProof to JSON. - * @function toJSON - * @memberof ibc.core.commitment.v1.MerkleProof - * @instance - * @returns {Object.} JSON object - */ - MerkleProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MerkleProof; - })(); - - return v1; - })(); - - return commitment; - })(); - - core.connection = (function() { - - /** - * Namespace connection. - * @memberof ibc.core - * @namespace - */ - const connection = {}; - - connection.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.connection - * @namespace - */ - const v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenInit}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenInitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenInitResponse} [response] MsgConnectionOpenInitResponse - */ - - /** - * Calls ConnectionOpenInit. - * @function connectionOpenInit - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} request MsgConnectionOpenInit message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenInitCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenInitResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenInit = function connectionOpenInit(request, callback) { - return this.rpcCall(connectionOpenInit, $root.ibc.core.connection.v1.MsgConnectionOpenInit, $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse, request, callback); - }, "name", { value: "ConnectionOpenInit" }); - - /** - * Calls ConnectionOpenInit. - * @function connectionOpenInit - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenInit} request MsgConnectionOpenInit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenTry}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenTryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenTryResponse} [response] MsgConnectionOpenTryResponse - */ - - /** - * Calls ConnectionOpenTry. - * @function connectionOpenTry - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} request MsgConnectionOpenTry message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenTryCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenTryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenTry = function connectionOpenTry(request, callback) { - return this.rpcCall(connectionOpenTry, $root.ibc.core.connection.v1.MsgConnectionOpenTry, $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse, request, callback); - }, "name", { value: "ConnectionOpenTry" }); - - /** - * Calls ConnectionOpenTry. - * @function connectionOpenTry - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenTry} request MsgConnectionOpenTry message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenAck}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenAckCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenAckResponse} [response] MsgConnectionOpenAckResponse - */ - - /** - * Calls ConnectionOpenAck. - * @function connectionOpenAck - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} request MsgConnectionOpenAck message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenAckCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenAckResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenAck = function connectionOpenAck(request, callback) { - return this.rpcCall(connectionOpenAck, $root.ibc.core.connection.v1.MsgConnectionOpenAck, $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse, request, callback); - }, "name", { value: "ConnectionOpenAck" }); - - /** - * Calls ConnectionOpenAck. - * @function connectionOpenAck - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenAck} request MsgConnectionOpenAck message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Msg#connectionOpenConfirm}. - * @memberof ibc.core.connection.v1.Msg - * @typedef ConnectionOpenConfirmCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} [response] MsgConnectionOpenConfirmResponse - */ - - /** - * Calls ConnectionOpenConfirm. - * @function connectionOpenConfirm - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} request MsgConnectionOpenConfirm message or plain object - * @param {ibc.core.connection.v1.Msg.ConnectionOpenConfirmCallback} callback Node-style callback called with the error, if any, and MsgConnectionOpenConfirmResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.connectionOpenConfirm = function connectionOpenConfirm(request, callback) { - return this.rpcCall(connectionOpenConfirm, $root.ibc.core.connection.v1.MsgConnectionOpenConfirm, $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse, request, callback); - }, "name", { value: "ConnectionOpenConfirm" }); - - /** - * Calls ConnectionOpenConfirm. - * @function connectionOpenConfirm - * @memberof ibc.core.connection.v1.Msg - * @instance - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm} request MsgConnectionOpenConfirm message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgConnectionOpenInit = (function() { - - /** - * Properties of a MsgConnectionOpenInit. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenInit - * @property {string|null} [client_id] MsgConnectionOpenInit client_id - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenInit counterparty - * @property {ibc.core.connection.v1.IVersion|null} [version] MsgConnectionOpenInit version - * @property {Long|null} [delay_period] MsgConnectionOpenInit delay_period - * @property {string|null} [signer] MsgConnectionOpenInit signer - */ - - /** - * Constructs a new MsgConnectionOpenInit. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenInit. - * @implements IMsgConnectionOpenInit - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set - */ - function MsgConnectionOpenInit(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgConnectionOpenInit client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.client_id = ""; - - /** - * MsgConnectionOpenInit counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.counterparty = null; - - /** - * MsgConnectionOpenInit version. - * @member {ibc.core.connection.v1.IVersion|null|undefined} version - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.version = null; - - /** - * MsgConnectionOpenInit delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenInit signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.signer = ""; - - /** - * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.ibc.core.connection.v1.Version.encode(message.version, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.delay_period); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenInit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 3: - message.version = $root.ibc.core.connection.v1.Version.decode(reader, reader.uint32()); - break; - case 4: - message.delay_period = reader.uint64(); - break; - case 5: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.version != null && message.hasOwnProperty("version")) { - let error = $root.ibc.core.connection.v1.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit - */ - MsgConnectionOpenInit.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenInit) - return object; - let message = new $root.ibc.core.connection.v1.MsgConnectionOpenInit(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenInit.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenInit.version: object expected"); - message.version = $root.ibc.core.connection.v1.Version.fromObject(object.version); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenInit} message MsgConnectionOpenInit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenInit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.counterparty = null; - object.version = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - object.signer = ""; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.ibc.core.connection.v1.Version.toObject(message.version, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenInit to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenInit - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenInit; - })(); - - v1.MsgConnectionOpenInitResponse = (function() { - - /** - * Properties of a MsgConnectionOpenInitResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenInitResponse - */ - - /** - * Constructs a new MsgConnectionOpenInitResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenInitResponse. - * @implements IMsgConnectionOpenInitResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse=} [properties] Properties to set - */ - function MsgConnectionOpenInitResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenInitResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenInitResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenInitResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenInitResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenInitResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenInitResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenInitResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenInitResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenInitResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenInitResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenInitResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenInitResponse} MsgConnectionOpenInitResponse - */ - MsgConnectionOpenInitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenInitResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenInitResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenInitResponse} message MsgConnectionOpenInitResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenInitResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenInitResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenInitResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenInitResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenInitResponse; - })(); - - v1.MsgConnectionOpenTry = (function() { - - /** - * Properties of a MsgConnectionOpenTry. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenTry - * @property {string|null} [client_id] MsgConnectionOpenTry client_id - * @property {string|null} [previous_connection_id] MsgConnectionOpenTry previous_connection_id - * @property {google.protobuf.IAny|null} [client_state] MsgConnectionOpenTry client_state - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenTry counterparty - * @property {Long|null} [delay_period] MsgConnectionOpenTry delay_period - * @property {Array.|null} [counterparty_versions] MsgConnectionOpenTry counterparty_versions - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgConnectionOpenTry proof_height - * @property {Uint8Array|null} [proof_init] MsgConnectionOpenTry proof_init - * @property {Uint8Array|null} [proof_client] MsgConnectionOpenTry proof_client - * @property {Uint8Array|null} [proof_consensus] MsgConnectionOpenTry proof_consensus - * @property {ibc.core.client.v1.IHeight|null} [consensus_height] MsgConnectionOpenTry consensus_height - * @property {string|null} [signer] MsgConnectionOpenTry signer - * @property {Uint8Array|null} [host_consensus_state_proof] MsgConnectionOpenTry host_consensus_state_proof - */ - - /** - * Constructs a new MsgConnectionOpenTry. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenTry. - * @implements IMsgConnectionOpenTry - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set - */ - function MsgConnectionOpenTry(properties) { - this.counterparty_versions = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgConnectionOpenTry client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.client_id = ""; - - /** - * MsgConnectionOpenTry previous_connection_id. - * @member {string} previous_connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.previous_connection_id = ""; - - /** - * MsgConnectionOpenTry client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.client_state = null; - - /** - * MsgConnectionOpenTry counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.counterparty = null; - - /** - * MsgConnectionOpenTry delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenTry counterparty_versions. - * @member {Array.} counterparty_versions - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.counterparty_versions = $util.emptyArray; - - /** - * MsgConnectionOpenTry proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_height = null; - - /** - * MsgConnectionOpenTry proof_init. - * @member {Uint8Array} proof_init - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_init = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry proof_client. - * @member {Uint8Array} proof_client - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_client = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry proof_consensus. - * @member {Uint8Array} proof_consensus - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proof_consensus = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry consensus_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} consensus_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.consensus_height = null; - - /** - * MsgConnectionOpenTry signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.signer = ""; - - /** - * MsgConnectionOpenTry host_consensus_state_proof. - * @member {Uint8Array} host_consensus_state_proof - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.host_consensus_state_proof = $util.newBuffer([]); - - /** - * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.previous_connection_id != null && Object.hasOwnProperty.call(message, "previous_connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.previous_connection_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.delay_period); - if (message.counterparty_versions != null && message.counterparty_versions.length) - for (let i = 0; i < message.counterparty_versions.length; ++i) - $root.ibc.core.connection.v1.Version.encode(message.counterparty_versions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.proof_init != null && Object.hasOwnProperty.call(message, "proof_init")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.proof_init); - if (message.proof_client != null && Object.hasOwnProperty.call(message, "proof_client")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.proof_client); - if (message.proof_consensus != null && Object.hasOwnProperty.call(message, "proof_consensus")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.proof_consensus); - if (message.consensus_height != null && Object.hasOwnProperty.call(message, "consensus_height")) - $root.ibc.core.client.v1.Height.encode(message.consensus_height, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.signer); - if (message.host_consensus_state_proof != null && Object.hasOwnProperty.call(message, "host_consensus_state_proof")) - writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.host_consensus_state_proof); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenTry(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.previous_connection_id = reader.string(); - break; - case 3: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 4: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delay_period = reader.uint64(); - break; - case 6: - if (!(message.counterparty_versions && message.counterparty_versions.length)) - message.counterparty_versions = []; - message.counterparty_versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); - break; - case 7: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - message.proof_init = reader.bytes(); - break; - case 9: - message.proof_client = reader.bytes(); - break; - case 10: - message.proof_consensus = reader.bytes(); - break; - case 11: - message.consensus_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 12: - message.signer = reader.string(); - break; - case 13: - message.host_consensus_state_proof = 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 ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.previous_connection_id != null && message.hasOwnProperty("previous_connection_id")) - if (!$util.isString(message.previous_connection_id)) - return "previous_connection_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - if (message.counterparty_versions != null && message.hasOwnProperty("counterparty_versions")) { - if (!Array.isArray(message.counterparty_versions)) - return "counterparty_versions: array expected"; - for (let i = 0; i < message.counterparty_versions.length; ++i) { - let error = $root.ibc.core.connection.v1.Version.verify(message.counterparty_versions[i]); - if (error) - return "counterparty_versions." + error; - } - } - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - if (!(message.proof_init && typeof message.proof_init.length === "number" || $util.isString(message.proof_init))) - return "proof_init: buffer expected"; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - if (!(message.proof_client && typeof message.proof_client.length === "number" || $util.isString(message.proof_client))) - return "proof_client: buffer expected"; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - if (!(message.proof_consensus && typeof message.proof_consensus.length === "number" || $util.isString(message.proof_consensus))) - return "proof_consensus: buffer expected"; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.consensus_height); - if (error) - return "consensus_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - if (!(message.host_consensus_state_proof && typeof message.host_consensus_state_proof.length === "number" || $util.isString(message.host_consensus_state_proof))) - return "host_consensus_state_proof: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry - */ - MsgConnectionOpenTry.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenTry) - return object; - let message = new $root.ibc.core.connection.v1.MsgConnectionOpenTry(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.previous_connection_id != null) - message.previous_connection_id = String(object.previous_connection_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - if (object.counterparty_versions) { - if (!Array.isArray(object.counterparty_versions)) - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty_versions: array expected"); - message.counterparty_versions = []; - for (let i = 0; i < object.counterparty_versions.length; ++i) { - if (typeof object.counterparty_versions[i] !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.counterparty_versions: object expected"); - message.counterparty_versions[i] = $root.ibc.core.connection.v1.Version.fromObject(object.counterparty_versions[i]); - } - } - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.proof_init != null) - if (typeof object.proof_init === "string") - $util.base64.decode(object.proof_init, message.proof_init = $util.newBuffer($util.base64.length(object.proof_init)), 0); - else if (object.proof_init.length) - message.proof_init = object.proof_init; - if (object.proof_client != null) - if (typeof object.proof_client === "string") - $util.base64.decode(object.proof_client, message.proof_client = $util.newBuffer($util.base64.length(object.proof_client)), 0); - else if (object.proof_client.length) - message.proof_client = object.proof_client; - if (object.proof_consensus != null) - if (typeof object.proof_consensus === "string") - $util.base64.decode(object.proof_consensus, message.proof_consensus = $util.newBuffer($util.base64.length(object.proof_consensus)), 0); - else if (object.proof_consensus.length) - message.proof_consensus = object.proof_consensus; - if (object.consensus_height != null) { - if (typeof object.consensus_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenTry.consensus_height: object expected"); - message.consensus_height = $root.ibc.core.client.v1.Height.fromObject(object.consensus_height); - } - if (object.signer != null) - message.signer = String(object.signer); - if (object.host_consensus_state_proof != null) - if (typeof object.host_consensus_state_proof === "string") - $util.base64.decode(object.host_consensus_state_proof, message.host_consensus_state_proof = $util.newBuffer($util.base64.length(object.host_consensus_state_proof)), 0); - else if (object.host_consensus_state_proof.length) - message.host_consensus_state_proof = object.host_consensus_state_proof; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenTry} message MsgConnectionOpenTry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenTry.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.counterparty_versions = []; - if (options.defaults) { - object.client_id = ""; - object.previous_connection_id = ""; - object.client_state = null; - object.counterparty = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - object.proof_height = null; - if (options.bytes === String) - object.proof_init = ""; - else { - object.proof_init = []; - if (options.bytes !== Array) - object.proof_init = $util.newBuffer(object.proof_init); - } - if (options.bytes === String) - object.proof_client = ""; - else { - object.proof_client = []; - if (options.bytes !== Array) - object.proof_client = $util.newBuffer(object.proof_client); - } - if (options.bytes === String) - object.proof_consensus = ""; - else { - object.proof_consensus = []; - if (options.bytes !== Array) - object.proof_consensus = $util.newBuffer(object.proof_consensus); - } - object.consensus_height = null; - object.signer = ""; - if (options.bytes === String) - object.host_consensus_state_proof = ""; - else { - object.host_consensus_state_proof = []; - if (options.bytes !== Array) - object.host_consensus_state_proof = $util.newBuffer(object.host_consensus_state_proof); - } - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.previous_connection_id != null && message.hasOwnProperty("previous_connection_id")) - object.previous_connection_id = message.previous_connection_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - if (message.counterparty_versions && message.counterparty_versions.length) { - object.counterparty_versions = []; - for (let j = 0; j < message.counterparty_versions.length; ++j) - object.counterparty_versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.counterparty_versions[j], options); - } - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.proof_init != null && message.hasOwnProperty("proof_init")) - object.proof_init = options.bytes === String ? $util.base64.encode(message.proof_init, 0, message.proof_init.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_init) : message.proof_init; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - object.proof_client = options.bytes === String ? $util.base64.encode(message.proof_client, 0, message.proof_client.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_client) : message.proof_client; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - object.proof_consensus = options.bytes === String ? $util.base64.encode(message.proof_consensus, 0, message.proof_consensus.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_consensus) : message.proof_consensus; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) - object.consensus_height = $root.ibc.core.client.v1.Height.toObject(message.consensus_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - object.host_consensus_state_proof = options.bytes === String ? $util.base64.encode(message.host_consensus_state_proof, 0, message.host_consensus_state_proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.host_consensus_state_proof) : message.host_consensus_state_proof; - return object; - }; - - /** - * Converts this MsgConnectionOpenTry to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenTry - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenTry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenTry; - })(); - - v1.MsgConnectionOpenTryResponse = (function() { - - /** - * Properties of a MsgConnectionOpenTryResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenTryResponse - */ - - /** - * Constructs a new MsgConnectionOpenTryResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenTryResponse. - * @implements IMsgConnectionOpenTryResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse=} [properties] Properties to set - */ - function MsgConnectionOpenTryResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenTryResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenTryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenTryResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenTryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenTryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenTryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenTryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenTryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenTryResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenTryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenTryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenTryResponse} MsgConnectionOpenTryResponse - */ - MsgConnectionOpenTryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenTryResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenTryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenTryResponse} message MsgConnectionOpenTryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenTryResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenTryResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenTryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenTryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenTryResponse; - })(); - - v1.MsgConnectionOpenAck = (function() { - - /** - * Properties of a MsgConnectionOpenAck. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenAck - * @property {string|null} [connection_id] MsgConnectionOpenAck connection_id - * @property {string|null} [counterparty_connection_id] MsgConnectionOpenAck counterparty_connection_id - * @property {ibc.core.connection.v1.IVersion|null} [version] MsgConnectionOpenAck version - * @property {google.protobuf.IAny|null} [client_state] MsgConnectionOpenAck client_state - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgConnectionOpenAck proof_height - * @property {Uint8Array|null} [proof_try] MsgConnectionOpenAck proof_try - * @property {Uint8Array|null} [proof_client] MsgConnectionOpenAck proof_client - * @property {Uint8Array|null} [proof_consensus] MsgConnectionOpenAck proof_consensus - * @property {ibc.core.client.v1.IHeight|null} [consensus_height] MsgConnectionOpenAck consensus_height - * @property {string|null} [signer] MsgConnectionOpenAck signer - * @property {Uint8Array|null} [host_consensus_state_proof] MsgConnectionOpenAck host_consensus_state_proof - */ - - /** - * Constructs a new MsgConnectionOpenAck. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenAck. - * @implements IMsgConnectionOpenAck - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set - */ - function MsgConnectionOpenAck(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgConnectionOpenAck connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.connection_id = ""; - - /** - * MsgConnectionOpenAck counterparty_connection_id. - * @member {string} counterparty_connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.counterparty_connection_id = ""; - - /** - * MsgConnectionOpenAck version. - * @member {ibc.core.connection.v1.IVersion|null|undefined} version - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.version = null; - - /** - * MsgConnectionOpenAck client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.client_state = null; - - /** - * MsgConnectionOpenAck proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_height = null; - - /** - * MsgConnectionOpenAck proof_try. - * @member {Uint8Array} proof_try - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_try = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck proof_client. - * @member {Uint8Array} proof_client - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_client = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck proof_consensus. - * @member {Uint8Array} proof_consensus - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proof_consensus = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck consensus_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} consensus_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.consensus_height = null; - - /** - * MsgConnectionOpenAck signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.signer = ""; - - /** - * MsgConnectionOpenAck host_consensus_state_proof. - * @member {Uint8Array} host_consensus_state_proof - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.host_consensus_state_proof = $util.newBuffer([]); - - /** - * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {ibc.core.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.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.counterparty_connection_id != null && Object.hasOwnProperty.call(message, "counterparty_connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.counterparty_connection_id); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.ibc.core.connection.v1.Version.encode(message.version, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.proof_try != null && Object.hasOwnProperty.call(message, "proof_try")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.proof_try); - if (message.proof_client != null && Object.hasOwnProperty.call(message, "proof_client")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.proof_client); - if (message.proof_consensus != null && Object.hasOwnProperty.call(message, "proof_consensus")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.proof_consensus); - if (message.consensus_height != null && Object.hasOwnProperty.call(message, "consensus_height")) - $root.ibc.core.client.v1.Height.encode(message.consensus_height, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.signer); - if (message.host_consensus_state_proof != null && Object.hasOwnProperty.call(message, "host_consensus_state_proof")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.host_consensus_state_proof); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenAck(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.counterparty_connection_id = reader.string(); - break; - case 3: - message.version = $root.ibc.core.connection.v1.Version.decode(reader, reader.uint32()); - break; - case 4: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 5: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 6: - message.proof_try = reader.bytes(); - break; - case 7: - message.proof_client = reader.bytes(); - break; - case 8: - message.proof_consensus = reader.bytes(); - break; - case 9: - message.consensus_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 10: - message.signer = reader.string(); - break; - case 11: - message.host_consensus_state_proof = 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 ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.counterparty_connection_id != null && message.hasOwnProperty("counterparty_connection_id")) - if (!$util.isString(message.counterparty_connection_id)) - return "counterparty_connection_id: string expected"; - if (message.version != null && message.hasOwnProperty("version")) { - let error = $root.ibc.core.connection.v1.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - if (!(message.proof_try && typeof message.proof_try.length === "number" || $util.isString(message.proof_try))) - return "proof_try: buffer expected"; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - if (!(message.proof_client && typeof message.proof_client.length === "number" || $util.isString(message.proof_client))) - return "proof_client: buffer expected"; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - if (!(message.proof_consensus && typeof message.proof_consensus.length === "number" || $util.isString(message.proof_consensus))) - return "proof_consensus: buffer expected"; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.consensus_height); - if (error) - return "consensus_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - if (!(message.host_consensus_state_proof && typeof message.host_consensus_state_proof.length === "number" || $util.isString(message.host_consensus_state_proof))) - return "host_consensus_state_proof: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck - */ - MsgConnectionOpenAck.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenAck) - return object; - let message = new $root.ibc.core.connection.v1.MsgConnectionOpenAck(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.counterparty_connection_id != null) - message.counterparty_connection_id = String(object.counterparty_connection_id); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.version: object expected"); - message.version = $root.ibc.core.connection.v1.Version.fromObject(object.version); - } - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.proof_try != null) - if (typeof object.proof_try === "string") - $util.base64.decode(object.proof_try, message.proof_try = $util.newBuffer($util.base64.length(object.proof_try)), 0); - else if (object.proof_try.length) - message.proof_try = object.proof_try; - if (object.proof_client != null) - if (typeof object.proof_client === "string") - $util.base64.decode(object.proof_client, message.proof_client = $util.newBuffer($util.base64.length(object.proof_client)), 0); - else if (object.proof_client.length) - message.proof_client = object.proof_client; - if (object.proof_consensus != null) - if (typeof object.proof_consensus === "string") - $util.base64.decode(object.proof_consensus, message.proof_consensus = $util.newBuffer($util.base64.length(object.proof_consensus)), 0); - else if (object.proof_consensus.length) - message.proof_consensus = object.proof_consensus; - if (object.consensus_height != null) { - if (typeof object.consensus_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenAck.consensus_height: object expected"); - message.consensus_height = $root.ibc.core.client.v1.Height.fromObject(object.consensus_height); - } - if (object.signer != null) - message.signer = String(object.signer); - if (object.host_consensus_state_proof != null) - if (typeof object.host_consensus_state_proof === "string") - $util.base64.decode(object.host_consensus_state_proof, message.host_consensus_state_proof = $util.newBuffer($util.base64.length(object.host_consensus_state_proof)), 0); - else if (object.host_consensus_state_proof.length) - message.host_consensus_state_proof = object.host_consensus_state_proof; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenAck} message MsgConnectionOpenAck - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenAck.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection_id = ""; - object.counterparty_connection_id = ""; - object.version = null; - object.client_state = null; - object.proof_height = null; - if (options.bytes === String) - object.proof_try = ""; - else { - object.proof_try = []; - if (options.bytes !== Array) - object.proof_try = $util.newBuffer(object.proof_try); - } - if (options.bytes === String) - object.proof_client = ""; - else { - object.proof_client = []; - if (options.bytes !== Array) - object.proof_client = $util.newBuffer(object.proof_client); - } - if (options.bytes === String) - object.proof_consensus = ""; - else { - object.proof_consensus = []; - if (options.bytes !== Array) - object.proof_consensus = $util.newBuffer(object.proof_consensus); - } - object.consensus_height = null; - object.signer = ""; - if (options.bytes === String) - object.host_consensus_state_proof = ""; - else { - object.host_consensus_state_proof = []; - if (options.bytes !== Array) - object.host_consensus_state_proof = $util.newBuffer(object.host_consensus_state_proof); - } - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.counterparty_connection_id != null && message.hasOwnProperty("counterparty_connection_id")) - object.counterparty_connection_id = message.counterparty_connection_id; - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.ibc.core.connection.v1.Version.toObject(message.version, options); - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.proof_try != null && message.hasOwnProperty("proof_try")) - object.proof_try = options.bytes === String ? $util.base64.encode(message.proof_try, 0, message.proof_try.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_try) : message.proof_try; - if (message.proof_client != null && message.hasOwnProperty("proof_client")) - object.proof_client = options.bytes === String ? $util.base64.encode(message.proof_client, 0, message.proof_client.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_client) : message.proof_client; - if (message.proof_consensus != null && message.hasOwnProperty("proof_consensus")) - object.proof_consensus = options.bytes === String ? $util.base64.encode(message.proof_consensus, 0, message.proof_consensus.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_consensus) : message.proof_consensus; - if (message.consensus_height != null && message.hasOwnProperty("consensus_height")) - object.consensus_height = $root.ibc.core.client.v1.Height.toObject(message.consensus_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - if (message.host_consensus_state_proof != null && message.hasOwnProperty("host_consensus_state_proof")) - object.host_consensus_state_proof = options.bytes === String ? $util.base64.encode(message.host_consensus_state_proof, 0, message.host_consensus_state_proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.host_consensus_state_proof) : message.host_consensus_state_proof; - return object; - }; - - /** - * Converts this MsgConnectionOpenAck to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenAck - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenAck; - })(); - - v1.MsgConnectionOpenAckResponse = (function() { - - /** - * Properties of a MsgConnectionOpenAckResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenAckResponse - */ - - /** - * Constructs a new MsgConnectionOpenAckResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenAckResponse. - * @implements IMsgConnectionOpenAckResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse=} [properties] Properties to set - */ - function MsgConnectionOpenAckResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenAckResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenAckResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenAckResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenAckResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenAckResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenAckResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenAckResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenAckResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenAckResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenAckResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenAckResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenAckResponse} MsgConnectionOpenAckResponse - */ - MsgConnectionOpenAckResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenAckResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenAckResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenAckResponse} message MsgConnectionOpenAckResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenAckResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenAckResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenAckResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenAckResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenAckResponse; - })(); - - v1.MsgConnectionOpenConfirm = (function() { - - /** - * Properties of a MsgConnectionOpenConfirm. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenConfirm - * @property {string|null} [connection_id] MsgConnectionOpenConfirm connection_id - * @property {Uint8Array|null} [proof_ack] MsgConnectionOpenConfirm proof_ack - * @property {ibc.core.client.v1.IHeight|null} [proof_height] MsgConnectionOpenConfirm proof_height - * @property {string|null} [signer] MsgConnectionOpenConfirm signer - */ - - /** - * Constructs a new MsgConnectionOpenConfirm. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenConfirm. - * @implements IMsgConnectionOpenConfirm - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set - */ - function MsgConnectionOpenConfirm(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgConnectionOpenConfirm connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.connection_id = ""; - - /** - * MsgConnectionOpenConfirm proof_ack. - * @member {Uint8Array} proof_ack - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.proof_ack = $util.newBuffer([]); - - /** - * MsgConnectionOpenConfirm proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.proof_height = null; - - /** - * MsgConnectionOpenConfirm signer. - * @member {string} signer - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.signer = ""; - - /** - * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {ibc.core.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.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.proof_ack != null && Object.hasOwnProperty.call(message, "proof_ack")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof_ack); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, 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).string(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {ibc.core.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 ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirm(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.proof_ack = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.signer = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - if (!(message.proof_ack && typeof message.proof_ack.length === "number" || $util.isString(message.proof_ack))) - return "proof_ack: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!$util.isString(message.signer)) - return "signer: string expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm - */ - MsgConnectionOpenConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenConfirm) - return object; - let message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirm(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.proof_ack != null) - if (typeof object.proof_ack === "string") - $util.base64.decode(object.proof_ack, message.proof_ack = $util.newBuffer($util.base64.length(object.proof_ack)), 0); - else if (object.proof_ack.length) - message.proof_ack = object.proof_ack; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.MsgConnectionOpenConfirm.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - if (object.signer != null) - message.signer = String(object.signer); - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenConfirm} message MsgConnectionOpenConfirm - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenConfirm.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection_id = ""; - if (options.bytes === String) - object.proof_ack = ""; - else { - object.proof_ack = []; - if (options.bytes !== Array) - object.proof_ack = $util.newBuffer(object.proof_ack); - } - object.proof_height = null; - object.signer = ""; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.proof_ack != null && message.hasOwnProperty("proof_ack")) - object.proof_ack = options.bytes === String ? $util.base64.encode(message.proof_ack, 0, message.proof_ack.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof_ack) : message.proof_ack; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenConfirm to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenConfirm; - })(); - - v1.MsgConnectionOpenConfirmResponse = (function() { - - /** - * Properties of a MsgConnectionOpenConfirmResponse. - * @memberof ibc.core.connection.v1 - * @interface IMsgConnectionOpenConfirmResponse - */ - - /** - * Constructs a new MsgConnectionOpenConfirmResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a MsgConnectionOpenConfirmResponse. - * @implements IMsgConnectionOpenConfirmResponse - * @constructor - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse=} [properties] Properties to set - */ - function MsgConnectionOpenConfirmResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgConnectionOpenConfirmResponse message. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenConfirmResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenConfirmResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.MsgConnectionOpenConfirmResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {ibc.core.connection.v1.IMsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenConfirmResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenConfirmResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgConnectionOpenConfirmResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenConfirmResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenConfirmResponse message. - * @function verify - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenConfirmResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenConfirmResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} MsgConnectionOpenConfirmResponse - */ - MsgConnectionOpenConfirmResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse) - return object; - return new $root.ibc.core.connection.v1.MsgConnectionOpenConfirmResponse(); - }; - - /** - * Creates a plain object from a MsgConnectionOpenConfirmResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @static - * @param {ibc.core.connection.v1.MsgConnectionOpenConfirmResponse} message MsgConnectionOpenConfirmResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenConfirmResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgConnectionOpenConfirmResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.MsgConnectionOpenConfirmResponse - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenConfirmResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgConnectionOpenConfirmResponse; - })(); - - v1.ConnectionEnd = (function() { - - /** - * Properties of a ConnectionEnd. - * @memberof ibc.core.connection.v1 - * @interface IConnectionEnd - * @property {string|null} [client_id] ConnectionEnd client_id - * @property {Array.|null} [versions] ConnectionEnd versions - * @property {ibc.core.connection.v1.State|null} [state] ConnectionEnd state - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] ConnectionEnd counterparty - * @property {Long|null} [delay_period] ConnectionEnd delay_period - */ - - /** - * Constructs a new ConnectionEnd. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a ConnectionEnd. - * @implements IConnectionEnd - * @constructor - * @param {ibc.core.connection.v1.IConnectionEnd=} [properties] Properties to set - */ - function ConnectionEnd(properties) { - this.versions = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConnectionEnd client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.client_id = ""; - - /** - * ConnectionEnd versions. - * @member {Array.} versions - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.versions = $util.emptyArray; - - /** - * ConnectionEnd state. - * @member {ibc.core.connection.v1.State} state - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.state = 0; - - /** - * ConnectionEnd counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.counterparty = null; - - /** - * ConnectionEnd delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ConnectionEnd message. Does not implicitly {@link ibc.core.connection.v1.ConnectionEnd.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.versions != null && message.versions.length) - for (let i = 0; i < message.versions.length; ++i) - $root.ibc.core.connection.v1.Version.encode(message.versions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.delay_period); - return writer; - }; - - /** - * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionEnd.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {ibc.core.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 ibc.core.connection.v1.ConnectionEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ConnectionEnd(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 5: - message.delay_period = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.versions != null && message.hasOwnProperty("versions")) { - if (!Array.isArray(message.versions)) - return "versions: array expected"; - for (let i = 0; i < message.versions.length; ++i) { - let error = $root.ibc.core.connection.v1.Version.verify(message.versions[i]); - if (error) - return "versions." + error; - } - } - 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")) { - let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - return null; - }; - - /** - * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.ConnectionEnd} ConnectionEnd - */ - ConnectionEnd.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.ConnectionEnd) - return object; - let message = new $root.ibc.core.connection.v1.ConnectionEnd(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".ibc.core.connection.v1.ConnectionEnd.versions: array expected"); - message.versions = []; - for (let i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".ibc.core.connection.v1.ConnectionEnd.versions: object expected"); - message.versions[i] = $root.ibc.core.connection.v1.Version.fromObject(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(".ibc.core.connection.v1.ConnectionEnd.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.ConnectionEnd - * @static - * @param {ibc.core.connection.v1.ConnectionEnd} message ConnectionEnd - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionEnd.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.versions = []; - if (options.defaults) { - object.client_id = ""; - object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; - object.counterparty = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.versions && message.versions.length) { - object.versions = []; - for (let j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.versions[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.connection.v1.State[message.state] : message.state; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - return object; - }; - - /** - * Converts this ConnectionEnd to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.ConnectionEnd - * @instance - * @returns {Object.} JSON object - */ - ConnectionEnd.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConnectionEnd; - })(); - - v1.IdentifiedConnection = (function() { - - /** - * Properties of an IdentifiedConnection. - * @memberof ibc.core.connection.v1 - * @interface IIdentifiedConnection - * @property {string|null} [id] IdentifiedConnection id - * @property {string|null} [client_id] IdentifiedConnection client_id - * @property {Array.|null} [versions] IdentifiedConnection versions - * @property {ibc.core.connection.v1.State|null} [state] IdentifiedConnection state - * @property {ibc.core.connection.v1.ICounterparty|null} [counterparty] IdentifiedConnection counterparty - * @property {Long|null} [delay_period] IdentifiedConnection delay_period - */ - - /** - * Constructs a new IdentifiedConnection. - * @memberof ibc.core.connection.v1 - * @classdesc Represents an IdentifiedConnection. - * @implements IIdentifiedConnection - * @constructor - * @param {ibc.core.connection.v1.IIdentifiedConnection=} [properties] Properties to set - */ - function IdentifiedConnection(properties) { - this.versions = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedConnection id. - * @member {string} id - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.id = ""; - - /** - * IdentifiedConnection client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.client_id = ""; - - /** - * IdentifiedConnection versions. - * @member {Array.} versions - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.versions = $util.emptyArray; - - /** - * IdentifiedConnection state. - * @member {ibc.core.connection.v1.State} state - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.state = 0; - - /** - * IdentifiedConnection counterparty. - * @member {ibc.core.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.counterparty = null; - - /** - * IdentifiedConnection delay_period. - * @member {Long} delay_period - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - */ - IdentifiedConnection.prototype.delay_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified IdentifiedConnection message. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {ibc.core.connection.v1.IIdentifiedConnection} message IdentifiedConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedConnection.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.client_id); - if (message.versions != null && message.versions.length) - for (let i = 0; i < message.versions.length; ++i) - $root.ibc.core.connection.v1.Version.encode(message.versions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - 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.ibc.core.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.delay_period != null && Object.hasOwnProperty.call(message, "delay_period")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.delay_period); - return writer; - }; - - /** - * Encodes the specified IdentifiedConnection message, length delimited. Does not implicitly {@link ibc.core.connection.v1.IdentifiedConnection.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {ibc.core.connection.v1.IIdentifiedConnection} message IdentifiedConnection message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedConnection.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedConnection message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedConnection.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.IdentifiedConnection(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.string(); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push($root.ibc.core.connection.v1.Version.decode(reader, reader.uint32())); - break; - case 4: - message.state = reader.int32(); - break; - case 5: - message.counterparty = $root.ibc.core.connection.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 6: - message.delay_period = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedConnection message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedConnection.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedConnection message. - * @function verify - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedConnection.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.versions != null && message.hasOwnProperty("versions")) { - if (!Array.isArray(message.versions)) - return "versions: array expected"; - for (let i = 0; i < message.versions.length; ++i) { - let error = $root.ibc.core.connection.v1.Version.verify(message.versions[i]); - if (error) - return "versions." + error; - } - } - 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")) { - let error = $root.ibc.core.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (!$util.isInteger(message.delay_period) && !(message.delay_period && $util.isInteger(message.delay_period.low) && $util.isInteger(message.delay_period.high))) - return "delay_period: integer|Long expected"; - return null; - }; - - /** - * Creates an IdentifiedConnection message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.IdentifiedConnection} IdentifiedConnection - */ - IdentifiedConnection.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.IdentifiedConnection) - return object; - let message = new $root.ibc.core.connection.v1.IdentifiedConnection(); - if (object.id != null) - message.id = String(object.id); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.versions: array expected"); - message.versions = []; - for (let i = 0; i < object.versions.length; ++i) { - if (typeof object.versions[i] !== "object") - throw TypeError(".ibc.core.connection.v1.IdentifiedConnection.versions: object expected"); - message.versions[i] = $root.ibc.core.connection.v1.Version.fromObject(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(".ibc.core.connection.v1.IdentifiedConnection.counterparty: object expected"); - message.counterparty = $root.ibc.core.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.delay_period != null) - if ($util.Long) - (message.delay_period = $util.Long.fromValue(object.delay_period)).unsigned = true; - else if (typeof object.delay_period === "string") - message.delay_period = parseInt(object.delay_period, 10); - else if (typeof object.delay_period === "number") - message.delay_period = object.delay_period; - else if (typeof object.delay_period === "object") - message.delay_period = new $util.LongBits(object.delay_period.low >>> 0, object.delay_period.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an IdentifiedConnection message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @static - * @param {ibc.core.connection.v1.IdentifiedConnection} message IdentifiedConnection - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedConnection.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.versions = []; - if (options.defaults) { - object.id = ""; - object.client_id = ""; - object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; - object.counterparty = null; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.delay_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.delay_period = options.longs === String ? "0" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.versions && message.versions.length) { - object.versions = []; - for (let j = 0; j < message.versions.length; ++j) - object.versions[j] = $root.ibc.core.connection.v1.Version.toObject(message.versions[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.connection.v1.State[message.state] : message.state; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.delay_period != null && message.hasOwnProperty("delay_period")) - if (typeof message.delay_period === "number") - object.delay_period = options.longs === String ? String(message.delay_period) : message.delay_period; - else - object.delay_period = options.longs === String ? $util.Long.prototype.toString.call(message.delay_period) : options.longs === Number ? new $util.LongBits(message.delay_period.low >>> 0, message.delay_period.high >>> 0).toNumber(true) : message.delay_period; - return object; - }; - - /** - * Converts this IdentifiedConnection to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.IdentifiedConnection - * @instance - * @returns {Object.} JSON object - */ - IdentifiedConnection.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedConnection; - })(); - - /** - * State enum. - * @name ibc.core.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() { - const 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 ibc.core.connection.v1 - * @interface ICounterparty - * @property {string|null} [client_id] Counterparty client_id - * @property {string|null} [connection_id] Counterparty connection_id - * @property {ibc.core.commitment.v1.IMerklePrefix|null} [prefix] Counterparty prefix - */ - - /** - * Constructs a new Counterparty. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {ibc.core.connection.v1.ICounterparty=} [properties] Properties to set - */ - function Counterparty(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Counterparty client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.client_id = ""; - - /** - * Counterparty connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.connection_id = ""; - - /** - * Counterparty prefix. - * @member {ibc.core.commitment.v1.IMerklePrefix|null|undefined} prefix - * @memberof ibc.core.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.prefix = null; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.connection.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.Counterparty - * @static - * @param {ibc.core.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.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - $root.ibc.core.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 ibc.core.connection.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.Counterparty - * @static - * @param {ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.Counterparty(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.prefix = $root.ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.prefix != null && message.hasOwnProperty("prefix")) { - let error = $root.ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.Counterparty) - return object; - let message = new $root.ibc.core.connection.v1.Counterparty(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.prefix != null) { - if (typeof object.prefix !== "object") - throw TypeError(".ibc.core.connection.v1.Counterparty.prefix: object expected"); - message.prefix = $root.ibc.core.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 ibc.core.connection.v1.Counterparty - * @static - * @param {ibc.core.connection.v1.Counterparty} message Counterparty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Counterparty.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.connection_id = ""; - object.prefix = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = $root.ibc.core.commitment.v1.MerklePrefix.toObject(message.prefix, options); - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.connection.v1 - * @interface IClientPaths - * @property {Array.|null} [paths] ClientPaths paths - */ - - /** - * Constructs a new ClientPaths. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a ClientPaths. - * @implements IClientPaths - * @constructor - * @param {ibc.core.connection.v1.IClientPaths=} [properties] Properties to set - */ - function ClientPaths(properties) { - this.paths = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientPaths paths. - * @member {Array.} paths - * @memberof ibc.core.connection.v1.ClientPaths - * @instance - */ - ClientPaths.prototype.paths = $util.emptyArray; - - /** - * Encodes the specified ClientPaths message. Does not implicitly {@link ibc.core.connection.v1.ClientPaths.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.ClientPaths - * @static - * @param {ibc.core.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 (let 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 ibc.core.connection.v1.ClientPaths.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.ClientPaths - * @static - * @param {ibc.core.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 ibc.core.connection.v1.ClientPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ClientPaths(); - while (reader.pos < end) { - let 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 ibc.core.connection.v1.ClientPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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 (let 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 ibc.core.connection.v1.ClientPaths - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.ClientPaths} ClientPaths - */ - ClientPaths.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.ClientPaths) - return object; - let message = new $root.ibc.core.connection.v1.ClientPaths(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".ibc.core.connection.v1.ClientPaths.paths: array expected"); - message.paths = []; - for (let 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 ibc.core.connection.v1.ClientPaths - * @static - * @param {ibc.core.connection.v1.ClientPaths} message ClientPaths - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientPaths.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (let j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this ClientPaths to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.ClientPaths - * @instance - * @returns {Object.} JSON object - */ - ClientPaths.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientPaths; - })(); - - v1.ConnectionPaths = (function() { - - /** - * Properties of a ConnectionPaths. - * @memberof ibc.core.connection.v1 - * @interface IConnectionPaths - * @property {string|null} [client_id] ConnectionPaths client_id - * @property {Array.|null} [paths] ConnectionPaths paths - */ - - /** - * Constructs a new ConnectionPaths. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a ConnectionPaths. - * @implements IConnectionPaths - * @constructor - * @param {ibc.core.connection.v1.IConnectionPaths=} [properties] Properties to set - */ - function ConnectionPaths(properties) { - this.paths = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConnectionPaths client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.ConnectionPaths - * @instance - */ - ConnectionPaths.prototype.client_id = ""; - - /** - * ConnectionPaths paths. - * @member {Array.} paths - * @memberof ibc.core.connection.v1.ConnectionPaths - * @instance - */ - ConnectionPaths.prototype.paths = $util.emptyArray; - - /** - * Encodes the specified ConnectionPaths message. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {ibc.core.connection.v1.IConnectionPaths} message ConnectionPaths message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionPaths.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.paths != null && message.paths.length) - for (let i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified ConnectionPaths message, length delimited. Does not implicitly {@link ibc.core.connection.v1.ConnectionPaths.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {ibc.core.connection.v1.IConnectionPaths} message ConnectionPaths message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionPaths.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectionPaths message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionPaths.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.ConnectionPaths(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionPaths message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionPaths.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionPaths message. - * @function verify - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionPaths.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (let i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a ConnectionPaths message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.ConnectionPaths} ConnectionPaths - */ - ConnectionPaths.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.ConnectionPaths) - return object; - let message = new $root.ibc.core.connection.v1.ConnectionPaths(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".ibc.core.connection.v1.ConnectionPaths.paths: array expected"); - message.paths = []; - for (let i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a ConnectionPaths message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.ConnectionPaths - * @static - * @param {ibc.core.connection.v1.ConnectionPaths} message ConnectionPaths - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionPaths.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.paths && message.paths.length) { - object.paths = []; - for (let j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this ConnectionPaths to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.ConnectionPaths - * @instance - * @returns {Object.} JSON object - */ - ConnectionPaths.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConnectionPaths; - })(); - - v1.Version = (function() { - - /** - * Properties of a Version. - * @memberof ibc.core.connection.v1 - * @interface IVersion - * @property {string|null} [identifier] Version identifier - * @property {Array.|null} [features] Version features - */ - - /** - * Constructs a new Version. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Version. - * @implements IVersion - * @constructor - * @param {ibc.core.connection.v1.IVersion=} [properties] Properties to set - */ - function Version(properties) { - this.features = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Version identifier. - * @member {string} identifier - * @memberof ibc.core.connection.v1.Version - * @instance - */ - Version.prototype.identifier = ""; - - /** - * Version features. - * @member {Array.} features - * @memberof ibc.core.connection.v1.Version - * @instance - */ - Version.prototype.features = $util.emptyArray; - - /** - * Encodes the specified Version message. Does not implicitly {@link ibc.core.connection.v1.Version.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.Version - * @static - * @param {ibc.core.connection.v1.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.identifier != null && Object.hasOwnProperty.call(message, "identifier")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.identifier); - if (message.features != null && message.features.length) - for (let i = 0; i < message.features.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.features[i]); - return writer; - }; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link ibc.core.connection.v1.Version.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.Version - * @static - * @param {ibc.core.connection.v1.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 ibc.core.connection.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.Version(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identifier = reader.string(); - break; - case 2: - if (!(message.features && message.features.length)) - message.features = []; - message.features.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.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 ibc.core.connection.v1.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.identifier != null && message.hasOwnProperty("identifier")) - if (!$util.isString(message.identifier)) - return "identifier: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - if (!Array.isArray(message.features)) - return "features: array expected"; - for (let i = 0; i < message.features.length; ++i) - if (!$util.isString(message.features[i])) - return "features: string[] expected"; - } - return null; - }; - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.Version - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.Version} Version - */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.Version) - return object; - let message = new $root.ibc.core.connection.v1.Version(); - if (object.identifier != null) - message.identifier = String(object.identifier); - if (object.features) { - if (!Array.isArray(object.features)) - throw TypeError(".ibc.core.connection.v1.Version.features: array expected"); - message.features = []; - for (let i = 0; i < object.features.length; ++i) - message.features[i] = String(object.features[i]); - } - return message; - }; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.Version - * @static - * @param {ibc.core.connection.v1.Version} message Version - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Version.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.features = []; - if (options.defaults) - object.identifier = ""; - if (message.identifier != null && message.hasOwnProperty("identifier")) - object.identifier = message.identifier; - if (message.features && message.features.length) { - object.features = []; - for (let j = 0; j < message.features.length; ++j) - object.features[j] = message.features[j]; - } - return object; - }; - - /** - * Converts this Version to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.Version - * @instance - * @returns {Object.} JSON object - */ - Version.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Version; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.core.connection.v1 - * @interface IParams - * @property {Long|null} [max_expected_time_per_block] Params max_expected_time_per_block - */ - - /** - * Constructs a new Params. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.core.connection.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params max_expected_time_per_block. - * @member {Long} max_expected_time_per_block - * @memberof ibc.core.connection.v1.Params - * @instance - */ - Params.prototype.max_expected_time_per_block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.connection.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.Params - * @static - * @param {ibc.core.connection.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.max_expected_time_per_block != null && Object.hasOwnProperty.call(message, "max_expected_time_per_block")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.max_expected_time_per_block); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.connection.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.Params - * @static - * @param {ibc.core.connection.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 ibc.core.connection.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_expected_time_per_block = 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 ibc.core.connection.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.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 ibc.core.connection.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.max_expected_time_per_block != null && message.hasOwnProperty("max_expected_time_per_block")) - if (!$util.isInteger(message.max_expected_time_per_block) && !(message.max_expected_time_per_block && $util.isInteger(message.max_expected_time_per_block.low) && $util.isInteger(message.max_expected_time_per_block.high))) - return "max_expected_time_per_block: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.Params) - return object; - let message = new $root.ibc.core.connection.v1.Params(); - if (object.max_expected_time_per_block != null) - if ($util.Long) - (message.max_expected_time_per_block = $util.Long.fromValue(object.max_expected_time_per_block)).unsigned = true; - else if (typeof object.max_expected_time_per_block === "string") - message.max_expected_time_per_block = parseInt(object.max_expected_time_per_block, 10); - else if (typeof object.max_expected_time_per_block === "number") - message.max_expected_time_per_block = object.max_expected_time_per_block; - else if (typeof object.max_expected_time_per_block === "object") - message.max_expected_time_per_block = new $util.LongBits(object.max_expected_time_per_block.low >>> 0, object.max_expected_time_per_block.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 ibc.core.connection.v1.Params - * @static - * @param {ibc.core.connection.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.max_expected_time_per_block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_expected_time_per_block = options.longs === String ? "0" : 0; - if (message.max_expected_time_per_block != null && message.hasOwnProperty("max_expected_time_per_block")) - if (typeof message.max_expected_time_per_block === "number") - object.max_expected_time_per_block = options.longs === String ? String(message.max_expected_time_per_block) : message.max_expected_time_per_block; - else - object.max_expected_time_per_block = options.longs === String ? $util.Long.prototype.toString.call(message.max_expected_time_per_block) : options.longs === Number ? new $util.LongBits(message.max_expected_time_per_block.low >>> 0, message.max_expected_time_per_block.high >>> 0).toNumber(true) : message.max_expected_time_per_block; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.core.connection.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; - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connection}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionResponse} [response] QueryConnectionResponse - */ - - /** - * Calls Connection. - * @function connection - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionRequest} request QueryConnectionRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionCallback} callback Node-style callback called with the error, if any, and QueryConnectionResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connection = function connection(request, callback) { - return this.rpcCall(connection, $root.ibc.core.connection.v1.QueryConnectionRequest, $root.ibc.core.connection.v1.QueryConnectionResponse, request, callback); - }, "name", { value: "Connection" }); - - /** - * Calls Connection. - * @function connection - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionRequest} request QueryConnectionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connections}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionsResponse} [response] QueryConnectionsResponse - */ - - /** - * Calls Connections. - * @function connections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} request QueryConnectionsRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionsCallback} callback Node-style callback called with the error, if any, and QueryConnectionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connections = function connections(request, callback) { - return this.rpcCall(connections, $root.ibc.core.connection.v1.QueryConnectionsRequest, $root.ibc.core.connection.v1.QueryConnectionsResponse, request, callback); - }, "name", { value: "Connections" }); - - /** - * Calls Connections. - * @function connections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} request QueryConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#clientConnections}. - * @memberof ibc.core.connection.v1.Query - * @typedef ClientConnectionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryClientConnectionsResponse} [response] QueryClientConnectionsResponse - */ - - /** - * Calls ClientConnections. - * @function clientConnections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} request QueryClientConnectionsRequest message or plain object - * @param {ibc.core.connection.v1.Query.ClientConnectionsCallback} callback Node-style callback called with the error, if any, and QueryClientConnectionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.clientConnections = function clientConnections(request, callback) { - return this.rpcCall(clientConnections, $root.ibc.core.connection.v1.QueryClientConnectionsRequest, $root.ibc.core.connection.v1.QueryClientConnectionsResponse, request, callback); - }, "name", { value: "ClientConnections" }); - - /** - * Calls ClientConnections. - * @function clientConnections - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} request QueryClientConnectionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionClientState}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionClientStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionClientStateResponse} [response] QueryConnectionClientStateResponse - */ - - /** - * Calls ConnectionClientState. - * @function connectionClientState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} request QueryConnectionClientStateRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionClientStateCallback} callback Node-style callback called with the error, if any, and QueryConnectionClientStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionClientState = function connectionClientState(request, callback) { - return this.rpcCall(connectionClientState, $root.ibc.core.connection.v1.QueryConnectionClientStateRequest, $root.ibc.core.connection.v1.QueryConnectionClientStateResponse, request, callback); - }, "name", { value: "ConnectionClientState" }); - - /** - * Calls ConnectionClientState. - * @function connectionClientState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} request QueryConnectionClientStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionConsensusState}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionConsensusStateCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} [response] QueryConnectionConsensusStateResponse - */ - - /** - * Calls ConnectionConsensusState. - * @function connectionConsensusState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} request QueryConnectionConsensusStateRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionConsensusStateCallback} callback Node-style callback called with the error, if any, and QueryConnectionConsensusStateResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionConsensusState = function connectionConsensusState(request, callback) { - return this.rpcCall(connectionConsensusState, $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest, $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse, request, callback); - }, "name", { value: "ConnectionConsensusState" }); - - /** - * Calls ConnectionConsensusState. - * @function connectionConsensusState - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} request QueryConnectionConsensusStateRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.core.connection.v1.Query#connectionParams}. - * @memberof ibc.core.connection.v1.Query - * @typedef ConnectionParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.core.connection.v1.QueryConnectionParamsResponse} [response] QueryConnectionParamsResponse - */ - - /** - * Calls ConnectionParams. - * @function connectionParams - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} request QueryConnectionParamsRequest message or plain object - * @param {ibc.core.connection.v1.Query.ConnectionParamsCallback} callback Node-style callback called with the error, if any, and QueryConnectionParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.connectionParams = function connectionParams(request, callback) { - return this.rpcCall(connectionParams, $root.ibc.core.connection.v1.QueryConnectionParamsRequest, $root.ibc.core.connection.v1.QueryConnectionParamsResponse, request, callback); - }, "name", { value: "ConnectionParams" }); - - /** - * Calls ConnectionParams. - * @function connectionParams - * @memberof ibc.core.connection.v1.Query - * @instance - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} request QueryConnectionParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryConnectionRequest = (function() { - - /** - * Properties of a QueryConnectionRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionRequest - * @property {string|null} [connection_id] QueryConnectionRequest connection_id - */ - - /** - * Constructs a new QueryConnectionRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionRequest. - * @implements IQueryConnectionRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionRequest=} [properties] Properties to set - */ - function QueryConnectionRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionRequest connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @instance - */ - QueryConnectionRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryConnectionRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionRequest} message QueryConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryConnectionRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionRequest} message QueryConnectionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryConnectionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionRequest} QueryConnectionRequest - */ - QueryConnectionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionRequest) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionRequest(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryConnectionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionRequest} message QueryConnectionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.connection_id = ""; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryConnectionRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionRequest; - })(); - - v1.QueryConnectionResponse = (function() { - - /** - * Properties of a QueryConnectionResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionResponse - * @property {ibc.core.connection.v1.IConnectionEnd|null} [connection] QueryConnectionResponse connection - * @property {Uint8Array|null} [proof] QueryConnectionResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConnectionResponse proof_height - */ - - /** - * Constructs a new QueryConnectionResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionResponse. - * @implements IQueryConnectionResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionResponse=} [properties] Properties to set - */ - function QueryConnectionResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionResponse connection. - * @member {ibc.core.connection.v1.IConnectionEnd|null|undefined} connection - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - */ - QueryConnectionResponse.prototype.connection = null; - - /** - * QueryConnectionResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - */ - QueryConnectionResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConnectionResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - */ - QueryConnectionResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConnectionResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionResponse} message QueryConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - $root.ibc.core.connection.v1.ConnectionEnd.encode(message.connection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionResponse} message QueryConnectionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection != null && message.hasOwnProperty("connection")) { - let error = $root.ibc.core.connection.v1.ConnectionEnd.verify(message.connection); - if (error) - return "connection." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionResponse} QueryConnectionResponse - */ - QueryConnectionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionResponse) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionResponse(); - if (object.connection != null) { - if (typeof object.connection !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionResponse.connection: object expected"); - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.fromObject(object.connection); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionResponse} message QueryConnectionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = $root.ibc.core.connection.v1.ConnectionEnd.toObject(message.connection, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConnectionResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionResponse; - })(); - - v1.QueryConnectionsRequest = (function() { - - /** - * Properties of a QueryConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionsRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryConnectionsRequest pagination - */ - - /** - * Constructs a new QueryConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionsRequest. - * @implements IQueryConnectionsRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionsRequest=} [properties] Properties to set - */ - function QueryConnectionsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionsRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @instance - */ - QueryConnectionsRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} message QueryConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsRequest} message QueryConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionsRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionsRequest} QueryConnectionsRequest - */ - QueryConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionsRequest) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionsRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionsRequest} message QueryConnectionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryConnectionsRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionsRequest; - })(); - - v1.QueryConnectionsResponse = (function() { - - /** - * Properties of a QueryConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionsResponse - * @property {Array.|null} [connections] QueryConnectionsResponse connections - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryConnectionsResponse pagination - * @property {ibc.core.client.v1.IHeight|null} [height] QueryConnectionsResponse height - */ - - /** - * Constructs a new QueryConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionsResponse. - * @implements IQueryConnectionsResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionsResponse=} [properties] Properties to set - */ - function QueryConnectionsResponse(properties) { - this.connections = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionsResponse connections. - * @member {Array.} connections - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - */ - QueryConnectionsResponse.prototype.connections = $util.emptyArray; - - /** - * QueryConnectionsResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - */ - QueryConnectionsResponse.prototype.pagination = null; - - /** - * QueryConnectionsResponse height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - */ - QueryConnectionsResponse.prototype.height = null; - - /** - * Encodes the specified QueryConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsResponse} message QueryConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connections != null && message.connections.length) - for (let i = 0; i < message.connections.length; ++i) - $root.ibc.core.connection.v1.IdentifiedConnection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionsResponse} message QueryConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.connections && message.connections.length)) - message.connections = []; - message.connections.push($root.ibc.core.connection.v1.IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - case 3: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionsResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connections != null && message.hasOwnProperty("connections")) { - if (!Array.isArray(message.connections)) - return "connections: array expected"; - for (let i = 0; i < message.connections.length; ++i) { - let error = $root.ibc.core.connection.v1.IdentifiedConnection.verify(message.connections[i]); - if (error) - return "connections." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - let error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - if (message.height != null && message.hasOwnProperty("height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionsResponse} QueryConnectionsResponse - */ - QueryConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionsResponse) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionsResponse(); - if (object.connections) { - if (!Array.isArray(object.connections)) - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.connections: array expected"); - message.connections = []; - for (let i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.connections: object expected"); - message.connections[i] = $root.ibc.core.connection.v1.IdentifiedConnection.fromObject(object.connections[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionsResponse.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionsResponse} message QueryConnectionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.connections = []; - if (options.defaults) { - object.pagination = null; - object.height = null; - } - if (message.connections && message.connections.length) { - object.connections = []; - for (let j = 0; j < message.connections.length; ++j) - object.connections[j] = $root.ibc.core.connection.v1.IdentifiedConnection.toObject(message.connections[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - return object; - }; - - /** - * Converts this QueryConnectionsResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionsResponse; - })(); - - v1.QueryClientConnectionsRequest = (function() { - - /** - * Properties of a QueryClientConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryClientConnectionsRequest - * @property {string|null} [client_id] QueryClientConnectionsRequest client_id - */ - - /** - * Constructs a new QueryClientConnectionsRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryClientConnectionsRequest. - * @implements IQueryClientConnectionsRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest=} [properties] Properties to set - */ - function QueryClientConnectionsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientConnectionsRequest client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @instance - */ - QueryClientConnectionsRequest.prototype.client_id = ""; - - /** - * Encodes the specified QueryClientConnectionsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} message QueryClientConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - return writer; - }; - - /** - * Encodes the specified QueryClientConnectionsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsRequest} message QueryClientConnectionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryClientConnectionsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientConnectionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientConnectionsRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientConnectionsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - return null; - }; - - /** - * Creates a QueryClientConnectionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryClientConnectionsRequest} QueryClientConnectionsRequest - */ - QueryClientConnectionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryClientConnectionsRequest) - return object; - let message = new $root.ibc.core.connection.v1.QueryClientConnectionsRequest(); - if (object.client_id != null) - message.client_id = String(object.client_id); - return message; - }; - - /** - * Creates a plain object from a QueryClientConnectionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @static - * @param {ibc.core.connection.v1.QueryClientConnectionsRequest} message QueryClientConnectionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientConnectionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - return object; - }; - - /** - * Converts this QueryClientConnectionsRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryClientConnectionsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryClientConnectionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientConnectionsRequest; - })(); - - v1.QueryClientConnectionsResponse = (function() { - - /** - * Properties of a QueryClientConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryClientConnectionsResponse - * @property {Array.|null} [connection_paths] QueryClientConnectionsResponse connection_paths - * @property {Uint8Array|null} [proof] QueryClientConnectionsResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryClientConnectionsResponse proof_height - */ - - /** - * Constructs a new QueryClientConnectionsResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryClientConnectionsResponse. - * @implements IQueryClientConnectionsResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse=} [properties] Properties to set - */ - function QueryClientConnectionsResponse(properties) { - this.connection_paths = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryClientConnectionsResponse connection_paths. - * @member {Array.} connection_paths - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - */ - QueryClientConnectionsResponse.prototype.connection_paths = $util.emptyArray; - - /** - * QueryClientConnectionsResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - */ - QueryClientConnectionsResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryClientConnectionsResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - */ - QueryClientConnectionsResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryClientConnectionsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} message QueryClientConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_paths != null && message.connection_paths.length) - for (let i = 0; i < message.connection_paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_paths[i]); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryClientConnectionsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryClientConnectionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {ibc.core.connection.v1.IQueryClientConnectionsResponse} message QueryClientConnectionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryClientConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryClientConnectionsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.connection_paths && message.connection_paths.length)) - message.connection_paths = []; - message.connection_paths.push(reader.string()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryClientConnectionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryClientConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryClientConnectionsResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryClientConnectionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_paths != null && message.hasOwnProperty("connection_paths")) { - if (!Array.isArray(message.connection_paths)) - return "connection_paths: array expected"; - for (let i = 0; i < message.connection_paths.length; ++i) - if (!$util.isString(message.connection_paths[i])) - return "connection_paths: string[] expected"; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryClientConnectionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryClientConnectionsResponse} QueryClientConnectionsResponse - */ - QueryClientConnectionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryClientConnectionsResponse) - return object; - let message = new $root.ibc.core.connection.v1.QueryClientConnectionsResponse(); - if (object.connection_paths) { - if (!Array.isArray(object.connection_paths)) - throw TypeError(".ibc.core.connection.v1.QueryClientConnectionsResponse.connection_paths: array expected"); - message.connection_paths = []; - for (let i = 0; i < object.connection_paths.length; ++i) - message.connection_paths[i] = String(object.connection_paths[i]); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryClientConnectionsResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryClientConnectionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @static - * @param {ibc.core.connection.v1.QueryClientConnectionsResponse} message QueryClientConnectionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryClientConnectionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.connection_paths = []; - if (options.defaults) { - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.connection_paths && message.connection_paths.length) { - object.connection_paths = []; - for (let j = 0; j < message.connection_paths.length; ++j) - object.connection_paths[j] = message.connection_paths[j]; - } - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryClientConnectionsResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryClientConnectionsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryClientConnectionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryClientConnectionsResponse; - })(); - - v1.QueryConnectionClientStateRequest = (function() { - - /** - * Properties of a QueryConnectionClientStateRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionClientStateRequest - * @property {string|null} [connection_id] QueryConnectionClientStateRequest connection_id - */ - - /** - * Constructs a new QueryConnectionClientStateRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionClientStateRequest. - * @implements IQueryConnectionClientStateRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest=} [properties] Properties to set - */ - function QueryConnectionClientStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionClientStateRequest connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @instance - */ - QueryConnectionClientStateRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryConnectionClientStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} message QueryConnectionClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryConnectionClientStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateRequest} message QueryConnectionClientStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionClientStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionClientStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionClientStateRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionClientStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryConnectionClientStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionClientStateRequest} QueryConnectionClientStateRequest - */ - QueryConnectionClientStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionClientStateRequest) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionClientStateRequest(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryConnectionClientStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionClientStateRequest} message QueryConnectionClientStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionClientStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.connection_id = ""; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryConnectionClientStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionClientStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionClientStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionClientStateRequest; - })(); - - v1.QueryConnectionClientStateResponse = (function() { - - /** - * Properties of a QueryConnectionClientStateResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionClientStateResponse - * @property {ibc.core.client.v1.IIdentifiedClientState|null} [identified_client_state] QueryConnectionClientStateResponse identified_client_state - * @property {Uint8Array|null} [proof] QueryConnectionClientStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConnectionClientStateResponse proof_height - */ - - /** - * Constructs a new QueryConnectionClientStateResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionClientStateResponse. - * @implements IQueryConnectionClientStateResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse=} [properties] Properties to set - */ - function QueryConnectionClientStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionClientStateResponse identified_client_state. - * @member {ibc.core.client.v1.IIdentifiedClientState|null|undefined} identified_client_state - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - */ - QueryConnectionClientStateResponse.prototype.identified_client_state = null; - - /** - * QueryConnectionClientStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - */ - QueryConnectionClientStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConnectionClientStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - */ - QueryConnectionClientStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConnectionClientStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} message QueryConnectionClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.identified_client_state != null && Object.hasOwnProperty.call(message, "identified_client_state")) - $root.ibc.core.client.v1.IdentifiedClientState.encode(message.identified_client_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionClientStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionClientStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionClientStateResponse} message QueryConnectionClientStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionClientStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionClientStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.decode(reader, reader.uint32()); - break; - case 2: - message.proof = reader.bytes(); - break; - case 3: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionClientStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionClientStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionClientStateResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionClientStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) { - let error = $root.ibc.core.client.v1.IdentifiedClientState.verify(message.identified_client_state); - if (error) - return "identified_client_state." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionClientStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionClientStateResponse} QueryConnectionClientStateResponse - */ - QueryConnectionClientStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionClientStateResponse) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionClientStateResponse(); - if (object.identified_client_state != null) { - if (typeof object.identified_client_state !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionClientStateResponse.identified_client_state: object expected"); - message.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.fromObject(object.identified_client_state); - } - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionClientStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionClientStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionClientStateResponse} message QueryConnectionClientStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionClientStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.identified_client_state = null; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.identified_client_state != null && message.hasOwnProperty("identified_client_state")) - object.identified_client_state = $root.ibc.core.client.v1.IdentifiedClientState.toObject(message.identified_client_state, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConnectionClientStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionClientStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionClientStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionClientStateResponse; - })(); - - v1.QueryConnectionConsensusStateRequest = (function() { - - /** - * Properties of a QueryConnectionConsensusStateRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionConsensusStateRequest - * @property {string|null} [connection_id] QueryConnectionConsensusStateRequest connection_id - * @property {Long|null} [revision_number] QueryConnectionConsensusStateRequest revision_number - * @property {Long|null} [revision_height] QueryConnectionConsensusStateRequest revision_height - */ - - /** - * Constructs a new QueryConnectionConsensusStateRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionConsensusStateRequest. - * @implements IQueryConnectionConsensusStateRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest=} [properties] Properties to set - */ - function QueryConnectionConsensusStateRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionConsensusStateRequest connection_id. - * @member {string} connection_id - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - */ - QueryConnectionConsensusStateRequest.prototype.connection_id = ""; - - /** - * QueryConnectionConsensusStateRequest revision_number. - * @member {Long} revision_number - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - */ - QueryConnectionConsensusStateRequest.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryConnectionConsensusStateRequest revision_height. - * @member {Long} revision_height - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - */ - QueryConnectionConsensusStateRequest.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryConnectionConsensusStateRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified QueryConnectionConsensusStateRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - case 2: - message.revision_number = reader.uint64(); - break; - case 3: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionConsensusStateRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionConsensusStateRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionConsensusStateRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryConnectionConsensusStateRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} QueryConnectionConsensusStateRequest - */ - QueryConnectionConsensusStateRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateRequest(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryConnectionConsensusStateRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionConsensusStateRequest} message QueryConnectionConsensusStateRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionConsensusStateRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.connection_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this QueryConnectionConsensusStateRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionConsensusStateRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionConsensusStateRequest; - })(); - - v1.QueryConnectionConsensusStateResponse = (function() { - - /** - * Properties of a QueryConnectionConsensusStateResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionConsensusStateResponse - * @property {google.protobuf.IAny|null} [consensus_state] QueryConnectionConsensusStateResponse consensus_state - * @property {string|null} [client_id] QueryConnectionConsensusStateResponse client_id - * @property {Uint8Array|null} [proof] QueryConnectionConsensusStateResponse proof - * @property {ibc.core.client.v1.IHeight|null} [proof_height] QueryConnectionConsensusStateResponse proof_height - */ - - /** - * Constructs a new QueryConnectionConsensusStateResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionConsensusStateResponse. - * @implements IQueryConnectionConsensusStateResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse=} [properties] Properties to set - */ - function QueryConnectionConsensusStateResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionConsensusStateResponse consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.consensus_state = null; - - /** - * QueryConnectionConsensusStateResponse client_id. - * @member {string} client_id - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.client_id = ""; - - /** - * QueryConnectionConsensusStateResponse proof. - * @member {Uint8Array} proof - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.proof = $util.newBuffer([]); - - /** - * QueryConnectionConsensusStateResponse proof_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} proof_height - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - */ - QueryConnectionConsensusStateResponse.prototype.proof_height = null; - - /** - * Encodes the specified QueryConnectionConsensusStateResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.client_id); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proof); - if (message.proof_height != null && Object.hasOwnProperty.call(message, "proof_height")) - $root.ibc.core.client.v1.Height.encode(message.proof_height, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionConsensusStateResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionConsensusStateResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionConsensusStateResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.client_id = reader.string(); - break; - case 3: - message.proof = reader.bytes(); - break; - case 4: - message.proof_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionConsensusStateResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionConsensusStateResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionConsensusStateResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionConsensusStateResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.proof != null && message.hasOwnProperty("proof")) - if (!(message.proof && typeof message.proof.length === "number" || $util.isString(message.proof))) - return "proof: buffer expected"; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.proof_height); - if (error) - return "proof_height." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionConsensusStateResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} QueryConnectionConsensusStateResponse - */ - QueryConnectionConsensusStateResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionConsensusStateResponse(); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionConsensusStateResponse.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.proof != null) - if (typeof object.proof === "string") - $util.base64.decode(object.proof, message.proof = $util.newBuffer($util.base64.length(object.proof)), 0); - else if (object.proof.length) - message.proof = object.proof; - if (object.proof_height != null) { - if (typeof object.proof_height !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionConsensusStateResponse.proof_height: object expected"); - message.proof_height = $root.ibc.core.client.v1.Height.fromObject(object.proof_height); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionConsensusStateResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionConsensusStateResponse} message QueryConnectionConsensusStateResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionConsensusStateResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.consensus_state = null; - object.client_id = ""; - if (options.bytes === String) - object.proof = ""; - else { - object.proof = []; - if (options.bytes !== Array) - object.proof = $util.newBuffer(object.proof); - } - object.proof_height = null; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = options.bytes === String ? $util.base64.encode(message.proof, 0, message.proof.length) : options.bytes === Array ? Array.prototype.slice.call(message.proof) : message.proof; - if (message.proof_height != null && message.hasOwnProperty("proof_height")) - object.proof_height = $root.ibc.core.client.v1.Height.toObject(message.proof_height, options); - return object; - }; - - /** - * Converts this QueryConnectionConsensusStateResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionConsensusStateResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionConsensusStateResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionConsensusStateResponse; - })(); - - v1.QueryConnectionParamsRequest = (function() { - - /** - * Properties of a QueryConnectionParamsRequest. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionParamsRequest - */ - - /** - * Constructs a new QueryConnectionParamsRequest. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionParamsRequest. - * @implements IQueryConnectionParamsRequest - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest=} [properties] Properties to set - */ - function QueryConnectionParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryConnectionParamsRequest message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} message QueryConnectionParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionParamsRequest message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsRequest} message QueryConnectionParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionParamsRequest} QueryConnectionParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionParamsRequest} QueryConnectionParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionParamsRequest message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryConnectionParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionParamsRequest} QueryConnectionParamsRequest - */ - QueryConnectionParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionParamsRequest) - return object; - return new $root.ibc.core.connection.v1.QueryConnectionParamsRequest(); - }; - - /** - * Creates a plain object from a QueryConnectionParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @static - * @param {ibc.core.connection.v1.QueryConnectionParamsRequest} message QueryConnectionParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryConnectionParamsRequest to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionParamsRequest; - })(); - - v1.QueryConnectionParamsResponse = (function() { - - /** - * Properties of a QueryConnectionParamsResponse. - * @memberof ibc.core.connection.v1 - * @interface IQueryConnectionParamsResponse - * @property {ibc.core.connection.v1.IParams|null} [params] QueryConnectionParamsResponse params - */ - - /** - * Constructs a new QueryConnectionParamsResponse. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a QueryConnectionParamsResponse. - * @implements IQueryConnectionParamsResponse - * @constructor - * @param {ibc.core.connection.v1.IQueryConnectionParamsResponse=} [properties] Properties to set - */ - function QueryConnectionParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryConnectionParamsResponse params. - * @member {ibc.core.connection.v1.IParams|null|undefined} params - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @instance - */ - QueryConnectionParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryConnectionParamsResponse message. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsResponse} message QueryConnectionParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.connection.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryConnectionParamsResponse message, length delimited. Does not implicitly {@link ibc.core.connection.v1.QueryConnectionParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {ibc.core.connection.v1.IQueryConnectionParamsResponse} message QueryConnectionParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryConnectionParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryConnectionParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.QueryConnectionParamsResponse} QueryConnectionParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.QueryConnectionParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.core.connection.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryConnectionParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.QueryConnectionParamsResponse} QueryConnectionParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryConnectionParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryConnectionParamsResponse message. - * @function verify - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryConnectionParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.core.connection.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryConnectionParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.QueryConnectionParamsResponse} QueryConnectionParamsResponse - */ - QueryConnectionParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.QueryConnectionParamsResponse) - return object; - let message = new $root.ibc.core.connection.v1.QueryConnectionParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.connection.v1.QueryConnectionParamsResponse.params: object expected"); - message.params = $root.ibc.core.connection.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryConnectionParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @static - * @param {ibc.core.connection.v1.QueryConnectionParamsResponse} message QueryConnectionParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryConnectionParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.connection.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryConnectionParamsResponse to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.QueryConnectionParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryConnectionParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryConnectionParamsResponse; - })(); - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.connection.v1 - * @interface IGenesisState - * @property {Array.|null} [connections] GenesisState connections - * @property {Array.|null} [client_connection_paths] GenesisState client_connection_paths - * @property {Long|null} [next_connection_sequence] GenesisState next_connection_sequence - * @property {ibc.core.connection.v1.IParams|null} [params] GenesisState params - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.connection.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.connection.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.connections = []; - this.client_connection_paths = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState connections. - * @member {Array.} connections - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.connections = $util.emptyArray; - - /** - * GenesisState client_connection_paths. - * @member {Array.} client_connection_paths - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.client_connection_paths = $util.emptyArray; - - /** - * GenesisState next_connection_sequence. - * @member {Long} next_connection_sequence - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.next_connection_sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * GenesisState params. - * @member {ibc.core.connection.v1.IParams|null|undefined} params - * @memberof ibc.core.connection.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {ibc.core.connection.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connections != null && message.connections.length) - for (let i = 0; i < message.connections.length; ++i) - $root.ibc.core.connection.v1.IdentifiedConnection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.client_connection_paths != null && message.client_connection_paths.length) - for (let i = 0; i < message.client_connection_paths.length; ++i) - $root.ibc.core.connection.v1.ConnectionPaths.encode(message.client_connection_paths[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.next_connection_sequence != null && Object.hasOwnProperty.call(message, "next_connection_sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.next_connection_sequence); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.core.connection.v1.Params.encode(message.params, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.connection.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {ibc.core.connection.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.connection.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.connection.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.connections && message.connections.length)) - message.connections = []; - message.connections.push($root.ibc.core.connection.v1.IdentifiedConnection.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.client_connection_paths && message.client_connection_paths.length)) - message.client_connection_paths = []; - message.client_connection_paths.push($root.ibc.core.connection.v1.ConnectionPaths.decode(reader, reader.uint32())); - break; - case 3: - message.next_connection_sequence = reader.uint64(); - break; - case 4: - message.params = $root.ibc.core.connection.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.connection.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connections != null && message.hasOwnProperty("connections")) { - if (!Array.isArray(message.connections)) - return "connections: array expected"; - for (let i = 0; i < message.connections.length; ++i) { - let error = $root.ibc.core.connection.v1.IdentifiedConnection.verify(message.connections[i]); - if (error) - return "connections." + error; - } - } - if (message.client_connection_paths != null && message.hasOwnProperty("client_connection_paths")) { - if (!Array.isArray(message.client_connection_paths)) - return "client_connection_paths: array expected"; - for (let i = 0; i < message.client_connection_paths.length; ++i) { - let error = $root.ibc.core.connection.v1.ConnectionPaths.verify(message.client_connection_paths[i]); - if (error) - return "client_connection_paths." + error; - } - } - if (message.next_connection_sequence != null && message.hasOwnProperty("next_connection_sequence")) - if (!$util.isInteger(message.next_connection_sequence) && !(message.next_connection_sequence && $util.isInteger(message.next_connection_sequence.low) && $util.isInteger(message.next_connection_sequence.high))) - return "next_connection_sequence: integer|Long expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.ibc.core.connection.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.connection.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.connection.v1.GenesisState) - return object; - let message = new $root.ibc.core.connection.v1.GenesisState(); - if (object.connections) { - if (!Array.isArray(object.connections)) - throw TypeError(".ibc.core.connection.v1.GenesisState.connections: array expected"); - message.connections = []; - for (let i = 0; i < object.connections.length; ++i) { - if (typeof object.connections[i] !== "object") - throw TypeError(".ibc.core.connection.v1.GenesisState.connections: object expected"); - message.connections[i] = $root.ibc.core.connection.v1.IdentifiedConnection.fromObject(object.connections[i]); - } - } - if (object.client_connection_paths) { - if (!Array.isArray(object.client_connection_paths)) - throw TypeError(".ibc.core.connection.v1.GenesisState.client_connection_paths: array expected"); - message.client_connection_paths = []; - for (let i = 0; i < object.client_connection_paths.length; ++i) { - if (typeof object.client_connection_paths[i] !== "object") - throw TypeError(".ibc.core.connection.v1.GenesisState.client_connection_paths: object expected"); - message.client_connection_paths[i] = $root.ibc.core.connection.v1.ConnectionPaths.fromObject(object.client_connection_paths[i]); - } - } - if (object.next_connection_sequence != null) - if ($util.Long) - (message.next_connection_sequence = $util.Long.fromValue(object.next_connection_sequence)).unsigned = true; - else if (typeof object.next_connection_sequence === "string") - message.next_connection_sequence = parseInt(object.next_connection_sequence, 10); - else if (typeof object.next_connection_sequence === "number") - message.next_connection_sequence = object.next_connection_sequence; - else if (typeof object.next_connection_sequence === "object") - message.next_connection_sequence = new $util.LongBits(object.next_connection_sequence.low >>> 0, object.next_connection_sequence.high >>> 0).toNumber(true); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.core.connection.v1.GenesisState.params: object expected"); - message.params = $root.ibc.core.connection.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.connection.v1.GenesisState - * @static - * @param {ibc.core.connection.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.connections = []; - object.client_connection_paths = []; - } - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_connection_sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_connection_sequence = options.longs === String ? "0" : 0; - object.params = null; - } - if (message.connections && message.connections.length) { - object.connections = []; - for (let j = 0; j < message.connections.length; ++j) - object.connections[j] = $root.ibc.core.connection.v1.IdentifiedConnection.toObject(message.connections[j], options); - } - if (message.client_connection_paths && message.client_connection_paths.length) { - object.client_connection_paths = []; - for (let j = 0; j < message.client_connection_paths.length; ++j) - object.client_connection_paths[j] = $root.ibc.core.connection.v1.ConnectionPaths.toObject(message.client_connection_paths[j], options); - } - if (message.next_connection_sequence != null && message.hasOwnProperty("next_connection_sequence")) - if (typeof message.next_connection_sequence === "number") - object.next_connection_sequence = options.longs === String ? String(message.next_connection_sequence) : message.next_connection_sequence; - else - object.next_connection_sequence = options.longs === String ? $util.Long.prototype.toString.call(message.next_connection_sequence) : options.longs === Number ? new $util.LongBits(message.next_connection_sequence.low >>> 0, message.next_connection_sequence.high >>> 0).toNumber(true) : message.next_connection_sequence; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.core.connection.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.connection.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return v1; - })(); - - return connection; - })(); - - core.types = (function() { - - /** - * Namespace types. - * @memberof ibc.core - * @namespace - */ - const types = {}; - - types.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.types - * @namespace - */ - const v1 = {}; - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof ibc.core.types.v1 - * @interface IGenesisState - * @property {ibc.core.client.v1.IGenesisState|null} [client_genesis] GenesisState client_genesis - * @property {ibc.core.connection.v1.IGenesisState|null} [connection_genesis] GenesisState connection_genesis - * @property {ibc.core.channel.v1.IGenesisState|null} [channel_genesis] GenesisState channel_genesis - */ - - /** - * Constructs a new GenesisState. - * @memberof ibc.core.types.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {ibc.core.types.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState client_genesis. - * @member {ibc.core.client.v1.IGenesisState|null|undefined} client_genesis - * @memberof ibc.core.types.v1.GenesisState - * @instance - */ - GenesisState.prototype.client_genesis = null; - - /** - * GenesisState connection_genesis. - * @member {ibc.core.connection.v1.IGenesisState|null|undefined} connection_genesis - * @memberof ibc.core.types.v1.GenesisState - * @instance - */ - GenesisState.prototype.connection_genesis = null; - - /** - * GenesisState channel_genesis. - * @member {ibc.core.channel.v1.IGenesisState|null|undefined} channel_genesis - * @memberof ibc.core.types.v1.GenesisState - * @instance - */ - GenesisState.prototype.channel_genesis = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {ibc.core.types.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_genesis != null && Object.hasOwnProperty.call(message, "client_genesis")) - $root.ibc.core.client.v1.GenesisState.encode(message.client_genesis, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.connection_genesis != null && Object.hasOwnProperty.call(message, "connection_genesis")) - $root.ibc.core.connection.v1.GenesisState.encode(message.connection_genesis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.channel_genesis != null && Object.hasOwnProperty.call(message, "channel_genesis")) - $root.ibc.core.channel.v1.GenesisState.encode(message.channel_genesis, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link ibc.core.types.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {ibc.core.types.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.types.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.types.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_genesis = $root.ibc.core.client.v1.GenesisState.decode(reader, reader.uint32()); - break; - case 2: - message.connection_genesis = $root.ibc.core.connection.v1.GenesisState.decode(reader, reader.uint32()); - break; - case 3: - message.channel_genesis = $root.ibc.core.channel.v1.GenesisState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.types.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_genesis != null && message.hasOwnProperty("client_genesis")) { - let error = $root.ibc.core.client.v1.GenesisState.verify(message.client_genesis); - if (error) - return "client_genesis." + error; - } - if (message.connection_genesis != null && message.hasOwnProperty("connection_genesis")) { - let error = $root.ibc.core.connection.v1.GenesisState.verify(message.connection_genesis); - if (error) - return "connection_genesis." + error; - } - if (message.channel_genesis != null && message.hasOwnProperty("channel_genesis")) { - let error = $root.ibc.core.channel.v1.GenesisState.verify(message.channel_genesis); - if (error) - return "channel_genesis." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.types.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.types.v1.GenesisState) - return object; - let message = new $root.ibc.core.types.v1.GenesisState(); - if (object.client_genesis != null) { - if (typeof object.client_genesis !== "object") - throw TypeError(".ibc.core.types.v1.GenesisState.client_genesis: object expected"); - message.client_genesis = $root.ibc.core.client.v1.GenesisState.fromObject(object.client_genesis); - } - if (object.connection_genesis != null) { - if (typeof object.connection_genesis !== "object") - throw TypeError(".ibc.core.types.v1.GenesisState.connection_genesis: object expected"); - message.connection_genesis = $root.ibc.core.connection.v1.GenesisState.fromObject(object.connection_genesis); - } - if (object.channel_genesis != null) { - if (typeof object.channel_genesis !== "object") - throw TypeError(".ibc.core.types.v1.GenesisState.channel_genesis: object expected"); - message.channel_genesis = $root.ibc.core.channel.v1.GenesisState.fromObject(object.channel_genesis); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.types.v1.GenesisState - * @static - * @param {ibc.core.types.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_genesis = null; - object.connection_genesis = null; - object.channel_genesis = null; - } - if (message.client_genesis != null && message.hasOwnProperty("client_genesis")) - object.client_genesis = $root.ibc.core.client.v1.GenesisState.toObject(message.client_genesis, options); - if (message.connection_genesis != null && message.hasOwnProperty("connection_genesis")) - object.connection_genesis = $root.ibc.core.connection.v1.GenesisState.toObject(message.connection_genesis, options); - if (message.channel_genesis != null && message.hasOwnProperty("channel_genesis")) - object.channel_genesis = $root.ibc.core.channel.v1.GenesisState.toObject(message.channel_genesis, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof ibc.core.types.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return v1; - })(); - - return types; - })(); - - return core; - })(); - - ibc.lightclients = (function() { - - /** - * Namespace lightclients. - * @memberof ibc - * @namespace - */ - const lightclients = {}; - - lightclients.localhost = (function() { - - /** - * Namespace localhost. - * @memberof ibc.lightclients - * @namespace - */ - const localhost = {}; - - localhost.v2 = (function() { - - /** - * Namespace v2. - * @memberof ibc.lightclients.localhost - * @namespace - */ - const v2 = {}; - - v2.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.localhost.v2 - * @interface IClientState - * @property {ibc.core.client.v1.IHeight|null} [latest_height] ClientState latest_height - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.localhost.v2 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.localhost.v2.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState latest_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} latest_height - * @memberof ibc.lightclients.localhost.v2.ClientState - * @instance - */ - ClientState.prototype.latest_height = null; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.localhost.v2.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {ibc.lightclients.localhost.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.latest_height != null && Object.hasOwnProperty.call(message, "latest_height")) - $root.ibc.core.client.v1.Height.encode(message.latest_height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.localhost.v2.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {ibc.lightclients.localhost.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.localhost.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.localhost.v2.ClientState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.latest_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.localhost.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.latest_height); - if (error) - return "latest_height." + error; - } - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.localhost.v2.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.localhost.v2.ClientState) - return object; - let message = new $root.ibc.lightclients.localhost.v2.ClientState(); - if (object.latest_height != null) { - if (typeof object.latest_height !== "object") - throw TypeError(".ibc.lightclients.localhost.v2.ClientState.latest_height: object expected"); - message.latest_height = $root.ibc.core.client.v1.Height.fromObject(object.latest_height); - } - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.localhost.v2.ClientState - * @static - * @param {ibc.lightclients.localhost.v2.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.latest_height = null; - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - object.latest_height = $root.ibc.core.client.v1.Height.toObject(message.latest_height, options); - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.localhost.v2.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - return v2; - })(); - - return localhost; - })(); - - lightclients.solomachine = (function() { - - /** - * Namespace solomachine. - * @memberof ibc.lightclients - * @namespace - */ - const solomachine = {}; - - solomachine.v2 = (function() { - - /** - * Namespace v2. - * @memberof ibc.lightclients.solomachine - * @namespace - */ - const v2 = {}; - - v2.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IClientState - * @property {Long|null} [sequence] ClientState sequence - * @property {boolean|null} [is_frozen] ClientState is_frozen - * @property {ibc.lightclients.solomachine.v2.IConsensusState|null} [consensus_state] ClientState consensus_state - * @property {boolean|null} [allow_update_after_proposal] ClientState allow_update_after_proposal - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.solomachine.v2.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ClientState is_frozen. - * @member {boolean} is_frozen - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.is_frozen = false; - - /** - * ClientState consensus_state. - * @member {ibc.lightclients.solomachine.v2.IConsensusState|null|undefined} consensus_state - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.consensus_state = null; - - /** - * ClientState allow_update_after_proposal. - * @member {boolean} allow_update_after_proposal - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - */ - ClientState.prototype.allow_update_after_proposal = false; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {ibc.lightclients.solomachine.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.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.is_frozen != null && Object.hasOwnProperty.call(message, "is_frozen")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_frozen); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.ibc.lightclients.solomachine.v2.ConsensusState.encode(message.consensus_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.allow_update_after_proposal != null && Object.hasOwnProperty.call(message, "allow_update_after_proposal")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.allow_update_after_proposal); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {ibc.lightclients.solomachine.v2.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ClientState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.is_frozen = reader.bool(); - break; - case 3: - message.consensus_state = $root.ibc.lightclients.solomachine.v2.ConsensusState.decode(reader, reader.uint32()); - break; - case 4: - message.allow_update_after_proposal = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.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.is_frozen != null && message.hasOwnProperty("is_frozen")) - if (typeof message.is_frozen !== "boolean") - return "is_frozen: boolean expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.ibc.lightclients.solomachine.v2.ConsensusState.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - if (message.allow_update_after_proposal != null && message.hasOwnProperty("allow_update_after_proposal")) - if (typeof message.allow_update_after_proposal !== "boolean") - return "allow_update_after_proposal: boolean expected"; - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ClientState) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.ClientState(); - 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.is_frozen != null) - message.is_frozen = Boolean(object.is_frozen); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ClientState.consensus_state: object expected"); - message.consensus_state = $root.ibc.lightclients.solomachine.v2.ConsensusState.fromObject(object.consensus_state); - } - if (object.allow_update_after_proposal != null) - message.allow_update_after_proposal = Boolean(object.allow_update_after_proposal); - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @static - * @param {ibc.lightclients.solomachine.v2.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - object.is_frozen = false; - object.consensus_state = null; - object.allow_update_after_proposal = false; - } - 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.is_frozen != null && message.hasOwnProperty("is_frozen")) - object.is_frozen = message.is_frozen; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.ibc.lightclients.solomachine.v2.ConsensusState.toObject(message.consensus_state, options); - if (message.allow_update_after_proposal != null && message.hasOwnProperty("allow_update_after_proposal")) - object.allow_update_after_proposal = message.allow_update_after_proposal; - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - v2.ConsensusState = (function() { - - /** - * Properties of a ConsensusState. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IConsensusState - * @property {google.protobuf.IAny|null} [public_key] ConsensusState public_key - * @property {string|null} [diversifier] ConsensusState diversifier - * @property {Long|null} [timestamp] ConsensusState timestamp - */ - - /** - * Constructs a new ConsensusState. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ConsensusState. - * @implements IConsensusState - * @constructor - * @param {ibc.lightclients.solomachine.v2.IConsensusState=} [properties] Properties to set - */ - function ConsensusState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusState public_key. - * @member {google.protobuf.IAny|null|undefined} public_key - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - */ - ConsensusState.prototype.public_key = null; - - /** - * ConsensusState diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - */ - ConsensusState.prototype.diversifier = ""; - - /** - * ConsensusState timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - */ - ConsensusState.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.public_key != null && Object.hasOwnProperty.call(message, "public_key")) - $root.google.protobuf.Any.encode(message.public_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.diversifier); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ConsensusState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.diversifier = reader.string(); - break; - case 3: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.public_key != null && message.hasOwnProperty("public_key")) { - let error = $root.google.protobuf.Any.verify(message.public_key); - if (error) - return "public_key." + error; - } - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ConsensusState} ConsensusState - */ - ConsensusState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ConsensusState) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.ConsensusState(); - if (object.public_key != null) { - if (typeof object.public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ConsensusState.public_key: object expected"); - message.public_key = $root.google.protobuf.Any.fromObject(object.public_key); - } - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v2.ConsensusState} message ConsensusState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.public_key = null; - object.diversifier = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.public_key != null && message.hasOwnProperty("public_key")) - object.public_key = $root.google.protobuf.Any.toObject(message.public_key, options); - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this ConsensusState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ConsensusState - * @instance - * @returns {Object.} JSON object - */ - ConsensusState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusState; - })(); - - v2.Header = (function() { - - /** - * Properties of a Header. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IHeader - * @property {Long|null} [sequence] Header sequence - * @property {Long|null} [timestamp] Header timestamp - * @property {Uint8Array|null} [signature] Header signature - * @property {google.protobuf.IAny|null} [new_public_key] Header new_public_key - * @property {string|null} [new_diversifier] Header new_diversifier - */ - - /** - * Constructs a new Header. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {ibc.lightclients.solomachine.v2.IHeader=} [properties] Properties to set - */ - function Header(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Header sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Header timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Header signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.signature = $util.newBuffer([]); - - /** - * Header new_public_key. - * @member {google.protobuf.IAny|null|undefined} new_public_key - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.new_public_key = null; - - /** - * Header new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - */ - Header.prototype.new_diversifier = ""; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.solomachine.v2.Header.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {ibc.lightclients.solomachine.v2.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.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signature); - if (message.new_public_key != null && Object.hasOwnProperty.call(message, "new_public_key")) - $root.google.protobuf.Any.encode(message.new_public_key, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {ibc.lightclients.solomachine.v2.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 ibc.lightclients.solomachine.v2.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.Header(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.signature = reader.bytes(); - break; - case 4: - message.new_public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 5: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.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 ibc.lightclients.solomachine.v2.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.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) { - let error = $root.google.protobuf.Any.verify(message.new_public_key); - if (error) - return "new_public_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.Header) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.Header(); - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.new_public_key != null) { - if (typeof object.new_public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.Header.new_public_key: object expected"); - message.new_public_key = $root.google.protobuf.Any.fromObject(object.new_public_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.Header - * @static - * @param {ibc.lightclients.solomachine.v2.Header} message Header - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Header.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.new_public_key = null; - object.new_diversifier = ""; - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) - object.new_public_key = $root.google.protobuf.Any.toObject(message.new_public_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - v2.Misbehaviour = (function() { - - /** - * Properties of a Misbehaviour. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IMisbehaviour - * @property {string|null} [client_id] Misbehaviour client_id - * @property {Long|null} [sequence] Misbehaviour sequence - * @property {ibc.lightclients.solomachine.v2.ISignatureAndData|null} [signature_one] Misbehaviour signature_one - * @property {ibc.lightclients.solomachine.v2.ISignatureAndData|null} [signature_two] Misbehaviour signature_two - */ - - /** - * Constructs a new Misbehaviour. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a Misbehaviour. - * @implements IMisbehaviour - * @constructor - * @param {ibc.lightclients.solomachine.v2.IMisbehaviour=} [properties] Properties to set - */ - function Misbehaviour(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Misbehaviour client_id. - * @member {string} client_id - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.client_id = ""; - - /** - * Misbehaviour sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Misbehaviour signature_one. - * @member {ibc.lightclients.solomachine.v2.ISignatureAndData|null|undefined} signature_one - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_one = null; - - /** - * Misbehaviour signature_two. - * @member {ibc.lightclients.solomachine.v2.ISignatureAndData|null|undefined} signature_two - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_two = null; - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.solomachine.v2.Misbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v2.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.sequence); - if (message.signature_one != null && Object.hasOwnProperty.call(message, "signature_one")) - $root.ibc.lightclients.solomachine.v2.SignatureAndData.encode(message.signature_one, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signature_two != null && Object.hasOwnProperty.call(message, "signature_two")) - $root.ibc.lightclients.solomachine.v2.SignatureAndData.encode(message.signature_two, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.Misbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v2.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.Misbehaviour(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.sequence = reader.uint64(); - break; - case 3: - message.signature_one = $root.ibc.lightclients.solomachine.v2.SignatureAndData.decode(reader, reader.uint32()); - break; - case 4: - message.signature_two = $root.ibc.lightclients.solomachine.v2.SignatureAndData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Misbehaviour message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Misbehaviour.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string 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.signature_one != null && message.hasOwnProperty("signature_one")) { - let error = $root.ibc.lightclients.solomachine.v2.SignatureAndData.verify(message.signature_one); - if (error) - return "signature_one." + error; - } - if (message.signature_two != null && message.hasOwnProperty("signature_two")) { - let error = $root.ibc.lightclients.solomachine.v2.SignatureAndData.verify(message.signature_two); - if (error) - return "signature_two." + error; - } - return null; - }; - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.Misbehaviour} Misbehaviour - */ - Misbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.Misbehaviour) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.Misbehaviour(); - if (object.client_id != null) - message.client_id = String(object.client_id); - 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.signature_one != null) { - if (typeof object.signature_one !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.Misbehaviour.signature_one: object expected"); - message.signature_one = $root.ibc.lightclients.solomachine.v2.SignatureAndData.fromObject(object.signature_one); - } - if (object.signature_two != null) { - if (typeof object.signature_two !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.Misbehaviour.signature_two: object expected"); - message.signature_two = $root.ibc.lightclients.solomachine.v2.SignatureAndData.fromObject(object.signature_two); - } - return message; - }; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v2.Misbehaviour} message Misbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Misbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - object.signature_one = null; - object.signature_two = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - 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.signature_one != null && message.hasOwnProperty("signature_one")) - object.signature_one = $root.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(message.signature_one, options); - if (message.signature_two != null && message.hasOwnProperty("signature_two")) - object.signature_two = $root.ibc.lightclients.solomachine.v2.SignatureAndData.toObject(message.signature_two, options); - return object; - }; - - /** - * Converts this Misbehaviour to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.Misbehaviour - * @instance - * @returns {Object.} JSON object - */ - Misbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Misbehaviour; - })(); - - v2.SignatureAndData = (function() { - - /** - * Properties of a SignatureAndData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface ISignatureAndData - * @property {Uint8Array|null} [signature] SignatureAndData signature - * @property {ibc.lightclients.solomachine.v2.DataType|null} [data_type] SignatureAndData data_type - * @property {Uint8Array|null} [data] SignatureAndData data - * @property {Long|null} [timestamp] SignatureAndData timestamp - */ - - /** - * Constructs a new SignatureAndData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a SignatureAndData. - * @implements ISignatureAndData - * @constructor - * @param {ibc.lightclients.solomachine.v2.ISignatureAndData=} [properties] Properties to set - */ - function SignatureAndData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignatureAndData signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.signature = $util.newBuffer([]); - - /** - * SignatureAndData data_type. - * @member {ibc.lightclients.solomachine.v2.DataType} data_type - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.data_type = 0; - - /** - * SignatureAndData data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.data = $util.newBuffer([]); - - /** - * SignatureAndData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - */ - SignatureAndData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified SignatureAndData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignatureAndData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v2.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature); - if (message.data_type != null && Object.hasOwnProperty.call(message, "data_type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.data_type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified SignatureAndData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignatureAndData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v2.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.SignatureAndData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature = reader.bytes(); - break; - case 2: - message.data_type = reader.int32(); - break; - case 3: - message.data = reader.bytes(); - break; - case 4: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignatureAndData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignatureAndData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.data_type != null && message.hasOwnProperty("data_type")) - switch (message.data_type) { - default: - return "data_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a SignatureAndData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.SignatureAndData} SignatureAndData - */ - SignatureAndData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.SignatureAndData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.SignatureAndData(); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - switch (object.data_type) { - case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": - case 0: - message.data_type = 0; - break; - case "DATA_TYPE_CLIENT_STATE": - case 1: - message.data_type = 1; - break; - case "DATA_TYPE_CONSENSUS_STATE": - case 2: - message.data_type = 2; - break; - case "DATA_TYPE_CONNECTION_STATE": - case 3: - message.data_type = 3; - break; - case "DATA_TYPE_CHANNEL_STATE": - case 4: - message.data_type = 4; - break; - case "DATA_TYPE_PACKET_COMMITMENT": - case 5: - message.data_type = 5; - break; - case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": - case 6: - message.data_type = 6; - break; - case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": - case 7: - message.data_type = 7; - break; - case "DATA_TYPE_NEXT_SEQUENCE_RECV": - case 8: - message.data_type = 8; - break; - case "DATA_TYPE_HEADER": - case 9: - message.data_type = 9; - break; - } - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a SignatureAndData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v2.SignatureAndData} message SignatureAndData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignatureAndData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.data_type = options.enums === String ? "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" : 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.data_type != null && message.hasOwnProperty("data_type")) - object.data_type = options.enums === String ? $root.ibc.lightclients.solomachine.v2.DataType[message.data_type] : message.data_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; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this SignatureAndData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.SignatureAndData - * @instance - * @returns {Object.} JSON object - */ - SignatureAndData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignatureAndData; - })(); - - v2.TimestampedSignatureData = (function() { - - /** - * Properties of a TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface ITimestampedSignatureData - * @property {Uint8Array|null} [signature_data] TimestampedSignatureData signature_data - * @property {Long|null} [timestamp] TimestampedSignatureData timestamp - */ - - /** - * Constructs a new TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a TimestampedSignatureData. - * @implements ITimestampedSignatureData - * @constructor - * @param {ibc.lightclients.solomachine.v2.ITimestampedSignatureData=} [properties] Properties to set - */ - function TimestampedSignatureData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimestampedSignatureData signature_data. - * @member {Uint8Array} signature_data - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.signature_data = $util.newBuffer([]); - - /** - * TimestampedSignatureData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified TimestampedSignatureData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.TimestampedSignatureData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v2.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature_data != null && Object.hasOwnProperty.call(message, "signature_data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature_data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified TimestampedSignatureData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.TimestampedSignatureData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v2.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.TimestampedSignatureData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature_data = reader.bytes(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimestampedSignatureData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimestampedSignatureData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - if (!(message.signature_data && typeof message.signature_data.length === "number" || $util.isString(message.signature_data))) - return "signature_data: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a TimestampedSignatureData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.TimestampedSignatureData} TimestampedSignatureData - */ - TimestampedSignatureData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.TimestampedSignatureData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.TimestampedSignatureData(); - if (object.signature_data != null) - if (typeof object.signature_data === "string") - $util.base64.decode(object.signature_data, message.signature_data = $util.newBuffer($util.base64.length(object.signature_data)), 0); - else if (object.signature_data.length) - message.signature_data = object.signature_data; - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a TimestampedSignatureData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v2.TimestampedSignatureData} message TimestampedSignatureData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimestampedSignatureData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature_data = ""; - else { - object.signature_data = []; - if (options.bytes !== Array) - object.signature_data = $util.newBuffer(object.signature_data); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - object.signature_data = options.bytes === String ? $util.base64.encode(message.signature_data, 0, message.signature_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature_data) : message.signature_data; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this TimestampedSignatureData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.TimestampedSignatureData - * @instance - * @returns {Object.} JSON object - */ - TimestampedSignatureData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TimestampedSignatureData; - })(); - - v2.SignBytes = (function() { - - /** - * Properties of a SignBytes. - * @memberof ibc.lightclients.solomachine.v2 - * @interface ISignBytes - * @property {Long|null} [sequence] SignBytes sequence - * @property {Long|null} [timestamp] SignBytes timestamp - * @property {string|null} [diversifier] SignBytes diversifier - * @property {ibc.lightclients.solomachine.v2.DataType|null} [data_type] SignBytes data_type - * @property {Uint8Array|null} [data] SignBytes data - */ - - /** - * Constructs a new SignBytes. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a SignBytes. - * @implements ISignBytes - * @constructor - * @param {ibc.lightclients.solomachine.v2.ISignBytes=} [properties] Properties to set - */ - function SignBytes(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignBytes sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.diversifier = ""; - - /** - * SignBytes data_type. - * @member {ibc.lightclients.solomachine.v2.DataType} data_type - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.data_type = 0; - - /** - * SignBytes data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - */ - SignBytes.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified SignBytes message. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignBytes.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v2.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.diversifier); - if (message.data_type != null && Object.hasOwnProperty.call(message, "data_type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.data_type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified SignBytes message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.SignBytes.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v2.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.SignBytes(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.diversifier = reader.string(); - break; - case 4: - message.data_type = reader.int32(); - break; - case 5: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignBytes message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignBytes.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.data_type != null && message.hasOwnProperty("data_type")) - switch (message.data_type) { - default: - return "data_type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - 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 SignBytes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.SignBytes} SignBytes - */ - SignBytes.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.SignBytes) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.SignBytes(); - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - switch (object.data_type) { - case "DATA_TYPE_UNINITIALIZED_UNSPECIFIED": - case 0: - message.data_type = 0; - break; - case "DATA_TYPE_CLIENT_STATE": - case 1: - message.data_type = 1; - break; - case "DATA_TYPE_CONSENSUS_STATE": - case 2: - message.data_type = 2; - break; - case "DATA_TYPE_CONNECTION_STATE": - case 3: - message.data_type = 3; - break; - case "DATA_TYPE_CHANNEL_STATE": - case 4: - message.data_type = 4; - break; - case "DATA_TYPE_PACKET_COMMITMENT": - case 5: - message.data_type = 5; - break; - case "DATA_TYPE_PACKET_ACKNOWLEDGEMENT": - case 6: - message.data_type = 6; - break; - case "DATA_TYPE_PACKET_RECEIPT_ABSENCE": - case 7: - message.data_type = 7; - break; - case "DATA_TYPE_NEXT_SEQUENCE_RECV": - case 8: - message.data_type = 8; - break; - case "DATA_TYPE_HEADER": - case 9: - message.data_type = 9; - break; - } - 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 SignBytes message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v2.SignBytes} message SignBytes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignBytes.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.diversifier = ""; - object.data_type = options.enums === String ? "DATA_TYPE_UNINITIALIZED_UNSPECIFIED" : 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.data_type != null && message.hasOwnProperty("data_type")) - object.data_type = options.enums === String ? $root.ibc.lightclients.solomachine.v2.DataType[message.data_type] : message.data_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 SignBytes to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.SignBytes - * @instance - * @returns {Object.} JSON object - */ - SignBytes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignBytes; - })(); - - /** - * DataType enum. - * @name ibc.lightclients.solomachine.v2.DataType - * @enum {number} - * @property {number} DATA_TYPE_UNINITIALIZED_UNSPECIFIED=0 DATA_TYPE_UNINITIALIZED_UNSPECIFIED value - * @property {number} DATA_TYPE_CLIENT_STATE=1 DATA_TYPE_CLIENT_STATE value - * @property {number} DATA_TYPE_CONSENSUS_STATE=2 DATA_TYPE_CONSENSUS_STATE value - * @property {number} DATA_TYPE_CONNECTION_STATE=3 DATA_TYPE_CONNECTION_STATE value - * @property {number} DATA_TYPE_CHANNEL_STATE=4 DATA_TYPE_CHANNEL_STATE value - * @property {number} DATA_TYPE_PACKET_COMMITMENT=5 DATA_TYPE_PACKET_COMMITMENT value - * @property {number} DATA_TYPE_PACKET_ACKNOWLEDGEMENT=6 DATA_TYPE_PACKET_ACKNOWLEDGEMENT value - * @property {number} DATA_TYPE_PACKET_RECEIPT_ABSENCE=7 DATA_TYPE_PACKET_RECEIPT_ABSENCE value - * @property {number} DATA_TYPE_NEXT_SEQUENCE_RECV=8 DATA_TYPE_NEXT_SEQUENCE_RECV value - * @property {number} DATA_TYPE_HEADER=9 DATA_TYPE_HEADER value - */ - v2.DataType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATA_TYPE_UNINITIALIZED_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATA_TYPE_CLIENT_STATE"] = 1; - values[valuesById[2] = "DATA_TYPE_CONSENSUS_STATE"] = 2; - values[valuesById[3] = "DATA_TYPE_CONNECTION_STATE"] = 3; - values[valuesById[4] = "DATA_TYPE_CHANNEL_STATE"] = 4; - values[valuesById[5] = "DATA_TYPE_PACKET_COMMITMENT"] = 5; - values[valuesById[6] = "DATA_TYPE_PACKET_ACKNOWLEDGEMENT"] = 6; - values[valuesById[7] = "DATA_TYPE_PACKET_RECEIPT_ABSENCE"] = 7; - values[valuesById[8] = "DATA_TYPE_NEXT_SEQUENCE_RECV"] = 8; - values[valuesById[9] = "DATA_TYPE_HEADER"] = 9; - return values; - })(); - - v2.HeaderData = (function() { - - /** - * Properties of a HeaderData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IHeaderData - * @property {google.protobuf.IAny|null} [new_pub_key] HeaderData new_pub_key - * @property {string|null} [new_diversifier] HeaderData new_diversifier - */ - - /** - * Constructs a new HeaderData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a HeaderData. - * @implements IHeaderData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IHeaderData=} [properties] Properties to set - */ - function HeaderData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HeaderData new_pub_key. - * @member {google.protobuf.IAny|null|undefined} new_pub_key - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @instance - */ - HeaderData.prototype.new_pub_key = null; - - /** - * HeaderData new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @instance - */ - HeaderData.prototype.new_diversifier = ""; - - /** - * Encodes the specified HeaderData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.HeaderData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v2.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.new_pub_key != null && Object.hasOwnProperty.call(message, "new_pub_key")) - $root.google.protobuf.Any.encode(message.new_pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified HeaderData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.HeaderData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v2.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.HeaderData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_pub_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HeaderData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HeaderData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) { - let error = $root.google.protobuf.Any.verify(message.new_pub_key); - if (error) - return "new_pub_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a HeaderData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.HeaderData} HeaderData - */ - HeaderData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.HeaderData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.HeaderData(); - if (object.new_pub_key != null) { - if (typeof object.new_pub_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.HeaderData.new_pub_key: object expected"); - message.new_pub_key = $root.google.protobuf.Any.fromObject(object.new_pub_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a HeaderData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v2.HeaderData} message HeaderData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HeaderData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.new_pub_key = null; - object.new_diversifier = ""; - } - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) - object.new_pub_key = $root.google.protobuf.Any.toObject(message.new_pub_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this HeaderData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.HeaderData - * @instance - * @returns {Object.} JSON object - */ - HeaderData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HeaderData; - })(); - - v2.ClientStateData = (function() { - - /** - * Properties of a ClientStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IClientStateData - * @property {Uint8Array|null} [path] ClientStateData path - * @property {google.protobuf.IAny|null} [client_state] ClientStateData client_state - */ - - /** - * Constructs a new ClientStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ClientStateData. - * @implements IClientStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IClientStateData=} [properties] Properties to set - */ - function ClientStateData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @instance - */ - ClientStateData.prototype.path = $util.newBuffer([]); - - /** - * ClientStateData client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @instance - */ - ClientStateData.prototype.client_state = null; - - /** - * Encodes the specified ClientStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IClientStateData} message ClientStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ClientStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IClientStateData} message ClientStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ClientStateData} ClientStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ClientStateData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ClientStateData} ClientStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - let error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - return null; - }; - - /** - * Creates a ClientStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ClientStateData} ClientStateData - */ - ClientStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ClientStateData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.ClientStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ClientStateData.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - return message; - }; - - /** - * Creates a plain object from a ClientStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ClientStateData} message ClientStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.client_state = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - return object; - }; - - /** - * Converts this ClientStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ClientStateData - * @instance - * @returns {Object.} JSON object - */ - ClientStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientStateData; - })(); - - v2.ConsensusStateData = (function() { - - /** - * Properties of a ConsensusStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IConsensusStateData - * @property {Uint8Array|null} [path] ConsensusStateData path - * @property {google.protobuf.IAny|null} [consensus_state] ConsensusStateData consensus_state - */ - - /** - * Constructs a new ConsensusStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ConsensusStateData. - * @implements IConsensusStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IConsensusStateData=} [properties] Properties to set - */ - function ConsensusStateData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @instance - */ - ConsensusStateData.prototype.path = $util.newBuffer([]); - - /** - * ConsensusStateData consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @instance - */ - ConsensusStateData.prototype.consensus_state = null; - - /** - * Encodes the specified ConsensusStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusStateData} message ConsensusStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConsensusStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConsensusStateData} message ConsensusStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ConsensusStateData} ConsensusStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ConsensusStateData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ConsensusStateData} ConsensusStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ConsensusStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ConsensusStateData} ConsensusStateData - */ - ConsensusStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ConsensusStateData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.ConsensusStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ConsensusStateData.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ConsensusStateData} message ConsensusStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.consensus_state = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ConsensusStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ConsensusStateData - * @instance - * @returns {Object.} JSON object - */ - ConsensusStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusStateData; - })(); - - v2.ConnectionStateData = (function() { - - /** - * Properties of a ConnectionStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IConnectionStateData - * @property {Uint8Array|null} [path] ConnectionStateData path - * @property {ibc.core.connection.v1.IConnectionEnd|null} [connection] ConnectionStateData connection - */ - - /** - * Constructs a new ConnectionStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ConnectionStateData. - * @implements IConnectionStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IConnectionStateData=} [properties] Properties to set - */ - function ConnectionStateData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConnectionStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @instance - */ - ConnectionStateData.prototype.path = $util.newBuffer([]); - - /** - * ConnectionStateData connection. - * @member {ibc.core.connection.v1.IConnectionEnd|null|undefined} connection - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @instance - */ - ConnectionStateData.prototype.connection = null; - - /** - * Encodes the specified ConnectionStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConnectionStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConnectionStateData} message ConnectionStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) - $root.ibc.core.connection.v1.ConnectionEnd.encode(message.connection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConnectionStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ConnectionStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IConnectionStateData} message ConnectionStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConnectionStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ConnectionStateData} ConnectionStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ConnectionStateData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConnectionStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ConnectionStateData} ConnectionStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.connection != null && message.hasOwnProperty("connection")) { - let error = $root.ibc.core.connection.v1.ConnectionEnd.verify(message.connection); - if (error) - return "connection." + error; - } - return null; - }; - - /** - * Creates a ConnectionStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ConnectionStateData} ConnectionStateData - */ - ConnectionStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ConnectionStateData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.ConnectionStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.connection != null) { - if (typeof object.connection !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ConnectionStateData.connection: object expected"); - message.connection = $root.ibc.core.connection.v1.ConnectionEnd.fromObject(object.connection); - } - return message; - }; - - /** - * Creates a plain object from a ConnectionStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ConnectionStateData} message ConnectionStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.connection = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.connection != null && message.hasOwnProperty("connection")) - object.connection = $root.ibc.core.connection.v1.ConnectionEnd.toObject(message.connection, options); - return object; - }; - - /** - * Converts this ConnectionStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ConnectionStateData - * @instance - * @returns {Object.} JSON object - */ - ConnectionStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConnectionStateData; - })(); - - v2.ChannelStateData = (function() { - - /** - * Properties of a ChannelStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IChannelStateData - * @property {Uint8Array|null} [path] ChannelStateData path - * @property {ibc.core.channel.v1.IChannel|null} [channel] ChannelStateData channel - */ - - /** - * Constructs a new ChannelStateData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a ChannelStateData. - * @implements IChannelStateData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IChannelStateData=} [properties] Properties to set - */ - function ChannelStateData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ChannelStateData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @instance - */ - ChannelStateData.prototype.path = $util.newBuffer([]); - - /** - * ChannelStateData channel. - * @member {ibc.core.channel.v1.IChannel|null|undefined} channel - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @instance - */ - ChannelStateData.prototype.channel = null; - - /** - * Encodes the specified ChannelStateData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.ChannelStateData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IChannelStateData} message ChannelStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChannelStateData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.ibc.core.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ChannelStateData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.ChannelStateData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {ibc.lightclients.solomachine.v2.IChannelStateData} message ChannelStateData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChannelStateData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ChannelStateData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.ChannelStateData} ChannelStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChannelStateData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.ChannelStateData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.channel = $root.ibc.core.channel.v1.Channel.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ChannelStateData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.ChannelStateData} ChannelStateData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChannelStateData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChannelStateData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChannelStateData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - let error = $root.ibc.core.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - return null; - }; - - /** - * Creates a ChannelStateData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.ChannelStateData} ChannelStateData - */ - ChannelStateData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.ChannelStateData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.ChannelStateData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".ibc.lightclients.solomachine.v2.ChannelStateData.channel: object expected"); - message.channel = $root.ibc.core.channel.v1.Channel.fromObject(object.channel); - } - return message; - }; - - /** - * Creates a plain object from a ChannelStateData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @static - * @param {ibc.lightclients.solomachine.v2.ChannelStateData} message ChannelStateData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChannelStateData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - object.channel = null; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.ibc.core.channel.v1.Channel.toObject(message.channel, options); - return object; - }; - - /** - * Converts this ChannelStateData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.ChannelStateData - * @instance - * @returns {Object.} JSON object - */ - ChannelStateData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ChannelStateData; - })(); - - v2.PacketCommitmentData = (function() { - - /** - * Properties of a PacketCommitmentData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IPacketCommitmentData - * @property {Uint8Array|null} [path] PacketCommitmentData path - * @property {Uint8Array|null} [commitment] PacketCommitmentData commitment - */ - - /** - * Constructs a new PacketCommitmentData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a PacketCommitmentData. - * @implements IPacketCommitmentData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IPacketCommitmentData=} [properties] Properties to set - */ - function PacketCommitmentData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketCommitmentData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @instance - */ - PacketCommitmentData.prototype.path = $util.newBuffer([]); - - /** - * PacketCommitmentData commitment. - * @member {Uint8Array} commitment - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @instance - */ - PacketCommitmentData.prototype.commitment = $util.newBuffer([]); - - /** - * Encodes the specified PacketCommitmentData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketCommitmentData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketCommitmentData} message PacketCommitmentData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketCommitmentData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.commitment != null && Object.hasOwnProperty.call(message, "commitment")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.commitment); - return writer; - }; - - /** - * Encodes the specified PacketCommitmentData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketCommitmentData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketCommitmentData} message PacketCommitmentData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketCommitmentData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketCommitmentData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.PacketCommitmentData} PacketCommitmentData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketCommitmentData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.PacketCommitmentData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.commitment = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketCommitmentData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.PacketCommitmentData} PacketCommitmentData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketCommitmentData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketCommitmentData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketCommitmentData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.commitment != null && message.hasOwnProperty("commitment")) - if (!(message.commitment && typeof message.commitment.length === "number" || $util.isString(message.commitment))) - return "commitment: buffer expected"; - return null; - }; - - /** - * Creates a PacketCommitmentData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.PacketCommitmentData} PacketCommitmentData - */ - PacketCommitmentData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.PacketCommitmentData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.PacketCommitmentData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.commitment != null) - if (typeof object.commitment === "string") - $util.base64.decode(object.commitment, message.commitment = $util.newBuffer($util.base64.length(object.commitment)), 0); - else if (object.commitment.length) - message.commitment = object.commitment; - return message; - }; - - /** - * Creates a plain object from a PacketCommitmentData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @static - * @param {ibc.lightclients.solomachine.v2.PacketCommitmentData} message PacketCommitmentData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketCommitmentData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.commitment = ""; - else { - object.commitment = []; - if (options.bytes !== Array) - object.commitment = $util.newBuffer(object.commitment); - } - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.commitment != null && message.hasOwnProperty("commitment")) - object.commitment = options.bytes === String ? $util.base64.encode(message.commitment, 0, message.commitment.length) : options.bytes === Array ? Array.prototype.slice.call(message.commitment) : message.commitment; - return object; - }; - - /** - * Converts this PacketCommitmentData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.PacketCommitmentData - * @instance - * @returns {Object.} JSON object - */ - PacketCommitmentData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketCommitmentData; - })(); - - v2.PacketAcknowledgementData = (function() { - - /** - * Properties of a PacketAcknowledgementData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IPacketAcknowledgementData - * @property {Uint8Array|null} [path] PacketAcknowledgementData path - * @property {Uint8Array|null} [acknowledgement] PacketAcknowledgementData acknowledgement - */ - - /** - * Constructs a new PacketAcknowledgementData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a PacketAcknowledgementData. - * @implements IPacketAcknowledgementData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IPacketAcknowledgementData=} [properties] Properties to set - */ - function PacketAcknowledgementData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketAcknowledgementData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @instance - */ - PacketAcknowledgementData.prototype.path = $util.newBuffer([]); - - /** - * PacketAcknowledgementData acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @instance - */ - PacketAcknowledgementData.prototype.acknowledgement = $util.newBuffer([]); - - /** - * Encodes the specified PacketAcknowledgementData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketAcknowledgementData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketAcknowledgementData} message PacketAcknowledgementData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketAcknowledgementData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acknowledgement); - return writer; - }; - - /** - * Encodes the specified PacketAcknowledgementData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketAcknowledgementData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketAcknowledgementData} message PacketAcknowledgementData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketAcknowledgementData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketAcknowledgementData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} PacketAcknowledgementData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketAcknowledgementData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.PacketAcknowledgementData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.acknowledgement = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketAcknowledgementData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} PacketAcknowledgementData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketAcknowledgementData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketAcknowledgementData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketAcknowledgementData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) - if (!(message.acknowledgement && typeof message.acknowledgement.length === "number" || $util.isString(message.acknowledgement))) - return "acknowledgement: buffer expected"; - return null; - }; - - /** - * Creates a PacketAcknowledgementData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} PacketAcknowledgementData - */ - PacketAcknowledgementData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.PacketAcknowledgementData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.PacketAcknowledgementData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - 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; - return message; - }; - - /** - * Creates a plain object from a PacketAcknowledgementData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @static - * @param {ibc.lightclients.solomachine.v2.PacketAcknowledgementData} message PacketAcknowledgementData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketAcknowledgementData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.acknowledgement = ""; - else { - object.acknowledgement = []; - if (options.bytes !== Array) - object.acknowledgement = $util.newBuffer(object.acknowledgement); - } - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - 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; - return object; - }; - - /** - * Converts this PacketAcknowledgementData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.PacketAcknowledgementData - * @instance - * @returns {Object.} JSON object - */ - PacketAcknowledgementData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketAcknowledgementData; - })(); - - v2.PacketReceiptAbsenceData = (function() { - - /** - * Properties of a PacketReceiptAbsenceData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface IPacketReceiptAbsenceData - * @property {Uint8Array|null} [path] PacketReceiptAbsenceData path - */ - - /** - * Constructs a new PacketReceiptAbsenceData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a PacketReceiptAbsenceData. - * @implements IPacketReceiptAbsenceData - * @constructor - * @param {ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData=} [properties] Properties to set - */ - function PacketReceiptAbsenceData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketReceiptAbsenceData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @instance - */ - PacketReceiptAbsenceData.prototype.path = $util.newBuffer([]); - - /** - * Encodes the specified PacketReceiptAbsenceData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData} message PacketReceiptAbsenceData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketReceiptAbsenceData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - return writer; - }; - - /** - * Encodes the specified PacketReceiptAbsenceData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {ibc.lightclients.solomachine.v2.IPacketReceiptAbsenceData} message PacketReceiptAbsenceData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketReceiptAbsenceData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketReceiptAbsenceData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} PacketReceiptAbsenceData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketReceiptAbsenceData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketReceiptAbsenceData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} PacketReceiptAbsenceData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketReceiptAbsenceData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketReceiptAbsenceData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketReceiptAbsenceData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - return null; - }; - - /** - * Creates a PacketReceiptAbsenceData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} PacketReceiptAbsenceData - */ - PacketReceiptAbsenceData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - return message; - }; - - /** - * Creates a plain object from a PacketReceiptAbsenceData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @static - * @param {ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData} message PacketReceiptAbsenceData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketReceiptAbsenceData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - return object; - }; - - /** - * Converts this PacketReceiptAbsenceData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.PacketReceiptAbsenceData - * @instance - * @returns {Object.} JSON object - */ - PacketReceiptAbsenceData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketReceiptAbsenceData; - })(); - - v2.NextSequenceRecvData = (function() { - - /** - * Properties of a NextSequenceRecvData. - * @memberof ibc.lightclients.solomachine.v2 - * @interface INextSequenceRecvData - * @property {Uint8Array|null} [path] NextSequenceRecvData path - * @property {Long|null} [next_seq_recv] NextSequenceRecvData next_seq_recv - */ - - /** - * Constructs a new NextSequenceRecvData. - * @memberof ibc.lightclients.solomachine.v2 - * @classdesc Represents a NextSequenceRecvData. - * @implements INextSequenceRecvData - * @constructor - * @param {ibc.lightclients.solomachine.v2.INextSequenceRecvData=} [properties] Properties to set - */ - function NextSequenceRecvData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NextSequenceRecvData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @instance - */ - NextSequenceRecvData.prototype.path = $util.newBuffer([]); - - /** - * NextSequenceRecvData next_seq_recv. - * @member {Long} next_seq_recv - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @instance - */ - NextSequenceRecvData.prototype.next_seq_recv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified NextSequenceRecvData message. Does not implicitly {@link ibc.lightclients.solomachine.v2.NextSequenceRecvData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {ibc.lightclients.solomachine.v2.INextSequenceRecvData} message NextSequenceRecvData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NextSequenceRecvData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.path); - if (message.next_seq_recv != null && Object.hasOwnProperty.call(message, "next_seq_recv")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.next_seq_recv); - return writer; - }; - - /** - * Encodes the specified NextSequenceRecvData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v2.NextSequenceRecvData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {ibc.lightclients.solomachine.v2.INextSequenceRecvData} message NextSequenceRecvData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NextSequenceRecvData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NextSequenceRecvData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v2.NextSequenceRecvData} NextSequenceRecvData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NextSequenceRecvData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v2.NextSequenceRecvData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.bytes(); - break; - case 2: - message.next_seq_recv = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NextSequenceRecvData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v2.NextSequenceRecvData} NextSequenceRecvData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NextSequenceRecvData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NextSequenceRecvData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NextSequenceRecvData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: buffer expected"; - if (message.next_seq_recv != null && message.hasOwnProperty("next_seq_recv")) - if (!$util.isInteger(message.next_seq_recv) && !(message.next_seq_recv && $util.isInteger(message.next_seq_recv.low) && $util.isInteger(message.next_seq_recv.high))) - return "next_seq_recv: integer|Long expected"; - return null; - }; - - /** - * Creates a NextSequenceRecvData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v2.NextSequenceRecvData} NextSequenceRecvData - */ - NextSequenceRecvData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v2.NextSequenceRecvData) - return object; - let message = new $root.ibc.lightclients.solomachine.v2.NextSequenceRecvData(); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - if (object.next_seq_recv != null) - if ($util.Long) - (message.next_seq_recv = $util.Long.fromValue(object.next_seq_recv)).unsigned = true; - else if (typeof object.next_seq_recv === "string") - message.next_seq_recv = parseInt(object.next_seq_recv, 10); - else if (typeof object.next_seq_recv === "number") - message.next_seq_recv = object.next_seq_recv; - else if (typeof object.next_seq_recv === "object") - message.next_seq_recv = new $util.LongBits(object.next_seq_recv.low >>> 0, object.next_seq_recv.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a NextSequenceRecvData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @static - * @param {ibc.lightclients.solomachine.v2.NextSequenceRecvData} message NextSequenceRecvData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NextSequenceRecvData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.next_seq_recv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.next_seq_recv = options.longs === String ? "0" : 0; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - if (message.next_seq_recv != null && message.hasOwnProperty("next_seq_recv")) - if (typeof message.next_seq_recv === "number") - object.next_seq_recv = options.longs === String ? String(message.next_seq_recv) : message.next_seq_recv; - else - object.next_seq_recv = options.longs === String ? $util.Long.prototype.toString.call(message.next_seq_recv) : options.longs === Number ? new $util.LongBits(message.next_seq_recv.low >>> 0, message.next_seq_recv.high >>> 0).toNumber(true) : message.next_seq_recv; - return object; - }; - - /** - * Converts this NextSequenceRecvData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v2.NextSequenceRecvData - * @instance - * @returns {Object.} JSON object - */ - NextSequenceRecvData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NextSequenceRecvData; - })(); - - return v2; - })(); - - solomachine.v3 = (function() { - - /** - * Namespace v3. - * @memberof ibc.lightclients.solomachine - * @namespace - */ - const v3 = {}; - - v3.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IClientState - * @property {Long|null} [sequence] ClientState sequence - * @property {boolean|null} [is_frozen] ClientState is_frozen - * @property {ibc.lightclients.solomachine.v3.IConsensusState|null} [consensus_state] ClientState consensus_state - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.solomachine.v3.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - */ - ClientState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ClientState is_frozen. - * @member {boolean} is_frozen - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - */ - ClientState.prototype.is_frozen = false; - - /** - * ClientState consensus_state. - * @member {ibc.lightclients.solomachine.v3.IConsensusState|null|undefined} consensus_state - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - */ - ClientState.prototype.consensus_state = null; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.solomachine.v3.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {ibc.lightclients.solomachine.v3.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.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.is_frozen != null && Object.hasOwnProperty.call(message, "is_frozen")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_frozen); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.ibc.lightclients.solomachine.v3.ConsensusState.encode(message.consensus_state, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {ibc.lightclients.solomachine.v3.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.ClientState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.is_frozen = reader.bool(); - break; - case 3: - message.consensus_state = $root.ibc.lightclients.solomachine.v3.ConsensusState.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.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.is_frozen != null && message.hasOwnProperty("is_frozen")) - if (typeof message.is_frozen !== "boolean") - return "is_frozen: boolean expected"; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - let error = $root.ibc.lightclients.solomachine.v3.ConsensusState.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.ClientState) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.ClientState(); - 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.is_frozen != null) - message.is_frozen = Boolean(object.is_frozen); - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.ClientState.consensus_state: object expected"); - message.consensus_state = $root.ibc.lightclients.solomachine.v3.ConsensusState.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @static - * @param {ibc.lightclients.solomachine.v3.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - object.is_frozen = false; - object.consensus_state = null; - } - 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.is_frozen != null && message.hasOwnProperty("is_frozen")) - object.is_frozen = message.is_frozen; - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.ibc.lightclients.solomachine.v3.ConsensusState.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - v3.ConsensusState = (function() { - - /** - * Properties of a ConsensusState. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IConsensusState - * @property {google.protobuf.IAny|null} [public_key] ConsensusState public_key - * @property {string|null} [diversifier] ConsensusState diversifier - * @property {Long|null} [timestamp] ConsensusState timestamp - */ - - /** - * Constructs a new ConsensusState. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a ConsensusState. - * @implements IConsensusState - * @constructor - * @param {ibc.lightclients.solomachine.v3.IConsensusState=} [properties] Properties to set - */ - function ConsensusState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusState public_key. - * @member {google.protobuf.IAny|null|undefined} public_key - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - */ - ConsensusState.prototype.public_key = null; - - /** - * ConsensusState diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - */ - ConsensusState.prototype.diversifier = ""; - - /** - * ConsensusState timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - */ - ConsensusState.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.solomachine.v3.ConsensusState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v3.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.public_key != null && Object.hasOwnProperty.call(message, "public_key")) - $root.google.protobuf.Any.encode(message.public_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.diversifier); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.ConsensusState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v3.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.ConsensusState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.diversifier = reader.string(); - break; - case 3: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusState message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.public_key != null && message.hasOwnProperty("public_key")) { - let error = $root.google.protobuf.Any.verify(message.public_key); - if (error) - return "public_key." + error; - } - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.ConsensusState} ConsensusState - */ - ConsensusState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.ConsensusState) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.ConsensusState(); - if (object.public_key != null) { - if (typeof object.public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.ConsensusState.public_key: object expected"); - message.public_key = $root.google.protobuf.Any.fromObject(object.public_key); - } - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @static - * @param {ibc.lightclients.solomachine.v3.ConsensusState} message ConsensusState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.public_key = null; - object.diversifier = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.public_key != null && message.hasOwnProperty("public_key")) - object.public_key = $root.google.protobuf.Any.toObject(message.public_key, options); - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this ConsensusState to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.ConsensusState - * @instance - * @returns {Object.} JSON object - */ - ConsensusState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusState; - })(); - - v3.Header = (function() { - - /** - * Properties of a Header. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IHeader - * @property {Long|null} [timestamp] Header timestamp - * @property {Uint8Array|null} [signature] Header signature - * @property {google.protobuf.IAny|null} [new_public_key] Header new_public_key - * @property {string|null} [new_diversifier] Header new_diversifier - */ - - /** - * Constructs a new Header. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {ibc.lightclients.solomachine.v3.IHeader=} [properties] Properties to set - */ - function Header(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Header timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Header signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.signature = $util.newBuffer([]); - - /** - * Header new_public_key. - * @member {google.protobuf.IAny|null|undefined} new_public_key - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.new_public_key = null; - - /** - * Header new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - */ - Header.prototype.new_diversifier = ""; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.solomachine.v3.Header.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {ibc.lightclients.solomachine.v3.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.timestamp); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.signature); - if (message.new_public_key != null && Object.hasOwnProperty.call(message, "new_public_key")) - $root.google.protobuf.Any.encode(message.new_public_key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {ibc.lightclients.solomachine.v3.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 ibc.lightclients.solomachine.v3.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.Header(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = reader.uint64(); - break; - case 2: - message.signature = reader.bytes(); - break; - case 3: - message.new_public_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 4: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.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 ibc.lightclients.solomachine.v3.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) { - let error = $root.google.protobuf.Any.verify(message.new_public_key); - if (error) - return "new_public_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.Header) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.Header(); - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.new_public_key != null) { - if (typeof object.new_public_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.Header.new_public_key: object expected"); - message.new_public_key = $root.google.protobuf.Any.fromObject(object.new_public_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.Header - * @static - * @param {ibc.lightclients.solomachine.v3.Header} message Header - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Header.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - object.new_public_key = null; - object.new_diversifier = ""; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.new_public_key != null && message.hasOwnProperty("new_public_key")) - object.new_public_key = $root.google.protobuf.Any.toObject(message.new_public_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - v3.Misbehaviour = (function() { - - /** - * Properties of a Misbehaviour. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IMisbehaviour - * @property {Long|null} [sequence] Misbehaviour sequence - * @property {ibc.lightclients.solomachine.v3.ISignatureAndData|null} [signature_one] Misbehaviour signature_one - * @property {ibc.lightclients.solomachine.v3.ISignatureAndData|null} [signature_two] Misbehaviour signature_two - */ - - /** - * Constructs a new Misbehaviour. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a Misbehaviour. - * @implements IMisbehaviour - * @constructor - * @param {ibc.lightclients.solomachine.v3.IMisbehaviour=} [properties] Properties to set - */ - function Misbehaviour(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Misbehaviour sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - */ - Misbehaviour.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Misbehaviour signature_one. - * @member {ibc.lightclients.solomachine.v3.ISignatureAndData|null|undefined} signature_one - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_one = null; - - /** - * Misbehaviour signature_two. - * @member {ibc.lightclients.solomachine.v3.ISignatureAndData|null|undefined} signature_two - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - */ - Misbehaviour.prototype.signature_two = null; - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.solomachine.v3.Misbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v3.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.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.signature_one != null && Object.hasOwnProperty.call(message, "signature_one")) - $root.ibc.lightclients.solomachine.v3.SignatureAndData.encode(message.signature_one, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signature_two != null && Object.hasOwnProperty.call(message, "signature_two")) - $root.ibc.lightclients.solomachine.v3.SignatureAndData.encode(message.signature_two, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.Misbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v3.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.Misbehaviour(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.signature_one = $root.ibc.lightclients.solomachine.v3.SignatureAndData.decode(reader, reader.uint32()); - break; - case 3: - message.signature_two = $root.ibc.lightclients.solomachine.v3.SignatureAndData.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Misbehaviour message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Misbehaviour.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.signature_one != null && message.hasOwnProperty("signature_one")) { - let error = $root.ibc.lightclients.solomachine.v3.SignatureAndData.verify(message.signature_one); - if (error) - return "signature_one." + error; - } - if (message.signature_two != null && message.hasOwnProperty("signature_two")) { - let error = $root.ibc.lightclients.solomachine.v3.SignatureAndData.verify(message.signature_two); - if (error) - return "signature_two." + error; - } - return null; - }; - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.Misbehaviour} Misbehaviour - */ - Misbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.Misbehaviour) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.Misbehaviour(); - 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.signature_one != null) { - if (typeof object.signature_one !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.Misbehaviour.signature_one: object expected"); - message.signature_one = $root.ibc.lightclients.solomachine.v3.SignatureAndData.fromObject(object.signature_one); - } - if (object.signature_two != null) { - if (typeof object.signature_two !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.Misbehaviour.signature_two: object expected"); - message.signature_two = $root.ibc.lightclients.solomachine.v3.SignatureAndData.fromObject(object.signature_two); - } - return message; - }; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @static - * @param {ibc.lightclients.solomachine.v3.Misbehaviour} message Misbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Misbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - object.signature_one = null; - object.signature_two = null; - } - 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.signature_one != null && message.hasOwnProperty("signature_one")) - object.signature_one = $root.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(message.signature_one, options); - if (message.signature_two != null && message.hasOwnProperty("signature_two")) - object.signature_two = $root.ibc.lightclients.solomachine.v3.SignatureAndData.toObject(message.signature_two, options); - return object; - }; - - /** - * Converts this Misbehaviour to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.Misbehaviour - * @instance - * @returns {Object.} JSON object - */ - Misbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Misbehaviour; - })(); - - v3.SignatureAndData = (function() { - - /** - * Properties of a SignatureAndData. - * @memberof ibc.lightclients.solomachine.v3 - * @interface ISignatureAndData - * @property {Uint8Array|null} [signature] SignatureAndData signature - * @property {Uint8Array|null} [path] SignatureAndData path - * @property {Uint8Array|null} [data] SignatureAndData data - * @property {Long|null} [timestamp] SignatureAndData timestamp - */ - - /** - * Constructs a new SignatureAndData. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a SignatureAndData. - * @implements ISignatureAndData - * @constructor - * @param {ibc.lightclients.solomachine.v3.ISignatureAndData=} [properties] Properties to set - */ - function SignatureAndData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignatureAndData signature. - * @member {Uint8Array} signature - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.signature = $util.newBuffer([]); - - /** - * SignatureAndData path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.path = $util.newBuffer([]); - - /** - * SignatureAndData data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.data = $util.newBuffer([]); - - /** - * SignatureAndData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - */ - SignatureAndData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified SignatureAndData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignatureAndData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v3.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.path); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified SignatureAndData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignatureAndData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v3.ISignatureAndData} message SignatureAndData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignatureAndData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.SignatureAndData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature = reader.bytes(); - break; - case 2: - message.path = reader.bytes(); - break; - case 3: - message.data = reader.bytes(); - break; - case 4: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignatureAndData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.SignatureAndData} SignatureAndData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignatureAndData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignatureAndData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignatureAndData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: 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"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a SignatureAndData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.SignatureAndData} SignatureAndData - */ - SignatureAndData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.SignatureAndData) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.SignatureAndData(); - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a SignatureAndData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @static - * @param {ibc.lightclients.solomachine.v3.SignatureAndData} message SignatureAndData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignatureAndData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this SignatureAndData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.SignatureAndData - * @instance - * @returns {Object.} JSON object - */ - SignatureAndData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignatureAndData; - })(); - - v3.TimestampedSignatureData = (function() { - - /** - * Properties of a TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v3 - * @interface ITimestampedSignatureData - * @property {Uint8Array|null} [signature_data] TimestampedSignatureData signature_data - * @property {Long|null} [timestamp] TimestampedSignatureData timestamp - */ - - /** - * Constructs a new TimestampedSignatureData. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a TimestampedSignatureData. - * @implements ITimestampedSignatureData - * @constructor - * @param {ibc.lightclients.solomachine.v3.ITimestampedSignatureData=} [properties] Properties to set - */ - function TimestampedSignatureData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TimestampedSignatureData signature_data. - * @member {Uint8Array} signature_data - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.signature_data = $util.newBuffer([]); - - /** - * TimestampedSignatureData timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @instance - */ - TimestampedSignatureData.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified TimestampedSignatureData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.TimestampedSignatureData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v3.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signature_data != null && Object.hasOwnProperty.call(message, "signature_data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signature_data); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - return writer; - }; - - /** - * Encodes the specified TimestampedSignatureData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.TimestampedSignatureData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v3.ITimestampedSignatureData} message TimestampedSignatureData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimestampedSignatureData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.TimestampedSignatureData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signature_data = reader.bytes(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimestampedSignatureData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.TimestampedSignatureData} TimestampedSignatureData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TimestampedSignatureData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimestampedSignatureData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TimestampedSignatureData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - if (!(message.signature_data && typeof message.signature_data.length === "number" || $util.isString(message.signature_data))) - return "signature_data: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a TimestampedSignatureData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.TimestampedSignatureData} TimestampedSignatureData - */ - TimestampedSignatureData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.TimestampedSignatureData) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.TimestampedSignatureData(); - if (object.signature_data != null) - if (typeof object.signature_data === "string") - $util.base64.decode(object.signature_data, message.signature_data = $util.newBuffer($util.base64.length(object.signature_data)), 0); - else if (object.signature_data.length) - message.signature_data = object.signature_data; - if (object.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a TimestampedSignatureData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @static - * @param {ibc.lightclients.solomachine.v3.TimestampedSignatureData} message TimestampedSignatureData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimestampedSignatureData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.signature_data = ""; - else { - object.signature_data = []; - if (options.bytes !== Array) - object.signature_data = $util.newBuffer(object.signature_data); - } - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - } - if (message.signature_data != null && message.hasOwnProperty("signature_data")) - object.signature_data = options.bytes === String ? $util.base64.encode(message.signature_data, 0, message.signature_data.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature_data) : message.signature_data; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - return object; - }; - - /** - * Converts this TimestampedSignatureData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.TimestampedSignatureData - * @instance - * @returns {Object.} JSON object - */ - TimestampedSignatureData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TimestampedSignatureData; - })(); - - v3.SignBytes = (function() { - - /** - * Properties of a SignBytes. - * @memberof ibc.lightclients.solomachine.v3 - * @interface ISignBytes - * @property {Long|null} [sequence] SignBytes sequence - * @property {Long|null} [timestamp] SignBytes timestamp - * @property {string|null} [diversifier] SignBytes diversifier - * @property {Uint8Array|null} [path] SignBytes path - * @property {Uint8Array|null} [data] SignBytes data - */ - - /** - * Constructs a new SignBytes. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a SignBytes. - * @implements ISignBytes - * @constructor - * @param {ibc.lightclients.solomachine.v3.ISignBytes=} [properties] Properties to set - */ - function SignBytes(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignBytes sequence. - * @member {Long} sequence - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes timestamp. - * @member {Long} timestamp - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignBytes diversifier. - * @member {string} diversifier - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.diversifier = ""; - - /** - * SignBytes path. - * @member {Uint8Array} path - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.path = $util.newBuffer([]); - - /** - * SignBytes data. - * @member {Uint8Array} data - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - */ - SignBytes.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified SignBytes message. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignBytes.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v3.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.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.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.timestamp); - if (message.diversifier != null && Object.hasOwnProperty.call(message, "diversifier")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.diversifier); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.path); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified SignBytes message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.SignBytes.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v3.ISignBytes} message SignBytes message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignBytes.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.SignBytes(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.timestamp = reader.uint64(); - break; - case 3: - message.diversifier = reader.string(); - break; - case 4: - message.path = reader.bytes(); - break; - case 5: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignBytes message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.SignBytes} SignBytes - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignBytes.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignBytes message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignBytes.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.timestamp != null && message.hasOwnProperty("timestamp")) - if (!$util.isInteger(message.timestamp) && !(message.timestamp && $util.isInteger(message.timestamp.low) && $util.isInteger(message.timestamp.high))) - return "timestamp: integer|Long expected"; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - if (!$util.isString(message.diversifier)) - return "diversifier: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!(message.path && typeof message.path.length === "number" || $util.isString(message.path))) - return "path: 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 SignBytes message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.SignBytes} SignBytes - */ - SignBytes.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.SignBytes) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.SignBytes(); - 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.timestamp != null) - if ($util.Long) - (message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = true; - else if (typeof object.timestamp === "string") - message.timestamp = parseInt(object.timestamp, 10); - else if (typeof object.timestamp === "number") - message.timestamp = object.timestamp; - else if (typeof object.timestamp === "object") - message.timestamp = new $util.LongBits(object.timestamp.low >>> 0, object.timestamp.high >>> 0).toNumber(true); - if (object.diversifier != null) - message.diversifier = String(object.diversifier); - if (object.path != null) - if (typeof object.path === "string") - $util.base64.decode(object.path, message.path = $util.newBuffer($util.base64.length(object.path)), 0); - else if (object.path.length) - message.path = object.path; - 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 SignBytes message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @static - * @param {ibc.lightclients.solomachine.v3.SignBytes} message SignBytes - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignBytes.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timestamp = options.longs === String ? "0" : 0; - object.diversifier = ""; - if (options.bytes === String) - object.path = ""; - else { - object.path = []; - if (options.bytes !== Array) - object.path = $util.newBuffer(object.path); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - 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.timestamp != null && message.hasOwnProperty("timestamp")) - if (typeof message.timestamp === "number") - object.timestamp = options.longs === String ? String(message.timestamp) : message.timestamp; - else - object.timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timestamp) : options.longs === Number ? new $util.LongBits(message.timestamp.low >>> 0, message.timestamp.high >>> 0).toNumber(true) : message.timestamp; - if (message.diversifier != null && message.hasOwnProperty("diversifier")) - object.diversifier = message.diversifier; - if (message.path != null && message.hasOwnProperty("path")) - object.path = options.bytes === String ? $util.base64.encode(message.path, 0, message.path.length) : options.bytes === Array ? Array.prototype.slice.call(message.path) : message.path; - 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 SignBytes to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.SignBytes - * @instance - * @returns {Object.} JSON object - */ - SignBytes.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignBytes; - })(); - - v3.HeaderData = (function() { - - /** - * Properties of a HeaderData. - * @memberof ibc.lightclients.solomachine.v3 - * @interface IHeaderData - * @property {google.protobuf.IAny|null} [new_pub_key] HeaderData new_pub_key - * @property {string|null} [new_diversifier] HeaderData new_diversifier - */ - - /** - * Constructs a new HeaderData. - * @memberof ibc.lightclients.solomachine.v3 - * @classdesc Represents a HeaderData. - * @implements IHeaderData - * @constructor - * @param {ibc.lightclients.solomachine.v3.IHeaderData=} [properties] Properties to set - */ - function HeaderData(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HeaderData new_pub_key. - * @member {google.protobuf.IAny|null|undefined} new_pub_key - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @instance - */ - HeaderData.prototype.new_pub_key = null; - - /** - * HeaderData new_diversifier. - * @member {string} new_diversifier - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @instance - */ - HeaderData.prototype.new_diversifier = ""; - - /** - * Encodes the specified HeaderData message. Does not implicitly {@link ibc.lightclients.solomachine.v3.HeaderData.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v3.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.new_pub_key != null && Object.hasOwnProperty.call(message, "new_pub_key")) - $root.google.protobuf.Any.encode(message.new_pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.new_diversifier != null && Object.hasOwnProperty.call(message, "new_diversifier")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.new_diversifier); - return writer; - }; - - /** - * Encodes the specified HeaderData message, length delimited. Does not implicitly {@link ibc.lightclients.solomachine.v3.HeaderData.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v3.IHeaderData} message HeaderData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HeaderData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.solomachine.v3.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.solomachine.v3.HeaderData(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_pub_key = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.new_diversifier = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HeaderData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.solomachine.v3.HeaderData} HeaderData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HeaderData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HeaderData message. - * @function verify - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HeaderData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) { - let error = $root.google.protobuf.Any.verify(message.new_pub_key); - if (error) - return "new_pub_key." + error; - } - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - if (!$util.isString(message.new_diversifier)) - return "new_diversifier: string expected"; - return null; - }; - - /** - * Creates a HeaderData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.solomachine.v3.HeaderData} HeaderData - */ - HeaderData.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.solomachine.v3.HeaderData) - return object; - let message = new $root.ibc.lightclients.solomachine.v3.HeaderData(); - if (object.new_pub_key != null) { - if (typeof object.new_pub_key !== "object") - throw TypeError(".ibc.lightclients.solomachine.v3.HeaderData.new_pub_key: object expected"); - message.new_pub_key = $root.google.protobuf.Any.fromObject(object.new_pub_key); - } - if (object.new_diversifier != null) - message.new_diversifier = String(object.new_diversifier); - return message; - }; - - /** - * Creates a plain object from a HeaderData message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @static - * @param {ibc.lightclients.solomachine.v3.HeaderData} message HeaderData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HeaderData.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.new_pub_key = null; - object.new_diversifier = ""; - } - if (message.new_pub_key != null && message.hasOwnProperty("new_pub_key")) - object.new_pub_key = $root.google.protobuf.Any.toObject(message.new_pub_key, options); - if (message.new_diversifier != null && message.hasOwnProperty("new_diversifier")) - object.new_diversifier = message.new_diversifier; - return object; - }; - - /** - * Converts this HeaderData to JSON. - * @function toJSON - * @memberof ibc.lightclients.solomachine.v3.HeaderData - * @instance - * @returns {Object.} JSON object - */ - HeaderData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HeaderData; - })(); - - return v3; - })(); - - return solomachine; - })(); - - lightclients.tendermint = (function() { - - /** - * Namespace tendermint. - * @memberof ibc.lightclients - * @namespace - */ - const tendermint = {}; - - tendermint.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.lightclients.tendermint - * @namespace - */ - const v1 = {}; - - v1.ClientState = (function() { - - /** - * Properties of a ClientState. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IClientState - * @property {string|null} [chain_id] ClientState chain_id - * @property {ibc.lightclients.tendermint.v1.IFraction|null} [trust_level] ClientState trust_level - * @property {google.protobuf.IDuration|null} [trusting_period] ClientState trusting_period - * @property {google.protobuf.IDuration|null} [unbonding_period] ClientState unbonding_period - * @property {google.protobuf.IDuration|null} [max_clock_drift] ClientState max_clock_drift - * @property {ibc.core.client.v1.IHeight|null} [frozen_height] ClientState frozen_height - * @property {ibc.core.client.v1.IHeight|null} [latest_height] ClientState latest_height - * @property {Array.|null} [proof_specs] ClientState proof_specs - * @property {Array.|null} [upgrade_path] ClientState upgrade_path - * @property {boolean|null} [allow_update_after_expiry] ClientState allow_update_after_expiry - * @property {boolean|null} [allow_update_after_misbehaviour] ClientState allow_update_after_misbehaviour - */ - - /** - * Constructs a new ClientState. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a ClientState. - * @implements IClientState - * @constructor - * @param {ibc.lightclients.tendermint.v1.IClientState=} [properties] Properties to set - */ - function ClientState(properties) { - this.proof_specs = []; - this.upgrade_path = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientState chain_id. - * @member {string} chain_id - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.chain_id = ""; - - /** - * ClientState trust_level. - * @member {ibc.lightclients.tendermint.v1.IFraction|null|undefined} trust_level - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.trust_level = null; - - /** - * ClientState trusting_period. - * @member {google.protobuf.IDuration|null|undefined} trusting_period - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.trusting_period = null; - - /** - * ClientState unbonding_period. - * @member {google.protobuf.IDuration|null|undefined} unbonding_period - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.unbonding_period = null; - - /** - * ClientState max_clock_drift. - * @member {google.protobuf.IDuration|null|undefined} max_clock_drift - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.max_clock_drift = null; - - /** - * ClientState frozen_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} frozen_height - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.frozen_height = null; - - /** - * ClientState latest_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} latest_height - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.latest_height = null; - - /** - * ClientState proof_specs. - * @member {Array.} proof_specs - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.proof_specs = $util.emptyArray; - - /** - * ClientState upgrade_path. - * @member {Array.} upgrade_path - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.upgrade_path = $util.emptyArray; - - /** - * ClientState allow_update_after_expiry. - * @member {boolean} allow_update_after_expiry - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.allow_update_after_expiry = false; - - /** - * ClientState allow_update_after_misbehaviour. - * @member {boolean} allow_update_after_misbehaviour - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - */ - ClientState.prototype.allow_update_after_misbehaviour = false; - - /** - * Encodes the specified ClientState message. Does not implicitly {@link ibc.lightclients.tendermint.v1.ClientState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {ibc.lightclients.tendermint.v1.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.chain_id != null && Object.hasOwnProperty.call(message, "chain_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.chain_id); - if (message.trust_level != null && Object.hasOwnProperty.call(message, "trust_level")) - $root.ibc.lightclients.tendermint.v1.Fraction.encode(message.trust_level, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trusting_period != null && Object.hasOwnProperty.call(message, "trusting_period")) - $root.google.protobuf.Duration.encode(message.trusting_period, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.unbonding_period != null && Object.hasOwnProperty.call(message, "unbonding_period")) - $root.google.protobuf.Duration.encode(message.unbonding_period, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.max_clock_drift != null && Object.hasOwnProperty.call(message, "max_clock_drift")) - $root.google.protobuf.Duration.encode(message.max_clock_drift, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.frozen_height != null && Object.hasOwnProperty.call(message, "frozen_height")) - $root.ibc.core.client.v1.Height.encode(message.frozen_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.latest_height != null && Object.hasOwnProperty.call(message, "latest_height")) - $root.ibc.core.client.v1.Height.encode(message.latest_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.proof_specs != null && message.proof_specs.length) - for (let i = 0; i < message.proof_specs.length; ++i) - $root.cosmos.ics23.v1.ProofSpec.encode(message.proof_specs[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.upgrade_path != null && message.upgrade_path.length) - for (let i = 0; i < message.upgrade_path.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.upgrade_path[i]); - if (message.allow_update_after_expiry != null && Object.hasOwnProperty.call(message, "allow_update_after_expiry")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.allow_update_after_expiry); - if (message.allow_update_after_misbehaviour != null && Object.hasOwnProperty.call(message, "allow_update_after_misbehaviour")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.allow_update_after_misbehaviour); - return writer; - }; - - /** - * Encodes the specified ClientState message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.ClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {ibc.lightclients.tendermint.v1.IClientState} message ClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.ClientState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chain_id = reader.string(); - break; - case 2: - message.trust_level = $root.ibc.lightclients.tendermint.v1.Fraction.decode(reader, reader.uint32()); - break; - case 3: - message.trusting_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 4: - message.unbonding_period = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 5: - message.max_clock_drift = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 6: - message.frozen_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.latest_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - if (!(message.proof_specs && message.proof_specs.length)) - message.proof_specs = []; - message.proof_specs.push($root.cosmos.ics23.v1.ProofSpec.decode(reader, reader.uint32())); - break; - case 9: - if (!(message.upgrade_path && message.upgrade_path.length)) - message.upgrade_path = []; - message.upgrade_path.push(reader.string()); - break; - case 10: - message.allow_update_after_expiry = reader.bool(); - break; - case 11: - message.allow_update_after_misbehaviour = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.ClientState} ClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientState message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - if (!$util.isString(message.chain_id)) - return "chain_id: string expected"; - if (message.trust_level != null && message.hasOwnProperty("trust_level")) { - let error = $root.ibc.lightclients.tendermint.v1.Fraction.verify(message.trust_level); - if (error) - return "trust_level." + error; - } - if (message.trusting_period != null && message.hasOwnProperty("trusting_period")) { - let error = $root.google.protobuf.Duration.verify(message.trusting_period); - if (error) - return "trusting_period." + error; - } - if (message.unbonding_period != null && message.hasOwnProperty("unbonding_period")) { - let error = $root.google.protobuf.Duration.verify(message.unbonding_period); - if (error) - return "unbonding_period." + error; - } - if (message.max_clock_drift != null && message.hasOwnProperty("max_clock_drift")) { - let error = $root.google.protobuf.Duration.verify(message.max_clock_drift); - if (error) - return "max_clock_drift." + error; - } - if (message.frozen_height != null && message.hasOwnProperty("frozen_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.frozen_height); - if (error) - return "frozen_height." + error; - } - if (message.latest_height != null && message.hasOwnProperty("latest_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.latest_height); - if (error) - return "latest_height." + error; - } - if (message.proof_specs != null && message.hasOwnProperty("proof_specs")) { - if (!Array.isArray(message.proof_specs)) - return "proof_specs: array expected"; - for (let i = 0; i < message.proof_specs.length; ++i) { - let error = $root.cosmos.ics23.v1.ProofSpec.verify(message.proof_specs[i]); - if (error) - return "proof_specs." + error; - } - } - if (message.upgrade_path != null && message.hasOwnProperty("upgrade_path")) { - if (!Array.isArray(message.upgrade_path)) - return "upgrade_path: array expected"; - for (let i = 0; i < message.upgrade_path.length; ++i) - if (!$util.isString(message.upgrade_path[i])) - return "upgrade_path: string[] expected"; - } - if (message.allow_update_after_expiry != null && message.hasOwnProperty("allow_update_after_expiry")) - if (typeof message.allow_update_after_expiry !== "boolean") - return "allow_update_after_expiry: boolean expected"; - if (message.allow_update_after_misbehaviour != null && message.hasOwnProperty("allow_update_after_misbehaviour")) - if (typeof message.allow_update_after_misbehaviour !== "boolean") - return "allow_update_after_misbehaviour: boolean expected"; - return null; - }; - - /** - * Creates a ClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.ClientState} ClientState - */ - ClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.ClientState) - return object; - let message = new $root.ibc.lightclients.tendermint.v1.ClientState(); - if (object.chain_id != null) - message.chain_id = String(object.chain_id); - if (object.trust_level != null) { - if (typeof object.trust_level !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.trust_level: object expected"); - message.trust_level = $root.ibc.lightclients.tendermint.v1.Fraction.fromObject(object.trust_level); - } - if (object.trusting_period != null) { - if (typeof object.trusting_period !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.trusting_period: object expected"); - message.trusting_period = $root.google.protobuf.Duration.fromObject(object.trusting_period); - } - if (object.unbonding_period != null) { - if (typeof object.unbonding_period !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.unbonding_period: object expected"); - message.unbonding_period = $root.google.protobuf.Duration.fromObject(object.unbonding_period); - } - if (object.max_clock_drift != null) { - if (typeof object.max_clock_drift !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.max_clock_drift: object expected"); - message.max_clock_drift = $root.google.protobuf.Duration.fromObject(object.max_clock_drift); - } - if (object.frozen_height != null) { - if (typeof object.frozen_height !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.frozen_height: object expected"); - message.frozen_height = $root.ibc.core.client.v1.Height.fromObject(object.frozen_height); - } - if (object.latest_height != null) { - if (typeof object.latest_height !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.latest_height: object expected"); - message.latest_height = $root.ibc.core.client.v1.Height.fromObject(object.latest_height); - } - if (object.proof_specs) { - if (!Array.isArray(object.proof_specs)) - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.proof_specs: array expected"); - message.proof_specs = []; - for (let i = 0; i < object.proof_specs.length; ++i) { - if (typeof object.proof_specs[i] !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.proof_specs: object expected"); - message.proof_specs[i] = $root.cosmos.ics23.v1.ProofSpec.fromObject(object.proof_specs[i]); - } - } - if (object.upgrade_path) { - if (!Array.isArray(object.upgrade_path)) - throw TypeError(".ibc.lightclients.tendermint.v1.ClientState.upgrade_path: array expected"); - message.upgrade_path = []; - for (let i = 0; i < object.upgrade_path.length; ++i) - message.upgrade_path[i] = String(object.upgrade_path[i]); - } - if (object.allow_update_after_expiry != null) - message.allow_update_after_expiry = Boolean(object.allow_update_after_expiry); - if (object.allow_update_after_misbehaviour != null) - message.allow_update_after_misbehaviour = Boolean(object.allow_update_after_misbehaviour); - return message; - }; - - /** - * Creates a plain object from a ClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @static - * @param {ibc.lightclients.tendermint.v1.ClientState} message ClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.proof_specs = []; - object.upgrade_path = []; - } - if (options.defaults) { - object.chain_id = ""; - object.trust_level = null; - object.trusting_period = null; - object.unbonding_period = null; - object.max_clock_drift = null; - object.frozen_height = null; - object.latest_height = null; - object.allow_update_after_expiry = false; - object.allow_update_after_misbehaviour = false; - } - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - object.chain_id = message.chain_id; - if (message.trust_level != null && message.hasOwnProperty("trust_level")) - object.trust_level = $root.ibc.lightclients.tendermint.v1.Fraction.toObject(message.trust_level, options); - if (message.trusting_period != null && message.hasOwnProperty("trusting_period")) - object.trusting_period = $root.google.protobuf.Duration.toObject(message.trusting_period, options); - if (message.unbonding_period != null && message.hasOwnProperty("unbonding_period")) - object.unbonding_period = $root.google.protobuf.Duration.toObject(message.unbonding_period, options); - if (message.max_clock_drift != null && message.hasOwnProperty("max_clock_drift")) - object.max_clock_drift = $root.google.protobuf.Duration.toObject(message.max_clock_drift, options); - if (message.frozen_height != null && message.hasOwnProperty("frozen_height")) - object.frozen_height = $root.ibc.core.client.v1.Height.toObject(message.frozen_height, options); - if (message.latest_height != null && message.hasOwnProperty("latest_height")) - object.latest_height = $root.ibc.core.client.v1.Height.toObject(message.latest_height, options); - if (message.proof_specs && message.proof_specs.length) { - object.proof_specs = []; - for (let j = 0; j < message.proof_specs.length; ++j) - object.proof_specs[j] = $root.cosmos.ics23.v1.ProofSpec.toObject(message.proof_specs[j], options); - } - if (message.upgrade_path && message.upgrade_path.length) { - object.upgrade_path = []; - for (let j = 0; j < message.upgrade_path.length; ++j) - object.upgrade_path[j] = message.upgrade_path[j]; - } - if (message.allow_update_after_expiry != null && message.hasOwnProperty("allow_update_after_expiry")) - object.allow_update_after_expiry = message.allow_update_after_expiry; - if (message.allow_update_after_misbehaviour != null && message.hasOwnProperty("allow_update_after_misbehaviour")) - object.allow_update_after_misbehaviour = message.allow_update_after_misbehaviour; - return object; - }; - - /** - * Converts this ClientState to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.ClientState - * @instance - * @returns {Object.} JSON object - */ - ClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientState; - })(); - - v1.ConsensusState = (function() { - - /** - * Properties of a ConsensusState. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IConsensusState - * @property {google.protobuf.ITimestamp|null} [timestamp] ConsensusState timestamp - * @property {ibc.core.commitment.v1.IMerkleRoot|null} [root] ConsensusState root - * @property {Uint8Array|null} [next_validators_hash] ConsensusState next_validators_hash - */ - - /** - * Constructs a new ConsensusState. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a ConsensusState. - * @implements IConsensusState - * @constructor - * @param {ibc.lightclients.tendermint.v1.IConsensusState=} [properties] Properties to set - */ - function ConsensusState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusState timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - */ - ConsensusState.prototype.timestamp = null; - - /** - * ConsensusState root. - * @member {ibc.core.commitment.v1.IMerkleRoot|null|undefined} root - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - */ - ConsensusState.prototype.root = null; - - /** - * ConsensusState next_validators_hash. - * @member {Uint8Array} next_validators_hash - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - */ - ConsensusState.prototype.next_validators_hash = $util.newBuffer([]); - - /** - * Encodes the specified ConsensusState message. Does not implicitly {@link ibc.lightclients.tendermint.v1.ConsensusState.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {ibc.lightclients.tendermint.v1.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.root != null && Object.hasOwnProperty.call(message, "root")) - $root.ibc.core.commitment.v1.MerkleRoot.encode(message.root, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.next_validators_hash != null && Object.hasOwnProperty.call(message, "next_validators_hash")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.next_validators_hash); - return writer; - }; - - /** - * Encodes the specified ConsensusState message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.ConsensusState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {ibc.lightclients.tendermint.v1.IConsensusState} message ConsensusState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.ConsensusState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 2: - message.root = $root.ibc.core.commitment.v1.MerkleRoot.decode(reader, reader.uint32()); - break; - case 3: - message.next_validators_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.ConsensusState} ConsensusState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusState message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - let error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.root != null && message.hasOwnProperty("root")) { - let error = $root.ibc.core.commitment.v1.MerkleRoot.verify(message.root); - if (error) - return "root." + error; - } - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - if (!(message.next_validators_hash && typeof message.next_validators_hash.length === "number" || $util.isString(message.next_validators_hash))) - return "next_validators_hash: buffer expected"; - return null; - }; - - /** - * Creates a ConsensusState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.ConsensusState} ConsensusState - */ - ConsensusState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.ConsensusState) - return object; - let message = new $root.ibc.lightclients.tendermint.v1.ConsensusState(); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ConsensusState.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.root != null) { - if (typeof object.root !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.ConsensusState.root: object expected"); - message.root = $root.ibc.core.commitment.v1.MerkleRoot.fromObject(object.root); - } - if (object.next_validators_hash != null) - if (typeof object.next_validators_hash === "string") - $util.base64.decode(object.next_validators_hash, message.next_validators_hash = $util.newBuffer($util.base64.length(object.next_validators_hash)), 0); - else if (object.next_validators_hash.length) - message.next_validators_hash = object.next_validators_hash; - return message; - }; - - /** - * Creates a plain object from a ConsensusState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @static - * @param {ibc.lightclients.tendermint.v1.ConsensusState} message ConsensusState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.timestamp = null; - object.root = null; - if (options.bytes === String) - object.next_validators_hash = ""; - else { - object.next_validators_hash = []; - if (options.bytes !== Array) - object.next_validators_hash = $util.newBuffer(object.next_validators_hash); - } - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.root != null && message.hasOwnProperty("root")) - object.root = $root.ibc.core.commitment.v1.MerkleRoot.toObject(message.root, options); - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - object.next_validators_hash = options.bytes === String ? $util.base64.encode(message.next_validators_hash, 0, message.next_validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_validators_hash) : message.next_validators_hash; - return object; - }; - - /** - * Converts this ConsensusState to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.ConsensusState - * @instance - * @returns {Object.} JSON object - */ - ConsensusState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusState; - })(); - - v1.Misbehaviour = (function() { - - /** - * Properties of a Misbehaviour. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IMisbehaviour - * @property {string|null} [client_id] Misbehaviour client_id - * @property {ibc.lightclients.tendermint.v1.IHeader|null} [header_1] Misbehaviour header_1 - * @property {ibc.lightclients.tendermint.v1.IHeader|null} [header_2] Misbehaviour header_2 - */ - - /** - * Constructs a new Misbehaviour. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a Misbehaviour. - * @implements IMisbehaviour - * @constructor - * @param {ibc.lightclients.tendermint.v1.IMisbehaviour=} [properties] Properties to set - */ - function Misbehaviour(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Misbehaviour client_id. - * @member {string} client_id - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - */ - Misbehaviour.prototype.client_id = ""; - - /** - * Misbehaviour header_1. - * @member {ibc.lightclients.tendermint.v1.IHeader|null|undefined} header_1 - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - */ - Misbehaviour.prototype.header_1 = null; - - /** - * Misbehaviour header_2. - * @member {ibc.lightclients.tendermint.v1.IHeader|null|undefined} header_2 - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - */ - Misbehaviour.prototype.header_2 = null; - - /** - * Encodes the specified Misbehaviour message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Misbehaviour.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {ibc.lightclients.tendermint.v1.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.header_1 != null && Object.hasOwnProperty.call(message, "header_1")) - $root.ibc.lightclients.tendermint.v1.Header.encode(message.header_1, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.header_2 != null && Object.hasOwnProperty.call(message, "header_2")) - $root.ibc.lightclients.tendermint.v1.Header.encode(message.header_2, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Misbehaviour message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Misbehaviour.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {ibc.lightclients.tendermint.v1.IMisbehaviour} message Misbehaviour message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Misbehaviour.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.Misbehaviour(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.header_1 = $root.ibc.lightclients.tendermint.v1.Header.decode(reader, reader.uint32()); - break; - case 3: - message.header_2 = $root.ibc.lightclients.tendermint.v1.Header.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Misbehaviour message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.Misbehaviour} Misbehaviour - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Misbehaviour.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Misbehaviour message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Misbehaviour.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.header_1 != null && message.hasOwnProperty("header_1")) { - let error = $root.ibc.lightclients.tendermint.v1.Header.verify(message.header_1); - if (error) - return "header_1." + error; - } - if (message.header_2 != null && message.hasOwnProperty("header_2")) { - let error = $root.ibc.lightclients.tendermint.v1.Header.verify(message.header_2); - if (error) - return "header_2." + error; - } - return null; - }; - - /** - * Creates a Misbehaviour message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.Misbehaviour} Misbehaviour - */ - Misbehaviour.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.Misbehaviour) - return object; - let message = new $root.ibc.lightclients.tendermint.v1.Misbehaviour(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.header_1 != null) { - if (typeof object.header_1 !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Misbehaviour.header_1: object expected"); - message.header_1 = $root.ibc.lightclients.tendermint.v1.Header.fromObject(object.header_1); - } - if (object.header_2 != null) { - if (typeof object.header_2 !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Misbehaviour.header_2: object expected"); - message.header_2 = $root.ibc.lightclients.tendermint.v1.Header.fromObject(object.header_2); - } - return message; - }; - - /** - * Creates a plain object from a Misbehaviour message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @static - * @param {ibc.lightclients.tendermint.v1.Misbehaviour} message Misbehaviour - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Misbehaviour.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.client_id = ""; - object.header_1 = null; - object.header_2 = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.header_1 != null && message.hasOwnProperty("header_1")) - object.header_1 = $root.ibc.lightclients.tendermint.v1.Header.toObject(message.header_1, options); - if (message.header_2 != null && message.hasOwnProperty("header_2")) - object.header_2 = $root.ibc.lightclients.tendermint.v1.Header.toObject(message.header_2, options); - return object; - }; - - /** - * Converts this Misbehaviour to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.Misbehaviour - * @instance - * @returns {Object.} JSON object - */ - Misbehaviour.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Misbehaviour; - })(); - - v1.Header = (function() { - - /** - * Properties of a Header. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IHeader - * @property {tendermint.types.ISignedHeader|null} [signed_header] Header signed_header - * @property {tendermint.types.IValidatorSet|null} [validator_set] Header validator_set - * @property {ibc.core.client.v1.IHeight|null} [trusted_height] Header trusted_height - * @property {tendermint.types.IValidatorSet|null} [trusted_validators] Header trusted_validators - */ - - /** - * Constructs a new Header. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {ibc.lightclients.tendermint.v1.IHeader=} [properties] Properties to set - */ - function Header(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Header signed_header. - * @member {tendermint.types.ISignedHeader|null|undefined} signed_header - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.signed_header = null; - - /** - * Header validator_set. - * @member {tendermint.types.IValidatorSet|null|undefined} validator_set - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.validator_set = null; - - /** - * Header trusted_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} trusted_height - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.trusted_height = null; - - /** - * Header trusted_validators. - * @member {tendermint.types.IValidatorSet|null|undefined} trusted_validators - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - */ - Header.prototype.trusted_validators = null; - - /** - * Encodes the specified Header message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Header.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {ibc.lightclients.tendermint.v1.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.signed_header != null && Object.hasOwnProperty.call(message, "signed_header")) - $root.tendermint.types.SignedHeader.encode(message.signed_header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validator_set != null && Object.hasOwnProperty.call(message, "validator_set")) - $root.tendermint.types.ValidatorSet.encode(message.validator_set, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.trusted_height != null && Object.hasOwnProperty.call(message, "trusted_height")) - $root.ibc.core.client.v1.Height.encode(message.trusted_height, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.trusted_validators != null && Object.hasOwnProperty.call(message, "trusted_validators")) - $root.tendermint.types.ValidatorSet.encode(message.trusted_validators, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {ibc.lightclients.tendermint.v1.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 ibc.lightclients.tendermint.v1.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.Header(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - case 3: - message.trusted_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 4: - message.trusted_validators = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.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 ibc.lightclients.tendermint.v1.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.signed_header != null && message.hasOwnProperty("signed_header")) { - let error = $root.tendermint.types.SignedHeader.verify(message.signed_header); - if (error) - return "signed_header." + error; - } - if (message.validator_set != null && message.hasOwnProperty("validator_set")) { - let error = $root.tendermint.types.ValidatorSet.verify(message.validator_set); - if (error) - return "validator_set." + error; - } - if (message.trusted_height != null && message.hasOwnProperty("trusted_height")) { - let error = $root.ibc.core.client.v1.Height.verify(message.trusted_height); - if (error) - return "trusted_height." + error; - } - if (message.trusted_validators != null && message.hasOwnProperty("trusted_validators")) { - let error = $root.tendermint.types.ValidatorSet.verify(message.trusted_validators); - if (error) - return "trusted_validators." + error; - } - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.Header) - return object; - let message = new $root.ibc.lightclients.tendermint.v1.Header(); - if (object.signed_header != null) { - if (typeof object.signed_header !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.signed_header: object expected"); - message.signed_header = $root.tendermint.types.SignedHeader.fromObject(object.signed_header); - } - if (object.validator_set != null) { - if (typeof object.validator_set !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.validator_set: object expected"); - message.validator_set = $root.tendermint.types.ValidatorSet.fromObject(object.validator_set); - } - if (object.trusted_height != null) { - if (typeof object.trusted_height !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.trusted_height: object expected"); - message.trusted_height = $root.ibc.core.client.v1.Height.fromObject(object.trusted_height); - } - if (object.trusted_validators != null) { - if (typeof object.trusted_validators !== "object") - throw TypeError(".ibc.lightclients.tendermint.v1.Header.trusted_validators: object expected"); - message.trusted_validators = $root.tendermint.types.ValidatorSet.fromObject(object.trusted_validators); - } - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.Header - * @static - * @param {ibc.lightclients.tendermint.v1.Header} message Header - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Header.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.signed_header = null; - object.validator_set = null; - object.trusted_height = null; - object.trusted_validators = null; - } - if (message.signed_header != null && message.hasOwnProperty("signed_header")) - object.signed_header = $root.tendermint.types.SignedHeader.toObject(message.signed_header, options); - if (message.validator_set != null && message.hasOwnProperty("validator_set")) - object.validator_set = $root.tendermint.types.ValidatorSet.toObject(message.validator_set, options); - if (message.trusted_height != null && message.hasOwnProperty("trusted_height")) - object.trusted_height = $root.ibc.core.client.v1.Height.toObject(message.trusted_height, options); - if (message.trusted_validators != null && message.hasOwnProperty("trusted_validators")) - object.trusted_validators = $root.tendermint.types.ValidatorSet.toObject(message.trusted_validators, options); - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - v1.Fraction = (function() { - - /** - * Properties of a Fraction. - * @memberof ibc.lightclients.tendermint.v1 - * @interface IFraction - * @property {Long|null} [numerator] Fraction numerator - * @property {Long|null} [denominator] Fraction denominator - */ - - /** - * Constructs a new Fraction. - * @memberof ibc.lightclients.tendermint.v1 - * @classdesc Represents a Fraction. - * @implements IFraction - * @constructor - * @param {ibc.lightclients.tendermint.v1.IFraction=} [properties] Properties to set - */ - function Fraction(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Fraction numerator. - * @member {Long} numerator - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @instance - */ - Fraction.prototype.numerator = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Fraction denominator. - * @member {Long} denominator - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @instance - */ - Fraction.prototype.denominator = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Fraction message. Does not implicitly {@link ibc.lightclients.tendermint.v1.Fraction.verify|verify} messages. - * @function encode - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {ibc.lightclients.tendermint.v1.IFraction} message Fraction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fraction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numerator != null && Object.hasOwnProperty.call(message, "numerator")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.numerator); - if (message.denominator != null && Object.hasOwnProperty.call(message, "denominator")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.denominator); - return writer; - }; - - /** - * Encodes the specified Fraction message, length delimited. Does not implicitly {@link ibc.lightclients.tendermint.v1.Fraction.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {ibc.lightclients.tendermint.v1.IFraction} message Fraction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fraction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Fraction message from the specified reader or buffer. - * @function decode - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.lightclients.tendermint.v1.Fraction} Fraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fraction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.lightclients.tendermint.v1.Fraction(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.numerator = reader.uint64(); - break; - case 2: - message.denominator = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fraction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.lightclients.tendermint.v1.Fraction} Fraction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fraction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Fraction message. - * @function verify - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Fraction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numerator != null && message.hasOwnProperty("numerator")) - if (!$util.isInteger(message.numerator) && !(message.numerator && $util.isInteger(message.numerator.low) && $util.isInteger(message.numerator.high))) - return "numerator: integer|Long expected"; - if (message.denominator != null && message.hasOwnProperty("denominator")) - if (!$util.isInteger(message.denominator) && !(message.denominator && $util.isInteger(message.denominator.low) && $util.isInteger(message.denominator.high))) - return "denominator: integer|Long expected"; - return null; - }; - - /** - * Creates a Fraction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {Object.} object Plain object - * @returns {ibc.lightclients.tendermint.v1.Fraction} Fraction - */ - Fraction.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.lightclients.tendermint.v1.Fraction) - return object; - let message = new $root.ibc.lightclients.tendermint.v1.Fraction(); - if (object.numerator != null) - if ($util.Long) - (message.numerator = $util.Long.fromValue(object.numerator)).unsigned = true; - else if (typeof object.numerator === "string") - message.numerator = parseInt(object.numerator, 10); - else if (typeof object.numerator === "number") - message.numerator = object.numerator; - else if (typeof object.numerator === "object") - message.numerator = new $util.LongBits(object.numerator.low >>> 0, object.numerator.high >>> 0).toNumber(true); - if (object.denominator != null) - if ($util.Long) - (message.denominator = $util.Long.fromValue(object.denominator)).unsigned = true; - else if (typeof object.denominator === "string") - message.denominator = parseInt(object.denominator, 10); - else if (typeof object.denominator === "number") - message.denominator = object.denominator; - else if (typeof object.denominator === "object") - message.denominator = new $util.LongBits(object.denominator.low >>> 0, object.denominator.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Fraction message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @static - * @param {ibc.lightclients.tendermint.v1.Fraction} message Fraction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fraction.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.numerator = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.numerator = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.denominator = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.denominator = options.longs === String ? "0" : 0; - } - if (message.numerator != null && message.hasOwnProperty("numerator")) - if (typeof message.numerator === "number") - object.numerator = options.longs === String ? String(message.numerator) : message.numerator; - else - object.numerator = options.longs === String ? $util.Long.prototype.toString.call(message.numerator) : options.longs === Number ? new $util.LongBits(message.numerator.low >>> 0, message.numerator.high >>> 0).toNumber(true) : message.numerator; - if (message.denominator != null && message.hasOwnProperty("denominator")) - if (typeof message.denominator === "number") - object.denominator = options.longs === String ? String(message.denominator) : message.denominator; - else - object.denominator = options.longs === String ? $util.Long.prototype.toString.call(message.denominator) : options.longs === Number ? new $util.LongBits(message.denominator.low >>> 0, message.denominator.high >>> 0).toNumber(true) : message.denominator; - return object; - }; - - /** - * Converts this Fraction to JSON. - * @function toJSON - * @memberof ibc.lightclients.tendermint.v1.Fraction - * @instance - * @returns {Object.} JSON object - */ - Fraction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Fraction; - })(); - - return v1; - })(); - - return tendermint; - })(); - - return lightclients; - })(); - - return ibc; -})(); - -export const tendermint = $root.tendermint = (() => { - - /** - * Namespace tendermint. - * @exports tendermint - * @namespace - */ - const tendermint = {}; - - tendermint.types = (function() { - - /** - * Namespace types. - * @memberof tendermint - * @namespace - */ - const types = {}; - - types.ValidatorSet = (function() { - - /** - * Properties of a ValidatorSet. - * @memberof tendermint.types - * @interface IValidatorSet - * @property {Array.|null} [validators] ValidatorSet validators - * @property {tendermint.types.IValidator|null} [proposer] ValidatorSet proposer - * @property {Long|null} [total_voting_power] ValidatorSet total_voting_power - */ - - /** - * Constructs a new ValidatorSet. - * @memberof tendermint.types - * @classdesc Represents a ValidatorSet. - * @implements IValidatorSet - * @constructor - * @param {tendermint.types.IValidatorSet=} [properties] Properties to set - */ - function ValidatorSet(properties) { - this.validators = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidatorSet validators. - * @member {Array.} validators - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.validators = $util.emptyArray; - - /** - * ValidatorSet proposer. - * @member {tendermint.types.IValidator|null|undefined} proposer - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.proposer = null; - - /** - * ValidatorSet total_voting_power. - * @member {Long} total_voting_power - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.total_voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @function encode - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validators != null && message.validators.length) - for (let i = 0; i < message.validators.length; ++i) - $root.tendermint.types.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - $root.tendermint.types.Validator.encode(message.proposer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.total_voting_power != null && Object.hasOwnProperty.call(message, "total_voting_power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.total_voting_power); - return writer; - }; - - /** - * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.ValidatorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.ValidatorSet} ValidatorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.ValidatorSet(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = $root.tendermint.types.Validator.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.ValidatorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.ValidatorSet} ValidatorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorSet message. - * @function verify - * @memberof tendermint.types.ValidatorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validators != null && message.hasOwnProperty("validators")) { - if (!Array.isArray(message.validators)) - return "validators: array expected"; - for (let i = 0; i < message.validators.length; ++i) { - let error = $root.tendermint.types.Validator.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - if (message.proposer != null && message.hasOwnProperty("proposer")) { - let error = $root.tendermint.types.Validator.verify(message.proposer); - if (error) - return "proposer." + error; - } - if (message.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (!$util.isInteger(message.total_voting_power) && !(message.total_voting_power && $util.isInteger(message.total_voting_power.low) && $util.isInteger(message.total_voting_power.high))) - return "total_voting_power: integer|Long expected"; - return null; - }; - - /** - * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.ValidatorSet - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.ValidatorSet} ValidatorSet - */ - ValidatorSet.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.ValidatorSet) - return object; - let message = new $root.tendermint.types.ValidatorSet(); - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.types.ValidatorSet.validators: array expected"); - message.validators = []; - for (let i = 0; i < object.validators.length; ++i) { - if (typeof object.validators[i] !== "object") - throw TypeError(".tendermint.types.ValidatorSet.validators: object expected"); - message.validators[i] = $root.tendermint.types.Validator.fromObject(object.validators[i]); - } - } - if (object.proposer != null) { - if (typeof object.proposer !== "object") - throw TypeError(".tendermint.types.ValidatorSet.proposer: object expected"); - message.proposer = $root.tendermint.types.Validator.fromObject(object.proposer); - } - if (object.total_voting_power != null) - if ($util.Long) - (message.total_voting_power = $util.Long.fromValue(object.total_voting_power)).unsigned = false; - else if (typeof object.total_voting_power === "string") - message.total_voting_power = parseInt(object.total_voting_power, 10); - else if (typeof object.total_voting_power === "number") - message.total_voting_power = object.total_voting_power; - else if (typeof object.total_voting_power === "object") - message.total_voting_power = new $util.LongBits(object.total_voting_power.low >>> 0, object.total_voting_power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.ValidatorSet} message ValidatorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.validators = []; - if (options.defaults) { - object.proposer = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.total_voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total_voting_power = options.longs === String ? "0" : 0; - } - if (message.validators && message.validators.length) { - object.validators = []; - for (let j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.types.Validator.toObject(message.validators[j], options); - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = $root.tendermint.types.Validator.toObject(message.proposer, options); - if (message.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (typeof message.total_voting_power === "number") - object.total_voting_power = options.longs === String ? String(message.total_voting_power) : message.total_voting_power; - else - object.total_voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.total_voting_power) : options.longs === Number ? new $util.LongBits(message.total_voting_power.low >>> 0, message.total_voting_power.high >>> 0).toNumber() : message.total_voting_power; - return object; - }; - - /** - * Converts this ValidatorSet to JSON. - * @function toJSON - * @memberof tendermint.types.ValidatorSet - * @instance - * @returns {Object.} JSON object - */ - ValidatorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValidatorSet; - })(); - - types.Validator = (function() { - - /** - * Properties of a Validator. - * @memberof tendermint.types - * @interface IValidator - * @property {Uint8Array|null} [address] Validator address - * @property {tendermint.crypto.IPublicKey|null} [pub_key] Validator pub_key - * @property {Long|null} [voting_power] Validator voting_power - * @property {Long|null} [proposer_priority] Validator proposer_priority - */ - - /** - * Constructs a new Validator. - * @memberof tendermint.types - * @classdesc Represents a Validator. - * @implements IValidator - * @constructor - * @param {tendermint.types.IValidator=} [properties] Properties to set - */ - function Validator(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Validator address. - * @member {Uint8Array} address - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.address = $util.newBuffer([]); - - /** - * Validator pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.pub_key = null; - - /** - * Validator voting_power. - * @member {Long} voting_power - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Validator proposer_priority. - * @member {Long} proposer_priority - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.proposer_priority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Validator - * @static - * @param {tendermint.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.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.voting_power != null && Object.hasOwnProperty.call(message, "voting_power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.voting_power); - if (message.proposer_priority != null && Object.hasOwnProperty.call(message, "proposer_priority")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposer_priority); - return writer; - }; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Validator - * @static - * @param {tendermint.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.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Validator(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pub_key = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = reader.int64(); - break; - case 4: - message.proposer_priority = 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.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.pub_key != null && message.hasOwnProperty("pub_key")) { - let error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (!$util.isInteger(message.voting_power) && !(message.voting_power && $util.isInteger(message.voting_power.low) && $util.isInteger(message.voting_power.high))) - return "voting_power: integer|Long expected"; - if (message.proposer_priority != null && message.hasOwnProperty("proposer_priority")) - if (!$util.isInteger(message.proposer_priority) && !(message.proposer_priority && $util.isInteger(message.proposer_priority.low) && $util.isInteger(message.proposer_priority.high))) - return "proposer_priority: 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.types.Validator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Validator} Validator - */ - Validator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Validator) - return object; - let message = new $root.tendermint.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.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.types.Validator.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - if (object.voting_power != null) - if ($util.Long) - (message.voting_power = $util.Long.fromValue(object.voting_power)).unsigned = false; - else if (typeof object.voting_power === "string") - message.voting_power = parseInt(object.voting_power, 10); - else if (typeof object.voting_power === "number") - message.voting_power = object.voting_power; - else if (typeof object.voting_power === "object") - message.voting_power = new $util.LongBits(object.voting_power.low >>> 0, object.voting_power.high >>> 0).toNumber(); - if (object.proposer_priority != null) - if ($util.Long) - (message.proposer_priority = $util.Long.fromValue(object.proposer_priority)).unsigned = false; - else if (typeof object.proposer_priority === "string") - message.proposer_priority = parseInt(object.proposer_priority, 10); - else if (typeof object.proposer_priority === "number") - message.proposer_priority = object.proposer_priority; - else if (typeof object.proposer_priority === "object") - message.proposer_priority = new $util.LongBits(object.proposer_priority.low >>> 0, object.proposer_priority.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.types.Validator - * @static - * @param {tendermint.types.Validator} message Validator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Validator.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - object.pub_key = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.voting_power = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.proposer_priority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposer_priority = 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.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, options); - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (typeof message.voting_power === "number") - object.voting_power = options.longs === String ? String(message.voting_power) : message.voting_power; - else - object.voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.voting_power) : options.longs === Number ? new $util.LongBits(message.voting_power.low >>> 0, message.voting_power.high >>> 0).toNumber() : message.voting_power; - if (message.proposer_priority != null && message.hasOwnProperty("proposer_priority")) - if (typeof message.proposer_priority === "number") - object.proposer_priority = options.longs === String ? String(message.proposer_priority) : message.proposer_priority; - else - object.proposer_priority = options.longs === String ? $util.Long.prototype.toString.call(message.proposer_priority) : options.longs === Number ? new $util.LongBits(message.proposer_priority.low >>> 0, message.proposer_priority.high >>> 0).toNumber() : message.proposer_priority; - return object; - }; - - /** - * Converts this Validator to JSON. - * @function toJSON - * @memberof tendermint.types.Validator - * @instance - * @returns {Object.} JSON object - */ - Validator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Validator; - })(); - - types.SimpleValidator = (function() { - - /** - * Properties of a SimpleValidator. - * @memberof tendermint.types - * @interface ISimpleValidator - * @property {tendermint.crypto.IPublicKey|null} [pub_key] SimpleValidator pub_key - * @property {Long|null} [voting_power] SimpleValidator voting_power - */ - - /** - * Constructs a new SimpleValidator. - * @memberof tendermint.types - * @classdesc Represents a SimpleValidator. - * @implements ISimpleValidator - * @constructor - * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set - */ - function SimpleValidator(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimpleValidator pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.types.SimpleValidator - * @instance - */ - SimpleValidator.prototype.pub_key = null; - - /** - * SimpleValidator voting_power. - * @member {Long} voting_power - * @memberof tendermint.types.SimpleValidator - * @instance - */ - SimpleValidator.prototype.voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @function encode - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleValidator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.voting_power != null && Object.hasOwnProperty.call(message, "voting_power")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.voting_power); - return writer; - }; - - /** - * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleValidator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.SimpleValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.SimpleValidator} SimpleValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleValidator.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SimpleValidator(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.voting_power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.SimpleValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.SimpleValidator} SimpleValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleValidator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimpleValidator message. - * @function verify - * @memberof tendermint.types.SimpleValidator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimpleValidator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) { - let error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (!$util.isInteger(message.voting_power) && !(message.voting_power && $util.isInteger(message.voting_power.low) && $util.isInteger(message.voting_power.high))) - return "voting_power: integer|Long expected"; - return null; - }; - - /** - * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.SimpleValidator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.SimpleValidator} SimpleValidator - */ - SimpleValidator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.SimpleValidator) - return object; - let message = new $root.tendermint.types.SimpleValidator(); - if (object.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.types.SimpleValidator.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - if (object.voting_power != null) - if ($util.Long) - (message.voting_power = $util.Long.fromValue(object.voting_power)).unsigned = false; - else if (typeof object.voting_power === "string") - message.voting_power = parseInt(object.voting_power, 10); - else if (typeof object.voting_power === "number") - message.voting_power = object.voting_power; - else if (typeof object.voting_power === "object") - message.voting_power = new $util.LongBits(object.voting_power.low >>> 0, object.voting_power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.SimpleValidator} message SimpleValidator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimpleValidator.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.pub_key = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.voting_power = options.longs === String ? "0" : 0; - } - if (message.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, options); - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (typeof message.voting_power === "number") - object.voting_power = options.longs === String ? String(message.voting_power) : message.voting_power; - else - object.voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.voting_power) : options.longs === Number ? new $util.LongBits(message.voting_power.low >>> 0, message.voting_power.high >>> 0).toNumber() : message.voting_power; - return object; - }; - - /** - * Converts this SimpleValidator to JSON. - * @function toJSON - * @memberof tendermint.types.SimpleValidator - * @instance - * @returns {Object.} JSON object - */ - SimpleValidator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SimpleValidator; - })(); - - /** - * BlockIDFlag enum. - * @name tendermint.types.BlockIDFlag - * @enum {number} - * @property {number} BLOCK_ID_FLAG_UNKNOWN=0 BLOCK_ID_FLAG_UNKNOWN value - * @property {number} BLOCK_ID_FLAG_ABSENT=1 BLOCK_ID_FLAG_ABSENT value - * @property {number} BLOCK_ID_FLAG_COMMIT=2 BLOCK_ID_FLAG_COMMIT value - * @property {number} BLOCK_ID_FLAG_NIL=3 BLOCK_ID_FLAG_NIL value - */ - types.BlockIDFlag = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BLOCK_ID_FLAG_UNKNOWN"] = 0; - values[valuesById[1] = "BLOCK_ID_FLAG_ABSENT"] = 1; - values[valuesById[2] = "BLOCK_ID_FLAG_COMMIT"] = 2; - values[valuesById[3] = "BLOCK_ID_FLAG_NIL"] = 3; - return values; - })(); - - /** - * SignedMsgType enum. - * @name tendermint.types.SignedMsgType - * @enum {number} - * @property {number} SIGNED_MSG_TYPE_UNKNOWN=0 SIGNED_MSG_TYPE_UNKNOWN value - * @property {number} SIGNED_MSG_TYPE_PREVOTE=1 SIGNED_MSG_TYPE_PREVOTE value - * @property {number} SIGNED_MSG_TYPE_PRECOMMIT=2 SIGNED_MSG_TYPE_PRECOMMIT value - * @property {number} SIGNED_MSG_TYPE_PROPOSAL=32 SIGNED_MSG_TYPE_PROPOSAL value - */ - types.SignedMsgType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SIGNED_MSG_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "SIGNED_MSG_TYPE_PREVOTE"] = 1; - values[valuesById[2] = "SIGNED_MSG_TYPE_PRECOMMIT"] = 2; - values[valuesById[32] = "SIGNED_MSG_TYPE_PROPOSAL"] = 32; - return values; - })(); - - types.PartSetHeader = (function() { - - /** - * Properties of a PartSetHeader. - * @memberof tendermint.types - * @interface IPartSetHeader - * @property {number|null} [total] PartSetHeader total - * @property {Uint8Array|null} [hash] PartSetHeader hash - */ - - /** - * Constructs a new PartSetHeader. - * @memberof tendermint.types - * @classdesc Represents a PartSetHeader. - * @implements IPartSetHeader - * @constructor - * @param {tendermint.types.IPartSetHeader=} [properties] Properties to set - */ - function PartSetHeader(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PartSetHeader total. - * @member {number} total - * @memberof tendermint.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.total = 0; - - /** - * PartSetHeader hash. - * @member {Uint8Array} hash - * @memberof tendermint.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.hash = $util.newBuffer([]); - - /** - * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.types.PartSetHeader - * @static - * @param {tendermint.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).uint32(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.types.PartSetHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.PartSetHeader - * @static - * @param {tendermint.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.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.PartSetHeader(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - 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.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.types.PartSetHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.PartSetHeader} PartSetHeader - */ - PartSetHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.PartSetHeader) - return object; - let message = new $root.tendermint.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.types.PartSetHeader - * @static - * @param {tendermint.types.PartSetHeader} message PartSetHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartSetHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.types.PartSetHeader - * @instance - * @returns {Object.} JSON object - */ - PartSetHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PartSetHeader; - })(); - - types.Part = (function() { - - /** - * Properties of a Part. - * @memberof tendermint.types - * @interface IPart - * @property {number|null} [index] Part index - * @property {Uint8Array|null} [bytes] Part bytes - * @property {tendermint.crypto.IProof|null} [proof] Part proof - */ - - /** - * Constructs a new Part. - * @memberof tendermint.types - * @classdesc Represents a Part. - * @implements IPart - * @constructor - * @param {tendermint.types.IPart=} [properties] Properties to set - */ - function Part(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Part index. - * @member {number} index - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.index = 0; - - /** - * Part bytes. - * @member {Uint8Array} bytes - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.bytes = $util.newBuffer([]); - - /** - * Part proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.proof = null; - - /** - * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.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).uint32(message.index); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytes); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Part message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Part(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Part message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Part message. - * @function verify - * @memberof tendermint.types.Part - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Part.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)) - return "index: integer expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (!(message.bytes && typeof message.bytes.length === "number" || $util.isString(message.bytes))) - return "bytes: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - let error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Part - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Part} Part - */ - Part.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Part) - return object; - let message = new $root.tendermint.types.Part(); - if (object.index != null) - message.index = object.index >>> 0; - if (object.bytes != null) - if (typeof object.bytes === "string") - $util.base64.decode(object.bytes, message.bytes = $util.newBuffer($util.base64.length(object.bytes)), 0); - else if (object.bytes.length) - message.bytes = object.bytes; - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.types.Part.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.Part} message Part - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Part.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.index = 0; - if (options.bytes === String) - object.bytes = ""; - else { - object.bytes = []; - if (options.bytes !== Array) - object.bytes = $util.newBuffer(object.bytes); - } - object.proof = null; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.bytes != null && message.hasOwnProperty("bytes")) - object.bytes = options.bytes === String ? $util.base64.encode(message.bytes, 0, message.bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytes) : message.bytes; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this Part to JSON. - * @function toJSON - * @memberof tendermint.types.Part - * @instance - * @returns {Object.} JSON object - */ - Part.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Part; - })(); - - types.BlockID = (function() { - - /** - * Properties of a BlockID. - * @memberof tendermint.types - * @interface IBlockID - * @property {Uint8Array|null} [hash] BlockID hash - * @property {tendermint.types.IPartSetHeader|null} [part_set_header] BlockID part_set_header - */ - - /** - * Constructs a new BlockID. - * @memberof tendermint.types - * @classdesc Represents a BlockID. - * @implements IBlockID - * @constructor - * @param {tendermint.types.IBlockID=} [properties] Properties to set - */ - function BlockID(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlockID hash. - * @member {Uint8Array} hash - * @memberof tendermint.types.BlockID - * @instance - */ - BlockID.prototype.hash = $util.newBuffer([]); - - /** - * BlockID part_set_header. - * @member {tendermint.types.IPartSetHeader|null|undefined} part_set_header - * @memberof tendermint.types.BlockID - * @instance - */ - BlockID.prototype.part_set_header = null; - - /** - * Encodes the specified BlockID message. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.part_set_header != null && Object.hasOwnProperty.call(message, "part_set_header")) - $root.tendermint.types.PartSetHeader.encode(message.part_set_header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockID(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.part_set_header = $root.tendermint.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.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.part_set_header != null && message.hasOwnProperty("part_set_header")) { - let error = $root.tendermint.types.PartSetHeader.verify(message.part_set_header); - if (error) - return "part_set_header." + error; - } - return null; - }; - - /** - * Creates a BlockID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.BlockID - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockID} BlockID - */ - BlockID.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockID) - return object; - let message = new $root.tendermint.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.part_set_header != null) { - if (typeof object.part_set_header !== "object") - throw TypeError(".tendermint.types.BlockID.part_set_header: object expected"); - message.part_set_header = $root.tendermint.types.PartSetHeader.fromObject(object.part_set_header); - } - return message; - }; - - /** - * Creates a plain object from a BlockID message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.types.BlockID} message BlockID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockID.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } - object.part_set_header = 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.part_set_header != null && message.hasOwnProperty("part_set_header")) - object.part_set_header = $root.tendermint.types.PartSetHeader.toObject(message.part_set_header, options); - return object; - }; - - /** - * Converts this BlockID to JSON. - * @function toJSON - * @memberof tendermint.types.BlockID - * @instance - * @returns {Object.} JSON object - */ - BlockID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockID; - })(); - - types.Header = (function() { - - /** - * Properties of a Header. - * @memberof tendermint.types - * @interface IHeader - * @property {tendermint.version.IConsensus|null} [version] Header version - * @property {string|null} [chain_id] Header chain_id - * @property {Long|null} [height] Header height - * @property {google.protobuf.ITimestamp|null} [time] Header time - * @property {tendermint.types.IBlockID|null} [last_block_id] Header last_block_id - * @property {Uint8Array|null} [last_commit_hash] Header last_commit_hash - * @property {Uint8Array|null} [data_hash] Header data_hash - * @property {Uint8Array|null} [validators_hash] Header validators_hash - * @property {Uint8Array|null} [next_validators_hash] Header next_validators_hash - * @property {Uint8Array|null} [consensus_hash] Header consensus_hash - * @property {Uint8Array|null} [app_hash] Header app_hash - * @property {Uint8Array|null} [last_results_hash] Header last_results_hash - * @property {Uint8Array|null} [evidence_hash] Header evidence_hash - * @property {Uint8Array|null} [proposer_address] Header proposer_address - */ - - /** - * Constructs a new Header. - * @memberof tendermint.types - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {tendermint.types.IHeader=} [properties] Properties to set - */ - function Header(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Header version. - * @member {tendermint.version.IConsensus|null|undefined} version - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.version = null; - - /** - * Header chain_id. - * @member {string} chain_id - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.chain_id = ""; - - /** - * Header height. - * @member {Long} height - * @memberof tendermint.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.types.Header - * @instance - */ - Header.prototype.time = null; - - /** - * Header last_block_id. - * @member {tendermint.types.IBlockID|null|undefined} last_block_id - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_block_id = null; - - /** - * Header last_commit_hash. - * @member {Uint8Array} last_commit_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_commit_hash = $util.newBuffer([]); - - /** - * Header data_hash. - * @member {Uint8Array} data_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.data_hash = $util.newBuffer([]); - - /** - * Header validators_hash. - * @member {Uint8Array} validators_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.validators_hash = $util.newBuffer([]); - - /** - * Header next_validators_hash. - * @member {Uint8Array} next_validators_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.next_validators_hash = $util.newBuffer([]); - - /** - * Header consensus_hash. - * @member {Uint8Array} consensus_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.consensus_hash = $util.newBuffer([]); - - /** - * Header app_hash. - * @member {Uint8Array} app_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.app_hash = $util.newBuffer([]); - - /** - * Header last_results_hash. - * @member {Uint8Array} last_results_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_results_hash = $util.newBuffer([]); - - /** - * Header evidence_hash. - * @member {Uint8Array} evidence_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.evidence_hash = $util.newBuffer([]); - - /** - * Header proposer_address. - * @member {Uint8Array} proposer_address - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.proposer_address = $util.newBuffer([]); - - /** - * Encodes the specified Header message. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.version.Consensus.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.chain_id != null && Object.hasOwnProperty.call(message, "chain_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.chain_id); - 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.last_block_id != null && Object.hasOwnProperty.call(message, "last_block_id")) - $root.tendermint.types.BlockID.encode(message.last_block_id, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.last_commit_hash != null && Object.hasOwnProperty.call(message, "last_commit_hash")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.last_commit_hash); - if (message.data_hash != null && Object.hasOwnProperty.call(message, "data_hash")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.data_hash); - if (message.validators_hash != null && Object.hasOwnProperty.call(message, "validators_hash")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validators_hash); - if (message.next_validators_hash != null && Object.hasOwnProperty.call(message, "next_validators_hash")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.next_validators_hash); - if (message.consensus_hash != null && Object.hasOwnProperty.call(message, "consensus_hash")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensus_hash); - if (message.app_hash != null && Object.hasOwnProperty.call(message, "app_hash")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.app_hash); - if (message.last_results_hash != null && Object.hasOwnProperty.call(message, "last_results_hash")) - writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.last_results_hash); - if (message.evidence_hash != null && Object.hasOwnProperty.call(message, "evidence_hash")) - writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidence_hash); - if (message.proposer_address != null && Object.hasOwnProperty.call(message, "proposer_address")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposer_address); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Header(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = $root.tendermint.version.Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chain_id = 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.last_block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.last_commit_hash = reader.bytes(); - break; - case 7: - message.data_hash = reader.bytes(); - break; - case 8: - message.validators_hash = reader.bytes(); - break; - case 9: - message.next_validators_hash = reader.bytes(); - break; - case 10: - message.consensus_hash = reader.bytes(); - break; - case 11: - message.app_hash = reader.bytes(); - break; - case 12: - message.last_results_hash = reader.bytes(); - break; - case 13: - message.evidence_hash = reader.bytes(); - break; - case 14: - message.proposer_address = 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.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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")) { - let error = $root.tendermint.version.Consensus.verify(message.version); - if (error) - return "version." + error; - } - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - if (!$util.isString(message.chain_id)) - return "chain_id: 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")) { - let error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.last_block_id != null && message.hasOwnProperty("last_block_id")) { - let error = $root.tendermint.types.BlockID.verify(message.last_block_id); - if (error) - return "last_block_id." + error; - } - if (message.last_commit_hash != null && message.hasOwnProperty("last_commit_hash")) - if (!(message.last_commit_hash && typeof message.last_commit_hash.length === "number" || $util.isString(message.last_commit_hash))) - return "last_commit_hash: buffer expected"; - if (message.data_hash != null && message.hasOwnProperty("data_hash")) - if (!(message.data_hash && typeof message.data_hash.length === "number" || $util.isString(message.data_hash))) - return "data_hash: buffer expected"; - if (message.validators_hash != null && message.hasOwnProperty("validators_hash")) - if (!(message.validators_hash && typeof message.validators_hash.length === "number" || $util.isString(message.validators_hash))) - return "validators_hash: buffer expected"; - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - if (!(message.next_validators_hash && typeof message.next_validators_hash.length === "number" || $util.isString(message.next_validators_hash))) - return "next_validators_hash: buffer expected"; - if (message.consensus_hash != null && message.hasOwnProperty("consensus_hash")) - if (!(message.consensus_hash && typeof message.consensus_hash.length === "number" || $util.isString(message.consensus_hash))) - return "consensus_hash: buffer expected"; - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - if (!(message.app_hash && typeof message.app_hash.length === "number" || $util.isString(message.app_hash))) - return "app_hash: buffer expected"; - if (message.last_results_hash != null && message.hasOwnProperty("last_results_hash")) - if (!(message.last_results_hash && typeof message.last_results_hash.length === "number" || $util.isString(message.last_results_hash))) - return "last_results_hash: buffer expected"; - if (message.evidence_hash != null && message.hasOwnProperty("evidence_hash")) - if (!(message.evidence_hash && typeof message.evidence_hash.length === "number" || $util.isString(message.evidence_hash))) - return "evidence_hash: buffer expected"; - if (message.proposer_address != null && message.hasOwnProperty("proposer_address")) - if (!(message.proposer_address && typeof message.proposer_address.length === "number" || $util.isString(message.proposer_address))) - return "proposer_address: buffer expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Header - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Header) - return object; - let message = new $root.tendermint.types.Header(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".tendermint.types.Header.version: object expected"); - message.version = $root.tendermint.version.Consensus.fromObject(object.version); - } - if (object.chain_id != null) - message.chain_id = String(object.chain_id); - 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.types.Header.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.last_block_id != null) { - if (typeof object.last_block_id !== "object") - throw TypeError(".tendermint.types.Header.last_block_id: object expected"); - message.last_block_id = $root.tendermint.types.BlockID.fromObject(object.last_block_id); - } - if (object.last_commit_hash != null) - if (typeof object.last_commit_hash === "string") - $util.base64.decode(object.last_commit_hash, message.last_commit_hash = $util.newBuffer($util.base64.length(object.last_commit_hash)), 0); - else if (object.last_commit_hash.length) - message.last_commit_hash = object.last_commit_hash; - if (object.data_hash != null) - if (typeof object.data_hash === "string") - $util.base64.decode(object.data_hash, message.data_hash = $util.newBuffer($util.base64.length(object.data_hash)), 0); - else if (object.data_hash.length) - message.data_hash = object.data_hash; - if (object.validators_hash != null) - if (typeof object.validators_hash === "string") - $util.base64.decode(object.validators_hash, message.validators_hash = $util.newBuffer($util.base64.length(object.validators_hash)), 0); - else if (object.validators_hash.length) - message.validators_hash = object.validators_hash; - if (object.next_validators_hash != null) - if (typeof object.next_validators_hash === "string") - $util.base64.decode(object.next_validators_hash, message.next_validators_hash = $util.newBuffer($util.base64.length(object.next_validators_hash)), 0); - else if (object.next_validators_hash.length) - message.next_validators_hash = object.next_validators_hash; - if (object.consensus_hash != null) - if (typeof object.consensus_hash === "string") - $util.base64.decode(object.consensus_hash, message.consensus_hash = $util.newBuffer($util.base64.length(object.consensus_hash)), 0); - else if (object.consensus_hash.length) - message.consensus_hash = object.consensus_hash; - if (object.app_hash != null) - if (typeof object.app_hash === "string") - $util.base64.decode(object.app_hash, message.app_hash = $util.newBuffer($util.base64.length(object.app_hash)), 0); - else if (object.app_hash.length) - message.app_hash = object.app_hash; - if (object.last_results_hash != null) - if (typeof object.last_results_hash === "string") - $util.base64.decode(object.last_results_hash, message.last_results_hash = $util.newBuffer($util.base64.length(object.last_results_hash)), 0); - else if (object.last_results_hash.length) - message.last_results_hash = object.last_results_hash; - if (object.evidence_hash != null) - if (typeof object.evidence_hash === "string") - $util.base64.decode(object.evidence_hash, message.evidence_hash = $util.newBuffer($util.base64.length(object.evidence_hash)), 0); - else if (object.evidence_hash.length) - message.evidence_hash = object.evidence_hash; - if (object.proposer_address != null) - if (typeof object.proposer_address === "string") - $util.base64.decode(object.proposer_address, message.proposer_address = $util.newBuffer($util.base64.length(object.proposer_address)), 0); - else if (object.proposer_address.length) - message.proposer_address = object.proposer_address; - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Header - * @static - * @param {tendermint.types.Header} message Header - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Header.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.version = null; - object.chain_id = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.time = null; - object.last_block_id = null; - if (options.bytes === String) - object.last_commit_hash = ""; - else { - object.last_commit_hash = []; - if (options.bytes !== Array) - object.last_commit_hash = $util.newBuffer(object.last_commit_hash); - } - if (options.bytes === String) - object.data_hash = ""; - else { - object.data_hash = []; - if (options.bytes !== Array) - object.data_hash = $util.newBuffer(object.data_hash); - } - if (options.bytes === String) - object.validators_hash = ""; - else { - object.validators_hash = []; - if (options.bytes !== Array) - object.validators_hash = $util.newBuffer(object.validators_hash); - } - if (options.bytes === String) - object.next_validators_hash = ""; - else { - object.next_validators_hash = []; - if (options.bytes !== Array) - object.next_validators_hash = $util.newBuffer(object.next_validators_hash); - } - if (options.bytes === String) - object.consensus_hash = ""; - else { - object.consensus_hash = []; - if (options.bytes !== Array) - object.consensus_hash = $util.newBuffer(object.consensus_hash); - } - if (options.bytes === String) - object.app_hash = ""; - else { - object.app_hash = []; - if (options.bytes !== Array) - object.app_hash = $util.newBuffer(object.app_hash); - } - if (options.bytes === String) - object.last_results_hash = ""; - else { - object.last_results_hash = []; - if (options.bytes !== Array) - object.last_results_hash = $util.newBuffer(object.last_results_hash); - } - if (options.bytes === String) - object.evidence_hash = ""; - else { - object.evidence_hash = []; - if (options.bytes !== Array) - object.evidence_hash = $util.newBuffer(object.evidence_hash); - } - if (options.bytes === String) - object.proposer_address = ""; - else { - object.proposer_address = []; - if (options.bytes !== Array) - object.proposer_address = $util.newBuffer(object.proposer_address); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.tendermint.version.Consensus.toObject(message.version, options); - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - object.chain_id = message.chain_id; - 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.last_block_id != null && message.hasOwnProperty("last_block_id")) - object.last_block_id = $root.tendermint.types.BlockID.toObject(message.last_block_id, options); - if (message.last_commit_hash != null && message.hasOwnProperty("last_commit_hash")) - object.last_commit_hash = options.bytes === String ? $util.base64.encode(message.last_commit_hash, 0, message.last_commit_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_commit_hash) : message.last_commit_hash; - if (message.data_hash != null && message.hasOwnProperty("data_hash")) - object.data_hash = options.bytes === String ? $util.base64.encode(message.data_hash, 0, message.data_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.data_hash) : message.data_hash; - if (message.validators_hash != null && message.hasOwnProperty("validators_hash")) - object.validators_hash = options.bytes === String ? $util.base64.encode(message.validators_hash, 0, message.validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validators_hash) : message.validators_hash; - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - object.next_validators_hash = options.bytes === String ? $util.base64.encode(message.next_validators_hash, 0, message.next_validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_validators_hash) : message.next_validators_hash; - if (message.consensus_hash != null && message.hasOwnProperty("consensus_hash")) - object.consensus_hash = options.bytes === String ? $util.base64.encode(message.consensus_hash, 0, message.consensus_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensus_hash) : message.consensus_hash; - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - object.app_hash = options.bytes === String ? $util.base64.encode(message.app_hash, 0, message.app_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_hash) : message.app_hash; - if (message.last_results_hash != null && message.hasOwnProperty("last_results_hash")) - object.last_results_hash = options.bytes === String ? $util.base64.encode(message.last_results_hash, 0, message.last_results_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_results_hash) : message.last_results_hash; - if (message.evidence_hash != null && message.hasOwnProperty("evidence_hash")) - object.evidence_hash = options.bytes === String ? $util.base64.encode(message.evidence_hash, 0, message.evidence_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidence_hash) : message.evidence_hash; - if (message.proposer_address != null && message.hasOwnProperty("proposer_address")) - object.proposer_address = options.bytes === String ? $util.base64.encode(message.proposer_address, 0, message.proposer_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposer_address) : message.proposer_address; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof tendermint.types.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - types.Data = (function() { - - /** - * Properties of a Data. - * @memberof tendermint.types - * @interface IData - * @property {Array.|null} [txs] Data txs - */ - - /** - * Constructs a new Data. - * @memberof tendermint.types - * @classdesc Represents a Data. - * @implements IData - * @constructor - * @param {tendermint.types.IData=} [properties] Properties to set - */ - function Data(properties) { - this.txs = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Data txs. - * @member {Array.} txs - * @memberof tendermint.types.Data - * @instance - */ - Data.prototype.txs = $util.emptyArray; - - /** - * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.IData} message Data message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Data.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.txs != null && message.txs.length) - for (let i = 0; i < message.txs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txs[i]); - return writer; - }; - - /** - * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.IData} message Data message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Data.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Data message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Data - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Data} Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Data.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Data(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.txs && message.txs.length)) - message.txs = []; - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Data message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Data - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Data} Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Data.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Data message. - * @function verify - * @memberof tendermint.types.Data - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Data.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.txs != null && message.hasOwnProperty("txs")) { - if (!Array.isArray(message.txs)) - return "txs: array expected"; - for (let i = 0; i < message.txs.length; ++i) - if (!(message.txs[i] && typeof message.txs[i].length === "number" || $util.isString(message.txs[i]))) - return "txs: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Data message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Data - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Data} Data - */ - Data.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Data) - return object; - let message = new $root.tendermint.types.Data(); - if (object.txs) { - if (!Array.isArray(object.txs)) - throw TypeError(".tendermint.types.Data.txs: array expected"); - message.txs = []; - for (let i = 0; i < object.txs.length; ++i) - if (typeof object.txs[i] === "string") - $util.base64.decode(object.txs[i], message.txs[i] = $util.newBuffer($util.base64.length(object.txs[i])), 0); - else if (object.txs[i].length) - message.txs[i] = object.txs[i]; - } - return message; - }; - - /** - * Creates a plain object from a Data message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.Data} message Data - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Data.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.txs = []; - if (message.txs && message.txs.length) { - object.txs = []; - for (let j = 0; j < message.txs.length; ++j) - object.txs[j] = options.bytes === String ? $util.base64.encode(message.txs[j], 0, message.txs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.txs[j]) : message.txs[j]; - } - return object; - }; - - /** - * Converts this Data to JSON. - * @function toJSON - * @memberof tendermint.types.Data - * @instance - * @returns {Object.} JSON object - */ - Data.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Data; - })(); - - types.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof tendermint.types - * @interface IVote - * @property {tendermint.types.SignedMsgType|null} [type] Vote type - * @property {Long|null} [height] Vote height - * @property {number|null} [round] Vote round - * @property {tendermint.types.IBlockID|null} [block_id] Vote block_id - * @property {google.protobuf.ITimestamp|null} [timestamp] Vote timestamp - * @property {Uint8Array|null} [validator_address] Vote validator_address - * @property {number|null} [validator_index] Vote validator_index - * @property {Uint8Array|null} [signature] Vote signature - */ - - /** - * Constructs a new Vote. - * @memberof tendermint.types - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {tendermint.types.IVote=} [properties] Properties to set - */ - function Vote(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Vote type. - * @member {tendermint.types.SignedMsgType} type - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.type = 0; - - /** - * Vote height. - * @member {Long} height - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Vote round. - * @member {number} round - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.round = 0; - - /** - * Vote block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.block_id = null; - - /** - * Vote timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.timestamp = null; - - /** - * Vote validator_address. - * @member {Uint8Array} validator_address - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.validator_address = $util.newBuffer([]); - - /** - * Vote validator_index. - * @member {number} validator_index - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.validator_index = 0; - - /** - * Vote signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.validator_address != null && Object.hasOwnProperty.call(message, "validator_address")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.validator_address); - if (message.validator_index != null && Object.hasOwnProperty.call(message, "validator_index")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.validator_index); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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 tendermint.types.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Vote(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.validator_address = reader.bytes(); - break; - case 7: - message.validator_index = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Vote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.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 tendermint.types.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 32: - break; - } - 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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - let error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - let error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - if (!(message.validator_address && typeof message.validator_address.length === "number" || $util.isString(message.validator_address))) - return "validator_address: buffer expected"; - if (message.validator_index != null && message.hasOwnProperty("validator_index")) - if (!$util.isInteger(message.validator_index)) - return "validator_index: integer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Vote - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Vote) - return object; - let message = new $root.tendermint.types.Vote(); - switch (object.type) { - case "SIGNED_MSG_TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "SIGNED_MSG_TYPE_PREVOTE": - case 1: - message.type = 1; - break; - case "SIGNED_MSG_TYPE_PRECOMMIT": - case 2: - message.type = 2; - break; - case "SIGNED_MSG_TYPE_PROPOSAL": - case 32: - message.type = 32; - break; - } - 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.round != null) - message.round = object.round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Vote.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.Vote.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.validator_address != null) - if (typeof object.validator_address === "string") - $util.base64.decode(object.validator_address, message.validator_address = $util.newBuffer($util.base64.length(object.validator_address)), 0); - else if (object.validator_address.length) - message.validator_address = object.validator_address; - if (object.validator_index != null) - message.validator_index = object.validator_index | 0; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.Vote} message Vote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vote.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.round = 0; - object.block_id = null; - object.timestamp = null; - if (options.bytes === String) - object.validator_address = ""; - else { - object.validator_address = []; - if (options.bytes !== Array) - object.validator_address = $util.newBuffer(object.validator_address); - } - object.validator_index = 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - object.validator_address = options.bytes === String ? $util.base64.encode(message.validator_address, 0, message.validator_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.validator_address) : message.validator_address; - if (message.validator_index != null && message.hasOwnProperty("validator_index")) - object.validator_index = message.validator_index; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof tendermint.types.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - types.Commit = (function() { - - /** - * Properties of a Commit. - * @memberof tendermint.types - * @interface ICommit - * @property {Long|null} [height] Commit height - * @property {number|null} [round] Commit round - * @property {tendermint.types.IBlockID|null} [block_id] Commit block_id - * @property {Array.|null} [signatures] Commit signatures - */ - - /** - * Constructs a new Commit. - * @memberof tendermint.types - * @classdesc Represents a Commit. - * @implements ICommit - * @constructor - * @param {tendermint.types.ICommit=} [properties] Properties to set - */ - function Commit(properties) { - this.signatures = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Commit height. - * @member {Long} height - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Commit round. - * @member {number} round - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.round = 0; - - /** - * Commit block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.block_id = null; - - /** - * Commit signatures. - * @member {Array.} signatures - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.signatures = $util.emptyArray; - - /** - * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.ICommit} message Commit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commit.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.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signatures != null && message.signatures.length) - for (let i = 0; i < message.signatures.length; ++i) - $root.tendermint.types.CommitSig.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.ICommit} message Commit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Commit message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Commit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Commit} Commit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Commit(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.tendermint.types.CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Commit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Commit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Commit} Commit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Commit message. - * @function verify - * @memberof tendermint.types.Commit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Commit.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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - let error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.signatures != null && message.hasOwnProperty("signatures")) { - if (!Array.isArray(message.signatures)) - return "signatures: array expected"; - for (let i = 0; i < message.signatures.length; ++i) { - let error = $root.tendermint.types.CommitSig.verify(message.signatures[i]); - if (error) - return "signatures." + error; - } - } - return null; - }; - - /** - * Creates a Commit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Commit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Commit} Commit - */ - Commit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Commit) - return object; - let message = new $root.tendermint.types.Commit(); - 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.round != null) - message.round = object.round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Commit.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".tendermint.types.Commit.signatures: array expected"); - message.signatures = []; - for (let i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".tendermint.types.Commit.signatures: object expected"); - message.signatures[i] = $root.tendermint.types.CommitSig.fromObject(object.signatures[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Commit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.Commit} message Commit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Commit.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.signatures = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.round = 0; - object.block_id = null; - } - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (let j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.tendermint.types.CommitSig.toObject(message.signatures[j], options); - } - return object; - }; - - /** - * Converts this Commit to JSON. - * @function toJSON - * @memberof tendermint.types.Commit - * @instance - * @returns {Object.} JSON object - */ - Commit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Commit; - })(); - - types.CommitSig = (function() { - - /** - * Properties of a CommitSig. - * @memberof tendermint.types - * @interface ICommitSig - * @property {tendermint.types.BlockIDFlag|null} [block_id_flag] CommitSig block_id_flag - * @property {Uint8Array|null} [validator_address] CommitSig validator_address - * @property {google.protobuf.ITimestamp|null} [timestamp] CommitSig timestamp - * @property {Uint8Array|null} [signature] CommitSig signature - */ - - /** - * Constructs a new CommitSig. - * @memberof tendermint.types - * @classdesc Represents a CommitSig. - * @implements ICommitSig - * @constructor - * @param {tendermint.types.ICommitSig=} [properties] Properties to set - */ - function CommitSig(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitSig block_id_flag. - * @member {tendermint.types.BlockIDFlag} block_id_flag - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.block_id_flag = 0; - - /** - * CommitSig validator_address. - * @member {Uint8Array} validator_address - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.validator_address = $util.newBuffer([]); - - /** - * CommitSig timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.timestamp = null; - - /** - * CommitSig signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @function encode - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_id_flag != null && Object.hasOwnProperty.call(message, "block_id_flag")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.block_id_flag); - if (message.validator_address != null && Object.hasOwnProperty.call(message, "validator_address")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validator_address); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitSig message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.CommitSig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.CommitSig} CommitSig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.CommitSig(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id_flag = reader.int32(); - break; - case 2: - message.validator_address = reader.bytes(); - break; - case 3: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitSig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.CommitSig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.CommitSig} CommitSig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitSig message. - * @function verify - * @memberof tendermint.types.CommitSig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitSig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_id_flag != null && message.hasOwnProperty("block_id_flag")) - switch (message.block_id_flag) { - default: - return "block_id_flag: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - if (!(message.validator_address && typeof message.validator_address.length === "number" || $util.isString(message.validator_address))) - return "validator_address: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - let error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.CommitSig - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.CommitSig} CommitSig - */ - CommitSig.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.CommitSig) - return object; - let message = new $root.tendermint.types.CommitSig(); - switch (object.block_id_flag) { - case "BLOCK_ID_FLAG_UNKNOWN": - case 0: - message.block_id_flag = 0; - break; - case "BLOCK_ID_FLAG_ABSENT": - case 1: - message.block_id_flag = 1; - break; - case "BLOCK_ID_FLAG_COMMIT": - case 2: - message.block_id_flag = 2; - break; - case "BLOCK_ID_FLAG_NIL": - case 3: - message.block_id_flag = 3; - break; - } - if (object.validator_address != null) - if (typeof object.validator_address === "string") - $util.base64.decode(object.validator_address, message.validator_address = $util.newBuffer($util.base64.length(object.validator_address)), 0); - else if (object.validator_address.length) - message.validator_address = object.validator_address; - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.CommitSig.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a CommitSig message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.CommitSig} message CommitSig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitSig.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.block_id_flag = options.enums === String ? "BLOCK_ID_FLAG_UNKNOWN" : 0; - if (options.bytes === String) - object.validator_address = ""; - else { - object.validator_address = []; - if (options.bytes !== Array) - object.validator_address = $util.newBuffer(object.validator_address); - } - object.timestamp = null; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.block_id_flag != null && message.hasOwnProperty("block_id_flag")) - object.block_id_flag = options.enums === String ? $root.tendermint.types.BlockIDFlag[message.block_id_flag] : message.block_id_flag; - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - object.validator_address = options.bytes === String ? $util.base64.encode(message.validator_address, 0, message.validator_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.validator_address) : message.validator_address; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this CommitSig to JSON. - * @function toJSON - * @memberof tendermint.types.CommitSig - * @instance - * @returns {Object.} JSON object - */ - CommitSig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitSig; - })(); - - types.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof tendermint.types - * @interface IProposal - * @property {tendermint.types.SignedMsgType|null} [type] Proposal type - * @property {Long|null} [height] Proposal height - * @property {number|null} [round] Proposal round - * @property {number|null} [pol_round] Proposal pol_round - * @property {tendermint.types.IBlockID|null} [block_id] Proposal block_id - * @property {google.protobuf.ITimestamp|null} [timestamp] Proposal timestamp - * @property {Uint8Array|null} [signature] Proposal signature - */ - - /** - * Constructs a new Proposal. - * @memberof tendermint.types - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {tendermint.types.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Proposal type. - * @member {tendermint.types.SignedMsgType} type - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.type = 0; - - /** - * Proposal height. - * @member {Long} height - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proposal round. - * @member {number} round - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.round = 0; - - /** - * Proposal pol_round. - * @member {number} pol_round - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.pol_round = 0; - - /** - * Proposal block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.block_id = null; - - /** - * Proposal timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.timestamp = null; - - /** - * Proposal signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); - if (message.pol_round != null && Object.hasOwnProperty.call(message, "pol_round")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pol_round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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 tendermint.types.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.Proposal(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.pol_round = reader.int32(); - break; - case 5: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Proposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.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 tendermint.types.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 32: - break; - } - 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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.pol_round != null && message.hasOwnProperty("pol_round")) - if (!$util.isInteger(message.pol_round)) - return "pol_round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - let error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - let error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Proposal - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Proposal) - return object; - let message = new $root.tendermint.types.Proposal(); - switch (object.type) { - case "SIGNED_MSG_TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "SIGNED_MSG_TYPE_PREVOTE": - case 1: - message.type = 1; - break; - case "SIGNED_MSG_TYPE_PRECOMMIT": - case 2: - message.type = 2; - break; - case "SIGNED_MSG_TYPE_PROPOSAL": - case 32: - message.type = 32; - break; - } - 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.round != null) - message.round = object.round | 0; - if (object.pol_round != null) - message.pol_round = object.pol_round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Proposal.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.Proposal.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.Proposal} message Proposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.round = 0; - object.pol_round = 0; - object.block_id = null; - object.timestamp = null; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.pol_round != null && message.hasOwnProperty("pol_round")) - object.pol_round = message.pol_round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof tendermint.types.Proposal - * @instance - * @returns {Object.} JSON object - */ - Proposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Proposal; - })(); - - types.SignedHeader = (function() { - - /** - * Properties of a SignedHeader. - * @memberof tendermint.types - * @interface ISignedHeader - * @property {tendermint.types.IHeader|null} [header] SignedHeader header - * @property {tendermint.types.ICommit|null} [commit] SignedHeader commit - */ - - /** - * Constructs a new SignedHeader. - * @memberof tendermint.types - * @classdesc Represents a SignedHeader. - * @implements ISignedHeader - * @constructor - * @param {tendermint.types.ISignedHeader=} [properties] Properties to set - */ - function SignedHeader(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignedHeader header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.types.SignedHeader - * @instance - */ - SignedHeader.prototype.header = null; - - /** - * SignedHeader commit. - * @member {tendermint.types.ICommit|null|undefined} commit - * @memberof tendermint.types.SignedHeader - * @instance - */ - SignedHeader.prototype.commit = null; - - /** - * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignedHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.types.Commit.encode(message.commit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignedHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignedHeader message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.SignedHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.SignedHeader} SignedHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignedHeader.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.SignedHeader(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignedHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.SignedHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.SignedHeader} SignedHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignedHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignedHeader message. - * @function verify - * @memberof tendermint.types.SignedHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignedHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.header != null && message.hasOwnProperty("header")) { - let error = $root.tendermint.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - let error = $root.tendermint.types.Commit.verify(message.commit); - if (error) - return "commit." + error; - } - return null; - }; - - /** - * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.SignedHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.SignedHeader} SignedHeader - */ - SignedHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.SignedHeader) - return object; - let message = new $root.tendermint.types.SignedHeader(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.types.SignedHeader.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.types.SignedHeader.commit: object expected"); - message.commit = $root.tendermint.types.Commit.fromObject(object.commit); - } - return message; - }; - - /** - * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.SignedHeader} message SignedHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignedHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.header = null; - object.commit = null; - } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.types.Header.toObject(message.header, options); - if (message.commit != null && message.hasOwnProperty("commit")) - object.commit = $root.tendermint.types.Commit.toObject(message.commit, options); - return object; - }; - - /** - * Converts this SignedHeader to JSON. - * @function toJSON - * @memberof tendermint.types.SignedHeader - * @instance - * @returns {Object.} JSON object - */ - SignedHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignedHeader; - })(); - - types.LightBlock = (function() { - - /** - * Properties of a LightBlock. - * @memberof tendermint.types - * @interface ILightBlock - * @property {tendermint.types.ISignedHeader|null} [signed_header] LightBlock signed_header - * @property {tendermint.types.IValidatorSet|null} [validator_set] LightBlock validator_set - */ - - /** - * Constructs a new LightBlock. - * @memberof tendermint.types - * @classdesc Represents a LightBlock. - * @implements ILightBlock - * @constructor - * @param {tendermint.types.ILightBlock=} [properties] Properties to set - */ - function LightBlock(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LightBlock signed_header. - * @member {tendermint.types.ISignedHeader|null|undefined} signed_header - * @memberof tendermint.types.LightBlock - * @instance - */ - LightBlock.prototype.signed_header = null; - - /** - * LightBlock validator_set. - * @member {tendermint.types.IValidatorSet|null|undefined} validator_set - * @memberof tendermint.types.LightBlock - * @instance - */ - LightBlock.prototype.validator_set = null; - - /** - * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LightBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signed_header != null && Object.hasOwnProperty.call(message, "signed_header")) - $root.tendermint.types.SignedHeader.encode(message.signed_header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validator_set != null && Object.hasOwnProperty.call(message, "validator_set")) - $root.tendermint.types.ValidatorSet.encode(message.validator_set, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LightBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LightBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.LightBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.LightBlock} LightBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LightBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.LightBlock(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LightBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.LightBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.LightBlock} LightBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LightBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LightBlock message. - * @function verify - * @memberof tendermint.types.LightBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LightBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signed_header != null && message.hasOwnProperty("signed_header")) { - let error = $root.tendermint.types.SignedHeader.verify(message.signed_header); - if (error) - return "signed_header." + error; - } - if (message.validator_set != null && message.hasOwnProperty("validator_set")) { - let error = $root.tendermint.types.ValidatorSet.verify(message.validator_set); - if (error) - return "validator_set." + error; - } - return null; - }; - - /** - * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.LightBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.LightBlock} LightBlock - */ - LightBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.LightBlock) - return object; - let message = new $root.tendermint.types.LightBlock(); - if (object.signed_header != null) { - if (typeof object.signed_header !== "object") - throw TypeError(".tendermint.types.LightBlock.signed_header: object expected"); - message.signed_header = $root.tendermint.types.SignedHeader.fromObject(object.signed_header); - } - if (object.validator_set != null) { - if (typeof object.validator_set !== "object") - throw TypeError(".tendermint.types.LightBlock.validator_set: object expected"); - message.validator_set = $root.tendermint.types.ValidatorSet.fromObject(object.validator_set); - } - return message; - }; - - /** - * Creates a plain object from a LightBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.LightBlock} message LightBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LightBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.signed_header = null; - object.validator_set = null; - } - if (message.signed_header != null && message.hasOwnProperty("signed_header")) - object.signed_header = $root.tendermint.types.SignedHeader.toObject(message.signed_header, options); - if (message.validator_set != null && message.hasOwnProperty("validator_set")) - object.validator_set = $root.tendermint.types.ValidatorSet.toObject(message.validator_set, options); - return object; - }; - - /** - * Converts this LightBlock to JSON. - * @function toJSON - * @memberof tendermint.types.LightBlock - * @instance - * @returns {Object.} JSON object - */ - LightBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LightBlock; - })(); - - types.BlockMeta = (function() { - - /** - * Properties of a BlockMeta. - * @memberof tendermint.types - * @interface IBlockMeta - * @property {tendermint.types.IBlockID|null} [block_id] BlockMeta block_id - * @property {Long|null} [block_size] BlockMeta block_size - * @property {tendermint.types.IHeader|null} [header] BlockMeta header - * @property {Long|null} [num_txs] BlockMeta num_txs - */ - - /** - * Constructs a new BlockMeta. - * @memberof tendermint.types - * @classdesc Represents a BlockMeta. - * @implements IBlockMeta - * @constructor - * @param {tendermint.types.IBlockMeta=} [properties] Properties to set - */ - function BlockMeta(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlockMeta block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.block_id = null; - - /** - * BlockMeta block_size. - * @member {Long} block_size - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockMeta header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.header = null; - - /** - * BlockMeta num_txs. - * @member {Long} num_txs - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.num_txs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockMeta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.block_size != null && Object.hasOwnProperty.call(message, "block_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.block_size); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.num_txs != null && Object.hasOwnProperty.call(message, "num_txs")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.num_txs); - return writer; - }; - - /** - * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockMeta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlockMeta message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.BlockMeta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.BlockMeta} BlockMeta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockMeta.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.BlockMeta(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block_size = reader.int64(); - break; - case 3: - message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); - break; - case 4: - message.num_txs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlockMeta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.BlockMeta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.BlockMeta} BlockMeta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockMeta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlockMeta message. - * @function verify - * @memberof tendermint.types.BlockMeta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlockMeta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - let error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (!$util.isInteger(message.block_size) && !(message.block_size && $util.isInteger(message.block_size.low) && $util.isInteger(message.block_size.high))) - return "block_size: integer|Long expected"; - if (message.header != null && message.hasOwnProperty("header")) { - let error = $root.tendermint.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.num_txs != null && message.hasOwnProperty("num_txs")) - if (!$util.isInteger(message.num_txs) && !(message.num_txs && $util.isInteger(message.num_txs.low) && $util.isInteger(message.num_txs.high))) - return "num_txs: integer|Long expected"; - return null; - }; - - /** - * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.BlockMeta - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockMeta} BlockMeta - */ - BlockMeta.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockMeta) - return object; - let message = new $root.tendermint.types.BlockMeta(); - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.BlockMeta.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.block_size != null) - if ($util.Long) - (message.block_size = $util.Long.fromValue(object.block_size)).unsigned = false; - else if (typeof object.block_size === "string") - message.block_size = parseInt(object.block_size, 10); - else if (typeof object.block_size === "number") - message.block_size = object.block_size; - else if (typeof object.block_size === "object") - message.block_size = new $util.LongBits(object.block_size.low >>> 0, object.block_size.high >>> 0).toNumber(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.types.BlockMeta.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.num_txs != null) - if ($util.Long) - (message.num_txs = $util.Long.fromValue(object.num_txs)).unsigned = false; - else if (typeof object.num_txs === "string") - message.num_txs = parseInt(object.num_txs, 10); - else if (typeof object.num_txs === "number") - message.num_txs = object.num_txs; - else if (typeof object.num_txs === "object") - message.num_txs = new $util.LongBits(object.num_txs.low >>> 0, object.num_txs.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.BlockMeta} message BlockMeta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockMeta.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.block_id = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_size = options.longs === String ? "0" : 0; - object.header = null; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.num_txs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.num_txs = options.longs === String ? "0" : 0; - } - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (typeof message.block_size === "number") - object.block_size = options.longs === String ? String(message.block_size) : message.block_size; - else - object.block_size = options.longs === String ? $util.Long.prototype.toString.call(message.block_size) : options.longs === Number ? new $util.LongBits(message.block_size.low >>> 0, message.block_size.high >>> 0).toNumber() : message.block_size; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.types.Header.toObject(message.header, options); - if (message.num_txs != null && message.hasOwnProperty("num_txs")) - if (typeof message.num_txs === "number") - object.num_txs = options.longs === String ? String(message.num_txs) : message.num_txs; - else - object.num_txs = options.longs === String ? $util.Long.prototype.toString.call(message.num_txs) : options.longs === Number ? new $util.LongBits(message.num_txs.low >>> 0, message.num_txs.high >>> 0).toNumber() : message.num_txs; - return object; - }; - - /** - * Converts this BlockMeta to JSON. - * @function toJSON - * @memberof tendermint.types.BlockMeta - * @instance - * @returns {Object.} JSON object - */ - BlockMeta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockMeta; - })(); - - types.TxProof = (function() { - - /** - * Properties of a TxProof. - * @memberof tendermint.types - * @interface ITxProof - * @property {Uint8Array|null} [root_hash] TxProof root_hash - * @property {Uint8Array|null} [data] TxProof data - * @property {tendermint.crypto.IProof|null} [proof] TxProof proof - */ - - /** - * Constructs a new TxProof. - * @memberof tendermint.types - * @classdesc Represents a TxProof. - * @implements ITxProof - * @constructor - * @param {tendermint.types.ITxProof=} [properties] Properties to set - */ - function TxProof(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxProof root_hash. - * @member {Uint8Array} root_hash - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.root_hash = $util.newBuffer([]); - - /** - * TxProof data. - * @member {Uint8Array} data - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.data = $util.newBuffer([]); - - /** - * TxProof proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.proof = null; - - /** - * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @function encode - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.root_hash != null && Object.hasOwnProperty.call(message, "root_hash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.root_hash); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxProof message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.TxProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.TxProof} TxProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.types.TxProof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.root_hash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.TxProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.TxProof} TxProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxProof message. - * @function verify - * @memberof tendermint.types.TxProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.root_hash != null && message.hasOwnProperty("root_hash")) - if (!(message.root_hash && typeof message.root_hash.length === "number" || $util.isString(message.root_hash))) - return "root_hash: 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"; - if (message.proof != null && message.hasOwnProperty("proof")) { - let error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a TxProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.TxProof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.TxProof} TxProof - */ - TxProof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.TxProof) - return object; - let message = new $root.tendermint.types.TxProof(); - if (object.root_hash != null) - if (typeof object.root_hash === "string") - $util.base64.decode(object.root_hash, message.root_hash = $util.newBuffer($util.base64.length(object.root_hash)), 0); - else if (object.root_hash.length) - message.root_hash = object.root_hash; - 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.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.types.TxProof.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a TxProof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.TxProof} message TxProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.root_hash = ""; - else { - object.root_hash = []; - if (options.bytes !== Array) - object.root_hash = $util.newBuffer(object.root_hash); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.proof = null; - } - if (message.root_hash != null && message.hasOwnProperty("root_hash")) - object.root_hash = options.bytes === String ? $util.base64.encode(message.root_hash, 0, message.root_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.root_hash) : message.root_hash; - 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.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this TxProof to JSON. - * @function toJSON - * @memberof tendermint.types.TxProof - * @instance - * @returns {Object.} JSON object - */ - TxProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxProof; - })(); - - return types; - })(); - - tendermint.crypto = (function() { - - /** - * Namespace crypto. - * @memberof tendermint - * @namespace - */ - const crypto = {}; - - crypto.PublicKey = (function() { - - /** - * Properties of a PublicKey. - * @memberof tendermint.crypto - * @interface IPublicKey - * @property {Uint8Array|null} [ed25519] PublicKey ed25519 - * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 - */ - - /** - * Constructs a new PublicKey. - * @memberof tendermint.crypto - * @classdesc Represents a PublicKey. - * @implements IPublicKey - * @constructor - * @param {tendermint.crypto.IPublicKey=} [properties] Properties to set - */ - function PublicKey(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PublicKey ed25519. - * @member {Uint8Array|null|undefined} ed25519 - * @memberof tendermint.crypto.PublicKey - * @instance - */ - PublicKey.prototype.ed25519 = null; - - /** - * PublicKey secp256k1. - * @member {Uint8Array|null|undefined} secp256k1 - * @memberof tendermint.crypto.PublicKey - * @instance - */ - PublicKey.prototype.secp256k1 = null; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * PublicKey sum. - * @member {"ed25519"|"secp256k1"|undefined} sum - * @memberof tendermint.crypto.PublicKey - * @instance - */ - Object.defineProperty(PublicKey.prototype, "sum", { - get: $util.oneOfGetter($oneOfFields = ["ed25519", "secp256k1"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ed25519); - if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.secp256k1); - return writer; - }; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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 tendermint.crypto.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.PublicKey(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublicKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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 tendermint.crypto.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"; - let properties = {}; - if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { - properties.sum = 1; - if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) - return "ed25519: buffer expected"; - } - if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) - return "secp256k1: buffer expected"; - } - return null; - }; - - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.PublicKey - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.PublicKey} PublicKey - */ - PublicKey.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.PublicKey) - return object; - let message = new $root.tendermint.crypto.PublicKey(); - 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.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; - return message; - }; - - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.PublicKey} message PublicKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublicKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - 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.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"; - } - return object; - }; - - /** - * Converts this PublicKey to JSON. - * @function toJSON - * @memberof tendermint.crypto.PublicKey - * @instance - * @returns {Object.} JSON object - */ - PublicKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PublicKey; - })(); - - crypto.Proof = (function() { - - /** - * Properties of a Proof. - * @memberof tendermint.crypto - * @interface IProof - * @property {Long|null} [total] Proof total - * @property {Long|null} [index] Proof index - * @property {Uint8Array|null} [leaf_hash] Proof leaf_hash - * @property {Array.|null} [aunts] Proof aunts - */ - - /** - * Constructs a new Proof. - * @memberof tendermint.crypto - * @classdesc Represents a Proof. - * @implements IProof - * @constructor - * @param {tendermint.crypto.IProof=} [properties] Properties to set - */ - function Proof(properties) { - this.aunts = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Proof total. - * @member {Long} total - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.total = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proof index. - * @member {Long} index - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proof leaf_hash. - * @member {Uint8Array} leaf_hash - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.leaf_hash = $util.newBuffer([]); - - /** - * Proof aunts. - * @member {Array.} aunts - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.aunts = $util.emptyArray; - - /** - * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.total); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.index); - if (message.leaf_hash != null && Object.hasOwnProperty.call(message, "leaf_hash")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.leaf_hash); - if (message.aunts != null && message.aunts.length) - for (let i = 0; i < message.aunts.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.aunts[i]); - return writer; - }; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.Proof(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.int64(); - break; - case 2: - message.index = reader.int64(); - break; - case 3: - message.leaf_hash = reader.bytes(); - break; - case 4: - if (!(message.aunts && message.aunts.length)) - message.aunts = []; - message.aunts.push(reader.bytes()); - 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.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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.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.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - 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.leaf_hash != null && message.hasOwnProperty("leaf_hash")) - if (!(message.leaf_hash && typeof message.leaf_hash.length === "number" || $util.isString(message.leaf_hash))) - return "leaf_hash: buffer expected"; - if (message.aunts != null && message.hasOwnProperty("aunts")) { - if (!Array.isArray(message.aunts)) - return "aunts: array expected"; - for (let i = 0; i < message.aunts.length; ++i) - if (!(message.aunts[i] && typeof message.aunts[i].length === "number" || $util.isString(message.aunts[i]))) - return "aunts: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Proof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.Proof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.Proof} Proof - */ - Proof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.Proof) - return object; - let message = new $root.tendermint.crypto.Proof(); - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = false; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(); - 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.leaf_hash != null) - if (typeof object.leaf_hash === "string") - $util.base64.decode(object.leaf_hash, message.leaf_hash = $util.newBuffer($util.base64.length(object.leaf_hash)), 0); - else if (object.leaf_hash.length) - message.leaf_hash = object.leaf_hash; - if (object.aunts) { - if (!Array.isArray(object.aunts)) - throw TypeError(".tendermint.crypto.Proof.aunts: array expected"); - message.aunts = []; - for (let i = 0; i < object.aunts.length; ++i) - if (typeof object.aunts[i] === "string") - $util.base64.decode(object.aunts[i], message.aunts[i] = $util.newBuffer($util.base64.length(object.aunts[i])), 0); - else if (object.aunts[i].length) - message.aunts[i] = object.aunts[i]; - } - return message; - }; - - /** - * Creates a plain object from a Proof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.Proof} message Proof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proof.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.aunts = []; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - if ($util.Long) { - let 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.leaf_hash = ""; - else { - object.leaf_hash = []; - if (options.bytes !== Array) - object.leaf_hash = $util.newBuffer(object.leaf_hash); - } - } - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total; - 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.leaf_hash != null && message.hasOwnProperty("leaf_hash")) - object.leaf_hash = options.bytes === String ? $util.base64.encode(message.leaf_hash, 0, message.leaf_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.leaf_hash) : message.leaf_hash; - if (message.aunts && message.aunts.length) { - object.aunts = []; - for (let j = 0; j < message.aunts.length; ++j) - object.aunts[j] = options.bytes === String ? $util.base64.encode(message.aunts[j], 0, message.aunts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.aunts[j]) : message.aunts[j]; - } - return object; - }; - - /** - * Converts this Proof to JSON. - * @function toJSON - * @memberof tendermint.crypto.Proof - * @instance - * @returns {Object.} JSON object - */ - Proof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Proof; - })(); - - crypto.ValueOp = (function() { - - /** - * Properties of a ValueOp. - * @memberof tendermint.crypto - * @interface IValueOp - * @property {Uint8Array|null} [key] ValueOp key - * @property {tendermint.crypto.IProof|null} [proof] ValueOp proof - */ - - /** - * Constructs a new ValueOp. - * @memberof tendermint.crypto - * @classdesc Represents a ValueOp. - * @implements IValueOp - * @constructor - * @param {tendermint.crypto.IValueOp=} [properties] Properties to set - */ - function ValueOp(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValueOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.ValueOp - * @instance - */ - ValueOp.prototype.key = $util.newBuffer([]); - - /** - * ValueOp proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.crypto.ValueOp - * @instance - */ - ValueOp.prototype.proof = null; - - /** - * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueOp.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.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValueOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.ValueOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.ValueOp} ValueOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ValueOp(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValueOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.ValueOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.ValueOp} ValueOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValueOp message. - * @function verify - * @memberof tendermint.crypto.ValueOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValueOp.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.proof != null && message.hasOwnProperty("proof")) { - let error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.ValueOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ValueOp} ValueOp - */ - ValueOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ValueOp) - return object; - let message = new $root.tendermint.crypto.ValueOp(); - 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.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.crypto.ValueOp.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a ValueOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.ValueOp} message ValueOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValueOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - object.proof = null; - } - 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.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this ValueOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.ValueOp - * @instance - * @returns {Object.} JSON object - */ - ValueOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValueOp; - })(); - - crypto.DominoOp = (function() { - - /** - * Properties of a DominoOp. - * @memberof tendermint.crypto - * @interface IDominoOp - * @property {string|null} [key] DominoOp key - * @property {string|null} [input] DominoOp input - * @property {string|null} [output] DominoOp output - */ - - /** - * Constructs a new DominoOp. - * @memberof tendermint.crypto - * @classdesc Represents a DominoOp. - * @implements IDominoOp - * @constructor - * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set - */ - function DominoOp(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DominoOp key. - * @member {string} key - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.key = ""; - - /** - * DominoOp input. - * @member {string} input - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.input = ""; - - /** - * DominoOp output. - * @member {string} output - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.output = ""; - - /** - * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DominoOp.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.input != null && Object.hasOwnProperty.call(message, "input")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input); - if (message.output != null && Object.hasOwnProperty.call(message, "output")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output); - return writer; - }; - - /** - * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DominoOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DominoOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.DominoOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.DominoOp} DominoOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DominoOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.DominoOp(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DominoOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.DominoOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.DominoOp} DominoOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DominoOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DominoOp message. - * @function verify - * @memberof tendermint.crypto.DominoOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DominoOp.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.input != null && message.hasOwnProperty("input")) - if (!$util.isString(message.input)) - return "input: string expected"; - if (message.output != null && message.hasOwnProperty("output")) - if (!$util.isString(message.output)) - return "output: string expected"; - return null; - }; - - /** - * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.DominoOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.DominoOp} DominoOp - */ - DominoOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.DominoOp) - return object; - let message = new $root.tendermint.crypto.DominoOp(); - if (object.key != null) - message.key = String(object.key); - if (object.input != null) - message.input = String(object.input); - if (object.output != null) - message.output = String(object.output); - return message; - }; - - /** - * Creates a plain object from a DominoOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.DominoOp} message DominoOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DominoOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.key = ""; - object.input = ""; - object.output = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.input != null && message.hasOwnProperty("input")) - object.input = message.input; - if (message.output != null && message.hasOwnProperty("output")) - object.output = message.output; - return object; - }; - - /** - * Converts this DominoOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.DominoOp - * @instance - * @returns {Object.} JSON object - */ - DominoOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DominoOp; - })(); - - crypto.ProofOp = (function() { - - /** - * Properties of a ProofOp. - * @memberof tendermint.crypto - * @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 - * @classdesc Represents a ProofOp. - * @implements IProofOp - * @constructor - * @param {tendermint.crypto.IProofOp=} [properties] Properties to set - */ - function ProofOp(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProofOp type. - * @member {string} type - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.type = ""; - - /** - * ProofOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.key = $util.newBuffer([]); - - /** - * ProofOp data. - * @member {Uint8Array} data - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOp(); - while (reader.pos < end) { - let 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.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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.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.ProofOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ProofOp} ProofOp - */ - ProofOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ProofOp) - return object; - let message = new $root.tendermint.crypto.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.ProofOp - * @static - * @param {tendermint.crypto.ProofOp} message ProofOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.ProofOp - * @instance - * @returns {Object.} JSON object - */ - ProofOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofOp; - })(); - - crypto.ProofOps = (function() { - - /** - * Properties of a ProofOps. - * @memberof tendermint.crypto - * @interface IProofOps - * @property {Array.|null} [ops] ProofOps ops - */ - - /** - * Constructs a new ProofOps. - * @memberof tendermint.crypto - * @classdesc Represents a ProofOps. - * @implements IProofOps - * @constructor - * @param {tendermint.crypto.IProofOps=} [properties] Properties to set - */ - function ProofOps(properties) { - this.ops = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProofOps ops. - * @member {Array.} ops - * @memberof tendermint.crypto.ProofOps - * @instance - */ - ProofOps.prototype.ops = $util.emptyArray; - - /** - * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOps.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ops != null && message.ops.length) - for (let i = 0; i < message.ops.length; ++i) - $root.tendermint.crypto.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOps.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProofOps message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.ProofOps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.ProofOps} ProofOps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOps.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.ProofOps(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.ops && message.ops.length)) - message.ops = []; - message.ops.push($root.tendermint.crypto.ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProofOps message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.ProofOps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.ProofOps} ProofOps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOps.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProofOps message. - * @function verify - * @memberof tendermint.crypto.ProofOps - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProofOps.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 (let i = 0; i < message.ops.length; ++i) { - let error = $root.tendermint.crypto.ProofOp.verify(message.ops[i]); - if (error) - return "ops." + error; - } - } - return null; - }; - - /** - * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.ProofOps - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ProofOps} ProofOps - */ - ProofOps.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ProofOps) - return object; - let message = new $root.tendermint.crypto.ProofOps(); - if (object.ops) { - if (!Array.isArray(object.ops)) - throw TypeError(".tendermint.crypto.ProofOps.ops: array expected"); - message.ops = []; - for (let i = 0; i < object.ops.length; ++i) { - if (typeof object.ops[i] !== "object") - throw TypeError(".tendermint.crypto.ProofOps.ops: object expected"); - message.ops[i] = $root.tendermint.crypto.ProofOp.fromObject(object.ops[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ProofOps message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.ProofOps} message ProofOps - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofOps.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.ops = []; - if (message.ops && message.ops.length) { - object.ops = []; - for (let j = 0; j < message.ops.length; ++j) - object.ops[j] = $root.tendermint.crypto.ProofOp.toObject(message.ops[j], options); - } - return object; - }; - - /** - * Converts this ProofOps to JSON. - * @function toJSON - * @memberof tendermint.crypto.ProofOps - * @instance - * @returns {Object.} JSON object - */ - ProofOps.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofOps; - })(); - - return crypto; - })(); - - tendermint.version = (function() { - - /** - * Namespace version. - * @memberof tendermint - * @namespace - */ - const version = {}; - - version.App = (function() { - - /** - * Properties of an App. - * @memberof tendermint.version - * @interface IApp - * @property {Long|null} [protocol] App protocol - * @property {string|null} [software] App software - */ - - /** - * Constructs a new App. - * @memberof tendermint.version - * @classdesc Represents an App. - * @implements IApp - * @constructor - * @param {tendermint.version.IApp=} [properties] Properties to set - */ - function App(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * App protocol. - * @member {Long} protocol - * @memberof tendermint.version.App - * @instance - */ - App.prototype.protocol = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * App software. - * @member {string} software - * @memberof tendermint.version.App - * @instance - */ - App.prototype.software = ""; - - /** - * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @function encode - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.IApp} message App message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - App.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.protocol); - if (message.software != null && Object.hasOwnProperty.call(message, "software")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.software); - return writer; - }; - - /** - * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.IApp} message App message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - App.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an App message from the specified reader or buffer. - * @function decode - * @memberof tendermint.version.App - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.version.App} App - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - App.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.App(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = reader.uint64(); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an App message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.version.App - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.version.App} App - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - App.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an App message. - * @function verify - * @memberof tendermint.version.App - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - App.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isInteger(message.protocol) && !(message.protocol && $util.isInteger(message.protocol.low) && $util.isInteger(message.protocol.high))) - return "protocol: integer|Long expected"; - if (message.software != null && message.hasOwnProperty("software")) - if (!$util.isString(message.software)) - return "software: string expected"; - return null; - }; - - /** - * Creates an App message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.version.App - * @static - * @param {Object.} object Plain object - * @returns {tendermint.version.App} App - */ - App.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.version.App) - return object; - let message = new $root.tendermint.version.App(); - if (object.protocol != null) - if ($util.Long) - (message.protocol = $util.Long.fromValue(object.protocol)).unsigned = true; - else if (typeof object.protocol === "string") - message.protocol = parseInt(object.protocol, 10); - else if (typeof object.protocol === "number") - message.protocol = object.protocol; - else if (typeof object.protocol === "object") - message.protocol = new $util.LongBits(object.protocol.low >>> 0, object.protocol.high >>> 0).toNumber(true); - if (object.software != null) - message.software = String(object.software); - return message; - }; - - /** - * Creates a plain object from an App message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.App} message App - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - App.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.protocol = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.protocol = options.longs === String ? "0" : 0; - object.software = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (typeof message.protocol === "number") - object.protocol = options.longs === String ? String(message.protocol) : message.protocol; - else - object.protocol = options.longs === String ? $util.Long.prototype.toString.call(message.protocol) : options.longs === Number ? new $util.LongBits(message.protocol.low >>> 0, message.protocol.high >>> 0).toNumber(true) : message.protocol; - if (message.software != null && message.hasOwnProperty("software")) - object.software = message.software; - return object; - }; - - /** - * Converts this App to JSON. - * @function toJSON - * @memberof tendermint.version.App - * @instance - * @returns {Object.} JSON object - */ - App.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return App; - })(); - - version.Consensus = (function() { - - /** - * Properties of a Consensus. - * @memberof tendermint.version - * @interface IConsensus - * @property {Long|null} [block] Consensus block - * @property {Long|null} [app] Consensus app - */ - - /** - * Constructs a new Consensus. - * @memberof tendermint.version - * @classdesc Represents a Consensus. - * @implements IConsensus - * @constructor - * @param {tendermint.version.IConsensus=} [properties] Properties to set - */ - function Consensus(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Consensus block. - * @member {Long} block - * @memberof tendermint.version.Consensus - * @instance - */ - Consensus.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Consensus app. - * @member {Long} app - * @memberof tendermint.version.Consensus - * @instance - */ - Consensus.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @function encode - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consensus.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 Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consensus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Consensus message from the specified reader or buffer. - * @function decode - * @memberof tendermint.version.Consensus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.version.Consensus} Consensus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consensus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.version.Consensus(); - while (reader.pos < end) { - let 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 Consensus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.version.Consensus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.version.Consensus} Consensus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consensus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Consensus message. - * @function verify - * @memberof tendermint.version.Consensus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Consensus.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 Consensus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.version.Consensus - * @static - * @param {Object.} object Plain object - * @returns {tendermint.version.Consensus} Consensus - */ - Consensus.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.version.Consensus) - return object; - let message = new $root.tendermint.version.Consensus(); - 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 Consensus message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.Consensus} message Consensus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Consensus.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block = options.longs === String ? "0" : 0; - if ($util.Long) { - let 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 Consensus to JSON. - * @function toJSON - * @memberof tendermint.version.Consensus - * @instance - * @returns {Object.} JSON object - */ - Consensus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Consensus; - })(); - - return version; - })(); - - return tendermint; -})(); - -export { $root as default }; diff --git a/src/generated/pob/proto.cjs b/src/generated/pob/proto.cjs deleted file mode 100644 index 31904206..00000000 --- a/src/generated/pob/proto.cjs +++ /dev/null @@ -1,13793 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots["@skip-mev/pob"] || ($protobuf.roots["@skip-mev/pob"] = {}); - - $root.sdk = (function() { - - /** - * Namespace sdk. - * @exports sdk - * @namespace - */ - var sdk = {}; - - sdk.auction = (function() { - - /** - * Namespace auction. - * @memberof sdk - * @namespace - */ - var auction = {}; - - auction.module = (function() { - - /** - * Namespace module. - * @memberof sdk.auction - * @namespace - */ - var module = {}; - - module.v1 = (function() { - - /** - * Namespace v1. - * @memberof sdk.auction.module - * @namespace - */ - var v1 = {}; - - v1.Module = (function() { - - /** - * Properties of a Module. - * @memberof sdk.auction.module.v1 - * @interface IModule - * @property {string|null} [authority] Module authority - */ - - /** - * Constructs a new Module. - * @memberof sdk.auction.module.v1 - * @classdesc Represents a Module. - * @implements IModule - * @constructor - * @param {sdk.auction.module.v1.IModule=} [properties] Properties to set - */ - function Module(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Module authority. - * @member {string} authority - * @memberof sdk.auction.module.v1.Module - * @instance - */ - Module.prototype.authority = ""; - - /** - * Encodes the specified Module message. Does not implicitly {@link sdk.auction.module.v1.Module.verify|verify} messages. - * @function encode - * @memberof sdk.auction.module.v1.Module - * @static - * @param {sdk.auction.module.v1.IModule} message Module message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Module.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - return writer; - }; - - /** - * Encodes the specified Module message, length delimited. Does not implicitly {@link sdk.auction.module.v1.Module.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.module.v1.Module - * @static - * @param {sdk.auction.module.v1.IModule} message Module message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Module.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Module message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.module.v1.Module - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.module.v1.Module} Module - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Module.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.module.v1.Module(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Module message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.module.v1.Module - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.module.v1.Module} Module - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Module.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Module message. - * @function verify - * @memberof sdk.auction.module.v1.Module - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Module.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - return null; - }; - - /** - * Creates a Module message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.module.v1.Module - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.module.v1.Module} Module - */ - Module.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.module.v1.Module) - return object; - var message = new $root.sdk.auction.module.v1.Module(); - if (object.authority != null) - message.authority = String(object.authority); - return message; - }; - - /** - * Creates a plain object from a Module message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.module.v1.Module - * @static - * @param {sdk.auction.module.v1.Module} message Module - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Module.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.authority = ""; - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - return object; - }; - - /** - * Converts this Module to JSON. - * @function toJSON - * @memberof sdk.auction.module.v1.Module - * @instance - * @returns {Object.} JSON object - */ - Module.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Module; - })(); - - return v1; - })(); - - return module; - })(); - - auction.v1 = (function() { - - /** - * Namespace v1. - * @memberof sdk.auction - * @namespace - */ - var v1 = {}; - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof sdk.auction.v1 - * @interface IGenesisState - * @property {sdk.auction.v1.IParams|null} [params] GenesisState params - */ - - /** - * Constructs a new GenesisState. - * @memberof sdk.auction.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {sdk.auction.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {sdk.auction.v1.IParams|null|undefined} params - * @memberof sdk.auction.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link sdk.auction.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {sdk.auction.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.sdk.auction.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link sdk.auction.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {sdk.auction.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.sdk.auction.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.sdk.auction.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.GenesisState) - return object; - var message = new $root.sdk.auction.v1.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".sdk.auction.v1.GenesisState.params: object expected"); - message.params = $root.sdk.auction.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {sdk.auction.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.sdk.auction.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof sdk.auction.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof sdk.auction.v1 - * @interface IParams - * @property {number|null} [max_bundle_size] Params max_bundle_size - * @property {Uint8Array|null} [escrow_account_address] Params escrow_account_address - * @property {cosmos.base.v1beta1.ICoin|null} [reserve_fee] Params reserve_fee - * @property {cosmos.base.v1beta1.ICoin|null} [min_bid_increment] Params min_bid_increment - * @property {boolean|null} [front_running_protection] Params front_running_protection - * @property {string|null} [proposer_fee] Params proposer_fee - */ - - /** - * Constructs a new Params. - * @memberof sdk.auction.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {sdk.auction.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 max_bundle_size. - * @member {number} max_bundle_size - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.max_bundle_size = 0; - - /** - * Params escrow_account_address. - * @member {Uint8Array} escrow_account_address - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.escrow_account_address = $util.newBuffer([]); - - /** - * Params reserve_fee. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} reserve_fee - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.reserve_fee = null; - - /** - * Params min_bid_increment. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} min_bid_increment - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.min_bid_increment = null; - - /** - * Params front_running_protection. - * @member {boolean} front_running_protection - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.front_running_protection = false; - - /** - * Params proposer_fee. - * @member {string} proposer_fee - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.proposer_fee = ""; - - /** - * Encodes the specified Params message. Does not implicitly {@link sdk.auction.v1.Params.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.Params - * @static - * @param {sdk.auction.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.max_bundle_size != null && Object.hasOwnProperty.call(message, "max_bundle_size")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.max_bundle_size); - if (message.escrow_account_address != null && Object.hasOwnProperty.call(message, "escrow_account_address")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.escrow_account_address); - if (message.reserve_fee != null && Object.hasOwnProperty.call(message, "reserve_fee")) - $root.cosmos.base.v1beta1.Coin.encode(message.reserve_fee, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.min_bid_increment != null && Object.hasOwnProperty.call(message, "min_bid_increment")) - $root.cosmos.base.v1beta1.Coin.encode(message.min_bid_increment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.front_running_protection != null && Object.hasOwnProperty.call(message, "front_running_protection")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.front_running_protection); - if (message.proposer_fee != null && Object.hasOwnProperty.call(message, "proposer_fee")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.proposer_fee); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link sdk.auction.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.Params - * @static - * @param {sdk.auction.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 sdk.auction.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.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.sdk.auction.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_bundle_size = reader.uint32(); - break; - case 2: - message.escrow_account_address = reader.bytes(); - break; - case 3: - message.reserve_fee = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 4: - message.min_bid_increment = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 5: - message.front_running_protection = reader.bool(); - break; - case 6: - message.proposer_fee = 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 sdk.auction.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.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 sdk.auction.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.max_bundle_size != null && message.hasOwnProperty("max_bundle_size")) - if (!$util.isInteger(message.max_bundle_size)) - return "max_bundle_size: integer expected"; - if (message.escrow_account_address != null && message.hasOwnProperty("escrow_account_address")) - if (!(message.escrow_account_address && typeof message.escrow_account_address.length === "number" || $util.isString(message.escrow_account_address))) - return "escrow_account_address: buffer expected"; - if (message.reserve_fee != null && message.hasOwnProperty("reserve_fee")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.reserve_fee); - if (error) - return "reserve_fee." + error; - } - if (message.min_bid_increment != null && message.hasOwnProperty("min_bid_increment")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.min_bid_increment); - if (error) - return "min_bid_increment." + error; - } - if (message.front_running_protection != null && message.hasOwnProperty("front_running_protection")) - if (typeof message.front_running_protection !== "boolean") - return "front_running_protection: boolean expected"; - if (message.proposer_fee != null && message.hasOwnProperty("proposer_fee")) - if (!$util.isString(message.proposer_fee)) - return "proposer_fee: string expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.Params) - return object; - var message = new $root.sdk.auction.v1.Params(); - if (object.max_bundle_size != null) - message.max_bundle_size = object.max_bundle_size >>> 0; - if (object.escrow_account_address != null) - if (typeof object.escrow_account_address === "string") - $util.base64.decode(object.escrow_account_address, message.escrow_account_address = $util.newBuffer($util.base64.length(object.escrow_account_address)), 0); - else if (object.escrow_account_address.length) - message.escrow_account_address = object.escrow_account_address; - if (object.reserve_fee != null) { - if (typeof object.reserve_fee !== "object") - throw TypeError(".sdk.auction.v1.Params.reserve_fee: object expected"); - message.reserve_fee = $root.cosmos.base.v1beta1.Coin.fromObject(object.reserve_fee); - } - if (object.min_bid_increment != null) { - if (typeof object.min_bid_increment !== "object") - throw TypeError(".sdk.auction.v1.Params.min_bid_increment: object expected"); - message.min_bid_increment = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_bid_increment); - } - if (object.front_running_protection != null) - message.front_running_protection = Boolean(object.front_running_protection); - if (object.proposer_fee != null) - message.proposer_fee = String(object.proposer_fee); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.Params - * @static - * @param {sdk.auction.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.max_bundle_size = 0; - if (options.bytes === String) - object.escrow_account_address = ""; - else { - object.escrow_account_address = []; - if (options.bytes !== Array) - object.escrow_account_address = $util.newBuffer(object.escrow_account_address); - } - object.reserve_fee = null; - object.min_bid_increment = null; - object.front_running_protection = false; - object.proposer_fee = ""; - } - if (message.max_bundle_size != null && message.hasOwnProperty("max_bundle_size")) - object.max_bundle_size = message.max_bundle_size; - if (message.escrow_account_address != null && message.hasOwnProperty("escrow_account_address")) - object.escrow_account_address = options.bytes === String ? $util.base64.encode(message.escrow_account_address, 0, message.escrow_account_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.escrow_account_address) : message.escrow_account_address; - if (message.reserve_fee != null && message.hasOwnProperty("reserve_fee")) - object.reserve_fee = $root.cosmos.base.v1beta1.Coin.toObject(message.reserve_fee, options); - if (message.min_bid_increment != null && message.hasOwnProperty("min_bid_increment")) - object.min_bid_increment = $root.cosmos.base.v1beta1.Coin.toObject(message.min_bid_increment, options); - if (message.front_running_protection != null && message.hasOwnProperty("front_running_protection")) - object.front_running_protection = message.front_running_protection; - if (message.proposer_fee != null && message.hasOwnProperty("proposer_fee")) - object.proposer_fee = message.proposer_fee; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof sdk.auction.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof sdk.auction.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; - - /** - * Callback as used by {@link sdk.auction.v1.Query#params}. - * @memberof sdk.auction.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {sdk.auction.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof sdk.auction.v1.Query - * @instance - * @param {sdk.auction.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {sdk.auction.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.sdk.auction.v1.QueryParamsRequest, $root.sdk.auction.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof sdk.auction.v1.Query - * @instance - * @param {sdk.auction.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof sdk.auction.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof sdk.auction.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {sdk.auction.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link sdk.auction.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {sdk.auction.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link sdk.auction.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {sdk.auction.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.QueryParamsRequest) - return object; - return new $root.sdk.auction.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {sdk.auction.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof sdk.auction.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof sdk.auction.v1 - * @interface IQueryParamsResponse - * @property {sdk.auction.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof sdk.auction.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {sdk.auction.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {sdk.auction.v1.IParams|null|undefined} params - * @memberof sdk.auction.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link sdk.auction.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {sdk.auction.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.sdk.auction.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {sdk.auction.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.sdk.auction.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.sdk.auction.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.QueryParamsResponse) - return object; - var message = new $root.sdk.auction.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".sdk.auction.v1.QueryParamsResponse.params: object expected"); - message.params = $root.sdk.auction.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {sdk.auction.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.sdk.auction.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof sdk.auction.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof sdk.auction.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link sdk.auction.v1.Msg#auctionBid}. - * @memberof sdk.auction.v1.Msg - * @typedef AuctionBidCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {sdk.auction.v1.MsgAuctionBidResponse} [response] MsgAuctionBidResponse - */ - - /** - * Calls AuctionBid. - * @function auctionBid - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgAuctionBid} request MsgAuctionBid message or plain object - * @param {sdk.auction.v1.Msg.AuctionBidCallback} callback Node-style callback called with the error, if any, and MsgAuctionBidResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.auctionBid = function auctionBid(request, callback) { - return this.rpcCall(auctionBid, $root.sdk.auction.v1.MsgAuctionBid, $root.sdk.auction.v1.MsgAuctionBidResponse, request, callback); - }, "name", { value: "AuctionBid" }); - - /** - * Calls AuctionBid. - * @function auctionBid - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgAuctionBid} request MsgAuctionBid message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link sdk.auction.v1.Msg#updateParams}. - * @memberof sdk.auction.v1.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {sdk.auction.v1.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {sdk.auction.v1.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.sdk.auction.v1.MsgUpdateParams, $root.sdk.auction.v1.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgAuctionBid = (function() { - - /** - * Properties of a MsgAuctionBid. - * @memberof sdk.auction.v1 - * @interface IMsgAuctionBid - * @property {string|null} [bidder] MsgAuctionBid bidder - * @property {cosmos.base.v1beta1.ICoin|null} [bid] MsgAuctionBid bid - * @property {Array.|null} [transactions] MsgAuctionBid transactions - */ - - /** - * Constructs a new MsgAuctionBid. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgAuctionBid. - * @implements IMsgAuctionBid - * @constructor - * @param {sdk.auction.v1.IMsgAuctionBid=} [properties] Properties to set - */ - function MsgAuctionBid(properties) { - this.transactions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAuctionBid bidder. - * @member {string} bidder - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - */ - MsgAuctionBid.prototype.bidder = ""; - - /** - * MsgAuctionBid bid. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} bid - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - */ - MsgAuctionBid.prototype.bid = null; - - /** - * MsgAuctionBid transactions. - * @member {Array.} transactions - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - */ - MsgAuctionBid.prototype.transactions = $util.emptyArray; - - /** - * Encodes the specified MsgAuctionBid message. Does not implicitly {@link sdk.auction.v1.MsgAuctionBid.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {sdk.auction.v1.IMsgAuctionBid} message MsgAuctionBid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBid.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bidder != null && Object.hasOwnProperty.call(message, "bidder")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bidder); - if (message.bid != null && Object.hasOwnProperty.call(message, "bid")) - $root.cosmos.base.v1beta1.Coin.encode(message.bid, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transactions != null && message.transactions.length) - for (var i = 0; i < message.transactions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.transactions[i]); - return writer; - }; - - /** - * Encodes the specified MsgAuctionBid message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgAuctionBid.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {sdk.auction.v1.IMsgAuctionBid} message MsgAuctionBid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBid.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAuctionBid message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgAuctionBid} MsgAuctionBid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBid.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgAuctionBid(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bidder = reader.string(); - break; - case 2: - message.bid = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.transactions && message.transactions.length)) - message.transactions = []; - message.transactions.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAuctionBid message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgAuctionBid} MsgAuctionBid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBid.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAuctionBid message. - * @function verify - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAuctionBid.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bidder != null && message.hasOwnProperty("bidder")) - if (!$util.isString(message.bidder)) - return "bidder: string expected"; - if (message.bid != null && message.hasOwnProperty("bid")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.bid); - if (error) - return "bid." + error; - } - if (message.transactions != null && message.hasOwnProperty("transactions")) { - if (!Array.isArray(message.transactions)) - return "transactions: array expected"; - for (var i = 0; i < message.transactions.length; ++i) - if (!(message.transactions[i] && typeof message.transactions[i].length === "number" || $util.isString(message.transactions[i]))) - return "transactions: buffer[] expected"; - } - return null; - }; - - /** - * Creates a MsgAuctionBid message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgAuctionBid} MsgAuctionBid - */ - MsgAuctionBid.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgAuctionBid) - return object; - var message = new $root.sdk.auction.v1.MsgAuctionBid(); - if (object.bidder != null) - message.bidder = String(object.bidder); - if (object.bid != null) { - if (typeof object.bid !== "object") - throw TypeError(".sdk.auction.v1.MsgAuctionBid.bid: object expected"); - message.bid = $root.cosmos.base.v1beta1.Coin.fromObject(object.bid); - } - if (object.transactions) { - if (!Array.isArray(object.transactions)) - throw TypeError(".sdk.auction.v1.MsgAuctionBid.transactions: array expected"); - message.transactions = []; - for (var i = 0; i < object.transactions.length; ++i) - if (typeof object.transactions[i] === "string") - $util.base64.decode(object.transactions[i], message.transactions[i] = $util.newBuffer($util.base64.length(object.transactions[i])), 0); - else if (object.transactions[i].length) - message.transactions[i] = object.transactions[i]; - } - return message; - }; - - /** - * Creates a plain object from a MsgAuctionBid message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {sdk.auction.v1.MsgAuctionBid} message MsgAuctionBid - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAuctionBid.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.transactions = []; - if (options.defaults) { - object.bidder = ""; - object.bid = null; - } - if (message.bidder != null && message.hasOwnProperty("bidder")) - object.bidder = message.bidder; - if (message.bid != null && message.hasOwnProperty("bid")) - object.bid = $root.cosmos.base.v1beta1.Coin.toObject(message.bid, options); - if (message.transactions && message.transactions.length) { - object.transactions = []; - for (var j = 0; j < message.transactions.length; ++j) - object.transactions[j] = options.bytes === String ? $util.base64.encode(message.transactions[j], 0, message.transactions[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.transactions[j]) : message.transactions[j]; - } - return object; - }; - - /** - * Converts this MsgAuctionBid to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - * @returns {Object.} JSON object - */ - MsgAuctionBid.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAuctionBid; - })(); - - v1.MsgAuctionBidResponse = (function() { - - /** - * Properties of a MsgAuctionBidResponse. - * @memberof sdk.auction.v1 - * @interface IMsgAuctionBidResponse - */ - - /** - * Constructs a new MsgAuctionBidResponse. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgAuctionBidResponse. - * @implements IMsgAuctionBidResponse - * @constructor - * @param {sdk.auction.v1.IMsgAuctionBidResponse=} [properties] Properties to set - */ - function MsgAuctionBidResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgAuctionBidResponse message. Does not implicitly {@link sdk.auction.v1.MsgAuctionBidResponse.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {sdk.auction.v1.IMsgAuctionBidResponse} message MsgAuctionBidResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBidResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgAuctionBidResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgAuctionBidResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {sdk.auction.v1.IMsgAuctionBidResponse} message MsgAuctionBidResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBidResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAuctionBidResponse message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgAuctionBidResponse} MsgAuctionBidResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBidResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgAuctionBidResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAuctionBidResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgAuctionBidResponse} MsgAuctionBidResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBidResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAuctionBidResponse message. - * @function verify - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAuctionBidResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgAuctionBidResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgAuctionBidResponse} MsgAuctionBidResponse - */ - MsgAuctionBidResponse.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgAuctionBidResponse) - return object; - return new $root.sdk.auction.v1.MsgAuctionBidResponse(); - }; - - /** - * Creates a plain object from a MsgAuctionBidResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {sdk.auction.v1.MsgAuctionBidResponse} message MsgAuctionBidResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAuctionBidResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgAuctionBidResponse to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAuctionBidResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAuctionBidResponse; - })(); - - v1.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof sdk.auction.v1 - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {sdk.auction.v1.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {sdk.auction.v1.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof sdk.auction.v1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {sdk.auction.v1.IParams|null|undefined} params - * @memberof sdk.auction.v1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link sdk.auction.v1.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {sdk.auction.v1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.sdk.auction.v1.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {sdk.auction.v1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.sdk.auction.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.sdk.auction.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgUpdateParams) - return object; - var message = new $root.sdk.auction.v1.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".sdk.auction.v1.MsgUpdateParams.params: object expected"); - message.params = $root.sdk.auction.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {sdk.auction.v1.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.sdk.auction.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - v1.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof sdk.auction.v1 - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {sdk.auction.v1.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link sdk.auction.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {sdk.auction.v1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {sdk.auction.v1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgUpdateParamsResponse) - return object; - return new $root.sdk.auction.v1.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {sdk.auction.v1.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - return v1; - })(); - - return auction; - })(); - - sdk.proposals = (function() { - - /** - * Namespace proposals. - * @memberof sdk - * @namespace - */ - var proposals = {}; - - proposals.v1 = (function() { - - /** - * Namespace v1. - * @memberof sdk.proposals - * @namespace - */ - var v1 = {}; - - v1.ProposalInfo = (function() { - - /** - * Properties of a ProposalInfo. - * @memberof sdk.proposals.v1 - * @interface IProposalInfo - * @property {Object.|null} [txs_by_lane] ProposalInfo txs_by_lane - * @property {Long|null} [max_block_size] ProposalInfo max_block_size - * @property {Long|null} [max_gas_limit] ProposalInfo max_gas_limit - * @property {Long|null} [block_size] ProposalInfo block_size - * @property {Long|null} [gas_limit] ProposalInfo gas_limit - */ - - /** - * Constructs a new ProposalInfo. - * @memberof sdk.proposals.v1 - * @classdesc Represents a ProposalInfo. - * @implements IProposalInfo - * @constructor - * @param {sdk.proposals.v1.IProposalInfo=} [properties] Properties to set - */ - function ProposalInfo(properties) { - this.txs_by_lane = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProposalInfo txs_by_lane. - * @member {Object.} txs_by_lane - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.txs_by_lane = $util.emptyObject; - - /** - * ProposalInfo max_block_size. - * @member {Long} max_block_size - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.max_block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ProposalInfo max_gas_limit. - * @member {Long} max_gas_limit - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.max_gas_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ProposalInfo block_size. - * @member {Long} block_size - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ProposalInfo gas_limit. - * @member {Long} gas_limit - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.gas_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ProposalInfo message. Does not implicitly {@link sdk.proposals.v1.ProposalInfo.verify|verify} messages. - * @function encode - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {sdk.proposals.v1.IProposalInfo} message ProposalInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProposalInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.txs_by_lane != null && Object.hasOwnProperty.call(message, "txs_by_lane")) - for (var keys = Object.keys(message.txs_by_lane), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.txs_by_lane[keys[i]]).ldelim(); - if (message.max_block_size != null && Object.hasOwnProperty.call(message, "max_block_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max_block_size); - if (message.max_gas_limit != null && Object.hasOwnProperty.call(message, "max_gas_limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.max_gas_limit); - if (message.block_size != null && Object.hasOwnProperty.call(message, "block_size")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.block_size); - if (message.gas_limit != null && Object.hasOwnProperty.call(message, "gas_limit")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.gas_limit); - return writer; - }; - - /** - * Encodes the specified ProposalInfo message, length delimited. Does not implicitly {@link sdk.proposals.v1.ProposalInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {sdk.proposals.v1.IProposalInfo} message ProposalInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProposalInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProposalInfo message from the specified reader or buffer. - * @function decode - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.proposals.v1.ProposalInfo} ProposalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProposalInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.proposals.v1.ProposalInfo(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.txs_by_lane === $util.emptyObject) - message.txs_by_lane = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.uint64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.txs_by_lane[key] = value; - break; - case 2: - message.max_block_size = reader.int64(); - break; - case 3: - message.max_gas_limit = reader.uint64(); - break; - case 4: - message.block_size = reader.int64(); - break; - case 5: - message.gas_limit = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProposalInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.proposals.v1.ProposalInfo} ProposalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProposalInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProposalInfo message. - * @function verify - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProposalInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.txs_by_lane != null && message.hasOwnProperty("txs_by_lane")) { - if (!$util.isObject(message.txs_by_lane)) - return "txs_by_lane: object expected"; - var key = Object.keys(message.txs_by_lane); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.txs_by_lane[key[i]]) && !(message.txs_by_lane[key[i]] && $util.isInteger(message.txs_by_lane[key[i]].low) && $util.isInteger(message.txs_by_lane[key[i]].high))) - return "txs_by_lane: integer|Long{k:string} expected"; - } - if (message.max_block_size != null && message.hasOwnProperty("max_block_size")) - if (!$util.isInteger(message.max_block_size) && !(message.max_block_size && $util.isInteger(message.max_block_size.low) && $util.isInteger(message.max_block_size.high))) - return "max_block_size: integer|Long expected"; - if (message.max_gas_limit != null && message.hasOwnProperty("max_gas_limit")) - if (!$util.isInteger(message.max_gas_limit) && !(message.max_gas_limit && $util.isInteger(message.max_gas_limit.low) && $util.isInteger(message.max_gas_limit.high))) - return "max_gas_limit: integer|Long expected"; - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (!$util.isInteger(message.block_size) && !(message.block_size && $util.isInteger(message.block_size.low) && $util.isInteger(message.block_size.high))) - return "block_size: integer|Long expected"; - if (message.gas_limit != null && message.hasOwnProperty("gas_limit")) - if (!$util.isInteger(message.gas_limit) && !(message.gas_limit && $util.isInteger(message.gas_limit.low) && $util.isInteger(message.gas_limit.high))) - return "gas_limit: integer|Long expected"; - return null; - }; - - /** - * Creates a ProposalInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {Object.} object Plain object - * @returns {sdk.proposals.v1.ProposalInfo} ProposalInfo - */ - ProposalInfo.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.proposals.v1.ProposalInfo) - return object; - var message = new $root.sdk.proposals.v1.ProposalInfo(); - if (object.txs_by_lane) { - if (typeof object.txs_by_lane !== "object") - throw TypeError(".sdk.proposals.v1.ProposalInfo.txs_by_lane: object expected"); - message.txs_by_lane = {}; - for (var keys = Object.keys(object.txs_by_lane), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.txs_by_lane[keys[i]] = $util.Long.fromValue(object.txs_by_lane[keys[i]])).unsigned = true; - else if (typeof object.txs_by_lane[keys[i]] === "string") - message.txs_by_lane[keys[i]] = parseInt(object.txs_by_lane[keys[i]], 10); - else if (typeof object.txs_by_lane[keys[i]] === "number") - message.txs_by_lane[keys[i]] = object.txs_by_lane[keys[i]]; - else if (typeof object.txs_by_lane[keys[i]] === "object") - message.txs_by_lane[keys[i]] = new $util.LongBits(object.txs_by_lane[keys[i]].low >>> 0, object.txs_by_lane[keys[i]].high >>> 0).toNumber(true); - } - if (object.max_block_size != null) - if ($util.Long) - (message.max_block_size = $util.Long.fromValue(object.max_block_size)).unsigned = false; - else if (typeof object.max_block_size === "string") - message.max_block_size = parseInt(object.max_block_size, 10); - else if (typeof object.max_block_size === "number") - message.max_block_size = object.max_block_size; - else if (typeof object.max_block_size === "object") - message.max_block_size = new $util.LongBits(object.max_block_size.low >>> 0, object.max_block_size.high >>> 0).toNumber(); - if (object.max_gas_limit != null) - if ($util.Long) - (message.max_gas_limit = $util.Long.fromValue(object.max_gas_limit)).unsigned = true; - else if (typeof object.max_gas_limit === "string") - message.max_gas_limit = parseInt(object.max_gas_limit, 10); - else if (typeof object.max_gas_limit === "number") - message.max_gas_limit = object.max_gas_limit; - else if (typeof object.max_gas_limit === "object") - message.max_gas_limit = new $util.LongBits(object.max_gas_limit.low >>> 0, object.max_gas_limit.high >>> 0).toNumber(true); - if (object.block_size != null) - if ($util.Long) - (message.block_size = $util.Long.fromValue(object.block_size)).unsigned = false; - else if (typeof object.block_size === "string") - message.block_size = parseInt(object.block_size, 10); - else if (typeof object.block_size === "number") - message.block_size = object.block_size; - else if (typeof object.block_size === "object") - message.block_size = new $util.LongBits(object.block_size.low >>> 0, object.block_size.high >>> 0).toNumber(); - if (object.gas_limit != null) - if ($util.Long) - (message.gas_limit = $util.Long.fromValue(object.gas_limit)).unsigned = true; - else if (typeof object.gas_limit === "string") - message.gas_limit = parseInt(object.gas_limit, 10); - else if (typeof object.gas_limit === "number") - message.gas_limit = object.gas_limit; - else if (typeof object.gas_limit === "object") - message.gas_limit = new $util.LongBits(object.gas_limit.low >>> 0, object.gas_limit.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ProposalInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {sdk.proposals.v1.ProposalInfo} message ProposalInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProposalInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.txs_by_lane = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_block_size = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.max_gas_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_gas_limit = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_size = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.gas_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gas_limit = options.longs === String ? "0" : 0; - } - var keys2; - if (message.txs_by_lane && (keys2 = Object.keys(message.txs_by_lane)).length) { - object.txs_by_lane = {}; - for (var j = 0; j < keys2.length; ++j) - if (typeof message.txs_by_lane[keys2[j]] === "number") - object.txs_by_lane[keys2[j]] = options.longs === String ? String(message.txs_by_lane[keys2[j]]) : message.txs_by_lane[keys2[j]]; - else - object.txs_by_lane[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.txs_by_lane[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.txs_by_lane[keys2[j]].low >>> 0, message.txs_by_lane[keys2[j]].high >>> 0).toNumber(true) : message.txs_by_lane[keys2[j]]; - } - if (message.max_block_size != null && message.hasOwnProperty("max_block_size")) - if (typeof message.max_block_size === "number") - object.max_block_size = options.longs === String ? String(message.max_block_size) : message.max_block_size; - else - object.max_block_size = options.longs === String ? $util.Long.prototype.toString.call(message.max_block_size) : options.longs === Number ? new $util.LongBits(message.max_block_size.low >>> 0, message.max_block_size.high >>> 0).toNumber() : message.max_block_size; - if (message.max_gas_limit != null && message.hasOwnProperty("max_gas_limit")) - if (typeof message.max_gas_limit === "number") - object.max_gas_limit = options.longs === String ? String(message.max_gas_limit) : message.max_gas_limit; - else - object.max_gas_limit = options.longs === String ? $util.Long.prototype.toString.call(message.max_gas_limit) : options.longs === Number ? new $util.LongBits(message.max_gas_limit.low >>> 0, message.max_gas_limit.high >>> 0).toNumber(true) : message.max_gas_limit; - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (typeof message.block_size === "number") - object.block_size = options.longs === String ? String(message.block_size) : message.block_size; - else - object.block_size = options.longs === String ? $util.Long.prototype.toString.call(message.block_size) : options.longs === Number ? new $util.LongBits(message.block_size.low >>> 0, message.block_size.high >>> 0).toNumber() : message.block_size; - if (message.gas_limit != null && message.hasOwnProperty("gas_limit")) - if (typeof message.gas_limit === "number") - object.gas_limit = options.longs === String ? String(message.gas_limit) : message.gas_limit; - else - object.gas_limit = options.longs === String ? $util.Long.prototype.toString.call(message.gas_limit) : options.longs === Number ? new $util.LongBits(message.gas_limit.low >>> 0, message.gas_limit.high >>> 0).toNumber(true) : message.gas_limit; - return object; - }; - - /** - * Converts this ProposalInfo to JSON. - * @function toJSON - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - * @returns {Object.} JSON object - */ - ProposalInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProposalInfo; - })(); - - return v1; - })(); - - return proposals; - })(); - - return sdk; - })(); - - $root.gogoproto = (function() { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - var gogoproto = {}; - - return gogoproto; - })(); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - 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; - - /** - * 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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.message_type != null && message.message_type.length) - for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (var i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (var i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (var i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (var i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + 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.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (var i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (var i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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.message_type && message.message_type.length) { - object.message_type = []; - for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (var j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (var j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_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]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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.nested_type != null && message.nested_type.length) - for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[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.oneof_decl != null && message.oneof_decl.length) - for (var i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (var i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (var i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (var i = 0; i < message.oneof_decl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (var i = 0; i < message.reserved_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (var i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (var i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (var i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (var i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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.nested_type && message.nested_type.length) { - object.nested_type = []; - for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (var j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (var j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (var j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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; - - /** - * 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; - - /** - * 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: 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.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (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 java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - var error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - var error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (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 message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - 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.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] 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.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - 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.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - 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.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (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 allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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.identifier_value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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; - - /** - * 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (var i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (var i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (var i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - 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.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (var j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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; - - /** - * 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} [source_file] Annotation source_file - * @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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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.source_file = 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.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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.source_file != null) - message.source_file = String(object.source_file); - 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.source_file = ""; - 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.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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; - })(); - - return protobuf; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = 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.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (var i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = 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.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (var i = 0; i < message.additional_bindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (var i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (var j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = 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.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; - })(); - - $root.cosmos = (function() { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - var cosmos = {}; - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - var base = {}; - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - return base; - })(); - - return cosmos; - })(); - - $root.cosmos_proto = (function() { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - var cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - var message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - * @property {string|null} [legacy_amino_encoding] ScalarDescriptor legacy_amino_encoding - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * ScalarDescriptor legacy_amino_encoding. - * @member {string} legacy_amino_encoding - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.legacy_amino_encoding = ""; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - if (message.legacy_amino_encoding != null && Object.hasOwnProperty.call(message, "legacy_amino_encoding")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.legacy_amino_encoding); - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - case 4: - message.legacy_amino_encoding = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (var i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - if (!$util.isString(message.legacy_amino_encoding)) - return "legacy_amino_encoding: string expected"; - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - var message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (var i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - if (object.legacy_amino_encoding != null) - message.legacy_amino_encoding = String(object.legacy_amino_encoding); - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.legacy_amino_encoding = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (var j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - object.legacy_amino_encoding = message.legacy_amino_encoding; - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; - })(); - - return $root; -}); diff --git a/src/generated/pob/proto.d.ts b/src/generated/pob/proto.d.ts deleted file mode 100644 index bb4a6c85..00000000 --- a/src/generated/pob/proto.d.ts +++ /dev/null @@ -1,4803 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Namespace sdk. */ -export namespace sdk { - - /** Namespace auction. */ - namespace auction { - - /** Namespace module. */ - namespace module { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Module. */ - interface IModule { - - /** Module authority */ - authority?: (string|null); - } - - /** Represents a Module. */ - class Module implements IModule { - - /** - * Constructs a new Module. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.module.v1.IModule); - - /** Module authority. */ - public authority: string; - - /** - * Encodes the specified Module message. Does not implicitly {@link sdk.auction.module.v1.Module.verify|verify} messages. - * @param message Module message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.module.v1.IModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Module message, length delimited. Does not implicitly {@link sdk.auction.module.v1.Module.verify|verify} messages. - * @param message Module message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.module.v1.IModule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Module message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Module - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.module.v1.Module; - - /** - * Decodes a Module message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Module - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.module.v1.Module; - - /** - * Verifies a Module message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Module message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Module - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.module.v1.Module; - - /** - * Creates a plain object from a Module message. Also converts values to other types if specified. - * @param message Module - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.module.v1.Module, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Module to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (sdk.auction.v1.IParams|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IGenesisState); - - /** GenesisState params. */ - public params?: (sdk.auction.v1.IParams|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link sdk.auction.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link sdk.auction.v1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params max_bundle_size */ - max_bundle_size?: (number|null); - - /** Params escrow_account_address */ - escrow_account_address?: (Uint8Array|null); - - /** Params reserve_fee */ - reserve_fee?: (cosmos.base.v1beta1.ICoin|null); - - /** Params min_bid_increment */ - min_bid_increment?: (cosmos.base.v1beta1.ICoin|null); - - /** Params front_running_protection */ - front_running_protection?: (boolean|null); - - /** Params proposer_fee */ - proposer_fee?: (string|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IParams); - - /** Params max_bundle_size. */ - public max_bundle_size: number; - - /** Params escrow_account_address. */ - public escrow_account_address: Uint8Array; - - /** Params reserve_fee. */ - public reserve_fee?: (cosmos.base.v1beta1.ICoin|null); - - /** Params min_bid_increment. */ - public min_bid_increment?: (cosmos.base.v1beta1.ICoin|null); - - /** Params front_running_protection. */ - public front_running_protection: boolean; - - /** Params proposer_fee. */ - public proposer_fee: string; - - /** - * Encodes the specified Params message. Does not implicitly {@link sdk.auction.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: sdk.auction.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link sdk.auction.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: sdk.auction.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): sdk.auction.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)): sdk.auction.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 }): sdk.auction.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: sdk.auction.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: sdk.auction.v1.IQueryParamsRequest, callback: sdk.auction.v1.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: sdk.auction.v1.IQueryParamsRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link sdk.auction.v1.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: sdk.auction.v1.QueryParamsResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link sdk.auction.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link sdk.auction.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (sdk.auction.v1.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (sdk.auction.v1.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link sdk.auction.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls AuctionBid. - * @param request MsgAuctionBid message or plain object - * @param callback Node-style callback called with the error, if any, and MsgAuctionBidResponse - */ - public auctionBid(request: sdk.auction.v1.IMsgAuctionBid, callback: sdk.auction.v1.Msg.AuctionBidCallback): void; - - /** - * Calls AuctionBid. - * @param request MsgAuctionBid message or plain object - * @returns Promise - */ - public auctionBid(request: sdk.auction.v1.IMsgAuctionBid): Promise; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: sdk.auction.v1.IMsgUpdateParams, callback: sdk.auction.v1.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: sdk.auction.v1.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link sdk.auction.v1.Msg#auctionBid}. - * @param error Error, if any - * @param [response] MsgAuctionBidResponse - */ - type AuctionBidCallback = (error: (Error|null), response?: sdk.auction.v1.MsgAuctionBidResponse) => void; - - /** - * Callback as used by {@link sdk.auction.v1.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: sdk.auction.v1.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgAuctionBid. */ - interface IMsgAuctionBid { - - /** MsgAuctionBid bidder */ - bidder?: (string|null); - - /** MsgAuctionBid bid */ - bid?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgAuctionBid transactions */ - transactions?: (Uint8Array[]|null); - } - - /** Represents a MsgAuctionBid. */ - class MsgAuctionBid implements IMsgAuctionBid { - - /** - * Constructs a new MsgAuctionBid. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IMsgAuctionBid); - - /** MsgAuctionBid bidder. */ - public bidder: string; - - /** MsgAuctionBid bid. */ - public bid?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgAuctionBid transactions. */ - public transactions: Uint8Array[]; - - /** - * Encodes the specified MsgAuctionBid message. Does not implicitly {@link sdk.auction.v1.MsgAuctionBid.verify|verify} messages. - * @param message MsgAuctionBid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IMsgAuctionBid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAuctionBid message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgAuctionBid.verify|verify} messages. - * @param message MsgAuctionBid message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IMsgAuctionBid, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAuctionBid message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAuctionBid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.MsgAuctionBid; - - /** - * Decodes a MsgAuctionBid message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAuctionBid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.MsgAuctionBid; - - /** - * Verifies a MsgAuctionBid message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAuctionBid message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAuctionBid - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.MsgAuctionBid; - - /** - * Creates a plain object from a MsgAuctionBid message. Also converts values to other types if specified. - * @param message MsgAuctionBid - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.MsgAuctionBid, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAuctionBid to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAuctionBidResponse. */ - interface IMsgAuctionBidResponse { - } - - /** Represents a MsgAuctionBidResponse. */ - class MsgAuctionBidResponse implements IMsgAuctionBidResponse { - - /** - * Constructs a new MsgAuctionBidResponse. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IMsgAuctionBidResponse); - - /** - * Encodes the specified MsgAuctionBidResponse message. Does not implicitly {@link sdk.auction.v1.MsgAuctionBidResponse.verify|verify} messages. - * @param message MsgAuctionBidResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IMsgAuctionBidResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAuctionBidResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgAuctionBidResponse.verify|verify} messages. - * @param message MsgAuctionBidResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IMsgAuctionBidResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAuctionBidResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAuctionBidResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.MsgAuctionBidResponse; - - /** - * Decodes a MsgAuctionBidResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAuctionBidResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.MsgAuctionBidResponse; - - /** - * Verifies a MsgAuctionBidResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAuctionBidResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAuctionBidResponse - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.MsgAuctionBidResponse; - - /** - * Creates a plain object from a MsgAuctionBidResponse message. Also converts values to other types if specified. - * @param message MsgAuctionBidResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.MsgAuctionBidResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAuctionBidResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (sdk.auction.v1.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (sdk.auction.v1.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link sdk.auction.v1.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.auction.v1.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link sdk.auction.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.auction.v1.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.auction.v1.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.auction.v1.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.auction.v1.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): sdk.auction.v1.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.auction.v1.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace proposals. */ - namespace proposals { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ProposalInfo. */ - interface IProposalInfo { - - /** ProposalInfo txs_by_lane */ - txs_by_lane?: ({ [k: string]: Long }|null); - - /** ProposalInfo max_block_size */ - max_block_size?: (Long|null); - - /** ProposalInfo max_gas_limit */ - max_gas_limit?: (Long|null); - - /** ProposalInfo block_size */ - block_size?: (Long|null); - - /** ProposalInfo gas_limit */ - gas_limit?: (Long|null); - } - - /** Represents a ProposalInfo. */ - class ProposalInfo implements IProposalInfo { - - /** - * Constructs a new ProposalInfo. - * @param [properties] Properties to set - */ - constructor(properties?: sdk.proposals.v1.IProposalInfo); - - /** ProposalInfo txs_by_lane. */ - public txs_by_lane: { [k: string]: Long }; - - /** ProposalInfo max_block_size. */ - public max_block_size: Long; - - /** ProposalInfo max_gas_limit. */ - public max_gas_limit: Long; - - /** ProposalInfo block_size. */ - public block_size: Long; - - /** ProposalInfo gas_limit. */ - public gas_limit: Long; - - /** - * Encodes the specified ProposalInfo message. Does not implicitly {@link sdk.proposals.v1.ProposalInfo.verify|verify} messages. - * @param message ProposalInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: sdk.proposals.v1.IProposalInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProposalInfo message, length delimited. Does not implicitly {@link sdk.proposals.v1.ProposalInfo.verify|verify} messages. - * @param message ProposalInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: sdk.proposals.v1.IProposalInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProposalInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProposalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): sdk.proposals.v1.ProposalInfo; - - /** - * Decodes a ProposalInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProposalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): sdk.proposals.v1.ProposalInfo; - - /** - * Verifies a ProposalInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProposalInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProposalInfo - */ - public static fromObject(object: { [k: string]: any }): sdk.proposals.v1.ProposalInfo; - - /** - * Creates a plain object from a ProposalInfo message. Also converts values to other types if specified. - * @param message ProposalInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: sdk.proposals.v1.ProposalInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProposalInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } -} - -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** 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[]; - - /** - * 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 public_dependency */ - public_dependency?: (number[]|null); - - /** FileDescriptorProto weak_dependency */ - weak_dependency?: (number[]|null); - - /** FileDescriptorProto message_type */ - message_type?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enum_type */ - enum_type?: (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 source_code_info */ - source_code_info?: (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 public_dependency. */ - public public_dependency: number[]; - - /** FileDescriptorProto weak_dependency. */ - public weak_dependency: number[]; - - /** FileDescriptorProto message_type. */ - public message_type: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enum_type. */ - public enum_type: 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 source_code_info. */ - public source_code_info?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * 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 nested_type */ - nested_type?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enum_type */ - enum_type?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extension_range */ - extension_range?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneof_decl */ - oneof_decl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range */ - reserved_range?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reserved_name */ - reserved_name?: (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 nested_type. */ - public nested_type: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enum_type. */ - public enum_type: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extension_range. */ - public extension_range: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneof_decl. */ - public oneof_decl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range. */ - public reserved_range: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reserved_name. */ - public reserved_name: string[]; - - /** - * 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; - - /** - * 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; - - /** - * 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 type_name */ - type_name?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto default_value */ - default_value?: (string|null); - - /** FieldDescriptorProto oneof_index */ - oneof_index?: (number|null); - - /** FieldDescriptorProto json_name */ - json_name?: (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 type_name. */ - public type_name: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto default_value. */ - public default_value: string; - - /** FieldDescriptorProto oneof_index. */ - public oneof_index: number; - - /** FieldDescriptorProto json_name. */ - public json_name: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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 input_type */ - input_type?: (string|null); - - /** MethodDescriptorProto output_type */ - output_type?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming */ - client_streaming?: (boolean|null); - - /** MethodDescriptorProto server_streaming */ - server_streaming?: (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 input_type. */ - public input_type: string; - - /** MethodDescriptorProto output_type. */ - public output_type: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming. */ - public client_streaming: boolean; - - /** MethodDescriptorProto server_streaming. */ - public server_streaming: boolean; - - /** - * 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 java_package */ - java_package?: (string|null); - - /** FileOptions java_outer_classname */ - java_outer_classname?: (string|null); - - /** FileOptions java_multiple_files */ - java_multiple_files?: (boolean|null); - - /** FileOptions java_generate_equals_and_hash */ - java_generate_equals_and_hash?: (boolean|null); - - /** FileOptions java_string_check_utf8 */ - java_string_check_utf8?: (boolean|null); - - /** FileOptions optimize_for */ - optimize_for?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions go_package */ - go_package?: (string|null); - - /** FileOptions cc_generic_services */ - cc_generic_services?: (boolean|null); - - /** FileOptions java_generic_services */ - java_generic_services?: (boolean|null); - - /** FileOptions py_generic_services */ - py_generic_services?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions cc_enable_arenas */ - cc_enable_arenas?: (boolean|null); - - /** FileOptions objc_class_prefix */ - objc_class_prefix?: (string|null); - - /** FileOptions csharp_namespace */ - csharp_namespace?: (string|null); - - /** FileOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .gogoproto.goproto_getters_all */ - ".gogoproto.goproto_getters_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_prefix_all */ - ".gogoproto.goproto_enum_prefix_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_stringer_all */ - ".gogoproto.goproto_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.verbose_equal_all */ - ".gogoproto.verbose_equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.face_all */ - ".gogoproto.face_all"?: (boolean|null); - - /** FileOptions .gogoproto.gostring_all */ - ".gogoproto.gostring_all"?: (boolean|null); - - /** FileOptions .gogoproto.populate_all */ - ".gogoproto.populate_all"?: (boolean|null); - - /** FileOptions .gogoproto.stringer_all */ - ".gogoproto.stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.onlyone_all */ - ".gogoproto.onlyone_all"?: (boolean|null); - - /** FileOptions .gogoproto.equal_all */ - ".gogoproto.equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.description_all */ - ".gogoproto.description_all"?: (boolean|null); - - /** FileOptions .gogoproto.testgen_all */ - ".gogoproto.testgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.benchgen_all */ - ".gogoproto.benchgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.marshaler_all */ - ".gogoproto.marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unmarshaler_all */ - ".gogoproto.unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.stable_marshaler_all */ - ".gogoproto.stable_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.sizer_all */ - ".gogoproto.sizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_stringer_all */ - ".gogoproto.goproto_enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.enum_stringer_all */ - ".gogoproto.enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_marshaler_all */ - ".gogoproto.unsafe_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_unmarshaler_all */ - ".gogoproto.unsafe_unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_extensions_map_all */ - ".gogoproto.goproto_extensions_map_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unrecognized_all */ - ".gogoproto.goproto_unrecognized_all"?: (boolean|null); - - /** FileOptions .gogoproto.gogoproto_import */ - ".gogoproto.gogoproto_import"?: (boolean|null); - - /** FileOptions .gogoproto.protosizer_all */ - ".gogoproto.protosizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.compare_all */ - ".gogoproto.compare_all"?: (boolean|null); - - /** FileOptions .gogoproto.typedecl_all */ - ".gogoproto.typedecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.enumdecl_all */ - ".gogoproto.enumdecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_registration */ - ".gogoproto.goproto_registration"?: (boolean|null); - - /** FileOptions .gogoproto.messagename_all */ - ".gogoproto.messagename_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_sizecache_all */ - ".gogoproto.goproto_sizecache_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unkeyed_all */ - ".gogoproto.goproto_unkeyed_all"?: (boolean|null); - - /** FileOptions .cosmos_proto.declare_interface */ - ".cosmos_proto.declare_interface"?: (cosmos_proto.IInterfaceDescriptor[]|null); - - /** FileOptions .cosmos_proto.declare_scalar */ - ".cosmos_proto.declare_scalar"?: (cosmos_proto.IScalarDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions java_package. */ - public java_package: string; - - /** FileOptions java_outer_classname. */ - public java_outer_classname: string; - - /** FileOptions java_multiple_files. */ - public java_multiple_files: boolean; - - /** FileOptions java_generate_equals_and_hash. */ - public java_generate_equals_and_hash: boolean; - - /** FileOptions java_string_check_utf8. */ - public java_string_check_utf8: boolean; - - /** FileOptions optimize_for. */ - public optimize_for: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions go_package. */ - public go_package: string; - - /** FileOptions cc_generic_services. */ - public cc_generic_services: boolean; - - /** FileOptions java_generic_services. */ - public java_generic_services: boolean; - - /** FileOptions py_generic_services. */ - public py_generic_services: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions cc_enable_arenas. */ - public cc_enable_arenas: boolean; - - /** FileOptions objc_class_prefix. */ - public objc_class_prefix: string; - - /** FileOptions csharp_namespace. */ - public csharp_namespace: string; - - /** FileOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 message_set_wire_format */ - message_set_wire_format?: (boolean|null); - - /** MessageOptions no_standard_descriptor_accessor */ - no_standard_descriptor_accessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions map_entry */ - map_entry?: (boolean|null); - - /** MessageOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .gogoproto.goproto_getters */ - ".gogoproto.goproto_getters"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_stringer */ - ".gogoproto.goproto_stringer"?: (boolean|null); - - /** MessageOptions .gogoproto.verbose_equal */ - ".gogoproto.verbose_equal"?: (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.stable_marshaler */ - ".gogoproto.stable_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.sizer */ - ".gogoproto.sizer"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_marshaler */ - ".gogoproto.unsafe_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_unmarshaler */ - ".gogoproto.unsafe_unmarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_extensions_map */ - ".gogoproto.goproto_extensions_map"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unrecognized */ - ".gogoproto.goproto_unrecognized"?: (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.goproto_sizecache */ - ".gogoproto.goproto_sizecache"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unkeyed */ - ".gogoproto.goproto_unkeyed"?: (boolean|null); - - /** MessageOptions .cosmos_proto.implements_interface */ - ".cosmos_proto.implements_interface"?: (string[]|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions message_set_wire_format. */ - public message_set_wire_format: boolean; - - /** MessageOptions no_standard_descriptor_accessor. */ - public no_standard_descriptor_accessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions map_entry. */ - public map_entry: boolean; - - /** MessageOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|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); - - /** FieldOptions .cosmos_proto.accepts_interface */ - ".cosmos_proto.accepts_interface"?: (string|null); - - /** FieldOptions .cosmos_proto.scalar */ - ".cosmos_proto.scalar"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 allow_alias */ - allow_alias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumOptions .gogoproto.goproto_enum_prefix */ - ".gogoproto.goproto_enum_prefix"?: (boolean|null); - - /** EnumOptions .gogoproto.goproto_enum_stringer */ - ".gogoproto.goproto_enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_stringer */ - ".gogoproto.enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_customname */ - ".gogoproto.enum_customname"?: (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 allow_alias. */ - public allow_alias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumValueOptions .gogoproto.enumvalue_customname */ - ".gogoproto.enumvalue_customname"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 identifier_value */ - identifier_value?: (string|null); - - /** UninterpretedOption positive_int_value */ - positive_int_value?: (Long|null); - - /** UninterpretedOption negative_int_value */ - negative_int_value?: (Long|null); - - /** UninterpretedOption double_value */ - double_value?: (number|null); - - /** UninterpretedOption string_value */ - string_value?: (Uint8Array|null); - - /** UninterpretedOption aggregate_value */ - aggregate_value?: (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 identifier_value. */ - public identifier_value: string; - - /** UninterpretedOption positive_int_value. */ - public positive_int_value: Long; - - /** UninterpretedOption negative_int_value. */ - public negative_int_value: Long; - - /** UninterpretedOption double_value. */ - public double_value: number; - - /** UninterpretedOption string_value. */ - public string_value: Uint8Array; - - /** UninterpretedOption aggregate_value. */ - public aggregate_value: string; - - /** - * 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 name_part */ - name_part: string; - - /** NamePart is_extension */ - is_extension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart name_part. */ - public name_part: string; - - /** NamePart is_extension. */ - public is_extension: boolean; - - /** - * 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[]; - - /** - * 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 leading_comments */ - leading_comments?: (string|null); - - /** Location trailing_comments */ - trailing_comments?: (string|null); - - /** Location leading_detached_comments */ - leading_detached_comments?: (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 leading_comments. */ - public leading_comments: string; - - /** Location trailing_comments. */ - public trailing_comments: string; - - /** Location leading_detached_comments. */ - public leading_detached_comments: string[]; - - /** - * 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[]; - - /** - * 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 source_file */ - source_file?: (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 source_file. */ - public source_file: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * 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 }; - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fully_decode_reserved_expansion */ - fully_decode_reserved_expansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fully_decode_reserved_expansion. */ - public fully_decode_reserved_expansion: boolean; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is 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.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the 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.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule response_body */ - response_body?: (string|null); - - /** HttpRule additional_bindings */ - additional_bindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule response_body. */ - public response_body: string; - - /** HttpRule additional_bindings. */ - public additional_bindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is 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.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the 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.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is 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.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the 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.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} - -/** Namespace cosmos. */ -export namespace cosmos { - - /** Namespace base. */ - namespace base { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** 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.base.v1beta1.ICoin); - - /** Coin denom. */ - public denom: string; - - /** Coin amount. */ - public amount: string; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecCoin); - - /** DecCoin denom. */ - public denom: string; - - /** DecCoin amount. */ - public amount: string; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IIntProto); - - /** IntProto int. */ - public int: string; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecProto); - - /** DecProto dec. */ - public dec: string; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DecProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } -} - -/** Namespace cosmos_proto. */ -export namespace cosmos_proto { - - /** Properties of an InterfaceDescriptor. */ - interface IInterfaceDescriptor { - - /** InterfaceDescriptor name */ - name?: (string|null); - - /** InterfaceDescriptor description */ - description?: (string|null); - } - - /** Represents an InterfaceDescriptor. */ - class InterfaceDescriptor implements IInterfaceDescriptor { - - /** - * Constructs a new InterfaceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IInterfaceDescriptor); - - /** InterfaceDescriptor name. */ - public name: string; - - /** InterfaceDescriptor description. */ - public description: string; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.InterfaceDescriptor; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.InterfaceDescriptor; - - /** - * Verifies an InterfaceDescriptor message. - * @param message Plain 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 InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterfaceDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.InterfaceDescriptor; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @param message InterfaceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.InterfaceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ScalarDescriptor. */ - interface IScalarDescriptor { - - /** ScalarDescriptor name */ - name?: (string|null); - - /** ScalarDescriptor description */ - description?: (string|null); - - /** ScalarDescriptor field_type */ - field_type?: (cosmos_proto.ScalarType[]|null); - - /** ScalarDescriptor legacy_amino_encoding */ - legacy_amino_encoding?: (string|null); - } - - /** Represents a ScalarDescriptor. */ - class ScalarDescriptor implements IScalarDescriptor { - - /** - * Constructs a new ScalarDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IScalarDescriptor); - - /** ScalarDescriptor name. */ - public name: string; - - /** ScalarDescriptor description. */ - public description: string; - - /** ScalarDescriptor field_type. */ - public field_type: cosmos_proto.ScalarType[]; - - /** ScalarDescriptor legacy_amino_encoding. */ - public legacy_amino_encoding: string; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.ScalarDescriptor; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.ScalarDescriptor; - - /** - * Verifies a ScalarDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScalarDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.ScalarDescriptor; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @param message ScalarDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.ScalarDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScalarDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** ScalarType enum. */ - enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0, - SCALAR_TYPE_STRING = 1, - SCALAR_TYPE_BYTES = 2 - } -} diff --git a/src/generated/pob/proto.js b/src/generated/pob/proto.js deleted file mode 100644 index ecd53595..00000000 --- a/src/generated/pob/proto.js +++ /dev/null @@ -1,13783 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -import * as $protobuf from "protobufjs/minimal"; - -// Common aliases -const $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace -const $root = $protobuf.roots["@skip-mev/pob"] || ($protobuf.roots["@skip-mev/pob"] = {}); - -export const sdk = $root.sdk = (() => { - - /** - * Namespace sdk. - * @exports sdk - * @namespace - */ - const sdk = {}; - - sdk.auction = (function() { - - /** - * Namespace auction. - * @memberof sdk - * @namespace - */ - const auction = {}; - - auction.module = (function() { - - /** - * Namespace module. - * @memberof sdk.auction - * @namespace - */ - const module = {}; - - module.v1 = (function() { - - /** - * Namespace v1. - * @memberof sdk.auction.module - * @namespace - */ - const v1 = {}; - - v1.Module = (function() { - - /** - * Properties of a Module. - * @memberof sdk.auction.module.v1 - * @interface IModule - * @property {string|null} [authority] Module authority - */ - - /** - * Constructs a new Module. - * @memberof sdk.auction.module.v1 - * @classdesc Represents a Module. - * @implements IModule - * @constructor - * @param {sdk.auction.module.v1.IModule=} [properties] Properties to set - */ - function Module(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Module authority. - * @member {string} authority - * @memberof sdk.auction.module.v1.Module - * @instance - */ - Module.prototype.authority = ""; - - /** - * Encodes the specified Module message. Does not implicitly {@link sdk.auction.module.v1.Module.verify|verify} messages. - * @function encode - * @memberof sdk.auction.module.v1.Module - * @static - * @param {sdk.auction.module.v1.IModule} message Module message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Module.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - return writer; - }; - - /** - * Encodes the specified Module message, length delimited. Does not implicitly {@link sdk.auction.module.v1.Module.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.module.v1.Module - * @static - * @param {sdk.auction.module.v1.IModule} message Module message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Module.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Module message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.module.v1.Module - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.module.v1.Module} Module - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Module.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.module.v1.Module(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Module message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.module.v1.Module - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.module.v1.Module} Module - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Module.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Module message. - * @function verify - * @memberof sdk.auction.module.v1.Module - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Module.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - return null; - }; - - /** - * Creates a Module message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.module.v1.Module - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.module.v1.Module} Module - */ - Module.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.module.v1.Module) - return object; - let message = new $root.sdk.auction.module.v1.Module(); - if (object.authority != null) - message.authority = String(object.authority); - return message; - }; - - /** - * Creates a plain object from a Module message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.module.v1.Module - * @static - * @param {sdk.auction.module.v1.Module} message Module - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Module.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.authority = ""; - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - return object; - }; - - /** - * Converts this Module to JSON. - * @function toJSON - * @memberof sdk.auction.module.v1.Module - * @instance - * @returns {Object.} JSON object - */ - Module.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Module; - })(); - - return v1; - })(); - - return module; - })(); - - auction.v1 = (function() { - - /** - * Namespace v1. - * @memberof sdk.auction - * @namespace - */ - const v1 = {}; - - v1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof sdk.auction.v1 - * @interface IGenesisState - * @property {sdk.auction.v1.IParams|null} [params] GenesisState params - */ - - /** - * Constructs a new GenesisState. - * @memberof sdk.auction.v1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {sdk.auction.v1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {sdk.auction.v1.IParams|null|undefined} params - * @memberof sdk.auction.v1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link sdk.auction.v1.GenesisState.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {sdk.auction.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.sdk.auction.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link sdk.auction.v1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {sdk.auction.v1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.GenesisState(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.sdk.auction.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.sdk.auction.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.GenesisState) - return object; - let message = new $root.sdk.auction.v1.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".sdk.auction.v1.GenesisState.params: object expected"); - message.params = $root.sdk.auction.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.GenesisState - * @static - * @param {sdk.auction.v1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.sdk.auction.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof sdk.auction.v1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof sdk.auction.v1 - * @interface IParams - * @property {number|null} [max_bundle_size] Params max_bundle_size - * @property {Uint8Array|null} [escrow_account_address] Params escrow_account_address - * @property {cosmos.base.v1beta1.ICoin|null} [reserve_fee] Params reserve_fee - * @property {cosmos.base.v1beta1.ICoin|null} [min_bid_increment] Params min_bid_increment - * @property {boolean|null} [front_running_protection] Params front_running_protection - * @property {string|null} [proposer_fee] Params proposer_fee - */ - - /** - * Constructs a new Params. - * @memberof sdk.auction.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {sdk.auction.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Params max_bundle_size. - * @member {number} max_bundle_size - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.max_bundle_size = 0; - - /** - * Params escrow_account_address. - * @member {Uint8Array} escrow_account_address - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.escrow_account_address = $util.newBuffer([]); - - /** - * Params reserve_fee. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} reserve_fee - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.reserve_fee = null; - - /** - * Params min_bid_increment. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} min_bid_increment - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.min_bid_increment = null; - - /** - * Params front_running_protection. - * @member {boolean} front_running_protection - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.front_running_protection = false; - - /** - * Params proposer_fee. - * @member {string} proposer_fee - * @memberof sdk.auction.v1.Params - * @instance - */ - Params.prototype.proposer_fee = ""; - - /** - * Encodes the specified Params message. Does not implicitly {@link sdk.auction.v1.Params.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.Params - * @static - * @param {sdk.auction.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.max_bundle_size != null && Object.hasOwnProperty.call(message, "max_bundle_size")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.max_bundle_size); - if (message.escrow_account_address != null && Object.hasOwnProperty.call(message, "escrow_account_address")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.escrow_account_address); - if (message.reserve_fee != null && Object.hasOwnProperty.call(message, "reserve_fee")) - $root.cosmos.base.v1beta1.Coin.encode(message.reserve_fee, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.min_bid_increment != null && Object.hasOwnProperty.call(message, "min_bid_increment")) - $root.cosmos.base.v1beta1.Coin.encode(message.min_bid_increment, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.front_running_protection != null && Object.hasOwnProperty.call(message, "front_running_protection")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.front_running_protection); - if (message.proposer_fee != null && Object.hasOwnProperty.call(message, "proposer_fee")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.proposer_fee); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link sdk.auction.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.Params - * @static - * @param {sdk.auction.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 sdk.auction.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.Params(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_bundle_size = reader.uint32(); - break; - case 2: - message.escrow_account_address = reader.bytes(); - break; - case 3: - message.reserve_fee = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 4: - message.min_bid_increment = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 5: - message.front_running_protection = reader.bool(); - break; - case 6: - message.proposer_fee = 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 sdk.auction.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.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 sdk.auction.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.max_bundle_size != null && message.hasOwnProperty("max_bundle_size")) - if (!$util.isInteger(message.max_bundle_size)) - return "max_bundle_size: integer expected"; - if (message.escrow_account_address != null && message.hasOwnProperty("escrow_account_address")) - if (!(message.escrow_account_address && typeof message.escrow_account_address.length === "number" || $util.isString(message.escrow_account_address))) - return "escrow_account_address: buffer expected"; - if (message.reserve_fee != null && message.hasOwnProperty("reserve_fee")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.reserve_fee); - if (error) - return "reserve_fee." + error; - } - if (message.min_bid_increment != null && message.hasOwnProperty("min_bid_increment")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.min_bid_increment); - if (error) - return "min_bid_increment." + error; - } - if (message.front_running_protection != null && message.hasOwnProperty("front_running_protection")) - if (typeof message.front_running_protection !== "boolean") - return "front_running_protection: boolean expected"; - if (message.proposer_fee != null && message.hasOwnProperty("proposer_fee")) - if (!$util.isString(message.proposer_fee)) - return "proposer_fee: string expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.Params) - return object; - let message = new $root.sdk.auction.v1.Params(); - if (object.max_bundle_size != null) - message.max_bundle_size = object.max_bundle_size >>> 0; - if (object.escrow_account_address != null) - if (typeof object.escrow_account_address === "string") - $util.base64.decode(object.escrow_account_address, message.escrow_account_address = $util.newBuffer($util.base64.length(object.escrow_account_address)), 0); - else if (object.escrow_account_address.length) - message.escrow_account_address = object.escrow_account_address; - if (object.reserve_fee != null) { - if (typeof object.reserve_fee !== "object") - throw TypeError(".sdk.auction.v1.Params.reserve_fee: object expected"); - message.reserve_fee = $root.cosmos.base.v1beta1.Coin.fromObject(object.reserve_fee); - } - if (object.min_bid_increment != null) { - if (typeof object.min_bid_increment !== "object") - throw TypeError(".sdk.auction.v1.Params.min_bid_increment: object expected"); - message.min_bid_increment = $root.cosmos.base.v1beta1.Coin.fromObject(object.min_bid_increment); - } - if (object.front_running_protection != null) - message.front_running_protection = Boolean(object.front_running_protection); - if (object.proposer_fee != null) - message.proposer_fee = String(object.proposer_fee); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.Params - * @static - * @param {sdk.auction.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.max_bundle_size = 0; - if (options.bytes === String) - object.escrow_account_address = ""; - else { - object.escrow_account_address = []; - if (options.bytes !== Array) - object.escrow_account_address = $util.newBuffer(object.escrow_account_address); - } - object.reserve_fee = null; - object.min_bid_increment = null; - object.front_running_protection = false; - object.proposer_fee = ""; - } - if (message.max_bundle_size != null && message.hasOwnProperty("max_bundle_size")) - object.max_bundle_size = message.max_bundle_size; - if (message.escrow_account_address != null && message.hasOwnProperty("escrow_account_address")) - object.escrow_account_address = options.bytes === String ? $util.base64.encode(message.escrow_account_address, 0, message.escrow_account_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.escrow_account_address) : message.escrow_account_address; - if (message.reserve_fee != null && message.hasOwnProperty("reserve_fee")) - object.reserve_fee = $root.cosmos.base.v1beta1.Coin.toObject(message.reserve_fee, options); - if (message.min_bid_increment != null && message.hasOwnProperty("min_bid_increment")) - object.min_bid_increment = $root.cosmos.base.v1beta1.Coin.toObject(message.min_bid_increment, options); - if (message.front_running_protection != null && message.hasOwnProperty("front_running_protection")) - object.front_running_protection = message.front_running_protection; - if (message.proposer_fee != null && message.hasOwnProperty("proposer_fee")) - object.proposer_fee = message.proposer_fee; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof sdk.auction.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof sdk.auction.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; - - /** - * Callback as used by {@link sdk.auction.v1.Query#params}. - * @memberof sdk.auction.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {sdk.auction.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof sdk.auction.v1.Query - * @instance - * @param {sdk.auction.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {sdk.auction.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.sdk.auction.v1.QueryParamsRequest, $root.sdk.auction.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof sdk.auction.v1.Query - * @instance - * @param {sdk.auction.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof sdk.auction.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof sdk.auction.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {sdk.auction.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link sdk.auction.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {sdk.auction.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link sdk.auction.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {sdk.auction.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.QueryParamsRequest(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.QueryParamsRequest) - return object; - return new $root.sdk.auction.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.QueryParamsRequest - * @static - * @param {sdk.auction.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof sdk.auction.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof sdk.auction.v1 - * @interface IQueryParamsResponse - * @property {sdk.auction.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof sdk.auction.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {sdk.auction.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {sdk.auction.v1.IParams|null|undefined} params - * @memberof sdk.auction.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link sdk.auction.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {sdk.auction.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.sdk.auction.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {sdk.auction.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.QueryParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.sdk.auction.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.sdk.auction.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.QueryParamsResponse) - return object; - let message = new $root.sdk.auction.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".sdk.auction.v1.QueryParamsResponse.params: object expected"); - message.params = $root.sdk.auction.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.QueryParamsResponse - * @static - * @param {sdk.auction.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.sdk.auction.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof sdk.auction.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof sdk.auction.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link sdk.auction.v1.Msg#auctionBid}. - * @memberof sdk.auction.v1.Msg - * @typedef AuctionBidCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {sdk.auction.v1.MsgAuctionBidResponse} [response] MsgAuctionBidResponse - */ - - /** - * Calls AuctionBid. - * @function auctionBid - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgAuctionBid} request MsgAuctionBid message or plain object - * @param {sdk.auction.v1.Msg.AuctionBidCallback} callback Node-style callback called with the error, if any, and MsgAuctionBidResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.auctionBid = function auctionBid(request, callback) { - return this.rpcCall(auctionBid, $root.sdk.auction.v1.MsgAuctionBid, $root.sdk.auction.v1.MsgAuctionBidResponse, request, callback); - }, "name", { value: "AuctionBid" }); - - /** - * Calls AuctionBid. - * @function auctionBid - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgAuctionBid} request MsgAuctionBid message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link sdk.auction.v1.Msg#updateParams}. - * @memberof sdk.auction.v1.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {sdk.auction.v1.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {sdk.auction.v1.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.sdk.auction.v1.MsgUpdateParams, $root.sdk.auction.v1.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof sdk.auction.v1.Msg - * @instance - * @param {sdk.auction.v1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgAuctionBid = (function() { - - /** - * Properties of a MsgAuctionBid. - * @memberof sdk.auction.v1 - * @interface IMsgAuctionBid - * @property {string|null} [bidder] MsgAuctionBid bidder - * @property {cosmos.base.v1beta1.ICoin|null} [bid] MsgAuctionBid bid - * @property {Array.|null} [transactions] MsgAuctionBid transactions - */ - - /** - * Constructs a new MsgAuctionBid. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgAuctionBid. - * @implements IMsgAuctionBid - * @constructor - * @param {sdk.auction.v1.IMsgAuctionBid=} [properties] Properties to set - */ - function MsgAuctionBid(properties) { - this.transactions = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgAuctionBid bidder. - * @member {string} bidder - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - */ - MsgAuctionBid.prototype.bidder = ""; - - /** - * MsgAuctionBid bid. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} bid - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - */ - MsgAuctionBid.prototype.bid = null; - - /** - * MsgAuctionBid transactions. - * @member {Array.} transactions - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - */ - MsgAuctionBid.prototype.transactions = $util.emptyArray; - - /** - * Encodes the specified MsgAuctionBid message. Does not implicitly {@link sdk.auction.v1.MsgAuctionBid.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {sdk.auction.v1.IMsgAuctionBid} message MsgAuctionBid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBid.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bidder != null && Object.hasOwnProperty.call(message, "bidder")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bidder); - if (message.bid != null && Object.hasOwnProperty.call(message, "bid")) - $root.cosmos.base.v1beta1.Coin.encode(message.bid, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transactions != null && message.transactions.length) - for (let i = 0; i < message.transactions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.transactions[i]); - return writer; - }; - - /** - * Encodes the specified MsgAuctionBid message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgAuctionBid.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {sdk.auction.v1.IMsgAuctionBid} message MsgAuctionBid message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBid.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAuctionBid message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgAuctionBid} MsgAuctionBid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBid.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgAuctionBid(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.bidder = reader.string(); - break; - case 2: - message.bid = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.transactions && message.transactions.length)) - message.transactions = []; - message.transactions.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAuctionBid message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgAuctionBid} MsgAuctionBid - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBid.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAuctionBid message. - * @function verify - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAuctionBid.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bidder != null && message.hasOwnProperty("bidder")) - if (!$util.isString(message.bidder)) - return "bidder: string expected"; - if (message.bid != null && message.hasOwnProperty("bid")) { - let error = $root.cosmos.base.v1beta1.Coin.verify(message.bid); - if (error) - return "bid." + error; - } - if (message.transactions != null && message.hasOwnProperty("transactions")) { - if (!Array.isArray(message.transactions)) - return "transactions: array expected"; - for (let i = 0; i < message.transactions.length; ++i) - if (!(message.transactions[i] && typeof message.transactions[i].length === "number" || $util.isString(message.transactions[i]))) - return "transactions: buffer[] expected"; - } - return null; - }; - - /** - * Creates a MsgAuctionBid message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgAuctionBid} MsgAuctionBid - */ - MsgAuctionBid.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgAuctionBid) - return object; - let message = new $root.sdk.auction.v1.MsgAuctionBid(); - if (object.bidder != null) - message.bidder = String(object.bidder); - if (object.bid != null) { - if (typeof object.bid !== "object") - throw TypeError(".sdk.auction.v1.MsgAuctionBid.bid: object expected"); - message.bid = $root.cosmos.base.v1beta1.Coin.fromObject(object.bid); - } - if (object.transactions) { - if (!Array.isArray(object.transactions)) - throw TypeError(".sdk.auction.v1.MsgAuctionBid.transactions: array expected"); - message.transactions = []; - for (let i = 0; i < object.transactions.length; ++i) - if (typeof object.transactions[i] === "string") - $util.base64.decode(object.transactions[i], message.transactions[i] = $util.newBuffer($util.base64.length(object.transactions[i])), 0); - else if (object.transactions[i].length) - message.transactions[i] = object.transactions[i]; - } - return message; - }; - - /** - * Creates a plain object from a MsgAuctionBid message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgAuctionBid - * @static - * @param {sdk.auction.v1.MsgAuctionBid} message MsgAuctionBid - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAuctionBid.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.transactions = []; - if (options.defaults) { - object.bidder = ""; - object.bid = null; - } - if (message.bidder != null && message.hasOwnProperty("bidder")) - object.bidder = message.bidder; - if (message.bid != null && message.hasOwnProperty("bid")) - object.bid = $root.cosmos.base.v1beta1.Coin.toObject(message.bid, options); - if (message.transactions && message.transactions.length) { - object.transactions = []; - for (let j = 0; j < message.transactions.length; ++j) - object.transactions[j] = options.bytes === String ? $util.base64.encode(message.transactions[j], 0, message.transactions[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.transactions[j]) : message.transactions[j]; - } - return object; - }; - - /** - * Converts this MsgAuctionBid to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgAuctionBid - * @instance - * @returns {Object.} JSON object - */ - MsgAuctionBid.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAuctionBid; - })(); - - v1.MsgAuctionBidResponse = (function() { - - /** - * Properties of a MsgAuctionBidResponse. - * @memberof sdk.auction.v1 - * @interface IMsgAuctionBidResponse - */ - - /** - * Constructs a new MsgAuctionBidResponse. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgAuctionBidResponse. - * @implements IMsgAuctionBidResponse - * @constructor - * @param {sdk.auction.v1.IMsgAuctionBidResponse=} [properties] Properties to set - */ - function MsgAuctionBidResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgAuctionBidResponse message. Does not implicitly {@link sdk.auction.v1.MsgAuctionBidResponse.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {sdk.auction.v1.IMsgAuctionBidResponse} message MsgAuctionBidResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBidResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgAuctionBidResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgAuctionBidResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {sdk.auction.v1.IMsgAuctionBidResponse} message MsgAuctionBidResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAuctionBidResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgAuctionBidResponse message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgAuctionBidResponse} MsgAuctionBidResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBidResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgAuctionBidResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgAuctionBidResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgAuctionBidResponse} MsgAuctionBidResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAuctionBidResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAuctionBidResponse message. - * @function verify - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAuctionBidResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgAuctionBidResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgAuctionBidResponse} MsgAuctionBidResponse - */ - MsgAuctionBidResponse.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgAuctionBidResponse) - return object; - return new $root.sdk.auction.v1.MsgAuctionBidResponse(); - }; - - /** - * Creates a plain object from a MsgAuctionBidResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @static - * @param {sdk.auction.v1.MsgAuctionBidResponse} message MsgAuctionBidResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAuctionBidResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgAuctionBidResponse to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgAuctionBidResponse - * @instance - * @returns {Object.} JSON object - */ - MsgAuctionBidResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgAuctionBidResponse; - })(); - - v1.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof sdk.auction.v1 - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {sdk.auction.v1.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {sdk.auction.v1.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof sdk.auction.v1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {sdk.auction.v1.IParams|null|undefined} params - * @memberof sdk.auction.v1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link sdk.auction.v1.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {sdk.auction.v1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.sdk.auction.v1.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {sdk.auction.v1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgUpdateParams(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.sdk.auction.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - let error = $root.sdk.auction.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgUpdateParams) - return object; - let message = new $root.sdk.auction.v1.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".sdk.auction.v1.MsgUpdateParams.params: object expected"); - message.params = $root.sdk.auction.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgUpdateParams - * @static - * @param {sdk.auction.v1.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.sdk.auction.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - v1.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof sdk.auction.v1 - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof sdk.auction.v1 - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {sdk.auction.v1.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link sdk.auction.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {sdk.auction.v1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link sdk.auction.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {sdk.auction.v1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.auction.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.auction.v1.MsgUpdateParamsResponse(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.auction.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {sdk.auction.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.auction.v1.MsgUpdateParamsResponse) - return object; - return new $root.sdk.auction.v1.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @static - * @param {sdk.auction.v1.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof sdk.auction.v1.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - return v1; - })(); - - return auction; - })(); - - sdk.proposals = (function() { - - /** - * Namespace proposals. - * @memberof sdk - * @namespace - */ - const proposals = {}; - - proposals.v1 = (function() { - - /** - * Namespace v1. - * @memberof sdk.proposals - * @namespace - */ - const v1 = {}; - - v1.ProposalInfo = (function() { - - /** - * Properties of a ProposalInfo. - * @memberof sdk.proposals.v1 - * @interface IProposalInfo - * @property {Object.|null} [txs_by_lane] ProposalInfo txs_by_lane - * @property {Long|null} [max_block_size] ProposalInfo max_block_size - * @property {Long|null} [max_gas_limit] ProposalInfo max_gas_limit - * @property {Long|null} [block_size] ProposalInfo block_size - * @property {Long|null} [gas_limit] ProposalInfo gas_limit - */ - - /** - * Constructs a new ProposalInfo. - * @memberof sdk.proposals.v1 - * @classdesc Represents a ProposalInfo. - * @implements IProposalInfo - * @constructor - * @param {sdk.proposals.v1.IProposalInfo=} [properties] Properties to set - */ - function ProposalInfo(properties) { - this.txs_by_lane = {}; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ProposalInfo txs_by_lane. - * @member {Object.} txs_by_lane - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.txs_by_lane = $util.emptyObject; - - /** - * ProposalInfo max_block_size. - * @member {Long} max_block_size - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.max_block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ProposalInfo max_gas_limit. - * @member {Long} max_gas_limit - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.max_gas_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ProposalInfo block_size. - * @member {Long} block_size - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ProposalInfo gas_limit. - * @member {Long} gas_limit - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - */ - ProposalInfo.prototype.gas_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ProposalInfo message. Does not implicitly {@link sdk.proposals.v1.ProposalInfo.verify|verify} messages. - * @function encode - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {sdk.proposals.v1.IProposalInfo} message ProposalInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProposalInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.txs_by_lane != null && Object.hasOwnProperty.call(message, "txs_by_lane")) - for (let keys = Object.keys(message.txs_by_lane), i = 0; i < keys.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).uint64(message.txs_by_lane[keys[i]]).ldelim(); - if (message.max_block_size != null && Object.hasOwnProperty.call(message, "max_block_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max_block_size); - if (message.max_gas_limit != null && Object.hasOwnProperty.call(message, "max_gas_limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.max_gas_limit); - if (message.block_size != null && Object.hasOwnProperty.call(message, "block_size")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.block_size); - if (message.gas_limit != null && Object.hasOwnProperty.call(message, "gas_limit")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.gas_limit); - return writer; - }; - - /** - * Encodes the specified ProposalInfo message, length delimited. Does not implicitly {@link sdk.proposals.v1.ProposalInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {sdk.proposals.v1.IProposalInfo} message ProposalInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProposalInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProposalInfo message from the specified reader or buffer. - * @function decode - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {sdk.proposals.v1.ProposalInfo} ProposalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProposalInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.sdk.proposals.v1.ProposalInfo(), key, value; - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (message.txs_by_lane === $util.emptyObject) - message.txs_by_lane = {}; - let end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - let tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.uint64(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.txs_by_lane[key] = value; - break; - case 2: - message.max_block_size = reader.int64(); - break; - case 3: - message.max_gas_limit = reader.uint64(); - break; - case 4: - message.block_size = reader.int64(); - break; - case 5: - message.gas_limit = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProposalInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {sdk.proposals.v1.ProposalInfo} ProposalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProposalInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProposalInfo message. - * @function verify - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProposalInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.txs_by_lane != null && message.hasOwnProperty("txs_by_lane")) { - if (!$util.isObject(message.txs_by_lane)) - return "txs_by_lane: object expected"; - let key = Object.keys(message.txs_by_lane); - for (let i = 0; i < key.length; ++i) - if (!$util.isInteger(message.txs_by_lane[key[i]]) && !(message.txs_by_lane[key[i]] && $util.isInteger(message.txs_by_lane[key[i]].low) && $util.isInteger(message.txs_by_lane[key[i]].high))) - return "txs_by_lane: integer|Long{k:string} expected"; - } - if (message.max_block_size != null && message.hasOwnProperty("max_block_size")) - if (!$util.isInteger(message.max_block_size) && !(message.max_block_size && $util.isInteger(message.max_block_size.low) && $util.isInteger(message.max_block_size.high))) - return "max_block_size: integer|Long expected"; - if (message.max_gas_limit != null && message.hasOwnProperty("max_gas_limit")) - if (!$util.isInteger(message.max_gas_limit) && !(message.max_gas_limit && $util.isInteger(message.max_gas_limit.low) && $util.isInteger(message.max_gas_limit.high))) - return "max_gas_limit: integer|Long expected"; - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (!$util.isInteger(message.block_size) && !(message.block_size && $util.isInteger(message.block_size.low) && $util.isInteger(message.block_size.high))) - return "block_size: integer|Long expected"; - if (message.gas_limit != null && message.hasOwnProperty("gas_limit")) - if (!$util.isInteger(message.gas_limit) && !(message.gas_limit && $util.isInteger(message.gas_limit.low) && $util.isInteger(message.gas_limit.high))) - return "gas_limit: integer|Long expected"; - return null; - }; - - /** - * Creates a ProposalInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {Object.} object Plain object - * @returns {sdk.proposals.v1.ProposalInfo} ProposalInfo - */ - ProposalInfo.fromObject = function fromObject(object) { - if (object instanceof $root.sdk.proposals.v1.ProposalInfo) - return object; - let message = new $root.sdk.proposals.v1.ProposalInfo(); - if (object.txs_by_lane) { - if (typeof object.txs_by_lane !== "object") - throw TypeError(".sdk.proposals.v1.ProposalInfo.txs_by_lane: object expected"); - message.txs_by_lane = {}; - for (let keys = Object.keys(object.txs_by_lane), i = 0; i < keys.length; ++i) - if ($util.Long) - (message.txs_by_lane[keys[i]] = $util.Long.fromValue(object.txs_by_lane[keys[i]])).unsigned = true; - else if (typeof object.txs_by_lane[keys[i]] === "string") - message.txs_by_lane[keys[i]] = parseInt(object.txs_by_lane[keys[i]], 10); - else if (typeof object.txs_by_lane[keys[i]] === "number") - message.txs_by_lane[keys[i]] = object.txs_by_lane[keys[i]]; - else if (typeof object.txs_by_lane[keys[i]] === "object") - message.txs_by_lane[keys[i]] = new $util.LongBits(object.txs_by_lane[keys[i]].low >>> 0, object.txs_by_lane[keys[i]].high >>> 0).toNumber(true); - } - if (object.max_block_size != null) - if ($util.Long) - (message.max_block_size = $util.Long.fromValue(object.max_block_size)).unsigned = false; - else if (typeof object.max_block_size === "string") - message.max_block_size = parseInt(object.max_block_size, 10); - else if (typeof object.max_block_size === "number") - message.max_block_size = object.max_block_size; - else if (typeof object.max_block_size === "object") - message.max_block_size = new $util.LongBits(object.max_block_size.low >>> 0, object.max_block_size.high >>> 0).toNumber(); - if (object.max_gas_limit != null) - if ($util.Long) - (message.max_gas_limit = $util.Long.fromValue(object.max_gas_limit)).unsigned = true; - else if (typeof object.max_gas_limit === "string") - message.max_gas_limit = parseInt(object.max_gas_limit, 10); - else if (typeof object.max_gas_limit === "number") - message.max_gas_limit = object.max_gas_limit; - else if (typeof object.max_gas_limit === "object") - message.max_gas_limit = new $util.LongBits(object.max_gas_limit.low >>> 0, object.max_gas_limit.high >>> 0).toNumber(true); - if (object.block_size != null) - if ($util.Long) - (message.block_size = $util.Long.fromValue(object.block_size)).unsigned = false; - else if (typeof object.block_size === "string") - message.block_size = parseInt(object.block_size, 10); - else if (typeof object.block_size === "number") - message.block_size = object.block_size; - else if (typeof object.block_size === "object") - message.block_size = new $util.LongBits(object.block_size.low >>> 0, object.block_size.high >>> 0).toNumber(); - if (object.gas_limit != null) - if ($util.Long) - (message.gas_limit = $util.Long.fromValue(object.gas_limit)).unsigned = true; - else if (typeof object.gas_limit === "string") - message.gas_limit = parseInt(object.gas_limit, 10); - else if (typeof object.gas_limit === "number") - message.gas_limit = object.gas_limit; - else if (typeof object.gas_limit === "object") - message.gas_limit = new $util.LongBits(object.gas_limit.low >>> 0, object.gas_limit.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ProposalInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof sdk.proposals.v1.ProposalInfo - * @static - * @param {sdk.proposals.v1.ProposalInfo} message ProposalInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProposalInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.objects || options.defaults) - object.txs_by_lane = {}; - if (options.defaults) { - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.max_block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_block_size = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.max_gas_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_gas_limit = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_size = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.gas_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gas_limit = options.longs === String ? "0" : 0; - } - let keys2; - if (message.txs_by_lane && (keys2 = Object.keys(message.txs_by_lane)).length) { - object.txs_by_lane = {}; - for (let j = 0; j < keys2.length; ++j) - if (typeof message.txs_by_lane[keys2[j]] === "number") - object.txs_by_lane[keys2[j]] = options.longs === String ? String(message.txs_by_lane[keys2[j]]) : message.txs_by_lane[keys2[j]]; - else - object.txs_by_lane[keys2[j]] = options.longs === String ? $util.Long.prototype.toString.call(message.txs_by_lane[keys2[j]]) : options.longs === Number ? new $util.LongBits(message.txs_by_lane[keys2[j]].low >>> 0, message.txs_by_lane[keys2[j]].high >>> 0).toNumber(true) : message.txs_by_lane[keys2[j]]; - } - if (message.max_block_size != null && message.hasOwnProperty("max_block_size")) - if (typeof message.max_block_size === "number") - object.max_block_size = options.longs === String ? String(message.max_block_size) : message.max_block_size; - else - object.max_block_size = options.longs === String ? $util.Long.prototype.toString.call(message.max_block_size) : options.longs === Number ? new $util.LongBits(message.max_block_size.low >>> 0, message.max_block_size.high >>> 0).toNumber() : message.max_block_size; - if (message.max_gas_limit != null && message.hasOwnProperty("max_gas_limit")) - if (typeof message.max_gas_limit === "number") - object.max_gas_limit = options.longs === String ? String(message.max_gas_limit) : message.max_gas_limit; - else - object.max_gas_limit = options.longs === String ? $util.Long.prototype.toString.call(message.max_gas_limit) : options.longs === Number ? new $util.LongBits(message.max_gas_limit.low >>> 0, message.max_gas_limit.high >>> 0).toNumber(true) : message.max_gas_limit; - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (typeof message.block_size === "number") - object.block_size = options.longs === String ? String(message.block_size) : message.block_size; - else - object.block_size = options.longs === String ? $util.Long.prototype.toString.call(message.block_size) : options.longs === Number ? new $util.LongBits(message.block_size.low >>> 0, message.block_size.high >>> 0).toNumber() : message.block_size; - if (message.gas_limit != null && message.hasOwnProperty("gas_limit")) - if (typeof message.gas_limit === "number") - object.gas_limit = options.longs === String ? String(message.gas_limit) : message.gas_limit; - else - object.gas_limit = options.longs === String ? $util.Long.prototype.toString.call(message.gas_limit) : options.longs === Number ? new $util.LongBits(message.gas_limit.low >>> 0, message.gas_limit.high >>> 0).toNumber(true) : message.gas_limit; - return object; - }; - - /** - * Converts this ProposalInfo to JSON. - * @function toJSON - * @memberof sdk.proposals.v1.ProposalInfo - * @instance - * @returns {Object.} JSON object - */ - ProposalInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProposalInfo; - })(); - - return v1; - })(); - - return proposals; - })(); - - return sdk; -})(); - -export const gogoproto = $root.gogoproto = (() => { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - const gogoproto = {}; - - return gogoproto; -})(); - -export const google = $root.google = (() => { - - /** - * Namespace google. - * @exports google - * @namespace - */ - const google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - const protobuf = {}; - - 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.file.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (let 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - this.service = []; - this.extension = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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 (let i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.message_type != null && message.message_type.length) - for (let i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (let i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (let 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 (let 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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (let i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (let i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - let 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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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 (let i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (let i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (let i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (let i = 0; i < message.message_type.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (let i = 0; i < message.enum_type.length; ++i) { - let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (let i = 0; i < message.service.length; ++i) { - let 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 (let i = 0; i < message.extension.length; ++i) { - let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.source_code_info != null && message.hasOwnProperty("source_code_info")) { - let error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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; - let 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 (let i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (let i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (let i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (let i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (let i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (let 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 (let 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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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 (let j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.message_type && message.message_type.length) { - object.message_type = []; - for (let j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (let j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (let 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 (let 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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (let j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (let j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_name = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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 (let 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.nested_type != null && message.nested_type.length) - for (let i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (let i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (let i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (let 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.oneof_decl != null && message.oneof_decl.length) - for (let i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (let i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (let i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - let 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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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 (let i = 0; i < message.field.length; ++i) { - let 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 (let i = 0; i < message.extension.length; ++i) { - let error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (let i = 0; i < message.nested_type.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (let i = 0; i < message.enum_type.length; ++i) { - let error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (let i = 0; i < message.extension_range.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (let i = 0; i < message.oneof_decl.length; ++i) { - let error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (let i = 0; i < message.reserved_range.length; ++i) { - let error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (let i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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; - let 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 (let 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 (let 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (let i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (let i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (let i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (let i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (let i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (let i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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 (let j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nested_type && message.nested_type.length) { - object.nested_type = []; - for (let j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (let j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (let j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (let 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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (let j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (let j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (let j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - let 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; - let 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 = {}; - let 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 (let 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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - let 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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 = {}; - let 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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() { - const 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() { - const 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - let 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")) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.value.length; ++i) { - let error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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 (let 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 = {}; - let 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 (let 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 (let 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; - - /** - * 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - let 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")) { - let 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; - let 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 = {}; - let 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.method.length; ++i) { - let error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - let 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; - let 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 (let 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 = {}; - let 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 (let 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 (let 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - let error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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; - let message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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 = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileOptions java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (let i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (let i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (let i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - let error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (let i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - let error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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; - let message = new $root.google.protobuf.FileOptions(); - if (object.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (let i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (let i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (let j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (let j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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() { - const 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (let i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (let i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] 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; - let message = new $root.google.protobuf.MessageOptions(); - if (object.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (let i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (let j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - let 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: 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; - let 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - 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() { - const 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() { - const 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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; - let message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumOptions allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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; - let message = new $root.google.protobuf.EnumOptions(); - if (object.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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; - let message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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; - let message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (let i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (let i = 0; i < message.uninterpreted_option.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - let error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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; - let message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (let i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (let j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 (let 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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 (let 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - let 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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 (let i = 0; i < message.name.length; ++i) { - let error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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; - let 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 (let 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifier_value = ""; - if ($util.Long) { - let long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - let long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (let j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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; - let message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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 = {}; - let object = {}; - if (options.defaults) { - object.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.location.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (let 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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 (let 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 (let i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (let i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let 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) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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 (let 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 (let i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (let i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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; - let 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 (let 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 (let i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (let i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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 = {}; - let object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (let j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (let j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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 (let 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; - - /** - * 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 (let 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - let 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 (let i = 0; i < message.annotation.length; ++i) { - let 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; - let 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 (let 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (let 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} [source_file] Annotation source_file - * @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 (let 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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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 (let i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.source_file = 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 (let i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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; - let 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 (let i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.source_file != null) - message.source_file = String(object.source_file); - 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 = {}; - let object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.source_file = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (let j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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; - })(); - - return protobuf; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - const api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (let i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (let i = 0; i < message.rules.length; ++i) { - let error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - let message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (let i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (let j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - let $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (let i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - let properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - let error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (let i = 0; i < message.additional_bindings.length; ++i) { - let error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - let message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (let i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (let j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - let message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; -})(); - -export const cosmos = $root.cosmos = (() => { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - const cosmos = {}; - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - const base = {}; - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - const v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.ICoin=} [properties] Properties to set - */ - function Coin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Coin denom. - * @member {string} denom - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.Coin(); - while (reader.pos < end) { - let 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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.Coin} message Coin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Coin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.IDecCoin=} [properties] Properties to set - */ - function DecCoin(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DecCoin denom. - * @member {string} denom - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecCoin(); - while (reader.pos < end) { - let 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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.DecCoin} message DecCoin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecCoin.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.IIntProto=} [properties] Properties to set - */ - function IntProto(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IntProto int. - * @member {string} int - * @memberof cosmos.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.IntProto(); - while (reader.pos < end) { - let 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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.IntProto} message IntProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.IDecProto=} [properties] Properties to set - */ - function DecProto(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DecProto dec. - * @member {string} dec - * @memberof cosmos.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.v1beta1.DecProto(); - while (reader.pos < end) { - let 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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - let message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.DecProto} message DecProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - let 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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - return base; - })(); - - return cosmos; -})(); - -export const cosmos_proto = $root.cosmos_proto = (() => { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - const cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - let message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - * @property {string|null} [legacy_amino_encoding] ScalarDescriptor legacy_amino_encoding - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * ScalarDescriptor legacy_amino_encoding. - * @member {string} legacy_amino_encoding - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.legacy_amino_encoding = ""; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (let i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - if (message.legacy_amino_encoding != null && Object.hasOwnProperty.call(message, "legacy_amino_encoding")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.legacy_amino_encoding); - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - let end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - let tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - let end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - case 4: - message.legacy_amino_encoding = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (let i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - if (!$util.isString(message.legacy_amino_encoding)) - return "legacy_amino_encoding: string expected"; - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - let message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (let i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - if (object.legacy_amino_encoding != null) - message.legacy_amino_encoding = String(object.legacy_amino_encoding); - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - let object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.legacy_amino_encoding = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (let j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - object.legacy_amino_encoding = message.legacy_amino_encoding; - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - const valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; -})(); - -export { $root as default }; diff --git a/src/generated/proto.cjs b/src/generated/proto.cjs deleted file mode 100644 index 435bea05..00000000 --- a/src/generated/proto.cjs +++ /dev/null @@ -1,66216 +0,0 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("protobufjs/minimal")); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots["@neutron-org/neutron"] || ($protobuf.roots["@neutron-org/neutron"] = {}); - - $root.neutron = (function() { - - /** - * Namespace neutron. - * @exports neutron - * @namespace - */ - var neutron = {}; - - neutron.contractmanager = (function() { - - /** - * Namespace contractmanager. - * @memberof neutron - * @namespace - */ - var contractmanager = {}; - - contractmanager.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.contractmanager - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.contractmanager.Msg#updateParams}. - * @memberof neutron.contractmanager.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.contractmanager.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.contractmanager.Msg - * @instance - * @param {neutron.contractmanager.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {neutron.contractmanager.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.neutron.contractmanager.MsgUpdateParams, $root.neutron.contractmanager.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.contractmanager.Msg - * @instance - * @param {neutron.contractmanager.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - contractmanager.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof neutron.contractmanager - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {neutron.contractmanager.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof neutron.contractmanager - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {neutron.contractmanager.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof neutron.contractmanager.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {neutron.contractmanager.IParams|null|undefined} params - * @memberof neutron.contractmanager.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.contractmanager.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {neutron.contractmanager.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.contractmanager.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.contractmanager.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {neutron.contractmanager.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.neutron.contractmanager.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.contractmanager.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.MsgUpdateParams) - return object; - var message = new $root.neutron.contractmanager.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.contractmanager.MsgUpdateParams.params: object expected"); - message.params = $root.neutron.contractmanager.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.MsgUpdateParams - * @static - * @param {neutron.contractmanager.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.contractmanager.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof neutron.contractmanager.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - contractmanager.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof neutron.contractmanager - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof neutron.contractmanager - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {neutron.contractmanager.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.contractmanager.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {neutron.contractmanager.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.contractmanager.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {neutron.contractmanager.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.MsgUpdateParamsResponse) - return object; - return new $root.neutron.contractmanager.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @static - * @param {neutron.contractmanager.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof neutron.contractmanager.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - contractmanager.Params = (function() { - - /** - * Properties of a Params. - * @memberof neutron.contractmanager - * @interface IParams - */ - - /** - * Constructs a new Params. - * @memberof neutron.contractmanager - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {neutron.contractmanager.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]]; - } - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.contractmanager.Params.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.Params - * @static - * @param {neutron.contractmanager.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(); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.contractmanager.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.Params - * @static - * @param {neutron.contractmanager.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 neutron.contractmanager.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.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.neutron.contractmanager.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.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 neutron.contractmanager.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"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.Params - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.Params) - return object; - return new $root.neutron.contractmanager.Params(); - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.Params - * @static - * @param {neutron.contractmanager.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof neutron.contractmanager.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - contractmanager.Failure = (function() { - - /** - * Properties of a Failure. - * @memberof neutron.contractmanager - * @interface IFailure - * @property {string|null} [address] Failure address - * @property {Long|null} [id] Failure id - * @property {string|null} [ack_type] Failure ack_type - * @property {ibc.core.channel.v1.IPacket|null} [packet] Failure packet - * @property {ibc.core.channel.v1.IAcknowledgement|null} [ack] Failure ack - */ - - /** - * Constructs a new Failure. - * @memberof neutron.contractmanager - * @classdesc Represents a Failure. - * @implements IFailure - * @constructor - * @param {neutron.contractmanager.IFailure=} [properties] Properties to set - */ - function Failure(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Failure address. - * @member {string} address - * @memberof neutron.contractmanager.Failure - * @instance - */ - Failure.prototype.address = ""; - - /** - * Failure id. - * @member {Long} id - * @memberof neutron.contractmanager.Failure - * @instance - */ - Failure.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Failure ack_type. - * @member {string} ack_type - * @memberof neutron.contractmanager.Failure - * @instance - */ - Failure.prototype.ack_type = ""; - - /** - * Failure packet. - * @member {ibc.core.channel.v1.IPacket|null|undefined} packet - * @memberof neutron.contractmanager.Failure - * @instance - */ - Failure.prototype.packet = null; - - /** - * Failure ack. - * @member {ibc.core.channel.v1.IAcknowledgement|null|undefined} ack - * @memberof neutron.contractmanager.Failure - * @instance - */ - Failure.prototype.ack = null; - - /** - * Encodes the specified Failure message. Does not implicitly {@link neutron.contractmanager.Failure.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.Failure - * @static - * @param {neutron.contractmanager.IFailure} message Failure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Failure.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.id); - if (message.ack_type != null && Object.hasOwnProperty.call(message, "ack_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.ack_type); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.ibc.core.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.ack != null && Object.hasOwnProperty.call(message, "ack")) - $root.ibc.core.channel.v1.Acknowledgement.encode(message.ack, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link neutron.contractmanager.Failure.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.Failure - * @static - * @param {neutron.contractmanager.IFailure} message Failure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Failure.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.Failure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.Failure} Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Failure.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.Failure(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.id = reader.uint64(); - break; - case 3: - message.ack_type = reader.string(); - break; - case 4: - message.packet = $root.ibc.core.channel.v1.Packet.decode(reader, reader.uint32()); - break; - case 5: - message.ack = $root.ibc.core.channel.v1.Acknowledgement.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.Failure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.Failure} Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Failure.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Failure message. - * @function verify - * @memberof neutron.contractmanager.Failure - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Failure.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.ack_type != null && message.hasOwnProperty("ack_type")) - if (!$util.isString(message.ack_type)) - return "ack_type: string expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - var error = $root.ibc.core.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.ack != null && message.hasOwnProperty("ack")) { - var error = $root.ibc.core.channel.v1.Acknowledgement.verify(message.ack); - if (error) - return "ack." + error; - } - return null; - }; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.Failure - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.Failure} Failure - */ - Failure.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.Failure) - return object; - var message = new $root.neutron.contractmanager.Failure(); - if (object.address != null) - message.address = String(object.address); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - if (object.ack_type != null) - message.ack_type = String(object.ack_type); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".neutron.contractmanager.Failure.packet: object expected"); - message.packet = $root.ibc.core.channel.v1.Packet.fromObject(object.packet); - } - if (object.ack != null) { - if (typeof object.ack !== "object") - throw TypeError(".neutron.contractmanager.Failure.ack: object expected"); - message.ack = $root.ibc.core.channel.v1.Acknowledgement.fromObject(object.ack); - } - return message; - }; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.Failure - * @static - * @param {neutron.contractmanager.Failure} message Failure - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Failure.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.address = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.ack_type = ""; - object.packet = null; - object.ack = null; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - if (message.ack_type != null && message.hasOwnProperty("ack_type")) - object.ack_type = message.ack_type; - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.ibc.core.channel.v1.Packet.toObject(message.packet, options); - if (message.ack != null && message.hasOwnProperty("ack")) - object.ack = $root.ibc.core.channel.v1.Acknowledgement.toObject(message.ack, options); - return object; - }; - - /** - * Converts this Failure to JSON. - * @function toJSON - * @memberof neutron.contractmanager.Failure - * @instance - * @returns {Object.} JSON object - */ - Failure.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Failure; - })(); - - contractmanager.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.contractmanager - * @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; - - /** - * Callback as used by {@link neutron.contractmanager.Query#params}. - * @memberof neutron.contractmanager.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.contractmanager.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.contractmanager.Query - * @instance - * @param {neutron.contractmanager.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.contractmanager.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.neutron.contractmanager.QueryParamsRequest, $root.neutron.contractmanager.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.contractmanager.Query - * @instance - * @param {neutron.contractmanager.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.contractmanager.Query#addressFailures}. - * @memberof neutron.contractmanager.Query - * @typedef AddressFailuresCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.contractmanager.QueryFailuresResponse} [response] QueryFailuresResponse - */ - - /** - * Calls AddressFailures. - * @function addressFailures - * @memberof neutron.contractmanager.Query - * @instance - * @param {neutron.contractmanager.IQueryFailuresRequest} request QueryFailuresRequest message or plain object - * @param {neutron.contractmanager.Query.AddressFailuresCallback} callback Node-style callback called with the error, if any, and QueryFailuresResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.addressFailures = function addressFailures(request, callback) { - return this.rpcCall(addressFailures, $root.neutron.contractmanager.QueryFailuresRequest, $root.neutron.contractmanager.QueryFailuresResponse, request, callback); - }, "name", { value: "AddressFailures" }); - - /** - * Calls AddressFailures. - * @function addressFailures - * @memberof neutron.contractmanager.Query - * @instance - * @param {neutron.contractmanager.IQueryFailuresRequest} request QueryFailuresRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.contractmanager.Query#failures}. - * @memberof neutron.contractmanager.Query - * @typedef FailuresCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.contractmanager.QueryFailuresResponse} [response] QueryFailuresResponse - */ - - /** - * Calls Failures. - * @function failures - * @memberof neutron.contractmanager.Query - * @instance - * @param {neutron.contractmanager.IQueryFailuresRequest} request QueryFailuresRequest message or plain object - * @param {neutron.contractmanager.Query.FailuresCallback} callback Node-style callback called with the error, if any, and QueryFailuresResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.failures = function failures(request, callback) { - return this.rpcCall(failures, $root.neutron.contractmanager.QueryFailuresRequest, $root.neutron.contractmanager.QueryFailuresResponse, request, callback); - }, "name", { value: "Failures" }); - - /** - * Calls Failures. - * @function failures - * @memberof neutron.contractmanager.Query - * @instance - * @param {neutron.contractmanager.IQueryFailuresRequest} request QueryFailuresRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - contractmanager.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof neutron.contractmanager - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof neutron.contractmanager - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {neutron.contractmanager.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.contractmanager.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {neutron.contractmanager.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {neutron.contractmanager.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.QueryParamsRequest) - return object; - return new $root.neutron.contractmanager.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.QueryParamsRequest - * @static - * @param {neutron.contractmanager.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof neutron.contractmanager.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - contractmanager.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof neutron.contractmanager - * @interface IQueryParamsResponse - * @property {neutron.contractmanager.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof neutron.contractmanager - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {neutron.contractmanager.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {neutron.contractmanager.IParams|null|undefined} params - * @memberof neutron.contractmanager.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.contractmanager.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {neutron.contractmanager.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.contractmanager.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {neutron.contractmanager.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.contractmanager.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.contractmanager.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.QueryParamsResponse) - return object; - var message = new $root.neutron.contractmanager.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.contractmanager.QueryParamsResponse.params: object expected"); - message.params = $root.neutron.contractmanager.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.QueryParamsResponse - * @static - * @param {neutron.contractmanager.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.contractmanager.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof neutron.contractmanager.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - contractmanager.QueryFailuresRequest = (function() { - - /** - * Properties of a QueryFailuresRequest. - * @memberof neutron.contractmanager - * @interface IQueryFailuresRequest - * @property {string|null} [address] QueryFailuresRequest address - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryFailuresRequest pagination - */ - - /** - * Constructs a new QueryFailuresRequest. - * @memberof neutron.contractmanager - * @classdesc Represents a QueryFailuresRequest. - * @implements IQueryFailuresRequest - * @constructor - * @param {neutron.contractmanager.IQueryFailuresRequest=} [properties] Properties to set - */ - function QueryFailuresRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFailuresRequest address. - * @member {string} address - * @memberof neutron.contractmanager.QueryFailuresRequest - * @instance - */ - QueryFailuresRequest.prototype.address = ""; - - /** - * QueryFailuresRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof neutron.contractmanager.QueryFailuresRequest - * @instance - */ - QueryFailuresRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryFailuresRequest message. Does not implicitly {@link neutron.contractmanager.QueryFailuresRequest.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {neutron.contractmanager.IQueryFailuresRequest} message QueryFailuresRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFailuresRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryFailuresRequest message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryFailuresRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {neutron.contractmanager.IQueryFailuresRequest} message QueryFailuresRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFailuresRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFailuresRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.QueryFailuresRequest} QueryFailuresRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFailuresRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.QueryFailuresRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFailuresRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.QueryFailuresRequest} QueryFailuresRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFailuresRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFailuresRequest message. - * @function verify - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFailuresRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryFailuresRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.QueryFailuresRequest} QueryFailuresRequest - */ - QueryFailuresRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.QueryFailuresRequest) - return object; - var message = new $root.neutron.contractmanager.QueryFailuresRequest(); - if (object.address != null) - message.address = String(object.address); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".neutron.contractmanager.QueryFailuresRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryFailuresRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.QueryFailuresRequest - * @static - * @param {neutron.contractmanager.QueryFailuresRequest} message QueryFailuresRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFailuresRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.address = ""; - object.pagination = null; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryFailuresRequest to JSON. - * @function toJSON - * @memberof neutron.contractmanager.QueryFailuresRequest - * @instance - * @returns {Object.} JSON object - */ - QueryFailuresRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFailuresRequest; - })(); - - contractmanager.QueryFailuresResponse = (function() { - - /** - * Properties of a QueryFailuresResponse. - * @memberof neutron.contractmanager - * @interface IQueryFailuresResponse - * @property {Array.|null} [failures] QueryFailuresResponse failures - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryFailuresResponse pagination - */ - - /** - * Constructs a new QueryFailuresResponse. - * @memberof neutron.contractmanager - * @classdesc Represents a QueryFailuresResponse. - * @implements IQueryFailuresResponse - * @constructor - * @param {neutron.contractmanager.IQueryFailuresResponse=} [properties] Properties to set - */ - function QueryFailuresResponse(properties) { - this.failures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryFailuresResponse failures. - * @member {Array.} failures - * @memberof neutron.contractmanager.QueryFailuresResponse - * @instance - */ - QueryFailuresResponse.prototype.failures = $util.emptyArray; - - /** - * QueryFailuresResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof neutron.contractmanager.QueryFailuresResponse - * @instance - */ - QueryFailuresResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryFailuresResponse message. Does not implicitly {@link neutron.contractmanager.QueryFailuresResponse.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {neutron.contractmanager.IQueryFailuresResponse} message QueryFailuresResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFailuresResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.failures != null && message.failures.length) - for (var i = 0; i < message.failures.length; ++i) - $root.neutron.contractmanager.Failure.encode(message.failures[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryFailuresResponse message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryFailuresResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {neutron.contractmanager.IQueryFailuresResponse} message QueryFailuresResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryFailuresResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryFailuresResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.QueryFailuresResponse} QueryFailuresResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFailuresResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.QueryFailuresResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.failures && message.failures.length)) - message.failures = []; - message.failures.push($root.neutron.contractmanager.Failure.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryFailuresResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.QueryFailuresResponse} QueryFailuresResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryFailuresResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryFailuresResponse message. - * @function verify - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryFailuresResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.failures != null && message.hasOwnProperty("failures")) { - if (!Array.isArray(message.failures)) - return "failures: array expected"; - for (var i = 0; i < message.failures.length; ++i) { - var error = $root.neutron.contractmanager.Failure.verify(message.failures[i]); - if (error) - return "failures." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryFailuresResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.QueryFailuresResponse} QueryFailuresResponse - */ - QueryFailuresResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.QueryFailuresResponse) - return object; - var message = new $root.neutron.contractmanager.QueryFailuresResponse(); - if (object.failures) { - if (!Array.isArray(object.failures)) - throw TypeError(".neutron.contractmanager.QueryFailuresResponse.failures: array expected"); - message.failures = []; - for (var i = 0; i < object.failures.length; ++i) { - if (typeof object.failures[i] !== "object") - throw TypeError(".neutron.contractmanager.QueryFailuresResponse.failures: object expected"); - message.failures[i] = $root.neutron.contractmanager.Failure.fromObject(object.failures[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".neutron.contractmanager.QueryFailuresResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryFailuresResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.QueryFailuresResponse - * @static - * @param {neutron.contractmanager.QueryFailuresResponse} message QueryFailuresResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryFailuresResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.failures = []; - if (options.defaults) - object.pagination = null; - if (message.failures && message.failures.length) { - object.failures = []; - for (var j = 0; j < message.failures.length; ++j) - object.failures[j] = $root.neutron.contractmanager.Failure.toObject(message.failures[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryFailuresResponse to JSON. - * @function toJSON - * @memberof neutron.contractmanager.QueryFailuresResponse - * @instance - * @returns {Object.} JSON object - */ - QueryFailuresResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryFailuresResponse; - })(); - - contractmanager.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof neutron.contractmanager - * @interface IGenesisState - * @property {neutron.contractmanager.IParams|null} [params] GenesisState params - * @property {Array.|null} [failures_list] GenesisState failures_list - */ - - /** - * Constructs a new GenesisState. - * @memberof neutron.contractmanager - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {neutron.contractmanager.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.failures_list = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {neutron.contractmanager.IParams|null|undefined} params - * @memberof neutron.contractmanager.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState failures_list. - * @member {Array.} failures_list - * @memberof neutron.contractmanager.GenesisState - * @instance - */ - GenesisState.prototype.failures_list = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.contractmanager.GenesisState.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {neutron.contractmanager.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.contractmanager.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.failures_list != null && message.failures_list.length) - for (var i = 0; i < message.failures_list.length; ++i) - $root.neutron.contractmanager.Failure.encode(message.failures_list[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.contractmanager.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {neutron.contractmanager.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.contractmanager.Params.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.failures_list && message.failures_list.length)) - message.failures_list = []; - message.failures_list.push($root.neutron.contractmanager.Failure.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.contractmanager.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.failures_list != null && message.hasOwnProperty("failures_list")) { - if (!Array.isArray(message.failures_list)) - return "failures_list: array expected"; - for (var i = 0; i < message.failures_list.length; ++i) { - var error = $root.neutron.contractmanager.Failure.verify(message.failures_list[i]); - if (error) - return "failures_list." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.GenesisState) - return object; - var message = new $root.neutron.contractmanager.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.contractmanager.GenesisState.params: object expected"); - message.params = $root.neutron.contractmanager.Params.fromObject(object.params); - } - if (object.failures_list) { - if (!Array.isArray(object.failures_list)) - throw TypeError(".neutron.contractmanager.GenesisState.failures_list: array expected"); - message.failures_list = []; - for (var i = 0; i < object.failures_list.length; ++i) { - if (typeof object.failures_list[i] !== "object") - throw TypeError(".neutron.contractmanager.GenesisState.failures_list: object expected"); - message.failures_list[i] = $root.neutron.contractmanager.Failure.fromObject(object.failures_list[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.GenesisState - * @static - * @param {neutron.contractmanager.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.failures_list = []; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.contractmanager.Params.toObject(message.params, options); - if (message.failures_list && message.failures_list.length) { - object.failures_list = []; - for (var j = 0; j < message.failures_list.length; ++j) - object.failures_list[j] = $root.neutron.contractmanager.Failure.toObject(message.failures_list[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof neutron.contractmanager.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - contractmanager.v1 = (function() { - - /** - * Namespace v1. - * @memberof neutron.contractmanager - * @namespace - */ - var v1 = {}; - - v1.Failure = (function() { - - /** - * Properties of a Failure. - * @memberof neutron.contractmanager.v1 - * @interface IFailure - * @property {string|null} [channel_id] Failure channel_id - * @property {string|null} [address] Failure address - * @property {Long|null} [id] Failure id - * @property {Long|null} [ack_id] Failure ack_id - * @property {string|null} [ack_type] Failure ack_type - */ - - /** - * Constructs a new Failure. - * @memberof neutron.contractmanager.v1 - * @classdesc Represents a Failure. - * @implements IFailure - * @constructor - * @param {neutron.contractmanager.v1.IFailure=} [properties] Properties to set - */ - function Failure(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Failure channel_id. - * @member {string} channel_id - * @memberof neutron.contractmanager.v1.Failure - * @instance - */ - Failure.prototype.channel_id = ""; - - /** - * Failure address. - * @member {string} address - * @memberof neutron.contractmanager.v1.Failure - * @instance - */ - Failure.prototype.address = ""; - - /** - * Failure id. - * @member {Long} id - * @memberof neutron.contractmanager.v1.Failure - * @instance - */ - Failure.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Failure ack_id. - * @member {Long} ack_id - * @memberof neutron.contractmanager.v1.Failure - * @instance - */ - Failure.prototype.ack_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Failure ack_type. - * @member {string} ack_type - * @memberof neutron.contractmanager.v1.Failure - * @instance - */ - Failure.prototype.ack_type = ""; - - /** - * Encodes the specified Failure message. Does not implicitly {@link neutron.contractmanager.v1.Failure.verify|verify} messages. - * @function encode - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {neutron.contractmanager.v1.IFailure} message Failure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Failure.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.address); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.id); - if (message.ack_id != null && Object.hasOwnProperty.call(message, "ack_id")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.ack_id); - if (message.ack_type != null && Object.hasOwnProperty.call(message, "ack_type")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.ack_type); - return writer; - }; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link neutron.contractmanager.v1.Failure.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {neutron.contractmanager.v1.IFailure} message Failure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Failure.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @function decode - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.contractmanager.v1.Failure} Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Failure.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.contractmanager.v1.Failure(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.address = reader.string(); - break; - case 3: - message.id = reader.uint64(); - break; - case 4: - message.ack_id = reader.uint64(); - break; - case 5: - message.ack_type = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.contractmanager.v1.Failure} Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Failure.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Failure message. - * @function verify - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Failure.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.ack_id != null && message.hasOwnProperty("ack_id")) - if (!$util.isInteger(message.ack_id) && !(message.ack_id && $util.isInteger(message.ack_id.low) && $util.isInteger(message.ack_id.high))) - return "ack_id: integer|Long expected"; - if (message.ack_type != null && message.hasOwnProperty("ack_type")) - if (!$util.isString(message.ack_type)) - return "ack_type: string expected"; - return null; - }; - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {Object.} object Plain object - * @returns {neutron.contractmanager.v1.Failure} Failure - */ - Failure.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.contractmanager.v1.Failure) - return object; - var message = new $root.neutron.contractmanager.v1.Failure(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.address != null) - message.address = String(object.address); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - if (object.ack_id != null) - if ($util.Long) - (message.ack_id = $util.Long.fromValue(object.ack_id)).unsigned = true; - else if (typeof object.ack_id === "string") - message.ack_id = parseInt(object.ack_id, 10); - else if (typeof object.ack_id === "number") - message.ack_id = object.ack_id; - else if (typeof object.ack_id === "object") - message.ack_id = new $util.LongBits(object.ack_id.low >>> 0, object.ack_id.high >>> 0).toNumber(true); - if (object.ack_type != null) - message.ack_type = String(object.ack_type); - return message; - }; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.contractmanager.v1.Failure - * @static - * @param {neutron.contractmanager.v1.Failure} message Failure - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Failure.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.address = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.ack_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.ack_id = options.longs === String ? "0" : 0; - object.ack_type = ""; - } - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - if (message.ack_id != null && message.hasOwnProperty("ack_id")) - if (typeof message.ack_id === "number") - object.ack_id = options.longs === String ? String(message.ack_id) : message.ack_id; - else - object.ack_id = options.longs === String ? $util.Long.prototype.toString.call(message.ack_id) : options.longs === Number ? new $util.LongBits(message.ack_id.low >>> 0, message.ack_id.high >>> 0).toNumber(true) : message.ack_id; - if (message.ack_type != null && message.hasOwnProperty("ack_type")) - object.ack_type = message.ack_type; - return object; - }; - - /** - * Converts this Failure to JSON. - * @function toJSON - * @memberof neutron.contractmanager.v1.Failure - * @instance - * @returns {Object.} JSON object - */ - Failure.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Failure; - })(); - - return v1; - })(); - - return contractmanager; - })(); - - neutron.cron = (function() { - - /** - * Namespace cron. - * @memberof neutron - * @namespace - */ - var cron = {}; - - cron.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.cron - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.cron.Msg#updateParams}. - * @memberof neutron.cron.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.cron.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.cron.Msg - * @instance - * @param {neutron.cron.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {neutron.cron.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.neutron.cron.MsgUpdateParams, $root.neutron.cron.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.cron.Msg - * @instance - * @param {neutron.cron.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - cron.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof neutron.cron - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {neutron.cron.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof neutron.cron - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {neutron.cron.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof neutron.cron.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {neutron.cron.IParams|null|undefined} params - * @memberof neutron.cron.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.cron.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {neutron.cron.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.cron.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.cron.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {neutron.cron.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.neutron.cron.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.cron.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.MsgUpdateParams) - return object; - var message = new $root.neutron.cron.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.cron.MsgUpdateParams.params: object expected"); - message.params = $root.neutron.cron.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.MsgUpdateParams - * @static - * @param {neutron.cron.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.cron.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof neutron.cron.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - cron.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof neutron.cron - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof neutron.cron - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {neutron.cron.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.cron.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {neutron.cron.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.cron.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {neutron.cron.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.MsgUpdateParamsResponse) - return object; - return new $root.neutron.cron.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.MsgUpdateParamsResponse - * @static - * @param {neutron.cron.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof neutron.cron.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - cron.Params = (function() { - - /** - * Properties of a Params. - * @memberof neutron.cron - * @interface IParams - * @property {string|null} [security_address] Params security_address - * @property {Long|null} [limit] Params limit - */ - - /** - * Constructs a new Params. - * @memberof neutron.cron - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {neutron.cron.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 security_address. - * @member {string} security_address - * @memberof neutron.cron.Params - * @instance - */ - Params.prototype.security_address = ""; - - /** - * Params limit. - * @member {Long} limit - * @memberof neutron.cron.Params - * @instance - */ - Params.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.cron.Params.verify|verify} messages. - * @function encode - * @memberof neutron.cron.Params - * @static - * @param {neutron.cron.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.security_address != null && Object.hasOwnProperty.call(message, "security_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.security_address); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.limit); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.cron.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.Params - * @static - * @param {neutron.cron.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 neutron.cron.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.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.neutron.cron.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.security_address = reader.string(); - break; - case 2: - message.limit = 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 neutron.cron.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.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 neutron.cron.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.security_address != null && message.hasOwnProperty("security_address")) - if (!$util.isString(message.security_address)) - return "security_address: string expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.Params - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.Params) - return object; - var message = new $root.neutron.cron.Params(); - if (object.security_address != null) - message.security_address = String(object.security_address); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.Params - * @static - * @param {neutron.cron.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.security_address = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - } - if (message.security_address != null && message.hasOwnProperty("security_address")) - object.security_address = message.security_address; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof neutron.cron.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - cron.Schedule = (function() { - - /** - * Properties of a Schedule. - * @memberof neutron.cron - * @interface ISchedule - * @property {string|null} [name] Schedule name - * @property {Long|null} [period] Schedule period - * @property {Array.|null} [msgs] Schedule msgs - * @property {Long|null} [last_execute_height] Schedule last_execute_height - */ - - /** - * Constructs a new Schedule. - * @memberof neutron.cron - * @classdesc Represents a Schedule. - * @implements ISchedule - * @constructor - * @param {neutron.cron.ISchedule=} [properties] Properties to set - */ - function Schedule(properties) { - this.msgs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Schedule name. - * @member {string} name - * @memberof neutron.cron.Schedule - * @instance - */ - Schedule.prototype.name = ""; - - /** - * Schedule period. - * @member {Long} period - * @memberof neutron.cron.Schedule - * @instance - */ - Schedule.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Schedule msgs. - * @member {Array.} msgs - * @memberof neutron.cron.Schedule - * @instance - */ - Schedule.prototype.msgs = $util.emptyArray; - - /** - * Schedule last_execute_height. - * @member {Long} last_execute_height - * @memberof neutron.cron.Schedule - * @instance - */ - Schedule.prototype.last_execute_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Schedule message. Does not implicitly {@link neutron.cron.Schedule.verify|verify} messages. - * @function encode - * @memberof neutron.cron.Schedule - * @static - * @param {neutron.cron.ISchedule} message Schedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schedule.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.period != null && Object.hasOwnProperty.call(message, "period")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period); - if (message.msgs != null && message.msgs.length) - for (var i = 0; i < message.msgs.length; ++i) - $root.neutron.cron.MsgExecuteContract.encode(message.msgs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.last_execute_height != null && Object.hasOwnProperty.call(message, "last_execute_height")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.last_execute_height); - return writer; - }; - - /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link neutron.cron.Schedule.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.Schedule - * @static - * @param {neutron.cron.ISchedule} message Schedule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schedule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Schedule message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.Schedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.Schedule} Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schedule.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.Schedule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.period = reader.uint64(); - break; - case 3: - if (!(message.msgs && message.msgs.length)) - message.msgs = []; - message.msgs.push($root.neutron.cron.MsgExecuteContract.decode(reader, reader.uint32())); - break; - case 4: - message.last_execute_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.Schedule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.Schedule} Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schedule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Schedule message. - * @function verify - * @memberof neutron.cron.Schedule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Schedule.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.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"; - if (message.msgs != null && message.hasOwnProperty("msgs")) { - if (!Array.isArray(message.msgs)) - return "msgs: array expected"; - for (var i = 0; i < message.msgs.length; ++i) { - var error = $root.neutron.cron.MsgExecuteContract.verify(message.msgs[i]); - if (error) - return "msgs." + error; - } - } - if (message.last_execute_height != null && message.hasOwnProperty("last_execute_height")) - if (!$util.isInteger(message.last_execute_height) && !(message.last_execute_height && $util.isInteger(message.last_execute_height.low) && $util.isInteger(message.last_execute_height.high))) - return "last_execute_height: integer|Long expected"; - return null; - }; - - /** - * Creates a Schedule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.Schedule - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.Schedule} Schedule - */ - Schedule.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.Schedule) - return object; - var message = new $root.neutron.cron.Schedule(); - if (object.name != null) - message.name = String(object.name); - 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); - if (object.msgs) { - if (!Array.isArray(object.msgs)) - throw TypeError(".neutron.cron.Schedule.msgs: array expected"); - message.msgs = []; - for (var i = 0; i < object.msgs.length; ++i) { - if (typeof object.msgs[i] !== "object") - throw TypeError(".neutron.cron.Schedule.msgs: object expected"); - message.msgs[i] = $root.neutron.cron.MsgExecuteContract.fromObject(object.msgs[i]); - } - } - if (object.last_execute_height != null) - if ($util.Long) - (message.last_execute_height = $util.Long.fromValue(object.last_execute_height)).unsigned = true; - else if (typeof object.last_execute_height === "string") - message.last_execute_height = parseInt(object.last_execute_height, 10); - else if (typeof object.last_execute_height === "number") - message.last_execute_height = object.last_execute_height; - else if (typeof object.last_execute_height === "object") - message.last_execute_height = new $util.LongBits(object.last_execute_height.low >>> 0, object.last_execute_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.Schedule - * @static - * @param {neutron.cron.Schedule} message Schedule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Schedule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.msgs = []; - if (options.defaults) { - object.name = ""; - 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 ($util.Long) { - var long = new $util.Long(0, 0, true); - object.last_execute_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.last_execute_height = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - 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; - if (message.msgs && message.msgs.length) { - object.msgs = []; - for (var j = 0; j < message.msgs.length; ++j) - object.msgs[j] = $root.neutron.cron.MsgExecuteContract.toObject(message.msgs[j], options); - } - if (message.last_execute_height != null && message.hasOwnProperty("last_execute_height")) - if (typeof message.last_execute_height === "number") - object.last_execute_height = options.longs === String ? String(message.last_execute_height) : message.last_execute_height; - else - object.last_execute_height = options.longs === String ? $util.Long.prototype.toString.call(message.last_execute_height) : options.longs === Number ? new $util.LongBits(message.last_execute_height.low >>> 0, message.last_execute_height.high >>> 0).toNumber(true) : message.last_execute_height; - return object; - }; - - /** - * Converts this Schedule to JSON. - * @function toJSON - * @memberof neutron.cron.Schedule - * @instance - * @returns {Object.} JSON object - */ - Schedule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Schedule; - })(); - - cron.MsgExecuteContract = (function() { - - /** - * Properties of a MsgExecuteContract. - * @memberof neutron.cron - * @interface IMsgExecuteContract - * @property {string|null} [contract] MsgExecuteContract contract - * @property {string|null} [msg] MsgExecuteContract msg - */ - - /** - * Constructs a new MsgExecuteContract. - * @memberof neutron.cron - * @classdesc Represents a MsgExecuteContract. - * @implements IMsgExecuteContract - * @constructor - * @param {neutron.cron.IMsgExecuteContract=} [properties] Properties to set - */ - function MsgExecuteContract(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgExecuteContract contract. - * @member {string} contract - * @memberof neutron.cron.MsgExecuteContract - * @instance - */ - MsgExecuteContract.prototype.contract = ""; - - /** - * MsgExecuteContract msg. - * @member {string} msg - * @memberof neutron.cron.MsgExecuteContract - * @instance - */ - MsgExecuteContract.prototype.msg = ""; - - /** - * Encodes the specified MsgExecuteContract message. Does not implicitly {@link neutron.cron.MsgExecuteContract.verify|verify} messages. - * @function encode - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {neutron.cron.IMsgExecuteContract} message MsgExecuteContract message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgExecuteContract.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contract != null && Object.hasOwnProperty.call(message, "contract")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.contract); - if (message.msg != null && Object.hasOwnProperty.call(message, "msg")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.msg); - return writer; - }; - - /** - * Encodes the specified MsgExecuteContract message, length delimited. Does not implicitly {@link neutron.cron.MsgExecuteContract.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {neutron.cron.IMsgExecuteContract} message MsgExecuteContract message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgExecuteContract.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgExecuteContract message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.MsgExecuteContract} MsgExecuteContract - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgExecuteContract.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.MsgExecuteContract(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contract = reader.string(); - break; - case 2: - message.msg = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgExecuteContract message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.MsgExecuteContract} MsgExecuteContract - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgExecuteContract.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgExecuteContract message. - * @function verify - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgExecuteContract.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contract != null && message.hasOwnProperty("contract")) - if (!$util.isString(message.contract)) - return "contract: string expected"; - if (message.msg != null && message.hasOwnProperty("msg")) - if (!$util.isString(message.msg)) - return "msg: string expected"; - return null; - }; - - /** - * Creates a MsgExecuteContract message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.MsgExecuteContract} MsgExecuteContract - */ - MsgExecuteContract.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.MsgExecuteContract) - return object; - var message = new $root.neutron.cron.MsgExecuteContract(); - if (object.contract != null) - message.contract = String(object.contract); - if (object.msg != null) - message.msg = String(object.msg); - return message; - }; - - /** - * Creates a plain object from a MsgExecuteContract message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.MsgExecuteContract - * @static - * @param {neutron.cron.MsgExecuteContract} message MsgExecuteContract - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgExecuteContract.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.contract = ""; - object.msg = ""; - } - if (message.contract != null && message.hasOwnProperty("contract")) - object.contract = message.contract; - if (message.msg != null && message.hasOwnProperty("msg")) - object.msg = message.msg; - return object; - }; - - /** - * Converts this MsgExecuteContract to JSON. - * @function toJSON - * @memberof neutron.cron.MsgExecuteContract - * @instance - * @returns {Object.} JSON object - */ - MsgExecuteContract.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgExecuteContract; - })(); - - cron.ScheduleCount = (function() { - - /** - * Properties of a ScheduleCount. - * @memberof neutron.cron - * @interface IScheduleCount - * @property {number|null} [count] ScheduleCount count - */ - - /** - * Constructs a new ScheduleCount. - * @memberof neutron.cron - * @classdesc Represents a ScheduleCount. - * @implements IScheduleCount - * @constructor - * @param {neutron.cron.IScheduleCount=} [properties] Properties to set - */ - function ScheduleCount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScheduleCount count. - * @member {number} count - * @memberof neutron.cron.ScheduleCount - * @instance - */ - ScheduleCount.prototype.count = 0; - - /** - * Encodes the specified ScheduleCount message. Does not implicitly {@link neutron.cron.ScheduleCount.verify|verify} messages. - * @function encode - * @memberof neutron.cron.ScheduleCount - * @static - * @param {neutron.cron.IScheduleCount} message ScheduleCount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScheduleCount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); - return writer; - }; - - /** - * Encodes the specified ScheduleCount message, length delimited. Does not implicitly {@link neutron.cron.ScheduleCount.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.ScheduleCount - * @static - * @param {neutron.cron.IScheduleCount} message ScheduleCount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScheduleCount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScheduleCount message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.ScheduleCount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.ScheduleCount} ScheduleCount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScheduleCount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.ScheduleCount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.count = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScheduleCount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.ScheduleCount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.ScheduleCount} ScheduleCount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScheduleCount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScheduleCount message. - * @function verify - * @memberof neutron.cron.ScheduleCount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScheduleCount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - return null; - }; - - /** - * Creates a ScheduleCount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.ScheduleCount - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.ScheduleCount} ScheduleCount - */ - ScheduleCount.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.ScheduleCount) - return object; - var message = new $root.neutron.cron.ScheduleCount(); - if (object.count != null) - message.count = object.count | 0; - return message; - }; - - /** - * Creates a plain object from a ScheduleCount message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.ScheduleCount - * @static - * @param {neutron.cron.ScheduleCount} message ScheduleCount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScheduleCount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.count = 0; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - return object; - }; - - /** - * Converts this ScheduleCount to JSON. - * @function toJSON - * @memberof neutron.cron.ScheduleCount - * @instance - * @returns {Object.} JSON object - */ - ScheduleCount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScheduleCount; - })(); - - cron.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.cron - * @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; - - /** - * Callback as used by {@link neutron.cron.Query#params}. - * @memberof neutron.cron.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.cron.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.cron.Query - * @instance - * @param {neutron.cron.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.cron.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.neutron.cron.QueryParamsRequest, $root.neutron.cron.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.cron.Query - * @instance - * @param {neutron.cron.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.cron.Query#schedule}. - * @memberof neutron.cron.Query - * @typedef ScheduleCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.cron.QueryGetScheduleResponse} [response] QueryGetScheduleResponse - */ - - /** - * Calls Schedule. - * @function schedule - * @memberof neutron.cron.Query - * @instance - * @param {neutron.cron.IQueryGetScheduleRequest} request QueryGetScheduleRequest message or plain object - * @param {neutron.cron.Query.ScheduleCallback} callback Node-style callback called with the error, if any, and QueryGetScheduleResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.schedule = function schedule(request, callback) { - return this.rpcCall(schedule, $root.neutron.cron.QueryGetScheduleRequest, $root.neutron.cron.QueryGetScheduleResponse, request, callback); - }, "name", { value: "Schedule" }); - - /** - * Calls Schedule. - * @function schedule - * @memberof neutron.cron.Query - * @instance - * @param {neutron.cron.IQueryGetScheduleRequest} request QueryGetScheduleRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.cron.Query#schedules}. - * @memberof neutron.cron.Query - * @typedef SchedulesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.cron.QuerySchedulesResponse} [response] QuerySchedulesResponse - */ - - /** - * Calls Schedules. - * @function schedules - * @memberof neutron.cron.Query - * @instance - * @param {neutron.cron.IQuerySchedulesRequest} request QuerySchedulesRequest message or plain object - * @param {neutron.cron.Query.SchedulesCallback} callback Node-style callback called with the error, if any, and QuerySchedulesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.schedules = function schedules(request, callback) { - return this.rpcCall(schedules, $root.neutron.cron.QuerySchedulesRequest, $root.neutron.cron.QuerySchedulesResponse, request, callback); - }, "name", { value: "Schedules" }); - - /** - * Calls Schedules. - * @function schedules - * @memberof neutron.cron.Query - * @instance - * @param {neutron.cron.IQuerySchedulesRequest} request QuerySchedulesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - cron.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof neutron.cron - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof neutron.cron - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {neutron.cron.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.cron.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {neutron.cron.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.cron.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {neutron.cron.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.QueryParamsRequest) - return object; - return new $root.neutron.cron.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.QueryParamsRequest - * @static - * @param {neutron.cron.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof neutron.cron.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - cron.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof neutron.cron - * @interface IQueryParamsResponse - * @property {neutron.cron.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof neutron.cron - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {neutron.cron.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {neutron.cron.IParams|null|undefined} params - * @memberof neutron.cron.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.cron.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {neutron.cron.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.cron.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.cron.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {neutron.cron.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.cron.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.cron.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.QueryParamsResponse) - return object; - var message = new $root.neutron.cron.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.cron.QueryParamsResponse.params: object expected"); - message.params = $root.neutron.cron.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.QueryParamsResponse - * @static - * @param {neutron.cron.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.cron.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof neutron.cron.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - cron.QueryGetScheduleRequest = (function() { - - /** - * Properties of a QueryGetScheduleRequest. - * @memberof neutron.cron - * @interface IQueryGetScheduleRequest - * @property {string|null} [name] QueryGetScheduleRequest name - */ - - /** - * Constructs a new QueryGetScheduleRequest. - * @memberof neutron.cron - * @classdesc Represents a QueryGetScheduleRequest. - * @implements IQueryGetScheduleRequest - * @constructor - * @param {neutron.cron.IQueryGetScheduleRequest=} [properties] Properties to set - */ - function QueryGetScheduleRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryGetScheduleRequest name. - * @member {string} name - * @memberof neutron.cron.QueryGetScheduleRequest - * @instance - */ - QueryGetScheduleRequest.prototype.name = ""; - - /** - * Encodes the specified QueryGetScheduleRequest message. Does not implicitly {@link neutron.cron.QueryGetScheduleRequest.verify|verify} messages. - * @function encode - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {neutron.cron.IQueryGetScheduleRequest} message QueryGetScheduleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryGetScheduleRequest.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 QueryGetScheduleRequest message, length delimited. Does not implicitly {@link neutron.cron.QueryGetScheduleRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {neutron.cron.IQueryGetScheduleRequest} message QueryGetScheduleRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryGetScheduleRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryGetScheduleRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.QueryGetScheduleRequest} QueryGetScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryGetScheduleRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.QueryGetScheduleRequest(); - 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 QueryGetScheduleRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.QueryGetScheduleRequest} QueryGetScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryGetScheduleRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryGetScheduleRequest message. - * @function verify - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryGetScheduleRequest.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 QueryGetScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.QueryGetScheduleRequest} QueryGetScheduleRequest - */ - QueryGetScheduleRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.QueryGetScheduleRequest) - return object; - var message = new $root.neutron.cron.QueryGetScheduleRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a QueryGetScheduleRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.QueryGetScheduleRequest - * @static - * @param {neutron.cron.QueryGetScheduleRequest} message QueryGetScheduleRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryGetScheduleRequest.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 QueryGetScheduleRequest to JSON. - * @function toJSON - * @memberof neutron.cron.QueryGetScheduleRequest - * @instance - * @returns {Object.} JSON object - */ - QueryGetScheduleRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryGetScheduleRequest; - })(); - - cron.QueryGetScheduleResponse = (function() { - - /** - * Properties of a QueryGetScheduleResponse. - * @memberof neutron.cron - * @interface IQueryGetScheduleResponse - * @property {neutron.cron.ISchedule|null} [schedule] QueryGetScheduleResponse schedule - */ - - /** - * Constructs a new QueryGetScheduleResponse. - * @memberof neutron.cron - * @classdesc Represents a QueryGetScheduleResponse. - * @implements IQueryGetScheduleResponse - * @constructor - * @param {neutron.cron.IQueryGetScheduleResponse=} [properties] Properties to set - */ - function QueryGetScheduleResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryGetScheduleResponse schedule. - * @member {neutron.cron.ISchedule|null|undefined} schedule - * @memberof neutron.cron.QueryGetScheduleResponse - * @instance - */ - QueryGetScheduleResponse.prototype.schedule = null; - - /** - * Encodes the specified QueryGetScheduleResponse message. Does not implicitly {@link neutron.cron.QueryGetScheduleResponse.verify|verify} messages. - * @function encode - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {neutron.cron.IQueryGetScheduleResponse} message QueryGetScheduleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryGetScheduleResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) - $root.neutron.cron.Schedule.encode(message.schedule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryGetScheduleResponse message, length delimited. Does not implicitly {@link neutron.cron.QueryGetScheduleResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {neutron.cron.IQueryGetScheduleResponse} message QueryGetScheduleResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryGetScheduleResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryGetScheduleResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.QueryGetScheduleResponse} QueryGetScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryGetScheduleResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.QueryGetScheduleResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.schedule = $root.neutron.cron.Schedule.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryGetScheduleResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.QueryGetScheduleResponse} QueryGetScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryGetScheduleResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryGetScheduleResponse message. - * @function verify - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryGetScheduleResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schedule != null && message.hasOwnProperty("schedule")) { - var error = $root.neutron.cron.Schedule.verify(message.schedule); - if (error) - return "schedule." + error; - } - return null; - }; - - /** - * Creates a QueryGetScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.QueryGetScheduleResponse} QueryGetScheduleResponse - */ - QueryGetScheduleResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.QueryGetScheduleResponse) - return object; - var message = new $root.neutron.cron.QueryGetScheduleResponse(); - if (object.schedule != null) { - if (typeof object.schedule !== "object") - throw TypeError(".neutron.cron.QueryGetScheduleResponse.schedule: object expected"); - message.schedule = $root.neutron.cron.Schedule.fromObject(object.schedule); - } - return message; - }; - - /** - * Creates a plain object from a QueryGetScheduleResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.QueryGetScheduleResponse - * @static - * @param {neutron.cron.QueryGetScheduleResponse} message QueryGetScheduleResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryGetScheduleResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.schedule = null; - if (message.schedule != null && message.hasOwnProperty("schedule")) - object.schedule = $root.neutron.cron.Schedule.toObject(message.schedule, options); - return object; - }; - - /** - * Converts this QueryGetScheduleResponse to JSON. - * @function toJSON - * @memberof neutron.cron.QueryGetScheduleResponse - * @instance - * @returns {Object.} JSON object - */ - QueryGetScheduleResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryGetScheduleResponse; - })(); - - cron.QuerySchedulesRequest = (function() { - - /** - * Properties of a QuerySchedulesRequest. - * @memberof neutron.cron - * @interface IQuerySchedulesRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QuerySchedulesRequest pagination - */ - - /** - * Constructs a new QuerySchedulesRequest. - * @memberof neutron.cron - * @classdesc Represents a QuerySchedulesRequest. - * @implements IQuerySchedulesRequest - * @constructor - * @param {neutron.cron.IQuerySchedulesRequest=} [properties] Properties to set - */ - function QuerySchedulesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuerySchedulesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof neutron.cron.QuerySchedulesRequest - * @instance - */ - QuerySchedulesRequest.prototype.pagination = null; - - /** - * Encodes the specified QuerySchedulesRequest message. Does not implicitly {@link neutron.cron.QuerySchedulesRequest.verify|verify} messages. - * @function encode - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {neutron.cron.IQuerySchedulesRequest} message QuerySchedulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySchedulesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QuerySchedulesRequest message, length delimited. Does not implicitly {@link neutron.cron.QuerySchedulesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {neutron.cron.IQuerySchedulesRequest} message QuerySchedulesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySchedulesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuerySchedulesRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.QuerySchedulesRequest} QuerySchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySchedulesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.QuerySchedulesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuerySchedulesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.QuerySchedulesRequest} QuerySchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySchedulesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuerySchedulesRequest message. - * @function verify - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuerySchedulesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QuerySchedulesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.QuerySchedulesRequest} QuerySchedulesRequest - */ - QuerySchedulesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.QuerySchedulesRequest) - return object; - var message = new $root.neutron.cron.QuerySchedulesRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".neutron.cron.QuerySchedulesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QuerySchedulesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.QuerySchedulesRequest - * @static - * @param {neutron.cron.QuerySchedulesRequest} message QuerySchedulesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuerySchedulesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QuerySchedulesRequest to JSON. - * @function toJSON - * @memberof neutron.cron.QuerySchedulesRequest - * @instance - * @returns {Object.} JSON object - */ - QuerySchedulesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QuerySchedulesRequest; - })(); - - cron.QuerySchedulesResponse = (function() { - - /** - * Properties of a QuerySchedulesResponse. - * @memberof neutron.cron - * @interface IQuerySchedulesResponse - * @property {Array.|null} [schedules] QuerySchedulesResponse schedules - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QuerySchedulesResponse pagination - */ - - /** - * Constructs a new QuerySchedulesResponse. - * @memberof neutron.cron - * @classdesc Represents a QuerySchedulesResponse. - * @implements IQuerySchedulesResponse - * @constructor - * @param {neutron.cron.IQuerySchedulesResponse=} [properties] Properties to set - */ - function QuerySchedulesResponse(properties) { - this.schedules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QuerySchedulesResponse schedules. - * @member {Array.} schedules - * @memberof neutron.cron.QuerySchedulesResponse - * @instance - */ - QuerySchedulesResponse.prototype.schedules = $util.emptyArray; - - /** - * QuerySchedulesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof neutron.cron.QuerySchedulesResponse - * @instance - */ - QuerySchedulesResponse.prototype.pagination = null; - - /** - * Encodes the specified QuerySchedulesResponse message. Does not implicitly {@link neutron.cron.QuerySchedulesResponse.verify|verify} messages. - * @function encode - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {neutron.cron.IQuerySchedulesResponse} message QuerySchedulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySchedulesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.schedules != null && message.schedules.length) - for (var i = 0; i < message.schedules.length; ++i) - $root.neutron.cron.Schedule.encode(message.schedules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QuerySchedulesResponse message, length delimited. Does not implicitly {@link neutron.cron.QuerySchedulesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {neutron.cron.IQuerySchedulesResponse} message QuerySchedulesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySchedulesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuerySchedulesResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.QuerySchedulesResponse} QuerySchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySchedulesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.QuerySchedulesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.schedules && message.schedules.length)) - message.schedules = []; - message.schedules.push($root.neutron.cron.Schedule.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuerySchedulesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.QuerySchedulesResponse} QuerySchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySchedulesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuerySchedulesResponse message. - * @function verify - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuerySchedulesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schedules != null && message.hasOwnProperty("schedules")) { - if (!Array.isArray(message.schedules)) - return "schedules: array expected"; - for (var i = 0; i < message.schedules.length; ++i) { - var error = $root.neutron.cron.Schedule.verify(message.schedules[i]); - if (error) - return "schedules." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QuerySchedulesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.QuerySchedulesResponse} QuerySchedulesResponse - */ - QuerySchedulesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.QuerySchedulesResponse) - return object; - var message = new $root.neutron.cron.QuerySchedulesResponse(); - if (object.schedules) { - if (!Array.isArray(object.schedules)) - throw TypeError(".neutron.cron.QuerySchedulesResponse.schedules: array expected"); - message.schedules = []; - for (var i = 0; i < object.schedules.length; ++i) { - if (typeof object.schedules[i] !== "object") - throw TypeError(".neutron.cron.QuerySchedulesResponse.schedules: object expected"); - message.schedules[i] = $root.neutron.cron.Schedule.fromObject(object.schedules[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".neutron.cron.QuerySchedulesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QuerySchedulesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.QuerySchedulesResponse - * @static - * @param {neutron.cron.QuerySchedulesResponse} message QuerySchedulesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuerySchedulesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.schedules = []; - if (options.defaults) - object.pagination = null; - if (message.schedules && message.schedules.length) { - object.schedules = []; - for (var j = 0; j < message.schedules.length; ++j) - object.schedules[j] = $root.neutron.cron.Schedule.toObject(message.schedules[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QuerySchedulesResponse to JSON. - * @function toJSON - * @memberof neutron.cron.QuerySchedulesResponse - * @instance - * @returns {Object.} JSON object - */ - QuerySchedulesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QuerySchedulesResponse; - })(); - - cron.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof neutron.cron - * @interface IGenesisState - * @property {Array.|null} [scheduleList] GenesisState scheduleList - * @property {neutron.cron.IParams|null} [params] GenesisState params - */ - - /** - * Constructs a new GenesisState. - * @memberof neutron.cron - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {neutron.cron.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.scheduleList = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState scheduleList. - * @member {Array.} scheduleList - * @memberof neutron.cron.GenesisState - * @instance - */ - GenesisState.prototype.scheduleList = $util.emptyArray; - - /** - * GenesisState params. - * @member {neutron.cron.IParams|null|undefined} params - * @memberof neutron.cron.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.cron.GenesisState.verify|verify} messages. - * @function encode - * @memberof neutron.cron.GenesisState - * @static - * @param {neutron.cron.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.cron.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.scheduleList != null && message.scheduleList.length) - for (var i = 0; i < message.scheduleList.length; ++i) - $root.neutron.cron.Schedule.encode(message.scheduleList[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.cron.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.cron.GenesisState - * @static - * @param {neutron.cron.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof neutron.cron.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.cron.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.cron.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.scheduleList && message.scheduleList.length)) - message.scheduleList = []; - message.scheduleList.push($root.neutron.cron.Schedule.decode(reader, reader.uint32())); - break; - case 1: - message.params = $root.neutron.cron.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.cron.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.cron.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof neutron.cron.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scheduleList != null && message.hasOwnProperty("scheduleList")) { - if (!Array.isArray(message.scheduleList)) - return "scheduleList: array expected"; - for (var i = 0; i < message.scheduleList.length; ++i) { - var error = $root.neutron.cron.Schedule.verify(message.scheduleList[i]); - if (error) - return "scheduleList." + error; - } - } - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.cron.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.cron.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {neutron.cron.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.cron.GenesisState) - return object; - var message = new $root.neutron.cron.GenesisState(); - if (object.scheduleList) { - if (!Array.isArray(object.scheduleList)) - throw TypeError(".neutron.cron.GenesisState.scheduleList: array expected"); - message.scheduleList = []; - for (var i = 0; i < object.scheduleList.length; ++i) { - if (typeof object.scheduleList[i] !== "object") - throw TypeError(".neutron.cron.GenesisState.scheduleList: object expected"); - message.scheduleList[i] = $root.neutron.cron.Schedule.fromObject(object.scheduleList[i]); - } - } - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.cron.GenesisState.params: object expected"); - message.params = $root.neutron.cron.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.cron.GenesisState - * @static - * @param {neutron.cron.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.scheduleList = []; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.cron.Params.toObject(message.params, options); - if (message.scheduleList && message.scheduleList.length) { - object.scheduleList = []; - for (var j = 0; j < message.scheduleList.length; ++j) - object.scheduleList[j] = $root.neutron.cron.Schedule.toObject(message.scheduleList[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof neutron.cron.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return cron; - })(); - - neutron.feeburner = (function() { - - /** - * Namespace feeburner. - * @memberof neutron - * @namespace - */ - var feeburner = {}; - - feeburner.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.feeburner - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.feeburner.Msg#updateParams}. - * @memberof neutron.feeburner.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.feeburner.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.feeburner.Msg - * @instance - * @param {neutron.feeburner.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {neutron.feeburner.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.neutron.feeburner.MsgUpdateParams, $root.neutron.feeburner.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.feeburner.Msg - * @instance - * @param {neutron.feeburner.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - feeburner.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof neutron.feeburner - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {neutron.feeburner.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof neutron.feeburner - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {neutron.feeburner.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof neutron.feeburner.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {neutron.feeburner.IParams|null|undefined} params - * @memberof neutron.feeburner.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.feeburner.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {neutron.feeburner.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.feeburner.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.feeburner.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {neutron.feeburner.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.neutron.feeburner.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.feeburner.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.MsgUpdateParams) - return object; - var message = new $root.neutron.feeburner.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.feeburner.MsgUpdateParams.params: object expected"); - message.params = $root.neutron.feeburner.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.MsgUpdateParams - * @static - * @param {neutron.feeburner.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.feeburner.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof neutron.feeburner.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - feeburner.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof neutron.feeburner - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof neutron.feeburner - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {neutron.feeburner.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.feeburner.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {neutron.feeburner.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.feeburner.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {neutron.feeburner.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.MsgUpdateParamsResponse) - return object; - return new $root.neutron.feeburner.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @static - * @param {neutron.feeburner.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof neutron.feeburner.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - feeburner.Params = (function() { - - /** - * Properties of a Params. - * @memberof neutron.feeburner - * @interface IParams - * @property {string|null} [neutron_denom] Params neutron_denom - * @property {string|null} [reserve_address] Params reserve_address - * @property {string|null} [treasury_address] Params treasury_address - */ - - /** - * Constructs a new Params. - * @memberof neutron.feeburner - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {neutron.feeburner.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 neutron_denom. - * @member {string} neutron_denom - * @memberof neutron.feeburner.Params - * @instance - */ - Params.prototype.neutron_denom = ""; - - /** - * Params reserve_address. - * @member {string} reserve_address - * @memberof neutron.feeburner.Params - * @instance - */ - Params.prototype.reserve_address = ""; - - /** - * Params treasury_address. - * @member {string} treasury_address - * @memberof neutron.feeburner.Params - * @instance - */ - Params.prototype.treasury_address = ""; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.feeburner.Params.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.Params - * @static - * @param {neutron.feeburner.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.neutron_denom != null && Object.hasOwnProperty.call(message, "neutron_denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.neutron_denom); - if (message.reserve_address != null && Object.hasOwnProperty.call(message, "reserve_address")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.reserve_address); - if (message.treasury_address != null && Object.hasOwnProperty.call(message, "treasury_address")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.treasury_address); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.feeburner.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.Params - * @static - * @param {neutron.feeburner.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 neutron.feeburner.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.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.neutron.feeburner.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.neutron_denom = reader.string(); - break; - case 2: - message.reserve_address = reader.string(); - break; - case 3: - message.treasury_address = 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 neutron.feeburner.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.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 neutron.feeburner.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.neutron_denom != null && message.hasOwnProperty("neutron_denom")) - if (!$util.isString(message.neutron_denom)) - return "neutron_denom: string expected"; - if (message.reserve_address != null && message.hasOwnProperty("reserve_address")) - if (!$util.isString(message.reserve_address)) - return "reserve_address: string expected"; - if (message.treasury_address != null && message.hasOwnProperty("treasury_address")) - if (!$util.isString(message.treasury_address)) - return "treasury_address: string expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.Params - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.Params) - return object; - var message = new $root.neutron.feeburner.Params(); - if (object.neutron_denom != null) - message.neutron_denom = String(object.neutron_denom); - if (object.reserve_address != null) - message.reserve_address = String(object.reserve_address); - if (object.treasury_address != null) - message.treasury_address = String(object.treasury_address); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.Params - * @static - * @param {neutron.feeburner.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.neutron_denom = ""; - object.reserve_address = ""; - object.treasury_address = ""; - } - if (message.neutron_denom != null && message.hasOwnProperty("neutron_denom")) - object.neutron_denom = message.neutron_denom; - if (message.reserve_address != null && message.hasOwnProperty("reserve_address")) - object.reserve_address = message.reserve_address; - if (message.treasury_address != null && message.hasOwnProperty("treasury_address")) - object.treasury_address = message.treasury_address; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof neutron.feeburner.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - feeburner.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.feeburner - * @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; - - /** - * Callback as used by {@link neutron.feeburner.Query#params}. - * @memberof neutron.feeburner.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.feeburner.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.feeburner.Query - * @instance - * @param {neutron.feeburner.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.feeburner.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.neutron.feeburner.QueryParamsRequest, $root.neutron.feeburner.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.feeburner.Query - * @instance - * @param {neutron.feeburner.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.feeburner.Query#totalBurnedNeutronsAmount}. - * @memberof neutron.feeburner.Query - * @typedef TotalBurnedNeutronsAmountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse} [response] QueryTotalBurnedNeutronsAmountResponse - */ - - /** - * Calls TotalBurnedNeutronsAmount. - * @function totalBurnedNeutronsAmount - * @memberof neutron.feeburner.Query - * @instance - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest} request QueryTotalBurnedNeutronsAmountRequest message or plain object - * @param {neutron.feeburner.Query.TotalBurnedNeutronsAmountCallback} callback Node-style callback called with the error, if any, and QueryTotalBurnedNeutronsAmountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalBurnedNeutronsAmount = function totalBurnedNeutronsAmount(request, callback) { - return this.rpcCall(totalBurnedNeutronsAmount, $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest, $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse, request, callback); - }, "name", { value: "TotalBurnedNeutronsAmount" }); - - /** - * Calls TotalBurnedNeutronsAmount. - * @function totalBurnedNeutronsAmount - * @memberof neutron.feeburner.Query - * @instance - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest} request QueryTotalBurnedNeutronsAmountRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - feeburner.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof neutron.feeburner - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof neutron.feeburner - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {neutron.feeburner.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.feeburner.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {neutron.feeburner.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.feeburner.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {neutron.feeburner.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.QueryParamsRequest) - return object; - return new $root.neutron.feeburner.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.QueryParamsRequest - * @static - * @param {neutron.feeburner.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof neutron.feeburner.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - feeburner.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof neutron.feeburner - * @interface IQueryParamsResponse - * @property {neutron.feeburner.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof neutron.feeburner - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {neutron.feeburner.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {neutron.feeburner.IParams|null|undefined} params - * @memberof neutron.feeburner.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.feeburner.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {neutron.feeburner.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.feeburner.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.feeburner.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {neutron.feeburner.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.feeburner.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.feeburner.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.QueryParamsResponse) - return object; - var message = new $root.neutron.feeburner.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.feeburner.QueryParamsResponse.params: object expected"); - message.params = $root.neutron.feeburner.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.QueryParamsResponse - * @static - * @param {neutron.feeburner.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.feeburner.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof neutron.feeburner.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - feeburner.QueryTotalBurnedNeutronsAmountRequest = (function() { - - /** - * Properties of a QueryTotalBurnedNeutronsAmountRequest. - * @memberof neutron.feeburner - * @interface IQueryTotalBurnedNeutronsAmountRequest - */ - - /** - * Constructs a new QueryTotalBurnedNeutronsAmountRequest. - * @memberof neutron.feeburner - * @classdesc Represents a QueryTotalBurnedNeutronsAmountRequest. - * @implements IQueryTotalBurnedNeutronsAmountRequest - * @constructor - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest=} [properties] Properties to set - */ - function QueryTotalBurnedNeutronsAmountRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountRequest message. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest} message QueryTotalBurnedNeutronsAmountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalBurnedNeutronsAmountRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountRequest message, length delimited. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest} message QueryTotalBurnedNeutronsAmountRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalBurnedNeutronsAmountRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest} QueryTotalBurnedNeutronsAmountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalBurnedNeutronsAmountRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest} QueryTotalBurnedNeutronsAmountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalBurnedNeutronsAmountRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalBurnedNeutronsAmountRequest message. - * @function verify - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalBurnedNeutronsAmountRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryTotalBurnedNeutronsAmountRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest} QueryTotalBurnedNeutronsAmountRequest - */ - QueryTotalBurnedNeutronsAmountRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest) - return object; - return new $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest(); - }; - - /** - * Creates a plain object from a QueryTotalBurnedNeutronsAmountRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @static - * @param {neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest} message QueryTotalBurnedNeutronsAmountRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalBurnedNeutronsAmountRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryTotalBurnedNeutronsAmountRequest to JSON. - * @function toJSON - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalBurnedNeutronsAmountRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalBurnedNeutronsAmountRequest; - })(); - - feeburner.QueryTotalBurnedNeutronsAmountResponse = (function() { - - /** - * Properties of a QueryTotalBurnedNeutronsAmountResponse. - * @memberof neutron.feeburner - * @interface IQueryTotalBurnedNeutronsAmountResponse - * @property {neutron.feeburner.ITotalBurnedNeutronsAmount|null} [total_burned_neutrons_amount] QueryTotalBurnedNeutronsAmountResponse total_burned_neutrons_amount - */ - - /** - * Constructs a new QueryTotalBurnedNeutronsAmountResponse. - * @memberof neutron.feeburner - * @classdesc Represents a QueryTotalBurnedNeutronsAmountResponse. - * @implements IQueryTotalBurnedNeutronsAmountResponse - * @constructor - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountResponse=} [properties] Properties to set - */ - function QueryTotalBurnedNeutronsAmountResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryTotalBurnedNeutronsAmountResponse total_burned_neutrons_amount. - * @member {neutron.feeburner.ITotalBurnedNeutronsAmount|null|undefined} total_burned_neutrons_amount - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @instance - */ - QueryTotalBurnedNeutronsAmountResponse.prototype.total_burned_neutrons_amount = null; - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountResponse message. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountResponse} message QueryTotalBurnedNeutronsAmountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalBurnedNeutronsAmountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.total_burned_neutrons_amount != null && Object.hasOwnProperty.call(message, "total_burned_neutrons_amount")) - $root.neutron.feeburner.TotalBurnedNeutronsAmount.encode(message.total_burned_neutrons_amount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountResponse message, length delimited. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {neutron.feeburner.IQueryTotalBurnedNeutronsAmountResponse} message QueryTotalBurnedNeutronsAmountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalBurnedNeutronsAmountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse} QueryTotalBurnedNeutronsAmountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalBurnedNeutronsAmountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total_burned_neutrons_amount = $root.neutron.feeburner.TotalBurnedNeutronsAmount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse} QueryTotalBurnedNeutronsAmountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalBurnedNeutronsAmountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalBurnedNeutronsAmountResponse message. - * @function verify - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalBurnedNeutronsAmountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.total_burned_neutrons_amount != null && message.hasOwnProperty("total_burned_neutrons_amount")) { - var error = $root.neutron.feeburner.TotalBurnedNeutronsAmount.verify(message.total_burned_neutrons_amount); - if (error) - return "total_burned_neutrons_amount." + error; - } - return null; - }; - - /** - * Creates a QueryTotalBurnedNeutronsAmountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse} QueryTotalBurnedNeutronsAmountResponse - */ - QueryTotalBurnedNeutronsAmountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse) - return object; - var message = new $root.neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse(); - if (object.total_burned_neutrons_amount != null) { - if (typeof object.total_burned_neutrons_amount !== "object") - throw TypeError(".neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse.total_burned_neutrons_amount: object expected"); - message.total_burned_neutrons_amount = $root.neutron.feeburner.TotalBurnedNeutronsAmount.fromObject(object.total_burned_neutrons_amount); - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalBurnedNeutronsAmountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @static - * @param {neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse} message QueryTotalBurnedNeutronsAmountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalBurnedNeutronsAmountResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.total_burned_neutrons_amount = null; - if (message.total_burned_neutrons_amount != null && message.hasOwnProperty("total_burned_neutrons_amount")) - object.total_burned_neutrons_amount = $root.neutron.feeburner.TotalBurnedNeutronsAmount.toObject(message.total_burned_neutrons_amount, options); - return object; - }; - - /** - * Converts this QueryTotalBurnedNeutronsAmountResponse to JSON. - * @function toJSON - * @memberof neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalBurnedNeutronsAmountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryTotalBurnedNeutronsAmountResponse; - })(); - - feeburner.TotalBurnedNeutronsAmount = (function() { - - /** - * Properties of a TotalBurnedNeutronsAmount. - * @memberof neutron.feeburner - * @interface ITotalBurnedNeutronsAmount - * @property {cosmos.base.v1beta1.ICoin|null} [coin] TotalBurnedNeutronsAmount coin - */ - - /** - * Constructs a new TotalBurnedNeutronsAmount. - * @memberof neutron.feeburner - * @classdesc Represents a TotalBurnedNeutronsAmount. - * @implements ITotalBurnedNeutronsAmount - * @constructor - * @param {neutron.feeburner.ITotalBurnedNeutronsAmount=} [properties] Properties to set - */ - function TotalBurnedNeutronsAmount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TotalBurnedNeutronsAmount coin. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} coin - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @instance - */ - TotalBurnedNeutronsAmount.prototype.coin = null; - - /** - * Encodes the specified TotalBurnedNeutronsAmount message. Does not implicitly {@link neutron.feeburner.TotalBurnedNeutronsAmount.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {neutron.feeburner.ITotalBurnedNeutronsAmount} message TotalBurnedNeutronsAmount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TotalBurnedNeutronsAmount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.coin != null && Object.hasOwnProperty.call(message, "coin")) - $root.cosmos.base.v1beta1.Coin.encode(message.coin, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TotalBurnedNeutronsAmount message, length delimited. Does not implicitly {@link neutron.feeburner.TotalBurnedNeutronsAmount.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {neutron.feeburner.ITotalBurnedNeutronsAmount} message TotalBurnedNeutronsAmount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TotalBurnedNeutronsAmount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TotalBurnedNeutronsAmount message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.TotalBurnedNeutronsAmount} TotalBurnedNeutronsAmount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TotalBurnedNeutronsAmount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.TotalBurnedNeutronsAmount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.coin = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TotalBurnedNeutronsAmount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.TotalBurnedNeutronsAmount} TotalBurnedNeutronsAmount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TotalBurnedNeutronsAmount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TotalBurnedNeutronsAmount message. - * @function verify - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TotalBurnedNeutronsAmount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.coin != null && message.hasOwnProperty("coin")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.coin); - if (error) - return "coin." + error; - } - return null; - }; - - /** - * Creates a TotalBurnedNeutronsAmount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.TotalBurnedNeutronsAmount} TotalBurnedNeutronsAmount - */ - TotalBurnedNeutronsAmount.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.TotalBurnedNeutronsAmount) - return object; - var message = new $root.neutron.feeburner.TotalBurnedNeutronsAmount(); - if (object.coin != null) { - if (typeof object.coin !== "object") - throw TypeError(".neutron.feeburner.TotalBurnedNeutronsAmount.coin: object expected"); - message.coin = $root.cosmos.base.v1beta1.Coin.fromObject(object.coin); - } - return message; - }; - - /** - * Creates a plain object from a TotalBurnedNeutronsAmount message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @static - * @param {neutron.feeburner.TotalBurnedNeutronsAmount} message TotalBurnedNeutronsAmount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TotalBurnedNeutronsAmount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.coin = null; - if (message.coin != null && message.hasOwnProperty("coin")) - object.coin = $root.cosmos.base.v1beta1.Coin.toObject(message.coin, options); - return object; - }; - - /** - * Converts this TotalBurnedNeutronsAmount to JSON. - * @function toJSON - * @memberof neutron.feeburner.TotalBurnedNeutronsAmount - * @instance - * @returns {Object.} JSON object - */ - TotalBurnedNeutronsAmount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TotalBurnedNeutronsAmount; - })(); - - feeburner.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof neutron.feeburner - * @interface IGenesisState - * @property {neutron.feeburner.IParams|null} [params] GenesisState params - * @property {neutron.feeburner.ITotalBurnedNeutronsAmount|null} [total_burned_neutrons_amount] GenesisState total_burned_neutrons_amount - */ - - /** - * Constructs a new GenesisState. - * @memberof neutron.feeburner - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {neutron.feeburner.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {neutron.feeburner.IParams|null|undefined} params - * @memberof neutron.feeburner.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState total_burned_neutrons_amount. - * @member {neutron.feeburner.ITotalBurnedNeutronsAmount|null|undefined} total_burned_neutrons_amount - * @memberof neutron.feeburner.GenesisState - * @instance - */ - GenesisState.prototype.total_burned_neutrons_amount = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.feeburner.GenesisState.verify|verify} messages. - * @function encode - * @memberof neutron.feeburner.GenesisState - * @static - * @param {neutron.feeburner.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.feeburner.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.total_burned_neutrons_amount != null && Object.hasOwnProperty.call(message, "total_burned_neutrons_amount")) - $root.neutron.feeburner.TotalBurnedNeutronsAmount.encode(message.total_burned_neutrons_amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.feeburner.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feeburner.GenesisState - * @static - * @param {neutron.feeburner.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof neutron.feeburner.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feeburner.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feeburner.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.feeburner.Params.decode(reader, reader.uint32()); - break; - case 2: - message.total_burned_neutrons_amount = $root.neutron.feeburner.TotalBurnedNeutronsAmount.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feeburner.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feeburner.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof neutron.feeburner.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.feeburner.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.total_burned_neutrons_amount != null && message.hasOwnProperty("total_burned_neutrons_amount")) { - var error = $root.neutron.feeburner.TotalBurnedNeutronsAmount.verify(message.total_burned_neutrons_amount); - if (error) - return "total_burned_neutrons_amount." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feeburner.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {neutron.feeburner.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feeburner.GenesisState) - return object; - var message = new $root.neutron.feeburner.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.feeburner.GenesisState.params: object expected"); - message.params = $root.neutron.feeburner.Params.fromObject(object.params); - } - if (object.total_burned_neutrons_amount != null) { - if (typeof object.total_burned_neutrons_amount !== "object") - throw TypeError(".neutron.feeburner.GenesisState.total_burned_neutrons_amount: object expected"); - message.total_burned_neutrons_amount = $root.neutron.feeburner.TotalBurnedNeutronsAmount.fromObject(object.total_burned_neutrons_amount); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feeburner.GenesisState - * @static - * @param {neutron.feeburner.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.params = null; - object.total_burned_neutrons_amount = null; - } - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.feeburner.Params.toObject(message.params, options); - if (message.total_burned_neutrons_amount != null && message.hasOwnProperty("total_burned_neutrons_amount")) - object.total_burned_neutrons_amount = $root.neutron.feeburner.TotalBurnedNeutronsAmount.toObject(message.total_burned_neutrons_amount, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof neutron.feeburner.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return feeburner; - })(); - - neutron.feerefunder = (function() { - - /** - * Namespace feerefunder. - * @memberof neutron - * @namespace - */ - var feerefunder = {}; - - feerefunder.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.feerefunder - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.feerefunder.Msg#updateParams}. - * @memberof neutron.feerefunder.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.feerefunder.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.feerefunder.Msg - * @instance - * @param {neutron.feerefunder.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {neutron.feerefunder.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.neutron.feerefunder.MsgUpdateParams, $root.neutron.feerefunder.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.feerefunder.Msg - * @instance - * @param {neutron.feerefunder.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - feerefunder.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof neutron.feerefunder - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {neutron.feerefunder.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof neutron.feerefunder - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {neutron.feerefunder.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof neutron.feerefunder.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {neutron.feerefunder.IParams|null|undefined} params - * @memberof neutron.feerefunder.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.feerefunder.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {neutron.feerefunder.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.feerefunder.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.feerefunder.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {neutron.feerefunder.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.neutron.feerefunder.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.feerefunder.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.MsgUpdateParams) - return object; - var message = new $root.neutron.feerefunder.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.feerefunder.MsgUpdateParams.params: object expected"); - message.params = $root.neutron.feerefunder.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.MsgUpdateParams - * @static - * @param {neutron.feerefunder.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.feerefunder.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof neutron.feerefunder.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - feerefunder.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof neutron.feerefunder - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof neutron.feerefunder - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {neutron.feerefunder.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.feerefunder.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {neutron.feerefunder.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.feerefunder.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {neutron.feerefunder.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.MsgUpdateParamsResponse) - return object; - return new $root.neutron.feerefunder.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @static - * @param {neutron.feerefunder.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof neutron.feerefunder.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - feerefunder.Params = (function() { - - /** - * Properties of a Params. - * @memberof neutron.feerefunder - * @interface IParams - * @property {neutron.feerefunder.IFee|null} [min_fee] Params min_fee - */ - - /** - * Constructs a new Params. - * @memberof neutron.feerefunder - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {neutron.feerefunder.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 min_fee. - * @member {neutron.feerefunder.IFee|null|undefined} min_fee - * @memberof neutron.feerefunder.Params - * @instance - */ - Params.prototype.min_fee = null; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.feerefunder.Params.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.Params - * @static - * @param {neutron.feerefunder.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.min_fee != null && Object.hasOwnProperty.call(message, "min_fee")) - $root.neutron.feerefunder.Fee.encode(message.min_fee, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.feerefunder.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.Params - * @static - * @param {neutron.feerefunder.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 neutron.feerefunder.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.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.neutron.feerefunder.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.min_fee = $root.neutron.feerefunder.Fee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.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 neutron.feerefunder.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.min_fee != null && message.hasOwnProperty("min_fee")) { - var error = $root.neutron.feerefunder.Fee.verify(message.min_fee); - if (error) - return "min_fee." + error; - } - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.Params - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.Params) - return object; - var message = new $root.neutron.feerefunder.Params(); - if (object.min_fee != null) { - if (typeof object.min_fee !== "object") - throw TypeError(".neutron.feerefunder.Params.min_fee: object expected"); - message.min_fee = $root.neutron.feerefunder.Fee.fromObject(object.min_fee); - } - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.Params - * @static - * @param {neutron.feerefunder.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.min_fee = null; - if (message.min_fee != null && message.hasOwnProperty("min_fee")) - object.min_fee = $root.neutron.feerefunder.Fee.toObject(message.min_fee, options); - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof neutron.feerefunder.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - feerefunder.Fee = (function() { - - /** - * Properties of a Fee. - * @memberof neutron.feerefunder - * @interface IFee - * @property {Array.|null} [recv_fee] Fee recv_fee - * @property {Array.|null} [ack_fee] Fee ack_fee - * @property {Array.|null} [timeout_fee] Fee timeout_fee - */ - - /** - * Constructs a new Fee. - * @memberof neutron.feerefunder - * @classdesc Represents a Fee. - * @implements IFee - * @constructor - * @param {neutron.feerefunder.IFee=} [properties] Properties to set - */ - function Fee(properties) { - this.recv_fee = []; - this.ack_fee = []; - this.timeout_fee = []; - if (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 recv_fee. - * @member {Array.} recv_fee - * @memberof neutron.feerefunder.Fee - * @instance - */ - Fee.prototype.recv_fee = $util.emptyArray; - - /** - * Fee ack_fee. - * @member {Array.} ack_fee - * @memberof neutron.feerefunder.Fee - * @instance - */ - Fee.prototype.ack_fee = $util.emptyArray; - - /** - * Fee timeout_fee. - * @member {Array.} timeout_fee - * @memberof neutron.feerefunder.Fee - * @instance - */ - Fee.prototype.timeout_fee = $util.emptyArray; - - /** - * Encodes the specified Fee message. Does not implicitly {@link neutron.feerefunder.Fee.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.Fee - * @static - * @param {neutron.feerefunder.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.recv_fee != null && message.recv_fee.length) - for (var i = 0; i < message.recv_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.recv_fee[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.ack_fee != null && message.ack_fee.length) - for (var i = 0; i < message.ack_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.ack_fee[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.timeout_fee != null && message.timeout_fee.length) - for (var i = 0; i < message.timeout_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.timeout_fee[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link neutron.feerefunder.Fee.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.Fee - * @static - * @param {neutron.feerefunder.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 neutron.feerefunder.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.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.neutron.feerefunder.Fee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.recv_fee && message.recv_fee.length)) - message.recv_fee = []; - message.recv_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - if (!(message.ack_fee && message.ack_fee.length)) - message.ack_fee = []; - message.ack_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.timeout_fee && message.timeout_fee.length)) - message.timeout_fee = []; - message.timeout_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Fee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.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 neutron.feerefunder.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.recv_fee != null && message.hasOwnProperty("recv_fee")) { - if (!Array.isArray(message.recv_fee)) - return "recv_fee: array expected"; - for (var i = 0; i < message.recv_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.recv_fee[i]); - if (error) - return "recv_fee." + error; - } - } - if (message.ack_fee != null && message.hasOwnProperty("ack_fee")) { - if (!Array.isArray(message.ack_fee)) - return "ack_fee: array expected"; - for (var i = 0; i < message.ack_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.ack_fee[i]); - if (error) - return "ack_fee." + error; - } - } - if (message.timeout_fee != null && message.hasOwnProperty("timeout_fee")) { - if (!Array.isArray(message.timeout_fee)) - return "timeout_fee: array expected"; - for (var i = 0; i < message.timeout_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.timeout_fee[i]); - if (error) - return "timeout_fee." + error; - } - } - return null; - }; - - /** - * Creates a Fee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.Fee - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.Fee} Fee - */ - Fee.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.Fee) - return object; - var message = new $root.neutron.feerefunder.Fee(); - if (object.recv_fee) { - if (!Array.isArray(object.recv_fee)) - throw TypeError(".neutron.feerefunder.Fee.recv_fee: array expected"); - message.recv_fee = []; - for (var i = 0; i < object.recv_fee.length; ++i) { - if (typeof object.recv_fee[i] !== "object") - throw TypeError(".neutron.feerefunder.Fee.recv_fee: object expected"); - message.recv_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.recv_fee[i]); - } - } - if (object.ack_fee) { - if (!Array.isArray(object.ack_fee)) - throw TypeError(".neutron.feerefunder.Fee.ack_fee: array expected"); - message.ack_fee = []; - for (var i = 0; i < object.ack_fee.length; ++i) { - if (typeof object.ack_fee[i] !== "object") - throw TypeError(".neutron.feerefunder.Fee.ack_fee: object expected"); - message.ack_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.ack_fee[i]); - } - } - if (object.timeout_fee) { - if (!Array.isArray(object.timeout_fee)) - throw TypeError(".neutron.feerefunder.Fee.timeout_fee: array expected"); - message.timeout_fee = []; - for (var i = 0; i < object.timeout_fee.length; ++i) { - if (typeof object.timeout_fee[i] !== "object") - throw TypeError(".neutron.feerefunder.Fee.timeout_fee: object expected"); - message.timeout_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.timeout_fee[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Fee message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.Fee - * @static - * @param {neutron.feerefunder.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.recv_fee = []; - object.ack_fee = []; - object.timeout_fee = []; - } - if (message.recv_fee && message.recv_fee.length) { - object.recv_fee = []; - for (var j = 0; j < message.recv_fee.length; ++j) - object.recv_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.recv_fee[j], options); - } - if (message.ack_fee && message.ack_fee.length) { - object.ack_fee = []; - for (var j = 0; j < message.ack_fee.length; ++j) - object.ack_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.ack_fee[j], options); - } - if (message.timeout_fee && message.timeout_fee.length) { - object.timeout_fee = []; - for (var j = 0; j < message.timeout_fee.length; ++j) - object.timeout_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.timeout_fee[j], options); - } - return object; - }; - - /** - * Converts this Fee to JSON. - * @function toJSON - * @memberof neutron.feerefunder.Fee - * @instance - * @returns {Object.} JSON object - */ - Fee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Fee; - })(); - - feerefunder.PacketID = (function() { - - /** - * Properties of a PacketID. - * @memberof neutron.feerefunder - * @interface IPacketID - * @property {string|null} [channel_id] PacketID channel_id - * @property {string|null} [port_id] PacketID port_id - * @property {Long|null} [sequence] PacketID sequence - */ - - /** - * Constructs a new PacketID. - * @memberof neutron.feerefunder - * @classdesc Represents a PacketID. - * @implements IPacketID - * @constructor - * @param {neutron.feerefunder.IPacketID=} [properties] Properties to set - */ - function PacketID(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketID channel_id. - * @member {string} channel_id - * @memberof neutron.feerefunder.PacketID - * @instance - */ - PacketID.prototype.channel_id = ""; - - /** - * PacketID port_id. - * @member {string} port_id - * @memberof neutron.feerefunder.PacketID - * @instance - */ - PacketID.prototype.port_id = ""; - - /** - * PacketID sequence. - * @member {Long} sequence - * @memberof neutron.feerefunder.PacketID - * @instance - */ - PacketID.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PacketID message. Does not implicitly {@link neutron.feerefunder.PacketID.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.PacketID - * @static - * @param {neutron.feerefunder.IPacketID} message PacketID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified PacketID message, length delimited. Does not implicitly {@link neutron.feerefunder.PacketID.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.PacketID - * @static - * @param {neutron.feerefunder.IPacketID} message PacketID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketID message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.PacketID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.PacketID} PacketID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketID.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.PacketID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.PacketID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.PacketID} PacketID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketID message. - * @function verify - * @memberof neutron.feerefunder.PacketID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string 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 PacketID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.PacketID - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.PacketID} PacketID - */ - PacketID.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.PacketID) - return object; - var message = new $root.neutron.feerefunder.PacketID(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - 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 PacketID message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.PacketID - * @static - * @param {neutron.feerefunder.PacketID} message PacketID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.port_id = ""; - 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.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - 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 PacketID to JSON. - * @function toJSON - * @memberof neutron.feerefunder.PacketID - * @instance - * @returns {Object.} JSON object - */ - PacketID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketID; - })(); - - feerefunder.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.feerefunder - * @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; - - /** - * Callback as used by {@link neutron.feerefunder.Query#params}. - * @memberof neutron.feerefunder.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.feerefunder.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.feerefunder.Query - * @instance - * @param {neutron.feerefunder.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.feerefunder.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.neutron.feerefunder.QueryParamsRequest, $root.neutron.feerefunder.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.feerefunder.Query - * @instance - * @param {neutron.feerefunder.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.feerefunder.Query#feeInfo}. - * @memberof neutron.feerefunder.Query - * @typedef FeeInfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.feerefunder.FeeInfoResponse} [response] FeeInfoResponse - */ - - /** - * Calls FeeInfo. - * @function feeInfo - * @memberof neutron.feerefunder.Query - * @instance - * @param {neutron.feerefunder.IFeeInfoRequest} request FeeInfoRequest message or plain object - * @param {neutron.feerefunder.Query.FeeInfoCallback} callback Node-style callback called with the error, if any, and FeeInfoResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.feeInfo = function feeInfo(request, callback) { - return this.rpcCall(feeInfo, $root.neutron.feerefunder.FeeInfoRequest, $root.neutron.feerefunder.FeeInfoResponse, request, callback); - }, "name", { value: "FeeInfo" }); - - /** - * Calls FeeInfo. - * @function feeInfo - * @memberof neutron.feerefunder.Query - * @instance - * @param {neutron.feerefunder.IFeeInfoRequest} request FeeInfoRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - feerefunder.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof neutron.feerefunder - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof neutron.feerefunder - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {neutron.feerefunder.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.feerefunder.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {neutron.feerefunder.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.feerefunder.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {neutron.feerefunder.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.QueryParamsRequest) - return object; - return new $root.neutron.feerefunder.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.QueryParamsRequest - * @static - * @param {neutron.feerefunder.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof neutron.feerefunder.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - feerefunder.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof neutron.feerefunder - * @interface IQueryParamsResponse - * @property {neutron.feerefunder.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof neutron.feerefunder - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {neutron.feerefunder.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {neutron.feerefunder.IParams|null|undefined} params - * @memberof neutron.feerefunder.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.feerefunder.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {neutron.feerefunder.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.feerefunder.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.feerefunder.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {neutron.feerefunder.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.feerefunder.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.feerefunder.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.QueryParamsResponse) - return object; - var message = new $root.neutron.feerefunder.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.feerefunder.QueryParamsResponse.params: object expected"); - message.params = $root.neutron.feerefunder.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.QueryParamsResponse - * @static - * @param {neutron.feerefunder.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.feerefunder.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof neutron.feerefunder.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - feerefunder.FeeInfoRequest = (function() { - - /** - * Properties of a FeeInfoRequest. - * @memberof neutron.feerefunder - * @interface IFeeInfoRequest - * @property {string|null} [channel_id] FeeInfoRequest channel_id - * @property {string|null} [port_id] FeeInfoRequest port_id - * @property {Long|null} [sequence] FeeInfoRequest sequence - */ - - /** - * Constructs a new FeeInfoRequest. - * @memberof neutron.feerefunder - * @classdesc Represents a FeeInfoRequest. - * @implements IFeeInfoRequest - * @constructor - * @param {neutron.feerefunder.IFeeInfoRequest=} [properties] Properties to set - */ - function FeeInfoRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeeInfoRequest channel_id. - * @member {string} channel_id - * @memberof neutron.feerefunder.FeeInfoRequest - * @instance - */ - FeeInfoRequest.prototype.channel_id = ""; - - /** - * FeeInfoRequest port_id. - * @member {string} port_id - * @memberof neutron.feerefunder.FeeInfoRequest - * @instance - */ - FeeInfoRequest.prototype.port_id = ""; - - /** - * FeeInfoRequest sequence. - * @member {Long} sequence - * @memberof neutron.feerefunder.FeeInfoRequest - * @instance - */ - FeeInfoRequest.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified FeeInfoRequest message. Does not implicitly {@link neutron.feerefunder.FeeInfoRequest.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {neutron.feerefunder.IFeeInfoRequest} message FeeInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeInfoRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.channel_id); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.port_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified FeeInfoRequest message, length delimited. Does not implicitly {@link neutron.feerefunder.FeeInfoRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {neutron.feerefunder.IFeeInfoRequest} message FeeInfoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeInfoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeeInfoRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.FeeInfoRequest} FeeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeInfoRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.FeeInfoRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.channel_id = reader.string(); - break; - case 2: - message.port_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeeInfoRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.FeeInfoRequest} FeeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeInfoRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeeInfoRequest message. - * @function verify - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeeInfoRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string 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 FeeInfoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.FeeInfoRequest} FeeInfoRequest - */ - FeeInfoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.FeeInfoRequest) - return object; - var message = new $root.neutron.feerefunder.FeeInfoRequest(); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - if (object.port_id != null) - message.port_id = String(object.port_id); - 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 FeeInfoRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.FeeInfoRequest - * @static - * @param {neutron.feerefunder.FeeInfoRequest} message FeeInfoRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeeInfoRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.channel_id = ""; - object.port_id = ""; - 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.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - 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 FeeInfoRequest to JSON. - * @function toJSON - * @memberof neutron.feerefunder.FeeInfoRequest - * @instance - * @returns {Object.} JSON object - */ - FeeInfoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FeeInfoRequest; - })(); - - feerefunder.FeeInfoResponse = (function() { - - /** - * Properties of a FeeInfoResponse. - * @memberof neutron.feerefunder - * @interface IFeeInfoResponse - * @property {neutron.feerefunder.IFeeInfo|null} [fee_info] FeeInfoResponse fee_info - */ - - /** - * Constructs a new FeeInfoResponse. - * @memberof neutron.feerefunder - * @classdesc Represents a FeeInfoResponse. - * @implements IFeeInfoResponse - * @constructor - * @param {neutron.feerefunder.IFeeInfoResponse=} [properties] Properties to set - */ - function FeeInfoResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeeInfoResponse fee_info. - * @member {neutron.feerefunder.IFeeInfo|null|undefined} fee_info - * @memberof neutron.feerefunder.FeeInfoResponse - * @instance - */ - FeeInfoResponse.prototype.fee_info = null; - - /** - * Encodes the specified FeeInfoResponse message. Does not implicitly {@link neutron.feerefunder.FeeInfoResponse.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {neutron.feerefunder.IFeeInfoResponse} message FeeInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeInfoResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fee_info != null && Object.hasOwnProperty.call(message, "fee_info")) - $root.neutron.feerefunder.FeeInfo.encode(message.fee_info, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeeInfoResponse message, length delimited. Does not implicitly {@link neutron.feerefunder.FeeInfoResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {neutron.feerefunder.IFeeInfoResponse} message FeeInfoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeInfoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeeInfoResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.FeeInfoResponse} FeeInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeInfoResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.FeeInfoResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.fee_info = $root.neutron.feerefunder.FeeInfo.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeeInfoResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.FeeInfoResponse} FeeInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeInfoResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeeInfoResponse message. - * @function verify - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeeInfoResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fee_info != null && message.hasOwnProperty("fee_info")) { - var error = $root.neutron.feerefunder.FeeInfo.verify(message.fee_info); - if (error) - return "fee_info." + error; - } - return null; - }; - - /** - * Creates a FeeInfoResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.FeeInfoResponse} FeeInfoResponse - */ - FeeInfoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.FeeInfoResponse) - return object; - var message = new $root.neutron.feerefunder.FeeInfoResponse(); - if (object.fee_info != null) { - if (typeof object.fee_info !== "object") - throw TypeError(".neutron.feerefunder.FeeInfoResponse.fee_info: object expected"); - message.fee_info = $root.neutron.feerefunder.FeeInfo.fromObject(object.fee_info); - } - return message; - }; - - /** - * Creates a plain object from a FeeInfoResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.FeeInfoResponse - * @static - * @param {neutron.feerefunder.FeeInfoResponse} message FeeInfoResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeeInfoResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fee_info = null; - if (message.fee_info != null && message.hasOwnProperty("fee_info")) - object.fee_info = $root.neutron.feerefunder.FeeInfo.toObject(message.fee_info, options); - return object; - }; - - /** - * Converts this FeeInfoResponse to JSON. - * @function toJSON - * @memberof neutron.feerefunder.FeeInfoResponse - * @instance - * @returns {Object.} JSON object - */ - FeeInfoResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FeeInfoResponse; - })(); - - feerefunder.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof neutron.feerefunder - * @interface IGenesisState - * @property {neutron.feerefunder.IParams|null} [params] GenesisState params - * @property {Array.|null} [fee_infos] GenesisState fee_infos - */ - - /** - * Constructs a new GenesisState. - * @memberof neutron.feerefunder - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {neutron.feerefunder.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.fee_infos = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {neutron.feerefunder.IParams|null|undefined} params - * @memberof neutron.feerefunder.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState fee_infos. - * @member {Array.} fee_infos - * @memberof neutron.feerefunder.GenesisState - * @instance - */ - GenesisState.prototype.fee_infos = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.feerefunder.GenesisState.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {neutron.feerefunder.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.feerefunder.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fee_infos != null && message.fee_infos.length) - for (var i = 0; i < message.fee_infos.length; ++i) - $root.neutron.feerefunder.FeeInfo.encode(message.fee_infos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.feerefunder.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {neutron.feerefunder.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.feerefunder.Params.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.fee_infos && message.fee_infos.length)) - message.fee_infos = []; - message.fee_infos.push($root.neutron.feerefunder.FeeInfo.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.feerefunder.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.fee_infos != null && message.hasOwnProperty("fee_infos")) { - if (!Array.isArray(message.fee_infos)) - return "fee_infos: array expected"; - for (var i = 0; i < message.fee_infos.length; ++i) { - var error = $root.neutron.feerefunder.FeeInfo.verify(message.fee_infos[i]); - if (error) - return "fee_infos." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.GenesisState) - return object; - var message = new $root.neutron.feerefunder.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.feerefunder.GenesisState.params: object expected"); - message.params = $root.neutron.feerefunder.Params.fromObject(object.params); - } - if (object.fee_infos) { - if (!Array.isArray(object.fee_infos)) - throw TypeError(".neutron.feerefunder.GenesisState.fee_infos: array expected"); - message.fee_infos = []; - for (var i = 0; i < object.fee_infos.length; ++i) { - if (typeof object.fee_infos[i] !== "object") - throw TypeError(".neutron.feerefunder.GenesisState.fee_infos: object expected"); - message.fee_infos[i] = $root.neutron.feerefunder.FeeInfo.fromObject(object.fee_infos[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.GenesisState - * @static - * @param {neutron.feerefunder.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fee_infos = []; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.feerefunder.Params.toObject(message.params, options); - if (message.fee_infos && message.fee_infos.length) { - object.fee_infos = []; - for (var j = 0; j < message.fee_infos.length; ++j) - object.fee_infos[j] = $root.neutron.feerefunder.FeeInfo.toObject(message.fee_infos[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof neutron.feerefunder.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - feerefunder.FeeInfo = (function() { - - /** - * Properties of a FeeInfo. - * @memberof neutron.feerefunder - * @interface IFeeInfo - * @property {string|null} [payer] FeeInfo payer - * @property {neutron.feerefunder.IPacketID|null} [packet_id] FeeInfo packet_id - * @property {neutron.feerefunder.IFee|null} [fee] FeeInfo fee - */ - - /** - * Constructs a new FeeInfo. - * @memberof neutron.feerefunder - * @classdesc Represents a FeeInfo. - * @implements IFeeInfo - * @constructor - * @param {neutron.feerefunder.IFeeInfo=} [properties] Properties to set - */ - function FeeInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeeInfo payer. - * @member {string} payer - * @memberof neutron.feerefunder.FeeInfo - * @instance - */ - FeeInfo.prototype.payer = ""; - - /** - * FeeInfo packet_id. - * @member {neutron.feerefunder.IPacketID|null|undefined} packet_id - * @memberof neutron.feerefunder.FeeInfo - * @instance - */ - FeeInfo.prototype.packet_id = null; - - /** - * FeeInfo fee. - * @member {neutron.feerefunder.IFee|null|undefined} fee - * @memberof neutron.feerefunder.FeeInfo - * @instance - */ - FeeInfo.prototype.fee = null; - - /** - * Encodes the specified FeeInfo message. Does not implicitly {@link neutron.feerefunder.FeeInfo.verify|verify} messages. - * @function encode - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {neutron.feerefunder.IFeeInfo} message FeeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.payer != null && Object.hasOwnProperty.call(message, "payer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.payer); - if (message.packet_id != null && Object.hasOwnProperty.call(message, "packet_id")) - $root.neutron.feerefunder.PacketID.encode(message.packet_id, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.neutron.feerefunder.Fee.encode(message.fee, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeeInfo message, length delimited. Does not implicitly {@link neutron.feerefunder.FeeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {neutron.feerefunder.IFeeInfo} message FeeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeeInfo message from the specified reader or buffer. - * @function decode - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.feerefunder.FeeInfo} FeeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.feerefunder.FeeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.payer = reader.string(); - break; - case 2: - message.packet_id = $root.neutron.feerefunder.PacketID.decode(reader, reader.uint32()); - break; - case 3: - message.fee = $root.neutron.feerefunder.Fee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.feerefunder.FeeInfo} FeeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeeInfo message. - * @function verify - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.payer != null && message.hasOwnProperty("payer")) - if (!$util.isString(message.payer)) - return "payer: string expected"; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) { - var error = $root.neutron.feerefunder.PacketID.verify(message.packet_id); - if (error) - return "packet_id." + error; - } - if (message.fee != null && message.hasOwnProperty("fee")) { - var error = $root.neutron.feerefunder.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - return null; - }; - - /** - * Creates a FeeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {Object.} object Plain object - * @returns {neutron.feerefunder.FeeInfo} FeeInfo - */ - FeeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.feerefunder.FeeInfo) - return object; - var message = new $root.neutron.feerefunder.FeeInfo(); - if (object.payer != null) - message.payer = String(object.payer); - if (object.packet_id != null) { - if (typeof object.packet_id !== "object") - throw TypeError(".neutron.feerefunder.FeeInfo.packet_id: object expected"); - message.packet_id = $root.neutron.feerefunder.PacketID.fromObject(object.packet_id); - } - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".neutron.feerefunder.FeeInfo.fee: object expected"); - message.fee = $root.neutron.feerefunder.Fee.fromObject(object.fee); - } - return message; - }; - - /** - * Creates a plain object from a FeeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.feerefunder.FeeInfo - * @static - * @param {neutron.feerefunder.FeeInfo} message FeeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.payer = ""; - object.packet_id = null; - object.fee = null; - } - if (message.payer != null && message.hasOwnProperty("payer")) - object.payer = message.payer; - if (message.packet_id != null && message.hasOwnProperty("packet_id")) - object.packet_id = $root.neutron.feerefunder.PacketID.toObject(message.packet_id, options); - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.neutron.feerefunder.Fee.toObject(message.fee, options); - return object; - }; - - /** - * Converts this FeeInfo to JSON. - * @function toJSON - * @memberof neutron.feerefunder.FeeInfo - * @instance - * @returns {Object.} JSON object - */ - FeeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FeeInfo; - })(); - - return feerefunder; - })(); - - neutron.interchainqueries = (function() { - - /** - * Namespace interchainqueries. - * @memberof neutron - * @namespace - */ - var interchainqueries = {}; - - interchainqueries.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.interchainqueries - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#registerInterchainQuery}. - * @memberof neutron.interchainqueries.Msg - * @typedef RegisterInterchainQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.MsgRegisterInterchainQueryResponse} [response] MsgRegisterInterchainQueryResponse - */ - - /** - * Calls RegisterInterchainQuery. - * @function registerInterchainQuery - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgRegisterInterchainQuery} request MsgRegisterInterchainQuery message or plain object - * @param {neutron.interchainqueries.Msg.RegisterInterchainQueryCallback} callback Node-style callback called with the error, if any, and MsgRegisterInterchainQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerInterchainQuery = function registerInterchainQuery(request, callback) { - return this.rpcCall(registerInterchainQuery, $root.neutron.interchainqueries.MsgRegisterInterchainQuery, $root.neutron.interchainqueries.MsgRegisterInterchainQueryResponse, request, callback); - }, "name", { value: "RegisterInterchainQuery" }); - - /** - * Calls RegisterInterchainQuery. - * @function registerInterchainQuery - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgRegisterInterchainQuery} request MsgRegisterInterchainQuery message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#submitQueryResult}. - * @memberof neutron.interchainqueries.Msg - * @typedef SubmitQueryResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.MsgSubmitQueryResultResponse} [response] MsgSubmitQueryResultResponse - */ - - /** - * Calls SubmitQueryResult. - * @function submitQueryResult - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgSubmitQueryResult} request MsgSubmitQueryResult message or plain object - * @param {neutron.interchainqueries.Msg.SubmitQueryResultCallback} callback Node-style callback called with the error, if any, and MsgSubmitQueryResultResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitQueryResult = function submitQueryResult(request, callback) { - return this.rpcCall(submitQueryResult, $root.neutron.interchainqueries.MsgSubmitQueryResult, $root.neutron.interchainqueries.MsgSubmitQueryResultResponse, request, callback); - }, "name", { value: "SubmitQueryResult" }); - - /** - * Calls SubmitQueryResult. - * @function submitQueryResult - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgSubmitQueryResult} request MsgSubmitQueryResult message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#removeInterchainQuery}. - * @memberof neutron.interchainqueries.Msg - * @typedef RemoveInterchainQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.MsgRemoveInterchainQueryResponse} [response] MsgRemoveInterchainQueryResponse - */ - - /** - * Calls RemoveInterchainQuery. - * @function removeInterchainQuery - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryRequest} request MsgRemoveInterchainQueryRequest message or plain object - * @param {neutron.interchainqueries.Msg.RemoveInterchainQueryCallback} callback Node-style callback called with the error, if any, and MsgRemoveInterchainQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.removeInterchainQuery = function removeInterchainQuery(request, callback) { - return this.rpcCall(removeInterchainQuery, $root.neutron.interchainqueries.MsgRemoveInterchainQueryRequest, $root.neutron.interchainqueries.MsgRemoveInterchainQueryResponse, request, callback); - }, "name", { value: "RemoveInterchainQuery" }); - - /** - * Calls RemoveInterchainQuery. - * @function removeInterchainQuery - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryRequest} request MsgRemoveInterchainQueryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#updateInterchainQuery}. - * @memberof neutron.interchainqueries.Msg - * @typedef UpdateInterchainQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.MsgUpdateInterchainQueryResponse} [response] MsgUpdateInterchainQueryResponse - */ - - /** - * Calls UpdateInterchainQuery. - * @function updateInterchainQuery - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryRequest} request MsgUpdateInterchainQueryRequest message or plain object - * @param {neutron.interchainqueries.Msg.UpdateInterchainQueryCallback} callback Node-style callback called with the error, if any, and MsgUpdateInterchainQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateInterchainQuery = function updateInterchainQuery(request, callback) { - return this.rpcCall(updateInterchainQuery, $root.neutron.interchainqueries.MsgUpdateInterchainQueryRequest, $root.neutron.interchainqueries.MsgUpdateInterchainQueryResponse, request, callback); - }, "name", { value: "UpdateInterchainQuery" }); - - /** - * Calls UpdateInterchainQuery. - * @function updateInterchainQuery - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryRequest} request MsgUpdateInterchainQueryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#updateParams}. - * @memberof neutron.interchainqueries.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {neutron.interchainqueries.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.neutron.interchainqueries.MsgUpdateParams, $root.neutron.interchainqueries.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.interchainqueries.Msg - * @instance - * @param {neutron.interchainqueries.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - interchainqueries.MsgRegisterInterchainQuery = (function() { - - /** - * Properties of a MsgRegisterInterchainQuery. - * @memberof neutron.interchainqueries - * @interface IMsgRegisterInterchainQuery - * @property {string|null} [query_type] MsgRegisterInterchainQuery query_type - * @property {Array.|null} [keys] MsgRegisterInterchainQuery keys - * @property {string|null} [transactions_filter] MsgRegisterInterchainQuery transactions_filter - * @property {string|null} [connection_id] MsgRegisterInterchainQuery connection_id - * @property {Long|null} [update_period] MsgRegisterInterchainQuery update_period - * @property {string|null} [sender] MsgRegisterInterchainQuery sender - */ - - /** - * Constructs a new MsgRegisterInterchainQuery. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgRegisterInterchainQuery. - * @implements IMsgRegisterInterchainQuery - * @constructor - * @param {neutron.interchainqueries.IMsgRegisterInterchainQuery=} [properties] Properties to set - */ - function MsgRegisterInterchainQuery(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]]; - } - - /** - * MsgRegisterInterchainQuery query_type. - * @member {string} query_type - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - */ - MsgRegisterInterchainQuery.prototype.query_type = ""; - - /** - * MsgRegisterInterchainQuery keys. - * @member {Array.} keys - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - */ - MsgRegisterInterchainQuery.prototype.keys = $util.emptyArray; - - /** - * MsgRegisterInterchainQuery transactions_filter. - * @member {string} transactions_filter - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - */ - MsgRegisterInterchainQuery.prototype.transactions_filter = ""; - - /** - * MsgRegisterInterchainQuery connection_id. - * @member {string} connection_id - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - */ - MsgRegisterInterchainQuery.prototype.connection_id = ""; - - /** - * MsgRegisterInterchainQuery update_period. - * @member {Long} update_period - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - */ - MsgRegisterInterchainQuery.prototype.update_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgRegisterInterchainQuery sender. - * @member {string} sender - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - */ - MsgRegisterInterchainQuery.prototype.sender = ""; - - /** - * Encodes the specified MsgRegisterInterchainQuery message. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQuery.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {neutron.interchainqueries.IMsgRegisterInterchainQuery} message MsgRegisterInterchainQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query_type != null && Object.hasOwnProperty.call(message, "query_type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.query_type); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.neutron.interchainqueries.KVKey.encode(message.keys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transactions_filter != null && Object.hasOwnProperty.call(message, "transactions_filter")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transactions_filter); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_id); - if (message.update_period != null && Object.hasOwnProperty.call(message, "update_period")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.update_period); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.sender); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainQuery message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {neutron.interchainqueries.IMsgRegisterInterchainQuery} message MsgRegisterInterchainQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainQuery message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgRegisterInterchainQuery} MsgRegisterInterchainQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgRegisterInterchainQuery(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_type = reader.string(); - break; - case 2: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.neutron.interchainqueries.KVKey.decode(reader, reader.uint32())); - break; - case 3: - message.transactions_filter = reader.string(); - break; - case 4: - message.connection_id = reader.string(); - break; - case 5: - message.update_period = reader.uint64(); - break; - case 6: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgRegisterInterchainQuery} MsgRegisterInterchainQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainQuery message. - * @function verify - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query_type != null && message.hasOwnProperty("query_type")) - if (!$util.isString(message.query_type)) - return "query_type: string 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.neutron.interchainqueries.KVKey.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - if (message.transactions_filter != null && message.hasOwnProperty("transactions_filter")) - if (!$util.isString(message.transactions_filter)) - return "transactions_filter: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.update_period != null && message.hasOwnProperty("update_period")) - if (!$util.isInteger(message.update_period) && !(message.update_period && $util.isInteger(message.update_period.low) && $util.isInteger(message.update_period.high))) - return "update_period: integer|Long expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgRegisterInterchainQuery} MsgRegisterInterchainQuery - */ - MsgRegisterInterchainQuery.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgRegisterInterchainQuery) - return object; - var message = new $root.neutron.interchainqueries.MsgRegisterInterchainQuery(); - if (object.query_type != null) - message.query_type = String(object.query_type); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".neutron.interchainqueries.MsgRegisterInterchainQuery.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".neutron.interchainqueries.MsgRegisterInterchainQuery.keys: object expected"); - message.keys[i] = $root.neutron.interchainqueries.KVKey.fromObject(object.keys[i]); - } - } - if (object.transactions_filter != null) - message.transactions_filter = String(object.transactions_filter); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.update_period != null) - if ($util.Long) - (message.update_period = $util.Long.fromValue(object.update_period)).unsigned = true; - else if (typeof object.update_period === "string") - message.update_period = parseInt(object.update_period, 10); - else if (typeof object.update_period === "number") - message.update_period = object.update_period; - else if (typeof object.update_period === "object") - message.update_period = new $util.LongBits(object.update_period.low >>> 0, object.update_period.high >>> 0).toNumber(true); - if (object.sender != null) - message.sender = String(object.sender); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @static - * @param {neutron.interchainqueries.MsgRegisterInterchainQuery} message MsgRegisterInterchainQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keys = []; - if (options.defaults) { - object.query_type = ""; - object.transactions_filter = ""; - object.connection_id = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.update_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.update_period = options.longs === String ? "0" : 0; - object.sender = ""; - } - if (message.query_type != null && message.hasOwnProperty("query_type")) - object.query_type = message.query_type; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.neutron.interchainqueries.KVKey.toObject(message.keys[j], options); - } - if (message.transactions_filter != null && message.hasOwnProperty("transactions_filter")) - object.transactions_filter = message.transactions_filter; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.update_period != null && message.hasOwnProperty("update_period")) - if (typeof message.update_period === "number") - object.update_period = options.longs === String ? String(message.update_period) : message.update_period; - else - object.update_period = options.longs === String ? $util.Long.prototype.toString.call(message.update_period) : options.longs === Number ? new $util.LongBits(message.update_period.low >>> 0, message.update_period.high >>> 0).toNumber(true) : message.update_period; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - return object; - }; - - /** - * Converts this MsgRegisterInterchainQuery to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgRegisterInterchainQuery - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainQuery; - })(); - - interchainqueries.MsgRegisterInterchainQueryResponse = (function() { - - /** - * Properties of a MsgRegisterInterchainQueryResponse. - * @memberof neutron.interchainqueries - * @interface IMsgRegisterInterchainQueryResponse - * @property {Long|null} [id] MsgRegisterInterchainQueryResponse id - */ - - /** - * Constructs a new MsgRegisterInterchainQueryResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgRegisterInterchainQueryResponse. - * @implements IMsgRegisterInterchainQueryResponse - * @constructor - * @param {neutron.interchainqueries.IMsgRegisterInterchainQueryResponse=} [properties] Properties to set - */ - function MsgRegisterInterchainQueryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterInterchainQueryResponse id. - * @member {Long} id - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @instance - */ - MsgRegisterInterchainQueryResponse.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified MsgRegisterInterchainQueryResponse message. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQueryResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.IMsgRegisterInterchainQueryResponse} message MsgRegisterInterchainQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.IMsgRegisterInterchainQueryResponse} message MsgRegisterInterchainQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgRegisterInterchainQueryResponse} MsgRegisterInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainQueryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgRegisterInterchainQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgRegisterInterchainQueryResponse} MsgRegisterInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainQueryResponse message. - * @function verify - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgRegisterInterchainQueryResponse} MsgRegisterInterchainQueryResponse - */ - MsgRegisterInterchainQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgRegisterInterchainQueryResponse) - return object; - var message = new $root.neutron.interchainqueries.MsgRegisterInterchainQueryResponse(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.MsgRegisterInterchainQueryResponse} message MsgRegisterInterchainQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainQueryResponse.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.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - return object; - }; - - /** - * Converts this MsgRegisterInterchainQueryResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgRegisterInterchainQueryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainQueryResponse; - })(); - - interchainqueries.MsgSubmitQueryResult = (function() { - - /** - * Properties of a MsgSubmitQueryResult. - * @memberof neutron.interchainqueries - * @interface IMsgSubmitQueryResult - * @property {Long|null} [query_id] MsgSubmitQueryResult query_id - * @property {string|null} [sender] MsgSubmitQueryResult sender - * @property {string|null} [client_id] MsgSubmitQueryResult client_id - * @property {neutron.interchainqueries.IQueryResult|null} [result] MsgSubmitQueryResult result - */ - - /** - * Constructs a new MsgSubmitQueryResult. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgSubmitQueryResult. - * @implements IMsgSubmitQueryResult - * @constructor - * @param {neutron.interchainqueries.IMsgSubmitQueryResult=} [properties] Properties to set - */ - function MsgSubmitQueryResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitQueryResult query_id. - * @member {Long} query_id - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @instance - */ - MsgSubmitQueryResult.prototype.query_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgSubmitQueryResult sender. - * @member {string} sender - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @instance - */ - MsgSubmitQueryResult.prototype.sender = ""; - - /** - * MsgSubmitQueryResult client_id. - * @member {string} client_id - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @instance - */ - MsgSubmitQueryResult.prototype.client_id = ""; - - /** - * MsgSubmitQueryResult result. - * @member {neutron.interchainqueries.IQueryResult|null|undefined} result - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @instance - */ - MsgSubmitQueryResult.prototype.result = null; - - /** - * Encodes the specified MsgSubmitQueryResult message. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResult.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {neutron.interchainqueries.IMsgSubmitQueryResult} message MsgSubmitQueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitQueryResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query_id != null && Object.hasOwnProperty.call(message, "query_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.query_id); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sender); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.client_id); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.neutron.interchainqueries.QueryResult.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgSubmitQueryResult message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResult.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {neutron.interchainqueries.IMsgSubmitQueryResult} message MsgSubmitQueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitQueryResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitQueryResult message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgSubmitQueryResult} MsgSubmitQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitQueryResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgSubmitQueryResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_id = reader.uint64(); - break; - case 2: - message.sender = reader.string(); - break; - case 3: - message.client_id = reader.string(); - break; - case 4: - message.result = $root.neutron.interchainqueries.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitQueryResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgSubmitQueryResult} MsgSubmitQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitQueryResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitQueryResult message. - * @function verify - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitQueryResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (!$util.isInteger(message.query_id) && !(message.query_id && $util.isInteger(message.query_id.low) && $util.isInteger(message.query_id.high))) - return "query_id: integer|Long expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.neutron.interchainqueries.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a MsgSubmitQueryResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgSubmitQueryResult} MsgSubmitQueryResult - */ - MsgSubmitQueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgSubmitQueryResult) - return object; - var message = new $root.neutron.interchainqueries.MsgSubmitQueryResult(); - if (object.query_id != null) - if ($util.Long) - (message.query_id = $util.Long.fromValue(object.query_id)).unsigned = true; - else if (typeof object.query_id === "string") - message.query_id = parseInt(object.query_id, 10); - else if (typeof object.query_id === "number") - message.query_id = object.query_id; - else if (typeof object.query_id === "object") - message.query_id = new $util.LongBits(object.query_id.low >>> 0, object.query_id.high >>> 0).toNumber(true); - if (object.sender != null) - message.sender = String(object.sender); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".neutron.interchainqueries.MsgSubmitQueryResult.result: object expected"); - message.result = $root.neutron.interchainqueries.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a MsgSubmitQueryResult message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @static - * @param {neutron.interchainqueries.MsgSubmitQueryResult} message MsgSubmitQueryResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitQueryResult.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.query_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_id = options.longs === String ? "0" : 0; - object.sender = ""; - object.client_id = ""; - object.result = null; - } - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (typeof message.query_id === "number") - object.query_id = options.longs === String ? String(message.query_id) : message.query_id; - else - object.query_id = options.longs === String ? $util.Long.prototype.toString.call(message.query_id) : options.longs === Number ? new $util.LongBits(message.query_id.low >>> 0, message.query_id.high >>> 0).toNumber(true) : message.query_id; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.neutron.interchainqueries.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this MsgSubmitQueryResult to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgSubmitQueryResult - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitQueryResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitQueryResult; - })(); - - interchainqueries.QueryResult = (function() { - - /** - * Properties of a QueryResult. - * @memberof neutron.interchainqueries - * @interface IQueryResult - * @property {Array.|null} [kv_results] QueryResult kv_results - * @property {neutron.interchainqueries.IBlock|null} [block] QueryResult block - * @property {Long|null} [height] QueryResult height - * @property {Long|null} [revision] QueryResult revision - * @property {boolean|null} [allow_kv_callbacks] QueryResult allow_kv_callbacks - */ - - /** - * Constructs a new QueryResult. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryResult. - * @implements IQueryResult - * @constructor - * @param {neutron.interchainqueries.IQueryResult=} [properties] Properties to set - */ - function QueryResult(properties) { - this.kv_results = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryResult kv_results. - * @member {Array.} kv_results - * @memberof neutron.interchainqueries.QueryResult - * @instance - */ - QueryResult.prototype.kv_results = $util.emptyArray; - - /** - * QueryResult block. - * @member {neutron.interchainqueries.IBlock|null|undefined} block - * @memberof neutron.interchainqueries.QueryResult - * @instance - */ - QueryResult.prototype.block = null; - - /** - * QueryResult height. - * @member {Long} height - * @memberof neutron.interchainqueries.QueryResult - * @instance - */ - QueryResult.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryResult revision. - * @member {Long} revision - * @memberof neutron.interchainqueries.QueryResult - * @instance - */ - QueryResult.prototype.revision = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * QueryResult allow_kv_callbacks. - * @member {boolean} allow_kv_callbacks - * @memberof neutron.interchainqueries.QueryResult - * @instance - */ - QueryResult.prototype.allow_kv_callbacks = false; - - /** - * Encodes the specified QueryResult message. Does not implicitly {@link neutron.interchainqueries.QueryResult.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {neutron.interchainqueries.IQueryResult} message QueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kv_results != null && message.kv_results.length) - for (var i = 0; i < message.kv_results.length; ++i) - $root.neutron.interchainqueries.StorageValue.encode(message.kv_results[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.block != null && Object.hasOwnProperty.call(message, "block")) - $root.neutron.interchainqueries.Block.encode(message.block, 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).uint64(message.height); - if (message.revision != null && Object.hasOwnProperty.call(message, "revision")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.revision); - if (message.allow_kv_callbacks != null && Object.hasOwnProperty.call(message, "allow_kv_callbacks")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.allow_kv_callbacks); - return writer; - }; - - /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryResult.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {neutron.interchainqueries.IQueryResult} message QueryResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryResult message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryResult} QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.kv_results && message.kv_results.length)) - message.kv_results = []; - message.kv_results.push($root.neutron.interchainqueries.StorageValue.decode(reader, reader.uint32())); - break; - case 2: - message.block = $root.neutron.interchainqueries.Block.decode(reader, reader.uint32()); - break; - case 3: - message.height = reader.uint64(); - break; - case 4: - message.revision = reader.uint64(); - break; - case 5: - message.allow_kv_callbacks = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryResult} QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryResult message. - * @function verify - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kv_results != null && message.hasOwnProperty("kv_results")) { - if (!Array.isArray(message.kv_results)) - return "kv_results: array expected"; - for (var i = 0; i < message.kv_results.length; ++i) { - var error = $root.neutron.interchainqueries.StorageValue.verify(message.kv_results[i]); - if (error) - return "kv_results." + error; - } - } - if (message.block != null && message.hasOwnProperty("block")) { - var error = $root.neutron.interchainqueries.Block.verify(message.block); - if (error) - return "block." + 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.revision != null && message.hasOwnProperty("revision")) - if (!$util.isInteger(message.revision) && !(message.revision && $util.isInteger(message.revision.low) && $util.isInteger(message.revision.high))) - return "revision: integer|Long expected"; - if (message.allow_kv_callbacks != null && message.hasOwnProperty("allow_kv_callbacks")) - if (typeof message.allow_kv_callbacks !== "boolean") - return "allow_kv_callbacks: boolean expected"; - return null; - }; - - /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryResult} QueryResult - */ - QueryResult.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryResult) - return object; - var message = new $root.neutron.interchainqueries.QueryResult(); - if (object.kv_results) { - if (!Array.isArray(object.kv_results)) - throw TypeError(".neutron.interchainqueries.QueryResult.kv_results: array expected"); - message.kv_results = []; - for (var i = 0; i < object.kv_results.length; ++i) { - if (typeof object.kv_results[i] !== "object") - throw TypeError(".neutron.interchainqueries.QueryResult.kv_results: object expected"); - message.kv_results[i] = $root.neutron.interchainqueries.StorageValue.fromObject(object.kv_results[i]); - } - } - if (object.block != null) { - if (typeof object.block !== "object") - throw TypeError(".neutron.interchainqueries.QueryResult.block: object expected"); - message.block = $root.neutron.interchainqueries.Block.fromObject(object.block); - } - 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); - if (object.revision != null) - if ($util.Long) - (message.revision = $util.Long.fromValue(object.revision)).unsigned = true; - else if (typeof object.revision === "string") - message.revision = parseInt(object.revision, 10); - else if (typeof object.revision === "number") - message.revision = object.revision; - else if (typeof object.revision === "object") - message.revision = new $util.LongBits(object.revision.low >>> 0, object.revision.high >>> 0).toNumber(true); - if (object.allow_kv_callbacks != null) - message.allow_kv_callbacks = Boolean(object.allow_kv_callbacks); - return message; - }; - - /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryResult - * @static - * @param {neutron.interchainqueries.QueryResult} message QueryResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.kv_results = []; - if (options.defaults) { - object.block = null; - 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 ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision = options.longs === String ? "0" : 0; - object.allow_kv_callbacks = false; - } - if (message.kv_results && message.kv_results.length) { - object.kv_results = []; - for (var j = 0; j < message.kv_results.length; ++j) - object.kv_results[j] = $root.neutron.interchainqueries.StorageValue.toObject(message.kv_results[j], options); - } - if (message.block != null && message.hasOwnProperty("block")) - object.block = $root.neutron.interchainqueries.Block.toObject(message.block, 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(true) : message.height; - if (message.revision != null && message.hasOwnProperty("revision")) - if (typeof message.revision === "number") - object.revision = options.longs === String ? String(message.revision) : message.revision; - else - object.revision = options.longs === String ? $util.Long.prototype.toString.call(message.revision) : options.longs === Number ? new $util.LongBits(message.revision.low >>> 0, message.revision.high >>> 0).toNumber(true) : message.revision; - if (message.allow_kv_callbacks != null && message.hasOwnProperty("allow_kv_callbacks")) - object.allow_kv_callbacks = message.allow_kv_callbacks; - return object; - }; - - /** - * Converts this QueryResult to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryResult - * @instance - * @returns {Object.} JSON object - */ - QueryResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryResult; - })(); - - interchainqueries.StorageValue = (function() { - - /** - * Properties of a StorageValue. - * @memberof neutron.interchainqueries - * @interface IStorageValue - * @property {string|null} [storage_prefix] StorageValue storage_prefix - * @property {Uint8Array|null} [key] StorageValue key - * @property {Uint8Array|null} [value] StorageValue value - * @property {tendermint.crypto.IProofOps|null} [Proof] StorageValue Proof - */ - - /** - * Constructs a new StorageValue. - * @memberof neutron.interchainqueries - * @classdesc Represents a StorageValue. - * @implements IStorageValue - * @constructor - * @param {neutron.interchainqueries.IStorageValue=} [properties] Properties to set - */ - function StorageValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageValue storage_prefix. - * @member {string} storage_prefix - * @memberof neutron.interchainqueries.StorageValue - * @instance - */ - StorageValue.prototype.storage_prefix = ""; - - /** - * StorageValue key. - * @member {Uint8Array} key - * @memberof neutron.interchainqueries.StorageValue - * @instance - */ - StorageValue.prototype.key = $util.newBuffer([]); - - /** - * StorageValue value. - * @member {Uint8Array} value - * @memberof neutron.interchainqueries.StorageValue - * @instance - */ - StorageValue.prototype.value = $util.newBuffer([]); - - /** - * StorageValue Proof. - * @member {tendermint.crypto.IProofOps|null|undefined} Proof - * @memberof neutron.interchainqueries.StorageValue - * @instance - */ - StorageValue.prototype.Proof = null; - - /** - * Encodes the specified StorageValue message. Does not implicitly {@link neutron.interchainqueries.StorageValue.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {neutron.interchainqueries.IStorageValue} message StorageValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.storage_prefix != null && Object.hasOwnProperty.call(message, "storage_prefix")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.storage_prefix); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.value); - if (message.Proof != null && Object.hasOwnProperty.call(message, "Proof")) - $root.tendermint.crypto.ProofOps.encode(message.Proof, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified StorageValue message, length delimited. Does not implicitly {@link neutron.interchainqueries.StorageValue.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {neutron.interchainqueries.IStorageValue} message StorageValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageValue message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.StorageValue} StorageValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.StorageValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.storage_prefix = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - case 3: - message.value = reader.bytes(); - break; - case 4: - message.Proof = $root.tendermint.crypto.ProofOps.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.StorageValue} StorageValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageValue message. - * @function verify - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.storage_prefix != null && message.hasOwnProperty("storage_prefix")) - if (!$util.isString(message.storage_prefix)) - return "storage_prefix: 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.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.ProofOps.verify(message.Proof); - if (error) - return "Proof." + error; - } - return null; - }; - - /** - * Creates a StorageValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.StorageValue} StorageValue - */ - StorageValue.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.StorageValue) - return object; - var message = new $root.neutron.interchainqueries.StorageValue(); - if (object.storage_prefix != null) - message.storage_prefix = String(object.storage_prefix); - 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(".neutron.interchainqueries.StorageValue.Proof: object expected"); - message.Proof = $root.tendermint.crypto.ProofOps.fromObject(object.Proof); - } - return message; - }; - - /** - * Creates a plain object from a StorageValue message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.StorageValue - * @static - * @param {neutron.interchainqueries.StorageValue} message StorageValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.storage_prefix = ""; - 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 (message.storage_prefix != null && message.hasOwnProperty("storage_prefix")) - object.storage_prefix = message.storage_prefix; - 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.ProofOps.toObject(message.Proof, options); - return object; - }; - - /** - * Converts this StorageValue to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.StorageValue - * @instance - * @returns {Object.} JSON object - */ - StorageValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StorageValue; - })(); - - interchainqueries.Block = (function() { - - /** - * Properties of a Block. - * @memberof neutron.interchainqueries - * @interface IBlock - * @property {google.protobuf.IAny|null} [next_block_header] Block next_block_header - * @property {google.protobuf.IAny|null} [header] Block header - * @property {neutron.interchainqueries.ITxValue|null} [tx] Block tx - */ - - /** - * Constructs a new Block. - * @memberof neutron.interchainqueries - * @classdesc Represents a Block. - * @implements IBlock - * @constructor - * @param {neutron.interchainqueries.IBlock=} [properties] Properties to set - */ - function Block(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Block next_block_header. - * @member {google.protobuf.IAny|null|undefined} next_block_header - * @memberof neutron.interchainqueries.Block - * @instance - */ - Block.prototype.next_block_header = null; - - /** - * Block header. - * @member {google.protobuf.IAny|null|undefined} header - * @memberof neutron.interchainqueries.Block - * @instance - */ - Block.prototype.header = null; - - /** - * Block tx. - * @member {neutron.interchainqueries.ITxValue|null|undefined} tx - * @memberof neutron.interchainqueries.Block - * @instance - */ - Block.prototype.tx = null; - - /** - * Encodes the specified Block message. Does not implicitly {@link neutron.interchainqueries.Block.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.Block - * @static - * @param {neutron.interchainqueries.IBlock} message Block message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Block.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.next_block_header != null && Object.hasOwnProperty.call(message, "next_block_header")) - $root.google.protobuf.Any.encode(message.next_block_header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.google.protobuf.Any.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) - $root.neutron.interchainqueries.TxValue.encode(message.tx, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Block message, length delimited. Does not implicitly {@link neutron.interchainqueries.Block.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.Block - * @static - * @param {neutron.interchainqueries.IBlock} message Block message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Block.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Block message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.Block - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.Block} Block - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Block.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.Block(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_block_header = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 2: - message.header = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - case 3: - message.tx = $root.neutron.interchainqueries.TxValue.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Block message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.Block - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.Block} Block - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Block.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Block message. - * @function verify - * @memberof neutron.interchainqueries.Block - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Block.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.next_block_header != null && message.hasOwnProperty("next_block_header")) { - var error = $root.google.protobuf.Any.verify(message.next_block_header); - if (error) - return "next_block_header." + error; - } - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.google.protobuf.Any.verify(message.header); - if (error) - return "header." + error; - } - if (message.tx != null && message.hasOwnProperty("tx")) { - var error = $root.neutron.interchainqueries.TxValue.verify(message.tx); - if (error) - return "tx." + error; - } - return null; - }; - - /** - * Creates a Block message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.Block - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.Block} Block - */ - Block.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.Block) - return object; - var message = new $root.neutron.interchainqueries.Block(); - if (object.next_block_header != null) { - if (typeof object.next_block_header !== "object") - throw TypeError(".neutron.interchainqueries.Block.next_block_header: object expected"); - message.next_block_header = $root.google.protobuf.Any.fromObject(object.next_block_header); - } - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".neutron.interchainqueries.Block.header: object expected"); - message.header = $root.google.protobuf.Any.fromObject(object.header); - } - if (object.tx != null) { - if (typeof object.tx !== "object") - throw TypeError(".neutron.interchainqueries.Block.tx: object expected"); - message.tx = $root.neutron.interchainqueries.TxValue.fromObject(object.tx); - } - return message; - }; - - /** - * Creates a plain object from a Block message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.Block - * @static - * @param {neutron.interchainqueries.Block} message Block - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Block.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.next_block_header = null; - object.header = null; - object.tx = null; - } - if (message.next_block_header != null && message.hasOwnProperty("next_block_header")) - object.next_block_header = $root.google.protobuf.Any.toObject(message.next_block_header, options); - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.google.protobuf.Any.toObject(message.header, options); - if (message.tx != null && message.hasOwnProperty("tx")) - object.tx = $root.neutron.interchainqueries.TxValue.toObject(message.tx, options); - return object; - }; - - /** - * Converts this Block to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.Block - * @instance - * @returns {Object.} JSON object - */ - Block.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Block; - })(); - - interchainqueries.TxValue = (function() { - - /** - * Properties of a TxValue. - * @memberof neutron.interchainqueries - * @interface ITxValue - * @property {tendermint.abci.IResponseDeliverTx|null} [response] TxValue response - * @property {tendermint.crypto.IProof|null} [delivery_proof] TxValue delivery_proof - * @property {tendermint.crypto.IProof|null} [inclusion_proof] TxValue inclusion_proof - * @property {Uint8Array|null} [data] TxValue data - */ - - /** - * Constructs a new TxValue. - * @memberof neutron.interchainqueries - * @classdesc Represents a TxValue. - * @implements ITxValue - * @constructor - * @param {neutron.interchainqueries.ITxValue=} [properties] Properties to set - */ - function TxValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxValue response. - * @member {tendermint.abci.IResponseDeliverTx|null|undefined} response - * @memberof neutron.interchainqueries.TxValue - * @instance - */ - TxValue.prototype.response = null; - - /** - * TxValue delivery_proof. - * @member {tendermint.crypto.IProof|null|undefined} delivery_proof - * @memberof neutron.interchainqueries.TxValue - * @instance - */ - TxValue.prototype.delivery_proof = null; - - /** - * TxValue inclusion_proof. - * @member {tendermint.crypto.IProof|null|undefined} inclusion_proof - * @memberof neutron.interchainqueries.TxValue - * @instance - */ - TxValue.prototype.inclusion_proof = null; - - /** - * TxValue data. - * @member {Uint8Array} data - * @memberof neutron.interchainqueries.TxValue - * @instance - */ - TxValue.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified TxValue message. Does not implicitly {@link neutron.interchainqueries.TxValue.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {neutron.interchainqueries.ITxValue} message TxValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.response != null && Object.hasOwnProperty.call(message, "response")) - $root.tendermint.abci.ResponseDeliverTx.encode(message.response, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.delivery_proof != null && Object.hasOwnProperty.call(message, "delivery_proof")) - $root.tendermint.crypto.Proof.encode(message.delivery_proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inclusion_proof != null && Object.hasOwnProperty.call(message, "inclusion_proof")) - $root.tendermint.crypto.Proof.encode(message.inclusion_proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified TxValue message, length delimited. Does not implicitly {@link neutron.interchainqueries.TxValue.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {neutron.interchainqueries.ITxValue} message TxValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxValue message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.TxValue} TxValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.TxValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.response = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 2: - message.delivery_proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - case 3: - message.inclusion_proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.TxValue} TxValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxValue message. - * @function verify - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.response != null && message.hasOwnProperty("response")) { - var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.response); - if (error) - return "response." + error; - } - if (message.delivery_proof != null && message.hasOwnProperty("delivery_proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.delivery_proof); - if (error) - return "delivery_proof." + error; - } - if (message.inclusion_proof != null && message.hasOwnProperty("inclusion_proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.inclusion_proof); - if (error) - return "inclusion_proof." + error; - } - 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 TxValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.TxValue} TxValue - */ - TxValue.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.TxValue) - return object; - var message = new $root.neutron.interchainqueries.TxValue(); - if (object.response != null) { - if (typeof object.response !== "object") - throw TypeError(".neutron.interchainqueries.TxValue.response: object expected"); - message.response = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.response); - } - if (object.delivery_proof != null) { - if (typeof object.delivery_proof !== "object") - throw TypeError(".neutron.interchainqueries.TxValue.delivery_proof: object expected"); - message.delivery_proof = $root.tendermint.crypto.Proof.fromObject(object.delivery_proof); - } - if (object.inclusion_proof != null) { - if (typeof object.inclusion_proof !== "object") - throw TypeError(".neutron.interchainqueries.TxValue.inclusion_proof: object expected"); - message.inclusion_proof = $root.tendermint.crypto.Proof.fromObject(object.inclusion_proof); - } - 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 TxValue message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.TxValue - * @static - * @param {neutron.interchainqueries.TxValue} message TxValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.response = null; - object.delivery_proof = null; - object.inclusion_proof = null; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.response != null && message.hasOwnProperty("response")) - object.response = $root.tendermint.abci.ResponseDeliverTx.toObject(message.response, options); - if (message.delivery_proof != null && message.hasOwnProperty("delivery_proof")) - object.delivery_proof = $root.tendermint.crypto.Proof.toObject(message.delivery_proof, options); - if (message.inclusion_proof != null && message.hasOwnProperty("inclusion_proof")) - object.inclusion_proof = $root.tendermint.crypto.Proof.toObject(message.inclusion_proof, options); - 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 TxValue to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.TxValue - * @instance - * @returns {Object.} JSON object - */ - TxValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxValue; - })(); - - interchainqueries.MsgSubmitQueryResultResponse = (function() { - - /** - * Properties of a MsgSubmitQueryResultResponse. - * @memberof neutron.interchainqueries - * @interface IMsgSubmitQueryResultResponse - */ - - /** - * Constructs a new MsgSubmitQueryResultResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgSubmitQueryResultResponse. - * @implements IMsgSubmitQueryResultResponse - * @constructor - * @param {neutron.interchainqueries.IMsgSubmitQueryResultResponse=} [properties] Properties to set - */ - function MsgSubmitQueryResultResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgSubmitQueryResultResponse message. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResultResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {neutron.interchainqueries.IMsgSubmitQueryResultResponse} message MsgSubmitQueryResultResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitQueryResultResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgSubmitQueryResultResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResultResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {neutron.interchainqueries.IMsgSubmitQueryResultResponse} message MsgSubmitQueryResultResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitQueryResultResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitQueryResultResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgSubmitQueryResultResponse} MsgSubmitQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitQueryResultResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgSubmitQueryResultResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitQueryResultResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgSubmitQueryResultResponse} MsgSubmitQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitQueryResultResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitQueryResultResponse message. - * @function verify - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitQueryResultResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgSubmitQueryResultResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgSubmitQueryResultResponse} MsgSubmitQueryResultResponse - */ - MsgSubmitQueryResultResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgSubmitQueryResultResponse) - return object; - return new $root.neutron.interchainqueries.MsgSubmitQueryResultResponse(); - }; - - /** - * Creates a plain object from a MsgSubmitQueryResultResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @static - * @param {neutron.interchainqueries.MsgSubmitQueryResultResponse} message MsgSubmitQueryResultResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitQueryResultResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgSubmitQueryResultResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgSubmitQueryResultResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitQueryResultResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitQueryResultResponse; - })(); - - interchainqueries.MsgRemoveInterchainQueryRequest = (function() { - - /** - * Properties of a MsgRemoveInterchainQueryRequest. - * @memberof neutron.interchainqueries - * @interface IMsgRemoveInterchainQueryRequest - * @property {Long|null} [query_id] MsgRemoveInterchainQueryRequest query_id - * @property {string|null} [sender] MsgRemoveInterchainQueryRequest sender - */ - - /** - * Constructs a new MsgRemoveInterchainQueryRequest. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgRemoveInterchainQueryRequest. - * @implements IMsgRemoveInterchainQueryRequest - * @constructor - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryRequest=} [properties] Properties to set - */ - function MsgRemoveInterchainQueryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRemoveInterchainQueryRequest query_id. - * @member {Long} query_id - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @instance - */ - MsgRemoveInterchainQueryRequest.prototype.query_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgRemoveInterchainQueryRequest sender. - * @member {string} sender - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @instance - */ - MsgRemoveInterchainQueryRequest.prototype.sender = ""; - - /** - * Encodes the specified MsgRemoveInterchainQueryRequest message. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryRequest} message MsgRemoveInterchainQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRemoveInterchainQueryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query_id != null && Object.hasOwnProperty.call(message, "query_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.query_id); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sender); - return writer; - }; - - /** - * Encodes the specified MsgRemoveInterchainQueryRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryRequest} message MsgRemoveInterchainQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRemoveInterchainQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRemoveInterchainQueryRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgRemoveInterchainQueryRequest} MsgRemoveInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRemoveInterchainQueryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgRemoveInterchainQueryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_id = reader.uint64(); - break; - case 2: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRemoveInterchainQueryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgRemoveInterchainQueryRequest} MsgRemoveInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRemoveInterchainQueryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRemoveInterchainQueryRequest message. - * @function verify - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRemoveInterchainQueryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (!$util.isInteger(message.query_id) && !(message.query_id && $util.isInteger(message.query_id.low) && $util.isInteger(message.query_id.high))) - return "query_id: integer|Long expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - return null; - }; - - /** - * Creates a MsgRemoveInterchainQueryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgRemoveInterchainQueryRequest} MsgRemoveInterchainQueryRequest - */ - MsgRemoveInterchainQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgRemoveInterchainQueryRequest) - return object; - var message = new $root.neutron.interchainqueries.MsgRemoveInterchainQueryRequest(); - if (object.query_id != null) - if ($util.Long) - (message.query_id = $util.Long.fromValue(object.query_id)).unsigned = true; - else if (typeof object.query_id === "string") - message.query_id = parseInt(object.query_id, 10); - else if (typeof object.query_id === "number") - message.query_id = object.query_id; - else if (typeof object.query_id === "object") - message.query_id = new $util.LongBits(object.query_id.low >>> 0, object.query_id.high >>> 0).toNumber(true); - if (object.sender != null) - message.sender = String(object.sender); - return message; - }; - - /** - * Creates a plain object from a MsgRemoveInterchainQueryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @static - * @param {neutron.interchainqueries.MsgRemoveInterchainQueryRequest} message MsgRemoveInterchainQueryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRemoveInterchainQueryRequest.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.query_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_id = options.longs === String ? "0" : 0; - object.sender = ""; - } - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (typeof message.query_id === "number") - object.query_id = options.longs === String ? String(message.query_id) : message.query_id; - else - object.query_id = options.longs === String ? $util.Long.prototype.toString.call(message.query_id) : options.longs === Number ? new $util.LongBits(message.query_id.low >>> 0, message.query_id.high >>> 0).toNumber(true) : message.query_id; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - return object; - }; - - /** - * Converts this MsgRemoveInterchainQueryRequest to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryRequest - * @instance - * @returns {Object.} JSON object - */ - MsgRemoveInterchainQueryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRemoveInterchainQueryRequest; - })(); - - interchainqueries.MsgRemoveInterchainQueryResponse = (function() { - - /** - * Properties of a MsgRemoveInterchainQueryResponse. - * @memberof neutron.interchainqueries - * @interface IMsgRemoveInterchainQueryResponse - */ - - /** - * Constructs a new MsgRemoveInterchainQueryResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgRemoveInterchainQueryResponse. - * @implements IMsgRemoveInterchainQueryResponse - * @constructor - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryResponse=} [properties] Properties to set - */ - function MsgRemoveInterchainQueryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgRemoveInterchainQueryResponse message. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryResponse} message MsgRemoveInterchainQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRemoveInterchainQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgRemoveInterchainQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.IMsgRemoveInterchainQueryResponse} message MsgRemoveInterchainQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRemoveInterchainQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRemoveInterchainQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgRemoveInterchainQueryResponse} MsgRemoveInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRemoveInterchainQueryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgRemoveInterchainQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRemoveInterchainQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgRemoveInterchainQueryResponse} MsgRemoveInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRemoveInterchainQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRemoveInterchainQueryResponse message. - * @function verify - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRemoveInterchainQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgRemoveInterchainQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgRemoveInterchainQueryResponse} MsgRemoveInterchainQueryResponse - */ - MsgRemoveInterchainQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgRemoveInterchainQueryResponse) - return object; - return new $root.neutron.interchainqueries.MsgRemoveInterchainQueryResponse(); - }; - - /** - * Creates a plain object from a MsgRemoveInterchainQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.MsgRemoveInterchainQueryResponse} message MsgRemoveInterchainQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRemoveInterchainQueryResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgRemoveInterchainQueryResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgRemoveInterchainQueryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRemoveInterchainQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRemoveInterchainQueryResponse; - })(); - - interchainqueries.MsgUpdateInterchainQueryRequest = (function() { - - /** - * Properties of a MsgUpdateInterchainQueryRequest. - * @memberof neutron.interchainqueries - * @interface IMsgUpdateInterchainQueryRequest - * @property {Long|null} [query_id] MsgUpdateInterchainQueryRequest query_id - * @property {Array.|null} [new_keys] MsgUpdateInterchainQueryRequest new_keys - * @property {Long|null} [new_update_period] MsgUpdateInterchainQueryRequest new_update_period - * @property {string|null} [new_transactions_filter] MsgUpdateInterchainQueryRequest new_transactions_filter - * @property {string|null} [sender] MsgUpdateInterchainQueryRequest sender - */ - - /** - * Constructs a new MsgUpdateInterchainQueryRequest. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgUpdateInterchainQueryRequest. - * @implements IMsgUpdateInterchainQueryRequest - * @constructor - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryRequest=} [properties] Properties to set - */ - function MsgUpdateInterchainQueryRequest(properties) { - this.new_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]]; - } - - /** - * MsgUpdateInterchainQueryRequest query_id. - * @member {Long} query_id - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @instance - */ - MsgUpdateInterchainQueryRequest.prototype.query_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgUpdateInterchainQueryRequest new_keys. - * @member {Array.} new_keys - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @instance - */ - MsgUpdateInterchainQueryRequest.prototype.new_keys = $util.emptyArray; - - /** - * MsgUpdateInterchainQueryRequest new_update_period. - * @member {Long} new_update_period - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @instance - */ - MsgUpdateInterchainQueryRequest.prototype.new_update_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgUpdateInterchainQueryRequest new_transactions_filter. - * @member {string} new_transactions_filter - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @instance - */ - MsgUpdateInterchainQueryRequest.prototype.new_transactions_filter = ""; - - /** - * MsgUpdateInterchainQueryRequest sender. - * @member {string} sender - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @instance - */ - MsgUpdateInterchainQueryRequest.prototype.sender = ""; - - /** - * Encodes the specified MsgUpdateInterchainQueryRequest message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryRequest} message MsgUpdateInterchainQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateInterchainQueryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query_id != null && Object.hasOwnProperty.call(message, "query_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.query_id); - if (message.new_keys != null && message.new_keys.length) - for (var i = 0; i < message.new_keys.length; ++i) - $root.neutron.interchainqueries.KVKey.encode(message.new_keys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.new_update_period != null && Object.hasOwnProperty.call(message, "new_update_period")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.new_update_period); - if (message.new_transactions_filter != null && Object.hasOwnProperty.call(message, "new_transactions_filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.new_transactions_filter); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.sender); - return writer; - }; - - /** - * Encodes the specified MsgUpdateInterchainQueryRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryRequest} message MsgUpdateInterchainQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateInterchainQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateInterchainQueryRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgUpdateInterchainQueryRequest} MsgUpdateInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateInterchainQueryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgUpdateInterchainQueryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_id = reader.uint64(); - break; - case 2: - if (!(message.new_keys && message.new_keys.length)) - message.new_keys = []; - message.new_keys.push($root.neutron.interchainqueries.KVKey.decode(reader, reader.uint32())); - break; - case 3: - message.new_update_period = reader.uint64(); - break; - case 4: - message.new_transactions_filter = reader.string(); - break; - case 5: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateInterchainQueryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgUpdateInterchainQueryRequest} MsgUpdateInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateInterchainQueryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateInterchainQueryRequest message. - * @function verify - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateInterchainQueryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (!$util.isInteger(message.query_id) && !(message.query_id && $util.isInteger(message.query_id.low) && $util.isInteger(message.query_id.high))) - return "query_id: integer|Long expected"; - if (message.new_keys != null && message.hasOwnProperty("new_keys")) { - if (!Array.isArray(message.new_keys)) - return "new_keys: array expected"; - for (var i = 0; i < message.new_keys.length; ++i) { - var error = $root.neutron.interchainqueries.KVKey.verify(message.new_keys[i]); - if (error) - return "new_keys." + error; - } - } - if (message.new_update_period != null && message.hasOwnProperty("new_update_period")) - if (!$util.isInteger(message.new_update_period) && !(message.new_update_period && $util.isInteger(message.new_update_period.low) && $util.isInteger(message.new_update_period.high))) - return "new_update_period: integer|Long expected"; - if (message.new_transactions_filter != null && message.hasOwnProperty("new_transactions_filter")) - if (!$util.isString(message.new_transactions_filter)) - return "new_transactions_filter: string expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - return null; - }; - - /** - * Creates a MsgUpdateInterchainQueryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgUpdateInterchainQueryRequest} MsgUpdateInterchainQueryRequest - */ - MsgUpdateInterchainQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgUpdateInterchainQueryRequest) - return object; - var message = new $root.neutron.interchainqueries.MsgUpdateInterchainQueryRequest(); - if (object.query_id != null) - if ($util.Long) - (message.query_id = $util.Long.fromValue(object.query_id)).unsigned = true; - else if (typeof object.query_id === "string") - message.query_id = parseInt(object.query_id, 10); - else if (typeof object.query_id === "number") - message.query_id = object.query_id; - else if (typeof object.query_id === "object") - message.query_id = new $util.LongBits(object.query_id.low >>> 0, object.query_id.high >>> 0).toNumber(true); - if (object.new_keys) { - if (!Array.isArray(object.new_keys)) - throw TypeError(".neutron.interchainqueries.MsgUpdateInterchainQueryRequest.new_keys: array expected"); - message.new_keys = []; - for (var i = 0; i < object.new_keys.length; ++i) { - if (typeof object.new_keys[i] !== "object") - throw TypeError(".neutron.interchainqueries.MsgUpdateInterchainQueryRequest.new_keys: object expected"); - message.new_keys[i] = $root.neutron.interchainqueries.KVKey.fromObject(object.new_keys[i]); - } - } - if (object.new_update_period != null) - if ($util.Long) - (message.new_update_period = $util.Long.fromValue(object.new_update_period)).unsigned = true; - else if (typeof object.new_update_period === "string") - message.new_update_period = parseInt(object.new_update_period, 10); - else if (typeof object.new_update_period === "number") - message.new_update_period = object.new_update_period; - else if (typeof object.new_update_period === "object") - message.new_update_period = new $util.LongBits(object.new_update_period.low >>> 0, object.new_update_period.high >>> 0).toNumber(true); - if (object.new_transactions_filter != null) - message.new_transactions_filter = String(object.new_transactions_filter); - if (object.sender != null) - message.sender = String(object.sender); - return message; - }; - - /** - * Creates a plain object from a MsgUpdateInterchainQueryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @static - * @param {neutron.interchainqueries.MsgUpdateInterchainQueryRequest} message MsgUpdateInterchainQueryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateInterchainQueryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.new_keys = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.query_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_id = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.new_update_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.new_update_period = options.longs === String ? "0" : 0; - object.new_transactions_filter = ""; - object.sender = ""; - } - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (typeof message.query_id === "number") - object.query_id = options.longs === String ? String(message.query_id) : message.query_id; - else - object.query_id = options.longs === String ? $util.Long.prototype.toString.call(message.query_id) : options.longs === Number ? new $util.LongBits(message.query_id.low >>> 0, message.query_id.high >>> 0).toNumber(true) : message.query_id; - if (message.new_keys && message.new_keys.length) { - object.new_keys = []; - for (var j = 0; j < message.new_keys.length; ++j) - object.new_keys[j] = $root.neutron.interchainqueries.KVKey.toObject(message.new_keys[j], options); - } - if (message.new_update_period != null && message.hasOwnProperty("new_update_period")) - if (typeof message.new_update_period === "number") - object.new_update_period = options.longs === String ? String(message.new_update_period) : message.new_update_period; - else - object.new_update_period = options.longs === String ? $util.Long.prototype.toString.call(message.new_update_period) : options.longs === Number ? new $util.LongBits(message.new_update_period.low >>> 0, message.new_update_period.high >>> 0).toNumber(true) : message.new_update_period; - if (message.new_transactions_filter != null && message.hasOwnProperty("new_transactions_filter")) - object.new_transactions_filter = message.new_transactions_filter; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - return object; - }; - - /** - * Converts this MsgUpdateInterchainQueryRequest to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryRequest - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateInterchainQueryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateInterchainQueryRequest; - })(); - - interchainqueries.MsgUpdateInterchainQueryResponse = (function() { - - /** - * Properties of a MsgUpdateInterchainQueryResponse. - * @memberof neutron.interchainqueries - * @interface IMsgUpdateInterchainQueryResponse - */ - - /** - * Constructs a new MsgUpdateInterchainQueryResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgUpdateInterchainQueryResponse. - * @implements IMsgUpdateInterchainQueryResponse - * @constructor - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryResponse=} [properties] Properties to set - */ - function MsgUpdateInterchainQueryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateInterchainQueryResponse message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryResponse} message MsgUpdateInterchainQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateInterchainQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateInterchainQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.IMsgUpdateInterchainQueryResponse} message MsgUpdateInterchainQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateInterchainQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateInterchainQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgUpdateInterchainQueryResponse} MsgUpdateInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateInterchainQueryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgUpdateInterchainQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateInterchainQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgUpdateInterchainQueryResponse} MsgUpdateInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateInterchainQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateInterchainQueryResponse message. - * @function verify - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateInterchainQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateInterchainQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgUpdateInterchainQueryResponse} MsgUpdateInterchainQueryResponse - */ - MsgUpdateInterchainQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgUpdateInterchainQueryResponse) - return object; - return new $root.neutron.interchainqueries.MsgUpdateInterchainQueryResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateInterchainQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @static - * @param {neutron.interchainqueries.MsgUpdateInterchainQueryResponse} message MsgUpdateInterchainQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateInterchainQueryResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateInterchainQueryResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgUpdateInterchainQueryResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateInterchainQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateInterchainQueryResponse; - })(); - - interchainqueries.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof neutron.interchainqueries - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {neutron.interchainqueries.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {neutron.interchainqueries.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof neutron.interchainqueries.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {neutron.interchainqueries.IParams|null|undefined} params - * @memberof neutron.interchainqueries.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {neutron.interchainqueries.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.interchainqueries.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {neutron.interchainqueries.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.neutron.interchainqueries.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.interchainqueries.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgUpdateParams) - return object; - var message = new $root.neutron.interchainqueries.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.interchainqueries.MsgUpdateParams.params: object expected"); - message.params = $root.neutron.interchainqueries.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgUpdateParams - * @static - * @param {neutron.interchainqueries.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.interchainqueries.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - interchainqueries.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof neutron.interchainqueries - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {neutron.interchainqueries.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {neutron.interchainqueries.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {neutron.interchainqueries.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.MsgUpdateParamsResponse) - return object; - return new $root.neutron.interchainqueries.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @static - * @param {neutron.interchainqueries.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - interchainqueries.Params = (function() { - - /** - * Properties of a Params. - * @memberof neutron.interchainqueries - * @interface IParams - * @property {Long|null} [query_submit_timeout] Params query_submit_timeout - * @property {Array.|null} [query_deposit] Params query_deposit - * @property {Long|null} [tx_query_removal_limit] Params tx_query_removal_limit - */ - - /** - * Constructs a new Params. - * @memberof neutron.interchainqueries - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {neutron.interchainqueries.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.query_deposit = []; - if (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 query_submit_timeout. - * @member {Long} query_submit_timeout - * @memberof neutron.interchainqueries.Params - * @instance - */ - Params.prototype.query_submit_timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params query_deposit. - * @member {Array.} query_deposit - * @memberof neutron.interchainqueries.Params - * @instance - */ - Params.prototype.query_deposit = $util.emptyArray; - - /** - * Params tx_query_removal_limit. - * @member {Long} tx_query_removal_limit - * @memberof neutron.interchainqueries.Params - * @instance - */ - Params.prototype.tx_query_removal_limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.interchainqueries.Params.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.Params - * @static - * @param {neutron.interchainqueries.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.query_submit_timeout != null && Object.hasOwnProperty.call(message, "query_submit_timeout")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.query_submit_timeout); - if (message.query_deposit != null && message.query_deposit.length) - for (var i = 0; i < message.query_deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.query_deposit[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tx_query_removal_limit != null && Object.hasOwnProperty.call(message, "tx_query_removal_limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.tx_query_removal_limit); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.interchainqueries.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.Params - * @static - * @param {neutron.interchainqueries.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 neutron.interchainqueries.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.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.neutron.interchainqueries.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_submit_timeout = reader.uint64(); - break; - case 2: - if (!(message.query_deposit && message.query_deposit.length)) - message.query_deposit = []; - message.query_deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 3: - message.tx_query_removal_limit = 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 neutron.interchainqueries.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.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 neutron.interchainqueries.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.query_submit_timeout != null && message.hasOwnProperty("query_submit_timeout")) - if (!$util.isInteger(message.query_submit_timeout) && !(message.query_submit_timeout && $util.isInteger(message.query_submit_timeout.low) && $util.isInteger(message.query_submit_timeout.high))) - return "query_submit_timeout: integer|Long expected"; - if (message.query_deposit != null && message.hasOwnProperty("query_deposit")) { - if (!Array.isArray(message.query_deposit)) - return "query_deposit: array expected"; - for (var i = 0; i < message.query_deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.query_deposit[i]); - if (error) - return "query_deposit." + error; - } - } - if (message.tx_query_removal_limit != null && message.hasOwnProperty("tx_query_removal_limit")) - if (!$util.isInteger(message.tx_query_removal_limit) && !(message.tx_query_removal_limit && $util.isInteger(message.tx_query_removal_limit.low) && $util.isInteger(message.tx_query_removal_limit.high))) - return "tx_query_removal_limit: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.Params - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.Params) - return object; - var message = new $root.neutron.interchainqueries.Params(); - if (object.query_submit_timeout != null) - if ($util.Long) - (message.query_submit_timeout = $util.Long.fromValue(object.query_submit_timeout)).unsigned = true; - else if (typeof object.query_submit_timeout === "string") - message.query_submit_timeout = parseInt(object.query_submit_timeout, 10); - else if (typeof object.query_submit_timeout === "number") - message.query_submit_timeout = object.query_submit_timeout; - else if (typeof object.query_submit_timeout === "object") - message.query_submit_timeout = new $util.LongBits(object.query_submit_timeout.low >>> 0, object.query_submit_timeout.high >>> 0).toNumber(true); - if (object.query_deposit) { - if (!Array.isArray(object.query_deposit)) - throw TypeError(".neutron.interchainqueries.Params.query_deposit: array expected"); - message.query_deposit = []; - for (var i = 0; i < object.query_deposit.length; ++i) { - if (typeof object.query_deposit[i] !== "object") - throw TypeError(".neutron.interchainqueries.Params.query_deposit: object expected"); - message.query_deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.query_deposit[i]); - } - } - if (object.tx_query_removal_limit != null) - if ($util.Long) - (message.tx_query_removal_limit = $util.Long.fromValue(object.tx_query_removal_limit)).unsigned = true; - else if (typeof object.tx_query_removal_limit === "string") - message.tx_query_removal_limit = parseInt(object.tx_query_removal_limit, 10); - else if (typeof object.tx_query_removal_limit === "number") - message.tx_query_removal_limit = object.tx_query_removal_limit; - else if (typeof object.tx_query_removal_limit === "object") - message.tx_query_removal_limit = new $util.LongBits(object.tx_query_removal_limit.low >>> 0, object.tx_query_removal_limit.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 neutron.interchainqueries.Params - * @static - * @param {neutron.interchainqueries.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.arrays || options.defaults) - object.query_deposit = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.query_submit_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_submit_timeout = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.tx_query_removal_limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.tx_query_removal_limit = options.longs === String ? "0" : 0; - } - if (message.query_submit_timeout != null && message.hasOwnProperty("query_submit_timeout")) - if (typeof message.query_submit_timeout === "number") - object.query_submit_timeout = options.longs === String ? String(message.query_submit_timeout) : message.query_submit_timeout; - else - object.query_submit_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.query_submit_timeout) : options.longs === Number ? new $util.LongBits(message.query_submit_timeout.low >>> 0, message.query_submit_timeout.high >>> 0).toNumber(true) : message.query_submit_timeout; - if (message.query_deposit && message.query_deposit.length) { - object.query_deposit = []; - for (var j = 0; j < message.query_deposit.length; ++j) - object.query_deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.query_deposit[j], options); - } - if (message.tx_query_removal_limit != null && message.hasOwnProperty("tx_query_removal_limit")) - if (typeof message.tx_query_removal_limit === "number") - object.tx_query_removal_limit = options.longs === String ? String(message.tx_query_removal_limit) : message.tx_query_removal_limit; - else - object.tx_query_removal_limit = options.longs === String ? $util.Long.prototype.toString.call(message.tx_query_removal_limit) : options.longs === Number ? new $util.LongBits(message.tx_query_removal_limit.low >>> 0, message.tx_query_removal_limit.high >>> 0).toNumber(true) : message.tx_query_removal_limit; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - interchainqueries.RegisteredQuery = (function() { - - /** - * Properties of a RegisteredQuery. - * @memberof neutron.interchainqueries - * @interface IRegisteredQuery - * @property {Long|null} [id] RegisteredQuery id - * @property {string|null} [owner] RegisteredQuery owner - * @property {string|null} [query_type] RegisteredQuery query_type - * @property {Array.|null} [keys] RegisteredQuery keys - * @property {string|null} [transactions_filter] RegisteredQuery transactions_filter - * @property {string|null} [connection_id] RegisteredQuery connection_id - * @property {Long|null} [update_period] RegisteredQuery update_period - * @property {Long|null} [last_submitted_result_local_height] RegisteredQuery last_submitted_result_local_height - * @property {ibc.core.client.v1.IHeight|null} [last_submitted_result_remote_height] RegisteredQuery last_submitted_result_remote_height - * @property {Array.|null} [deposit] RegisteredQuery deposit - * @property {Long|null} [submit_timeout] RegisteredQuery submit_timeout - * @property {Long|null} [registered_at_height] RegisteredQuery registered_at_height - */ - - /** - * Constructs a new RegisteredQuery. - * @memberof neutron.interchainqueries - * @classdesc Represents a RegisteredQuery. - * @implements IRegisteredQuery - * @constructor - * @param {neutron.interchainqueries.IRegisteredQuery=} [properties] Properties to set - */ - function RegisteredQuery(properties) { - this.keys = []; - this.deposit = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RegisteredQuery id. - * @member {Long} id - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RegisteredQuery owner. - * @member {string} owner - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.owner = ""; - - /** - * RegisteredQuery query_type. - * @member {string} query_type - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.query_type = ""; - - /** - * RegisteredQuery keys. - * @member {Array.} keys - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.keys = $util.emptyArray; - - /** - * RegisteredQuery transactions_filter. - * @member {string} transactions_filter - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.transactions_filter = ""; - - /** - * RegisteredQuery connection_id. - * @member {string} connection_id - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.connection_id = ""; - - /** - * RegisteredQuery update_period. - * @member {Long} update_period - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.update_period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RegisteredQuery last_submitted_result_local_height. - * @member {Long} last_submitted_result_local_height - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.last_submitted_result_local_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RegisteredQuery last_submitted_result_remote_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} last_submitted_result_remote_height - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.last_submitted_result_remote_height = null; - - /** - * RegisteredQuery deposit. - * @member {Array.} deposit - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.deposit = $util.emptyArray; - - /** - * RegisteredQuery submit_timeout. - * @member {Long} submit_timeout - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.submit_timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RegisteredQuery registered_at_height. - * @member {Long} registered_at_height - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - */ - RegisteredQuery.prototype.registered_at_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified RegisteredQuery message. Does not implicitly {@link neutron.interchainqueries.RegisteredQuery.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {neutron.interchainqueries.IRegisteredQuery} message RegisteredQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.owner); - if (message.query_type != null && Object.hasOwnProperty.call(message, "query_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.query_type); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.neutron.interchainqueries.KVKey.encode(message.keys[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.transactions_filter != null && Object.hasOwnProperty.call(message, "transactions_filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.transactions_filter); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.connection_id); - if (message.update_period != null && Object.hasOwnProperty.call(message, "update_period")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.update_period); - if (message.last_submitted_result_local_height != null && Object.hasOwnProperty.call(message, "last_submitted_result_local_height")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.last_submitted_result_local_height); - if (message.last_submitted_result_remote_height != null && Object.hasOwnProperty.call(message, "last_submitted_result_remote_height")) - $root.ibc.core.client.v1.Height.encode(message.last_submitted_result_remote_height, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.deposit != null && message.deposit.length) - for (var i = 0; i < message.deposit.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.deposit[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.submit_timeout != null && Object.hasOwnProperty.call(message, "submit_timeout")) - writer.uint32(/* id 11, wireType 0 =*/88).uint64(message.submit_timeout); - if (message.registered_at_height != null && Object.hasOwnProperty.call(message, "registered_at_height")) - writer.uint32(/* id 12, wireType 0 =*/96).uint64(message.registered_at_height); - return writer; - }; - - /** - * Encodes the specified RegisteredQuery message, length delimited. Does not implicitly {@link neutron.interchainqueries.RegisteredQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {neutron.interchainqueries.IRegisteredQuery} message RegisteredQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RegisteredQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RegisteredQuery message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.RegisteredQuery} RegisteredQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.RegisteredQuery(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.owner = reader.string(); - break; - case 3: - message.query_type = reader.string(); - break; - case 4: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.neutron.interchainqueries.KVKey.decode(reader, reader.uint32())); - break; - case 5: - message.transactions_filter = reader.string(); - break; - case 6: - message.connection_id = reader.string(); - break; - case 7: - message.update_period = reader.uint64(); - break; - case 8: - message.last_submitted_result_local_height = reader.uint64(); - break; - case 9: - message.last_submitted_result_remote_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 10: - if (!(message.deposit && message.deposit.length)) - message.deposit = []; - message.deposit.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 11: - message.submit_timeout = reader.uint64(); - break; - case 12: - message.registered_at_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RegisteredQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.RegisteredQuery} RegisteredQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RegisteredQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RegisteredQuery message. - * @function verify - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RegisteredQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.query_type != null && message.hasOwnProperty("query_type")) - if (!$util.isString(message.query_type)) - return "query_type: string 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.neutron.interchainqueries.KVKey.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - if (message.transactions_filter != null && message.hasOwnProperty("transactions_filter")) - if (!$util.isString(message.transactions_filter)) - return "transactions_filter: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.update_period != null && message.hasOwnProperty("update_period")) - if (!$util.isInteger(message.update_period) && !(message.update_period && $util.isInteger(message.update_period.low) && $util.isInteger(message.update_period.high))) - return "update_period: integer|Long expected"; - if (message.last_submitted_result_local_height != null && message.hasOwnProperty("last_submitted_result_local_height")) - if (!$util.isInteger(message.last_submitted_result_local_height) && !(message.last_submitted_result_local_height && $util.isInteger(message.last_submitted_result_local_height.low) && $util.isInteger(message.last_submitted_result_local_height.high))) - return "last_submitted_result_local_height: integer|Long expected"; - if (message.last_submitted_result_remote_height != null && message.hasOwnProperty("last_submitted_result_remote_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.last_submitted_result_remote_height); - if (error) - return "last_submitted_result_remote_height." + error; - } - if (message.deposit != null && message.hasOwnProperty("deposit")) { - if (!Array.isArray(message.deposit)) - return "deposit: array expected"; - for (var i = 0; i < message.deposit.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.deposit[i]); - if (error) - return "deposit." + error; - } - } - if (message.submit_timeout != null && message.hasOwnProperty("submit_timeout")) - if (!$util.isInteger(message.submit_timeout) && !(message.submit_timeout && $util.isInteger(message.submit_timeout.low) && $util.isInteger(message.submit_timeout.high))) - return "submit_timeout: integer|Long expected"; - if (message.registered_at_height != null && message.hasOwnProperty("registered_at_height")) - if (!$util.isInteger(message.registered_at_height) && !(message.registered_at_height && $util.isInteger(message.registered_at_height.low) && $util.isInteger(message.registered_at_height.high))) - return "registered_at_height: integer|Long expected"; - return null; - }; - - /** - * Creates a RegisteredQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.RegisteredQuery} RegisteredQuery - */ - RegisteredQuery.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.RegisteredQuery) - return object; - var message = new $root.neutron.interchainqueries.RegisteredQuery(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - if (object.owner != null) - message.owner = String(object.owner); - if (object.query_type != null) - message.query_type = String(object.query_type); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".neutron.interchainqueries.RegisteredQuery.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".neutron.interchainqueries.RegisteredQuery.keys: object expected"); - message.keys[i] = $root.neutron.interchainqueries.KVKey.fromObject(object.keys[i]); - } - } - if (object.transactions_filter != null) - message.transactions_filter = String(object.transactions_filter); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.update_period != null) - if ($util.Long) - (message.update_period = $util.Long.fromValue(object.update_period)).unsigned = true; - else if (typeof object.update_period === "string") - message.update_period = parseInt(object.update_period, 10); - else if (typeof object.update_period === "number") - message.update_period = object.update_period; - else if (typeof object.update_period === "object") - message.update_period = new $util.LongBits(object.update_period.low >>> 0, object.update_period.high >>> 0).toNumber(true); - if (object.last_submitted_result_local_height != null) - if ($util.Long) - (message.last_submitted_result_local_height = $util.Long.fromValue(object.last_submitted_result_local_height)).unsigned = true; - else if (typeof object.last_submitted_result_local_height === "string") - message.last_submitted_result_local_height = parseInt(object.last_submitted_result_local_height, 10); - else if (typeof object.last_submitted_result_local_height === "number") - message.last_submitted_result_local_height = object.last_submitted_result_local_height; - else if (typeof object.last_submitted_result_local_height === "object") - message.last_submitted_result_local_height = new $util.LongBits(object.last_submitted_result_local_height.low >>> 0, object.last_submitted_result_local_height.high >>> 0).toNumber(true); - if (object.last_submitted_result_remote_height != null) { - if (typeof object.last_submitted_result_remote_height !== "object") - throw TypeError(".neutron.interchainqueries.RegisteredQuery.last_submitted_result_remote_height: object expected"); - message.last_submitted_result_remote_height = $root.ibc.core.client.v1.Height.fromObject(object.last_submitted_result_remote_height); - } - if (object.deposit) { - if (!Array.isArray(object.deposit)) - throw TypeError(".neutron.interchainqueries.RegisteredQuery.deposit: array expected"); - message.deposit = []; - for (var i = 0; i < object.deposit.length; ++i) { - if (typeof object.deposit[i] !== "object") - throw TypeError(".neutron.interchainqueries.RegisteredQuery.deposit: object expected"); - message.deposit[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.deposit[i]); - } - } - if (object.submit_timeout != null) - if ($util.Long) - (message.submit_timeout = $util.Long.fromValue(object.submit_timeout)).unsigned = true; - else if (typeof object.submit_timeout === "string") - message.submit_timeout = parseInt(object.submit_timeout, 10); - else if (typeof object.submit_timeout === "number") - message.submit_timeout = object.submit_timeout; - else if (typeof object.submit_timeout === "object") - message.submit_timeout = new $util.LongBits(object.submit_timeout.low >>> 0, object.submit_timeout.high >>> 0).toNumber(true); - if (object.registered_at_height != null) - if ($util.Long) - (message.registered_at_height = $util.Long.fromValue(object.registered_at_height)).unsigned = true; - else if (typeof object.registered_at_height === "string") - message.registered_at_height = parseInt(object.registered_at_height, 10); - else if (typeof object.registered_at_height === "number") - message.registered_at_height = object.registered_at_height; - else if (typeof object.registered_at_height === "object") - message.registered_at_height = new $util.LongBits(object.registered_at_height.low >>> 0, object.registered_at_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a RegisteredQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.RegisteredQuery - * @static - * @param {neutron.interchainqueries.RegisteredQuery} message RegisteredQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RegisteredQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.keys = []; - object.deposit = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - object.owner = ""; - object.query_type = ""; - object.transactions_filter = ""; - object.connection_id = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.update_period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.update_period = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.last_submitted_result_local_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.last_submitted_result_local_height = options.longs === String ? "0" : 0; - object.last_submitted_result_remote_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.submit_timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.submit_timeout = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.registered_at_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.registered_at_height = options.longs === String ? "0" : 0; - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.query_type != null && message.hasOwnProperty("query_type")) - object.query_type = message.query_type; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.neutron.interchainqueries.KVKey.toObject(message.keys[j], options); - } - if (message.transactions_filter != null && message.hasOwnProperty("transactions_filter")) - object.transactions_filter = message.transactions_filter; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.update_period != null && message.hasOwnProperty("update_period")) - if (typeof message.update_period === "number") - object.update_period = options.longs === String ? String(message.update_period) : message.update_period; - else - object.update_period = options.longs === String ? $util.Long.prototype.toString.call(message.update_period) : options.longs === Number ? new $util.LongBits(message.update_period.low >>> 0, message.update_period.high >>> 0).toNumber(true) : message.update_period; - if (message.last_submitted_result_local_height != null && message.hasOwnProperty("last_submitted_result_local_height")) - if (typeof message.last_submitted_result_local_height === "number") - object.last_submitted_result_local_height = options.longs === String ? String(message.last_submitted_result_local_height) : message.last_submitted_result_local_height; - else - object.last_submitted_result_local_height = options.longs === String ? $util.Long.prototype.toString.call(message.last_submitted_result_local_height) : options.longs === Number ? new $util.LongBits(message.last_submitted_result_local_height.low >>> 0, message.last_submitted_result_local_height.high >>> 0).toNumber(true) : message.last_submitted_result_local_height; - if (message.last_submitted_result_remote_height != null && message.hasOwnProperty("last_submitted_result_remote_height")) - object.last_submitted_result_remote_height = $root.ibc.core.client.v1.Height.toObject(message.last_submitted_result_remote_height, options); - if (message.deposit && message.deposit.length) { - object.deposit = []; - for (var j = 0; j < message.deposit.length; ++j) - object.deposit[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.deposit[j], options); - } - if (message.submit_timeout != null && message.hasOwnProperty("submit_timeout")) - if (typeof message.submit_timeout === "number") - object.submit_timeout = options.longs === String ? String(message.submit_timeout) : message.submit_timeout; - else - object.submit_timeout = options.longs === String ? $util.Long.prototype.toString.call(message.submit_timeout) : options.longs === Number ? new $util.LongBits(message.submit_timeout.low >>> 0, message.submit_timeout.high >>> 0).toNumber(true) : message.submit_timeout; - if (message.registered_at_height != null && message.hasOwnProperty("registered_at_height")) - if (typeof message.registered_at_height === "number") - object.registered_at_height = options.longs === String ? String(message.registered_at_height) : message.registered_at_height; - else - object.registered_at_height = options.longs === String ? $util.Long.prototype.toString.call(message.registered_at_height) : options.longs === Number ? new $util.LongBits(message.registered_at_height.low >>> 0, message.registered_at_height.high >>> 0).toNumber(true) : message.registered_at_height; - return object; - }; - - /** - * Converts this RegisteredQuery to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.RegisteredQuery - * @instance - * @returns {Object.} JSON object - */ - RegisteredQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RegisteredQuery; - })(); - - interchainqueries.KVKey = (function() { - - /** - * Properties of a KVKey. - * @memberof neutron.interchainqueries - * @interface IKVKey - * @property {string|null} [path] KVKey path - * @property {Uint8Array|null} [key] KVKey key - */ - - /** - * Constructs a new KVKey. - * @memberof neutron.interchainqueries - * @classdesc Represents a KVKey. - * @implements IKVKey - * @constructor - * @param {neutron.interchainqueries.IKVKey=} [properties] Properties to set - */ - function KVKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * KVKey path. - * @member {string} path - * @memberof neutron.interchainqueries.KVKey - * @instance - */ - KVKey.prototype.path = ""; - - /** - * KVKey key. - * @member {Uint8Array} key - * @memberof neutron.interchainqueries.KVKey - * @instance - */ - KVKey.prototype.key = $util.newBuffer([]); - - /** - * Encodes the specified KVKey message. Does not implicitly {@link neutron.interchainqueries.KVKey.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {neutron.interchainqueries.IKVKey} message KVKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KVKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); - return writer; - }; - - /** - * Encodes the specified KVKey message, length delimited. Does not implicitly {@link neutron.interchainqueries.KVKey.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {neutron.interchainqueries.IKVKey} message KVKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KVKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a KVKey message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.KVKey} KVKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KVKey.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.KVKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.key = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a KVKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.KVKey} KVKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KVKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KVKey message. - * @function verify - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KVKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: 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"; - return null; - }; - - /** - * Creates a KVKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.KVKey} KVKey - */ - KVKey.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.KVKey) - return object; - var message = new $root.neutron.interchainqueries.KVKey(); - if (object.path != null) - message.path = String(object.path); - 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; - return message; - }; - - /** - * Creates a plain object from a KVKey message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.KVKey - * @static - * @param {neutron.interchainqueries.KVKey} message KVKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KVKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.path = ""; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - 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; - return object; - }; - - /** - * Converts this KVKey to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.KVKey - * @instance - * @returns {Object.} JSON object - */ - KVKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return KVKey; - })(); - - interchainqueries.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof neutron.interchainqueries - * @interface IGenesisState - * @property {neutron.interchainqueries.IParams|null} [params] GenesisState params - * @property {Array.|null} [registered_queries] GenesisState registered_queries - */ - - /** - * Constructs a new GenesisState. - * @memberof neutron.interchainqueries - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {neutron.interchainqueries.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.registered_queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {neutron.interchainqueries.IParams|null|undefined} params - * @memberof neutron.interchainqueries.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState registered_queries. - * @member {Array.} registered_queries - * @memberof neutron.interchainqueries.GenesisState - * @instance - */ - GenesisState.prototype.registered_queries = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.interchainqueries.GenesisState.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {neutron.interchainqueries.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.interchainqueries.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.registered_queries != null && message.registered_queries.length) - for (var i = 0; i < message.registered_queries.length; ++i) - $root.neutron.interchainqueries.RegisteredQuery.encode(message.registered_queries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.interchainqueries.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {neutron.interchainqueries.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.interchainqueries.Params.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.registered_queries && message.registered_queries.length)) - message.registered_queries = []; - message.registered_queries.push($root.neutron.interchainqueries.RegisteredQuery.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.interchainqueries.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.registered_queries != null && message.hasOwnProperty("registered_queries")) { - if (!Array.isArray(message.registered_queries)) - return "registered_queries: array expected"; - for (var i = 0; i < message.registered_queries.length; ++i) { - var error = $root.neutron.interchainqueries.RegisteredQuery.verify(message.registered_queries[i]); - if (error) - return "registered_queries." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.GenesisState) - return object; - var message = new $root.neutron.interchainqueries.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.interchainqueries.GenesisState.params: object expected"); - message.params = $root.neutron.interchainqueries.Params.fromObject(object.params); - } - if (object.registered_queries) { - if (!Array.isArray(object.registered_queries)) - throw TypeError(".neutron.interchainqueries.GenesisState.registered_queries: array expected"); - message.registered_queries = []; - for (var i = 0; i < object.registered_queries.length; ++i) { - if (typeof object.registered_queries[i] !== "object") - throw TypeError(".neutron.interchainqueries.GenesisState.registered_queries: object expected"); - message.registered_queries[i] = $root.neutron.interchainqueries.RegisteredQuery.fromObject(object.registered_queries[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.GenesisState - * @static - * @param {neutron.interchainqueries.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.registered_queries = []; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.interchainqueries.Params.toObject(message.params, options); - if (message.registered_queries && message.registered_queries.length) { - object.registered_queries = []; - for (var j = 0; j < message.registered_queries.length; ++j) - object.registered_queries[j] = $root.neutron.interchainqueries.RegisteredQuery.toObject(message.registered_queries[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - interchainqueries.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.interchainqueries - * @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; - - /** - * Callback as used by {@link neutron.interchainqueries.Query#params}. - * @memberof neutron.interchainqueries.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.interchainqueries.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.neutron.interchainqueries.QueryParamsRequest, $root.neutron.interchainqueries.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Query#registeredQueries}. - * @memberof neutron.interchainqueries.Query - * @typedef RegisteredQueriesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.QueryRegisteredQueriesResponse} [response] QueryRegisteredQueriesResponse - */ - - /** - * Calls RegisteredQueries. - * @function registeredQueries - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryRegisteredQueriesRequest} request QueryRegisteredQueriesRequest message or plain object - * @param {neutron.interchainqueries.Query.RegisteredQueriesCallback} callback Node-style callback called with the error, if any, and QueryRegisteredQueriesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.registeredQueries = function registeredQueries(request, callback) { - return this.rpcCall(registeredQueries, $root.neutron.interchainqueries.QueryRegisteredQueriesRequest, $root.neutron.interchainqueries.QueryRegisteredQueriesResponse, request, callback); - }, "name", { value: "RegisteredQueries" }); - - /** - * Calls RegisteredQueries. - * @function registeredQueries - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryRegisteredQueriesRequest} request QueryRegisteredQueriesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Query#registeredQuery}. - * @memberof neutron.interchainqueries.Query - * @typedef RegisteredQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.QueryRegisteredQueryResponse} [response] QueryRegisteredQueryResponse - */ - - /** - * Calls RegisteredQuery. - * @function registeredQuery - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryRegisteredQueryRequest} request QueryRegisteredQueryRequest message or plain object - * @param {neutron.interchainqueries.Query.RegisteredQueryCallback} callback Node-style callback called with the error, if any, and QueryRegisteredQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.registeredQuery = function registeredQuery(request, callback) { - return this.rpcCall(registeredQuery, $root.neutron.interchainqueries.QueryRegisteredQueryRequest, $root.neutron.interchainqueries.QueryRegisteredQueryResponse, request, callback); - }, "name", { value: "RegisteredQuery" }); - - /** - * Calls RegisteredQuery. - * @function registeredQuery - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryRegisteredQueryRequest} request QueryRegisteredQueryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Query#queryResult}. - * @memberof neutron.interchainqueries.Query - * @typedef QueryResultCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.QueryRegisteredQueryResultResponse} [response] QueryRegisteredQueryResultResponse - */ - - /** - * Calls QueryResult. - * @function queryResult - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultRequest} request QueryRegisteredQueryResultRequest message or plain object - * @param {neutron.interchainqueries.Query.QueryResultCallback} callback Node-style callback called with the error, if any, and QueryRegisteredQueryResultResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.queryResult = function queryResult(request, callback) { - return this.rpcCall(queryResult, $root.neutron.interchainqueries.QueryRegisteredQueryResultRequest, $root.neutron.interchainqueries.QueryRegisteredQueryResultResponse, request, callback); - }, "name", { value: "QueryResult" }); - - /** - * Calls QueryResult. - * @function queryResult - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultRequest} request QueryRegisteredQueryResultRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchainqueries.Query#lastRemoteHeight}. - * @memberof neutron.interchainqueries.Query - * @typedef LastRemoteHeightCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchainqueries.QueryLastRemoteHeightResponse} [response] QueryLastRemoteHeightResponse - */ - - /** - * Calls LastRemoteHeight. - * @function lastRemoteHeight - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryLastRemoteHeight} request QueryLastRemoteHeight message or plain object - * @param {neutron.interchainqueries.Query.LastRemoteHeightCallback} callback Node-style callback called with the error, if any, and QueryLastRemoteHeightResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.lastRemoteHeight = function lastRemoteHeight(request, callback) { - return this.rpcCall(lastRemoteHeight, $root.neutron.interchainqueries.QueryLastRemoteHeight, $root.neutron.interchainqueries.QueryLastRemoteHeightResponse, request, callback); - }, "name", { value: "LastRemoteHeight" }); - - /** - * Calls LastRemoteHeight. - * @function lastRemoteHeight - * @memberof neutron.interchainqueries.Query - * @instance - * @param {neutron.interchainqueries.IQueryLastRemoteHeight} request QueryLastRemoteHeight message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - interchainqueries.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof neutron.interchainqueries - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {neutron.interchainqueries.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.interchainqueries.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {neutron.interchainqueries.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {neutron.interchainqueries.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryParamsRequest) - return object; - return new $root.neutron.interchainqueries.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryParamsRequest - * @static - * @param {neutron.interchainqueries.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - interchainqueries.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof neutron.interchainqueries - * @interface IQueryParamsResponse - * @property {neutron.interchainqueries.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {neutron.interchainqueries.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {neutron.interchainqueries.IParams|null|undefined} params - * @memberof neutron.interchainqueries.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.interchainqueries.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {neutron.interchainqueries.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.interchainqueries.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {neutron.interchainqueries.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.interchainqueries.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.interchainqueries.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryParamsResponse) - return object; - var message = new $root.neutron.interchainqueries.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.interchainqueries.QueryParamsResponse.params: object expected"); - message.params = $root.neutron.interchainqueries.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryParamsResponse - * @static - * @param {neutron.interchainqueries.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.interchainqueries.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - interchainqueries.QueryRegisteredQueriesRequest = (function() { - - /** - * Properties of a QueryRegisteredQueriesRequest. - * @memberof neutron.interchainqueries - * @interface IQueryRegisteredQueriesRequest - * @property {Array.|null} [owners] QueryRegisteredQueriesRequest owners - * @property {string|null} [connection_id] QueryRegisteredQueriesRequest connection_id - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryRegisteredQueriesRequest pagination - */ - - /** - * Constructs a new QueryRegisteredQueriesRequest. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryRegisteredQueriesRequest. - * @implements IQueryRegisteredQueriesRequest - * @constructor - * @param {neutron.interchainqueries.IQueryRegisteredQueriesRequest=} [properties] Properties to set - */ - function QueryRegisteredQueriesRequest(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]]; - } - - /** - * QueryRegisteredQueriesRequest owners. - * @member {Array.} owners - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @instance - */ - QueryRegisteredQueriesRequest.prototype.owners = $util.emptyArray; - - /** - * QueryRegisteredQueriesRequest connection_id. - * @member {string} connection_id - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @instance - */ - QueryRegisteredQueriesRequest.prototype.connection_id = ""; - - /** - * QueryRegisteredQueriesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @instance - */ - QueryRegisteredQueriesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryRegisteredQueriesRequest message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueriesRequest} message QueryRegisteredQueriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueriesRequest.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) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owners[i]); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryRegisteredQueriesRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueriesRequest} message QueryRegisteredQueriesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueriesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryRegisteredQueriesRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryRegisteredQueriesRequest} QueryRegisteredQueriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueriesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryRegisteredQueriesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.owners && message.owners.length)) - message.owners = []; - message.owners.push(reader.string()); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryRegisteredQueriesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryRegisteredQueriesRequest} QueryRegisteredQueriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueriesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryRegisteredQueriesRequest message. - * @function verify - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryRegisteredQueriesRequest.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) - if (!$util.isString(message.owners[i])) - return "owners: string[] expected"; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryRegisteredQueriesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryRegisteredQueriesRequest} QueryRegisteredQueriesRequest - */ - QueryRegisteredQueriesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryRegisteredQueriesRequest) - return object; - var message = new $root.neutron.interchainqueries.QueryRegisteredQueriesRequest(); - if (object.owners) { - if (!Array.isArray(object.owners)) - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueriesRequest.owners: array expected"); - message.owners = []; - for (var i = 0; i < object.owners.length; ++i) - message.owners[i] = String(object.owners[i]); - } - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueriesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryRegisteredQueriesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @static - * @param {neutron.interchainqueries.QueryRegisteredQueriesRequest} message QueryRegisteredQueriesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryRegisteredQueriesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.owners = []; - if (options.defaults) { - object.connection_id = ""; - object.pagination = null; - } - if (message.owners && message.owners.length) { - object.owners = []; - for (var j = 0; j < message.owners.length; ++j) - object.owners[j] = message.owners[j]; - } - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryRegisteredQueriesRequest to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryRegisteredQueriesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryRegisteredQueriesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryRegisteredQueriesRequest; - })(); - - interchainqueries.QueryRegisteredQueriesResponse = (function() { - - /** - * Properties of a QueryRegisteredQueriesResponse. - * @memberof neutron.interchainqueries - * @interface IQueryRegisteredQueriesResponse - * @property {Array.|null} [registered_queries] QueryRegisteredQueriesResponse registered_queries - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryRegisteredQueriesResponse pagination - */ - - /** - * Constructs a new QueryRegisteredQueriesResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryRegisteredQueriesResponse. - * @implements IQueryRegisteredQueriesResponse - * @constructor - * @param {neutron.interchainqueries.IQueryRegisteredQueriesResponse=} [properties] Properties to set - */ - function QueryRegisteredQueriesResponse(properties) { - this.registered_queries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryRegisteredQueriesResponse registered_queries. - * @member {Array.} registered_queries - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @instance - */ - QueryRegisteredQueriesResponse.prototype.registered_queries = $util.emptyArray; - - /** - * QueryRegisteredQueriesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @instance - */ - QueryRegisteredQueriesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryRegisteredQueriesResponse message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueriesResponse} message QueryRegisteredQueriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueriesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.registered_queries != null && message.registered_queries.length) - for (var i = 0; i < message.registered_queries.length; ++i) - $root.neutron.interchainqueries.RegisteredQuery.encode(message.registered_queries[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryRegisteredQueriesResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueriesResponse} message QueryRegisteredQueriesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueriesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryRegisteredQueriesResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryRegisteredQueriesResponse} QueryRegisteredQueriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueriesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryRegisteredQueriesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.registered_queries && message.registered_queries.length)) - message.registered_queries = []; - message.registered_queries.push($root.neutron.interchainqueries.RegisteredQuery.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryRegisteredQueriesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryRegisteredQueriesResponse} QueryRegisteredQueriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueriesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryRegisteredQueriesResponse message. - * @function verify - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryRegisteredQueriesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.registered_queries != null && message.hasOwnProperty("registered_queries")) { - if (!Array.isArray(message.registered_queries)) - return "registered_queries: array expected"; - for (var i = 0; i < message.registered_queries.length; ++i) { - var error = $root.neutron.interchainqueries.RegisteredQuery.verify(message.registered_queries[i]); - if (error) - return "registered_queries." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryRegisteredQueriesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryRegisteredQueriesResponse} QueryRegisteredQueriesResponse - */ - QueryRegisteredQueriesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryRegisteredQueriesResponse) - return object; - var message = new $root.neutron.interchainqueries.QueryRegisteredQueriesResponse(); - if (object.registered_queries) { - if (!Array.isArray(object.registered_queries)) - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueriesResponse.registered_queries: array expected"); - message.registered_queries = []; - for (var i = 0; i < object.registered_queries.length; ++i) { - if (typeof object.registered_queries[i] !== "object") - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueriesResponse.registered_queries: object expected"); - message.registered_queries[i] = $root.neutron.interchainqueries.RegisteredQuery.fromObject(object.registered_queries[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueriesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryRegisteredQueriesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @static - * @param {neutron.interchainqueries.QueryRegisteredQueriesResponse} message QueryRegisteredQueriesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryRegisteredQueriesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.registered_queries = []; - if (options.defaults) - object.pagination = null; - if (message.registered_queries && message.registered_queries.length) { - object.registered_queries = []; - for (var j = 0; j < message.registered_queries.length; ++j) - object.registered_queries[j] = $root.neutron.interchainqueries.RegisteredQuery.toObject(message.registered_queries[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryRegisteredQueriesResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryRegisteredQueriesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryRegisteredQueriesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryRegisteredQueriesResponse; - })(); - - interchainqueries.QueryRegisteredQueryRequest = (function() { - - /** - * Properties of a QueryRegisteredQueryRequest. - * @memberof neutron.interchainqueries - * @interface IQueryRegisteredQueryRequest - * @property {Long|null} [query_id] QueryRegisteredQueryRequest query_id - */ - - /** - * Constructs a new QueryRegisteredQueryRequest. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryRegisteredQueryRequest. - * @implements IQueryRegisteredQueryRequest - * @constructor - * @param {neutron.interchainqueries.IQueryRegisteredQueryRequest=} [properties] Properties to set - */ - function QueryRegisteredQueryRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryRegisteredQueryRequest query_id. - * @member {Long} query_id - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @instance - */ - QueryRegisteredQueryRequest.prototype.query_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryRegisteredQueryRequest message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryRequest} message QueryRegisteredQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query_id != null && Object.hasOwnProperty.call(message, "query_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.query_id); - return writer; - }; - - /** - * Encodes the specified QueryRegisteredQueryRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryRequest} message QueryRegisteredQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryRegisteredQueryRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryRegisteredQueryRequest} QueryRegisteredQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryRegisteredQueryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryRegisteredQueryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryRegisteredQueryRequest} QueryRegisteredQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryRegisteredQueryRequest message. - * @function verify - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryRegisteredQueryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (!$util.isInteger(message.query_id) && !(message.query_id && $util.isInteger(message.query_id.low) && $util.isInteger(message.query_id.high))) - return "query_id: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryRegisteredQueryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryRegisteredQueryRequest} QueryRegisteredQueryRequest - */ - QueryRegisteredQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryRegisteredQueryRequest) - return object; - var message = new $root.neutron.interchainqueries.QueryRegisteredQueryRequest(); - if (object.query_id != null) - if ($util.Long) - (message.query_id = $util.Long.fromValue(object.query_id)).unsigned = true; - else if (typeof object.query_id === "string") - message.query_id = parseInt(object.query_id, 10); - else if (typeof object.query_id === "number") - message.query_id = object.query_id; - else if (typeof object.query_id === "object") - message.query_id = new $util.LongBits(object.query_id.low >>> 0, object.query_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryRegisteredQueryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @static - * @param {neutron.interchainqueries.QueryRegisteredQueryRequest} message QueryRegisteredQueryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryRegisteredQueryRequest.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.query_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_id = options.longs === String ? "0" : 0; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (typeof message.query_id === "number") - object.query_id = options.longs === String ? String(message.query_id) : message.query_id; - else - object.query_id = options.longs === String ? $util.Long.prototype.toString.call(message.query_id) : options.longs === Number ? new $util.LongBits(message.query_id.low >>> 0, message.query_id.high >>> 0).toNumber(true) : message.query_id; - return object; - }; - - /** - * Converts this QueryRegisteredQueryRequest to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryRegisteredQueryRequest - * @instance - * @returns {Object.} JSON object - */ - QueryRegisteredQueryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryRegisteredQueryRequest; - })(); - - interchainqueries.QueryRegisteredQueryResponse = (function() { - - /** - * Properties of a QueryRegisteredQueryResponse. - * @memberof neutron.interchainqueries - * @interface IQueryRegisteredQueryResponse - * @property {neutron.interchainqueries.IRegisteredQuery|null} [registered_query] QueryRegisteredQueryResponse registered_query - */ - - /** - * Constructs a new QueryRegisteredQueryResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryRegisteredQueryResponse. - * @implements IQueryRegisteredQueryResponse - * @constructor - * @param {neutron.interchainqueries.IQueryRegisteredQueryResponse=} [properties] Properties to set - */ - function QueryRegisteredQueryResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryRegisteredQueryResponse registered_query. - * @member {neutron.interchainqueries.IRegisteredQuery|null|undefined} registered_query - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @instance - */ - QueryRegisteredQueryResponse.prototype.registered_query = null; - - /** - * Encodes the specified QueryRegisteredQueryResponse message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryResponse} message QueryRegisteredQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.registered_query != null && Object.hasOwnProperty.call(message, "registered_query")) - $root.neutron.interchainqueries.RegisteredQuery.encode(message.registered_query, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryRegisteredQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryResponse} message QueryRegisteredQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryRegisteredQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryRegisteredQueryResponse} QueryRegisteredQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryRegisteredQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.registered_query = $root.neutron.interchainqueries.RegisteredQuery.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryRegisteredQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryRegisteredQueryResponse} QueryRegisteredQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryRegisteredQueryResponse message. - * @function verify - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryRegisteredQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.registered_query != null && message.hasOwnProperty("registered_query")) { - var error = $root.neutron.interchainqueries.RegisteredQuery.verify(message.registered_query); - if (error) - return "registered_query." + error; - } - return null; - }; - - /** - * Creates a QueryRegisteredQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryRegisteredQueryResponse} QueryRegisteredQueryResponse - */ - QueryRegisteredQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryRegisteredQueryResponse) - return object; - var message = new $root.neutron.interchainqueries.QueryRegisteredQueryResponse(); - if (object.registered_query != null) { - if (typeof object.registered_query !== "object") - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueryResponse.registered_query: object expected"); - message.registered_query = $root.neutron.interchainqueries.RegisteredQuery.fromObject(object.registered_query); - } - return message; - }; - - /** - * Creates a plain object from a QueryRegisteredQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @static - * @param {neutron.interchainqueries.QueryRegisteredQueryResponse} message QueryRegisteredQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryRegisteredQueryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.registered_query = null; - if (message.registered_query != null && message.hasOwnProperty("registered_query")) - object.registered_query = $root.neutron.interchainqueries.RegisteredQuery.toObject(message.registered_query, options); - return object; - }; - - /** - * Converts this QueryRegisteredQueryResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryRegisteredQueryResponse - * @instance - * @returns {Object.} JSON object - */ - QueryRegisteredQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryRegisteredQueryResponse; - })(); - - interchainqueries.QueryRegisteredQueryResultRequest = (function() { - - /** - * Properties of a QueryRegisteredQueryResultRequest. - * @memberof neutron.interchainqueries - * @interface IQueryRegisteredQueryResultRequest - * @property {Long|null} [query_id] QueryRegisteredQueryResultRequest query_id - */ - - /** - * Constructs a new QueryRegisteredQueryResultRequest. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryRegisteredQueryResultRequest. - * @implements IQueryRegisteredQueryResultRequest - * @constructor - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultRequest=} [properties] Properties to set - */ - function QueryRegisteredQueryResultRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryRegisteredQueryResultRequest query_id. - * @member {Long} query_id - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @instance - */ - QueryRegisteredQueryResultRequest.prototype.query_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryRegisteredQueryResultRequest message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultRequest} message QueryRegisteredQueryResultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryResultRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.query_id != null && Object.hasOwnProperty.call(message, "query_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.query_id); - return writer; - }; - - /** - * Encodes the specified QueryRegisteredQueryResultRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultRequest} message QueryRegisteredQueryResultRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryResultRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryRegisteredQueryResultRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryRegisteredQueryResultRequest} QueryRegisteredQueryResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryResultRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryRegisteredQueryResultRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.query_id = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryRegisteredQueryResultRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryRegisteredQueryResultRequest} QueryRegisteredQueryResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryResultRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryRegisteredQueryResultRequest message. - * @function verify - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryRegisteredQueryResultRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (!$util.isInteger(message.query_id) && !(message.query_id && $util.isInteger(message.query_id.low) && $util.isInteger(message.query_id.high))) - return "query_id: integer|Long expected"; - return null; - }; - - /** - * Creates a QueryRegisteredQueryResultRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryRegisteredQueryResultRequest} QueryRegisteredQueryResultRequest - */ - QueryRegisteredQueryResultRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryRegisteredQueryResultRequest) - return object; - var message = new $root.neutron.interchainqueries.QueryRegisteredQueryResultRequest(); - if (object.query_id != null) - if ($util.Long) - (message.query_id = $util.Long.fromValue(object.query_id)).unsigned = true; - else if (typeof object.query_id === "string") - message.query_id = parseInt(object.query_id, 10); - else if (typeof object.query_id === "number") - message.query_id = object.query_id; - else if (typeof object.query_id === "object") - message.query_id = new $util.LongBits(object.query_id.low >>> 0, object.query_id.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a QueryRegisteredQueryResultRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @static - * @param {neutron.interchainqueries.QueryRegisteredQueryResultRequest} message QueryRegisteredQueryResultRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryRegisteredQueryResultRequest.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.query_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.query_id = options.longs === String ? "0" : 0; - if (message.query_id != null && message.hasOwnProperty("query_id")) - if (typeof message.query_id === "number") - object.query_id = options.longs === String ? String(message.query_id) : message.query_id; - else - object.query_id = options.longs === String ? $util.Long.prototype.toString.call(message.query_id) : options.longs === Number ? new $util.LongBits(message.query_id.low >>> 0, message.query_id.high >>> 0).toNumber(true) : message.query_id; - return object; - }; - - /** - * Converts this QueryRegisteredQueryResultRequest to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultRequest - * @instance - * @returns {Object.} JSON object - */ - QueryRegisteredQueryResultRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryRegisteredQueryResultRequest; - })(); - - interchainqueries.QueryRegisteredQueryResultResponse = (function() { - - /** - * Properties of a QueryRegisteredQueryResultResponse. - * @memberof neutron.interchainqueries - * @interface IQueryRegisteredQueryResultResponse - * @property {neutron.interchainqueries.IQueryResult|null} [result] QueryRegisteredQueryResultResponse result - */ - - /** - * Constructs a new QueryRegisteredQueryResultResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryRegisteredQueryResultResponse. - * @implements IQueryRegisteredQueryResultResponse - * @constructor - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultResponse=} [properties] Properties to set - */ - function QueryRegisteredQueryResultResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryRegisteredQueryResultResponse result. - * @member {neutron.interchainqueries.IQueryResult|null|undefined} result - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @instance - */ - QueryRegisteredQueryResultResponse.prototype.result = null; - - /** - * Encodes the specified QueryRegisteredQueryResultResponse message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultResponse} message QueryRegisteredQueryResultResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryResultResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.neutron.interchainqueries.QueryResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryRegisteredQueryResultResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {neutron.interchainqueries.IQueryRegisteredQueryResultResponse} message QueryRegisteredQueryResultResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryRegisteredQueryResultResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryRegisteredQueryResultResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryRegisteredQueryResultResponse} QueryRegisteredQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryResultResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryRegisteredQueryResultResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = $root.neutron.interchainqueries.QueryResult.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryRegisteredQueryResultResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryRegisteredQueryResultResponse} QueryRegisteredQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryRegisteredQueryResultResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryRegisteredQueryResultResponse message. - * @function verify - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryRegisteredQueryResultResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.neutron.interchainqueries.QueryResult.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a QueryRegisteredQueryResultResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryRegisteredQueryResultResponse} QueryRegisteredQueryResultResponse - */ - QueryRegisteredQueryResultResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryRegisteredQueryResultResponse) - return object; - var message = new $root.neutron.interchainqueries.QueryRegisteredQueryResultResponse(); - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".neutron.interchainqueries.QueryRegisteredQueryResultResponse.result: object expected"); - message.result = $root.neutron.interchainqueries.QueryResult.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a QueryRegisteredQueryResultResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @static - * @param {neutron.interchainqueries.QueryRegisteredQueryResultResponse} message QueryRegisteredQueryResultResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryRegisteredQueryResultResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = null; - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.neutron.interchainqueries.QueryResult.toObject(message.result, options); - return object; - }; - - /** - * Converts this QueryRegisteredQueryResultResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryRegisteredQueryResultResponse - * @instance - * @returns {Object.} JSON object - */ - QueryRegisteredQueryResultResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryRegisteredQueryResultResponse; - })(); - - interchainqueries.Transaction = (function() { - - /** - * Properties of a Transaction. - * @memberof neutron.interchainqueries - * @interface ITransaction - * @property {Long|null} [id] Transaction id - * @property {Long|null} [height] Transaction height - * @property {Uint8Array|null} [data] Transaction data - */ - - /** - * Constructs a new Transaction. - * @memberof neutron.interchainqueries - * @classdesc Represents a Transaction. - * @implements ITransaction - * @constructor - * @param {neutron.interchainqueries.ITransaction=} [properties] Properties to set - */ - function Transaction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Transaction id. - * @member {Long} id - * @memberof neutron.interchainqueries.Transaction - * @instance - */ - Transaction.prototype.id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Transaction height. - * @member {Long} height - * @memberof neutron.interchainqueries.Transaction - * @instance - */ - Transaction.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Transaction data. - * @member {Uint8Array} data - * @memberof neutron.interchainqueries.Transaction - * @instance - */ - Transaction.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified Transaction message. Does not implicitly {@link neutron.interchainqueries.Transaction.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {neutron.interchainqueries.ITransaction} message Transaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transaction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.id); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.height); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified Transaction message, length delimited. Does not implicitly {@link neutron.interchainqueries.Transaction.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {neutron.interchainqueries.ITransaction} message Transaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transaction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Transaction message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.Transaction} Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transaction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.Transaction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.id = reader.uint64(); - break; - case 2: - message.height = reader.uint64(); - break; - case 3: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Transaction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.Transaction} Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transaction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Transaction message. - * @function verify - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Transaction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) - return "id: integer|Long 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.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 Transaction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.Transaction} Transaction - */ - Transaction.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.Transaction) - return object; - var message = new $root.neutron.interchainqueries.Transaction(); - if (object.id != null) - if ($util.Long) - (message.id = $util.Long.fromValue(object.id)).unsigned = true; - else if (typeof object.id === "string") - message.id = parseInt(object.id, 10); - else if (typeof object.id === "number") - message.id = object.id; - else if (typeof object.id === "object") - message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(true); - 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); - 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 Transaction message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.Transaction - * @static - * @param {neutron.interchainqueries.Transaction} message Transaction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Transaction.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.id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.id = options.longs === String ? "0" : 0; - 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 (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.id != null && message.hasOwnProperty("id")) - if (typeof message.id === "number") - object.id = options.longs === String ? String(message.id) : message.id; - else - object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber(true) : message.id; - 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; - 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 Transaction to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.Transaction - * @instance - * @returns {Object.} JSON object - */ - Transaction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Transaction; - })(); - - interchainqueries.QueryLastRemoteHeight = (function() { - - /** - * Properties of a QueryLastRemoteHeight. - * @memberof neutron.interchainqueries - * @interface IQueryLastRemoteHeight - * @property {string|null} [connection_id] QueryLastRemoteHeight connection_id - */ - - /** - * Constructs a new QueryLastRemoteHeight. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryLastRemoteHeight. - * @implements IQueryLastRemoteHeight - * @constructor - * @param {neutron.interchainqueries.IQueryLastRemoteHeight=} [properties] Properties to set - */ - function QueryLastRemoteHeight(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryLastRemoteHeight connection_id. - * @member {string} connection_id - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @instance - */ - QueryLastRemoteHeight.prototype.connection_id = ""; - - /** - * Encodes the specified QueryLastRemoteHeight message. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeight.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {neutron.interchainqueries.IQueryLastRemoteHeight} message QueryLastRemoteHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryLastRemoteHeight.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryLastRemoteHeight message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeight.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {neutron.interchainqueries.IQueryLastRemoteHeight} message QueryLastRemoteHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryLastRemoteHeight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryLastRemoteHeight message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryLastRemoteHeight} QueryLastRemoteHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryLastRemoteHeight.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryLastRemoteHeight(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryLastRemoteHeight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryLastRemoteHeight} QueryLastRemoteHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryLastRemoteHeight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryLastRemoteHeight message. - * @function verify - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryLastRemoteHeight.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryLastRemoteHeight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryLastRemoteHeight} QueryLastRemoteHeight - */ - QueryLastRemoteHeight.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryLastRemoteHeight) - return object; - var message = new $root.neutron.interchainqueries.QueryLastRemoteHeight(); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryLastRemoteHeight message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @static - * @param {neutron.interchainqueries.QueryLastRemoteHeight} message QueryLastRemoteHeight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryLastRemoteHeight.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.connection_id = ""; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryLastRemoteHeight to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryLastRemoteHeight - * @instance - * @returns {Object.} JSON object - */ - QueryLastRemoteHeight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryLastRemoteHeight; - })(); - - interchainqueries.QueryLastRemoteHeightResponse = (function() { - - /** - * Properties of a QueryLastRemoteHeightResponse. - * @memberof neutron.interchainqueries - * @interface IQueryLastRemoteHeightResponse - * @property {Long|null} [height] QueryLastRemoteHeightResponse height - */ - - /** - * Constructs a new QueryLastRemoteHeightResponse. - * @memberof neutron.interchainqueries - * @classdesc Represents a QueryLastRemoteHeightResponse. - * @implements IQueryLastRemoteHeightResponse - * @constructor - * @param {neutron.interchainqueries.IQueryLastRemoteHeightResponse=} [properties] Properties to set - */ - function QueryLastRemoteHeightResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryLastRemoteHeightResponse height. - * @member {Long} height - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @instance - */ - QueryLastRemoteHeightResponse.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified QueryLastRemoteHeightResponse message. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeightResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {neutron.interchainqueries.IQueryLastRemoteHeightResponse} message QueryLastRemoteHeightResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryLastRemoteHeightResponse.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).uint64(message.height); - return writer; - }; - - /** - * Encodes the specified QueryLastRemoteHeightResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeightResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {neutron.interchainqueries.IQueryLastRemoteHeightResponse} message QueryLastRemoteHeightResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryLastRemoteHeightResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryLastRemoteHeightResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchainqueries.QueryLastRemoteHeightResponse} QueryLastRemoteHeightResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryLastRemoteHeightResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchainqueries.QueryLastRemoteHeightResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryLastRemoteHeightResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchainqueries.QueryLastRemoteHeightResponse} QueryLastRemoteHeightResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryLastRemoteHeightResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryLastRemoteHeightResponse message. - * @function verify - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryLastRemoteHeightResponse.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 QueryLastRemoteHeightResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchainqueries.QueryLastRemoteHeightResponse} QueryLastRemoteHeightResponse - */ - QueryLastRemoteHeightResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchainqueries.QueryLastRemoteHeightResponse) - return object; - var message = new $root.neutron.interchainqueries.QueryLastRemoteHeightResponse(); - 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 QueryLastRemoteHeightResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @static - * @param {neutron.interchainqueries.QueryLastRemoteHeightResponse} message QueryLastRemoteHeightResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryLastRemoteHeightResponse.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.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(true) : message.height; - return object; - }; - - /** - * Converts this QueryLastRemoteHeightResponse to JSON. - * @function toJSON - * @memberof neutron.interchainqueries.QueryLastRemoteHeightResponse - * @instance - * @returns {Object.} JSON object - */ - QueryLastRemoteHeightResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryLastRemoteHeightResponse; - })(); - - return interchainqueries; - })(); - - neutron.interchaintxs = (function() { - - /** - * Namespace interchaintxs. - * @memberof neutron - * @namespace - */ - var interchaintxs = {}; - - interchaintxs.v1 = (function() { - - /** - * Namespace v1. - * @memberof neutron.interchaintxs - * @namespace - */ - var v1 = {}; - - v1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.interchaintxs.v1.Msg#registerInterchainAccount}. - * @memberof neutron.interchaintxs.v1.Msg - * @typedef RegisterInterchainAccountCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse} [response] MsgRegisterInterchainAccountResponse - */ - - /** - * Calls RegisterInterchainAccount. - * @function registerInterchainAccount - * @memberof neutron.interchaintxs.v1.Msg - * @instance - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccount} request MsgRegisterInterchainAccount message or plain object - * @param {neutron.interchaintxs.v1.Msg.RegisterInterchainAccountCallback} callback Node-style callback called with the error, if any, and MsgRegisterInterchainAccountResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.registerInterchainAccount = function registerInterchainAccount(request, callback) { - return this.rpcCall(registerInterchainAccount, $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccount, $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse, request, callback); - }, "name", { value: "RegisterInterchainAccount" }); - - /** - * Calls RegisterInterchainAccount. - * @function registerInterchainAccount - * @memberof neutron.interchaintxs.v1.Msg - * @instance - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccount} request MsgRegisterInterchainAccount message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchaintxs.v1.Msg#submitTx}. - * @memberof neutron.interchaintxs.v1.Msg - * @typedef SubmitTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchaintxs.v1.MsgSubmitTxResponse} [response] MsgSubmitTxResponse - */ - - /** - * Calls SubmitTx. - * @function submitTx - * @memberof neutron.interchaintxs.v1.Msg - * @instance - * @param {neutron.interchaintxs.v1.IMsgSubmitTx} request MsgSubmitTx message or plain object - * @param {neutron.interchaintxs.v1.Msg.SubmitTxCallback} callback Node-style callback called with the error, if any, and MsgSubmitTxResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.submitTx = function submitTx(request, callback) { - return this.rpcCall(submitTx, $root.neutron.interchaintxs.v1.MsgSubmitTx, $root.neutron.interchaintxs.v1.MsgSubmitTxResponse, request, callback); - }, "name", { value: "SubmitTx" }); - - /** - * Calls SubmitTx. - * @function submitTx - * @memberof neutron.interchaintxs.v1.Msg - * @instance - * @param {neutron.interchaintxs.v1.IMsgSubmitTx} request MsgSubmitTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchaintxs.v1.Msg#updateParams}. - * @memberof neutron.interchaintxs.v1.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchaintxs.v1.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.interchaintxs.v1.Msg - * @instance - * @param {neutron.interchaintxs.v1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {neutron.interchaintxs.v1.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.neutron.interchaintxs.v1.MsgUpdateParams, $root.neutron.interchaintxs.v1.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof neutron.interchaintxs.v1.Msg - * @instance - * @param {neutron.interchaintxs.v1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1.MsgRegisterInterchainAccount = (function() { - - /** - * Properties of a MsgRegisterInterchainAccount. - * @memberof neutron.interchaintxs.v1 - * @interface IMsgRegisterInterchainAccount - * @property {string|null} [from_address] MsgRegisterInterchainAccount from_address - * @property {string|null} [connection_id] MsgRegisterInterchainAccount connection_id - * @property {string|null} [interchain_account_id] MsgRegisterInterchainAccount interchain_account_id - */ - - /** - * Constructs a new MsgRegisterInterchainAccount. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a MsgRegisterInterchainAccount. - * @implements IMsgRegisterInterchainAccount - * @constructor - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccount=} [properties] Properties to set - */ - function MsgRegisterInterchainAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgRegisterInterchainAccount from_address. - * @member {string} from_address - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.from_address = ""; - - /** - * MsgRegisterInterchainAccount connection_id. - * @member {string} connection_id - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.connection_id = ""; - - /** - * MsgRegisterInterchainAccount interchain_account_id. - * @member {string} interchain_account_id - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @instance - */ - MsgRegisterInterchainAccount.prototype.interchain_account_id = ""; - - /** - * Encodes the specified MsgRegisterInterchainAccount message. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccount} message MsgRegisterInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.from_address != null && Object.hasOwnProperty.call(message, "from_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_address); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connection_id); - if (message.interchain_account_id != null && Object.hasOwnProperty.call(message, "interchain_account_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.interchain_account_id); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainAccount message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccount} message MsgRegisterInterchainAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.from_address = reader.string(); - break; - case 2: - message.connection_id = reader.string(); - break; - case 3: - message.interchain_account_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainAccount message. - * @function verify - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.from_address != null && message.hasOwnProperty("from_address")) - if (!$util.isString(message.from_address)) - return "from_address: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.interchain_account_id != null && message.hasOwnProperty("interchain_account_id")) - if (!$util.isString(message.interchain_account_id)) - return "interchain_account_id: string expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.v1.MsgRegisterInterchainAccount} MsgRegisterInterchainAccount - */ - MsgRegisterInterchainAccount.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccount) - return object; - var message = new $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccount(); - if (object.from_address != null) - message.from_address = String(object.from_address); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.interchain_account_id != null) - message.interchain_account_id = String(object.interchain_account_id); - return message; - }; - - /** - * Creates a plain object from a MsgRegisterInterchainAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @static - * @param {neutron.interchaintxs.v1.MsgRegisterInterchainAccount} message MsgRegisterInterchainAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.from_address = ""; - object.connection_id = ""; - object.interchain_account_id = ""; - } - if (message.from_address != null && message.hasOwnProperty("from_address")) - object.from_address = message.from_address; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.interchain_account_id != null && message.hasOwnProperty("interchain_account_id")) - object.interchain_account_id = message.interchain_account_id; - return object; - }; - - /** - * Converts this MsgRegisterInterchainAccount to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccount - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainAccount; - })(); - - v1.MsgRegisterInterchainAccountResponse = (function() { - - /** - * Properties of a MsgRegisterInterchainAccountResponse. - * @memberof neutron.interchaintxs.v1 - * @interface IMsgRegisterInterchainAccountResponse - */ - - /** - * Constructs a new MsgRegisterInterchainAccountResponse. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a MsgRegisterInterchainAccountResponse. - * @implements IMsgRegisterInterchainAccountResponse - * @constructor - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccountResponse=} [properties] Properties to set - */ - function MsgRegisterInterchainAccountResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccountResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {neutron.interchaintxs.v1.IMsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgRegisterInterchainAccountResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccountResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgRegisterInterchainAccountResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgRegisterInterchainAccountResponse message. - * @function verify - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgRegisterInterchainAccountResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgRegisterInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse} MsgRegisterInterchainAccountResponse - */ - MsgRegisterInterchainAccountResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse) - return object; - return new $root.neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse(); - }; - - /** - * Creates a plain object from a MsgRegisterInterchainAccountResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @static - * @param {neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse} message MsgRegisterInterchainAccountResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgRegisterInterchainAccountResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgRegisterInterchainAccountResponse to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse - * @instance - * @returns {Object.} JSON object - */ - MsgRegisterInterchainAccountResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgRegisterInterchainAccountResponse; - })(); - - v1.MsgSubmitTx = (function() { - - /** - * Properties of a MsgSubmitTx. - * @memberof neutron.interchaintxs.v1 - * @interface IMsgSubmitTx - * @property {string|null} [from_address] MsgSubmitTx from_address - * @property {string|null} [interchain_account_id] MsgSubmitTx interchain_account_id - * @property {string|null} [connection_id] MsgSubmitTx connection_id - * @property {Array.|null} [msgs] MsgSubmitTx msgs - * @property {string|null} [memo] MsgSubmitTx memo - * @property {Long|null} [timeout] MsgSubmitTx timeout - * @property {neutron.feerefunder.IFee|null} [fee] MsgSubmitTx fee - */ - - /** - * Constructs a new MsgSubmitTx. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a MsgSubmitTx. - * @implements IMsgSubmitTx - * @constructor - * @param {neutron.interchaintxs.v1.IMsgSubmitTx=} [properties] Properties to set - */ - function MsgSubmitTx(properties) { - this.msgs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitTx from_address. - * @member {string} from_address - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.from_address = ""; - - /** - * MsgSubmitTx interchain_account_id. - * @member {string} interchain_account_id - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.interchain_account_id = ""; - - /** - * MsgSubmitTx connection_id. - * @member {string} connection_id - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.connection_id = ""; - - /** - * MsgSubmitTx msgs. - * @member {Array.} msgs - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.msgs = $util.emptyArray; - - /** - * MsgSubmitTx memo. - * @member {string} memo - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.memo = ""; - - /** - * MsgSubmitTx timeout. - * @member {Long} timeout - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.timeout = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgSubmitTx fee. - * @member {neutron.feerefunder.IFee|null|undefined} fee - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - */ - MsgSubmitTx.prototype.fee = null; - - /** - * Encodes the specified MsgSubmitTx message. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTx.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {neutron.interchaintxs.v1.IMsgSubmitTx} message MsgSubmitTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.from_address != null && Object.hasOwnProperty.call(message, "from_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.from_address); - if (message.interchain_account_id != null && Object.hasOwnProperty.call(message, "interchain_account_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.interchain_account_id); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.connection_id); - if (message.msgs != null && message.msgs.length) - for (var i = 0; i < message.msgs.length; ++i) - $root.google.protobuf.Any.encode(message.msgs[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.memo); - if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.timeout); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.neutron.feerefunder.Fee.encode(message.fee, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgSubmitTx message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTx.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {neutron.interchaintxs.v1.IMsgSubmitTx} message MsgSubmitTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitTx message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.v1.MsgSubmitTx} MsgSubmitTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.v1.MsgSubmitTx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.from_address = reader.string(); - break; - case 2: - message.interchain_account_id = reader.string(); - break; - case 3: - message.connection_id = reader.string(); - break; - case 4: - if (!(message.msgs && message.msgs.length)) - message.msgs = []; - message.msgs.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - case 5: - message.memo = reader.string(); - break; - case 6: - message.timeout = reader.uint64(); - break; - case 7: - message.fee = $root.neutron.feerefunder.Fee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.v1.MsgSubmitTx} MsgSubmitTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitTx message. - * @function verify - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.from_address != null && message.hasOwnProperty("from_address")) - if (!$util.isString(message.from_address)) - return "from_address: string expected"; - if (message.interchain_account_id != null && message.hasOwnProperty("interchain_account_id")) - if (!$util.isString(message.interchain_account_id)) - return "interchain_account_id: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - if (message.msgs != null && message.hasOwnProperty("msgs")) { - if (!Array.isArray(message.msgs)) - return "msgs: array expected"; - for (var i = 0; i < message.msgs.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.msgs[i]); - if (error) - return "msgs." + error; - } - } - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - if (message.timeout != null && message.hasOwnProperty("timeout")) - if (!$util.isInteger(message.timeout) && !(message.timeout && $util.isInteger(message.timeout.low) && $util.isInteger(message.timeout.high))) - return "timeout: integer|Long expected"; - if (message.fee != null && message.hasOwnProperty("fee")) { - var error = $root.neutron.feerefunder.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - return null; - }; - - /** - * Creates a MsgSubmitTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.v1.MsgSubmitTx} MsgSubmitTx - */ - MsgSubmitTx.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.v1.MsgSubmitTx) - return object; - var message = new $root.neutron.interchaintxs.v1.MsgSubmitTx(); - if (object.from_address != null) - message.from_address = String(object.from_address); - if (object.interchain_account_id != null) - message.interchain_account_id = String(object.interchain_account_id); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - if (object.msgs) { - if (!Array.isArray(object.msgs)) - throw TypeError(".neutron.interchaintxs.v1.MsgSubmitTx.msgs: array expected"); - message.msgs = []; - for (var i = 0; i < object.msgs.length; ++i) { - if (typeof object.msgs[i] !== "object") - throw TypeError(".neutron.interchaintxs.v1.MsgSubmitTx.msgs: object expected"); - message.msgs[i] = $root.google.protobuf.Any.fromObject(object.msgs[i]); - } - } - if (object.memo != null) - message.memo = String(object.memo); - if (object.timeout != null) - if ($util.Long) - (message.timeout = $util.Long.fromValue(object.timeout)).unsigned = true; - else if (typeof object.timeout === "string") - message.timeout = parseInt(object.timeout, 10); - else if (typeof object.timeout === "number") - message.timeout = object.timeout; - else if (typeof object.timeout === "object") - message.timeout = new $util.LongBits(object.timeout.low >>> 0, object.timeout.high >>> 0).toNumber(true); - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".neutron.interchaintxs.v1.MsgSubmitTx.fee: object expected"); - message.fee = $root.neutron.feerefunder.Fee.fromObject(object.fee); - } - return message; - }; - - /** - * Creates a plain object from a MsgSubmitTx message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @static - * @param {neutron.interchaintxs.v1.MsgSubmitTx} message MsgSubmitTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.msgs = []; - if (options.defaults) { - object.from_address = ""; - object.interchain_account_id = ""; - object.connection_id = ""; - object.memo = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeout = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout = options.longs === String ? "0" : 0; - object.fee = null; - } - if (message.from_address != null && message.hasOwnProperty("from_address")) - object.from_address = message.from_address; - if (message.interchain_account_id != null && message.hasOwnProperty("interchain_account_id")) - object.interchain_account_id = message.interchain_account_id; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - if (message.msgs && message.msgs.length) { - object.msgs = []; - for (var j = 0; j < message.msgs.length; ++j) - object.msgs[j] = $root.google.protobuf.Any.toObject(message.msgs[j], options); - } - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - if (message.timeout != null && message.hasOwnProperty("timeout")) - if (typeof message.timeout === "number") - object.timeout = options.longs === String ? String(message.timeout) : message.timeout; - else - object.timeout = options.longs === String ? $util.Long.prototype.toString.call(message.timeout) : options.longs === Number ? new $util.LongBits(message.timeout.low >>> 0, message.timeout.high >>> 0).toNumber(true) : message.timeout; - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.neutron.feerefunder.Fee.toObject(message.fee, options); - return object; - }; - - /** - * Converts this MsgSubmitTx to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.v1.MsgSubmitTx - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitTx; - })(); - - v1.MsgSubmitTxResponse = (function() { - - /** - * Properties of a MsgSubmitTxResponse. - * @memberof neutron.interchaintxs.v1 - * @interface IMsgSubmitTxResponse - * @property {Long|null} [sequence_id] MsgSubmitTxResponse sequence_id - * @property {string|null} [channel] MsgSubmitTxResponse channel - */ - - /** - * Constructs a new MsgSubmitTxResponse. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a MsgSubmitTxResponse. - * @implements IMsgSubmitTxResponse - * @constructor - * @param {neutron.interchaintxs.v1.IMsgSubmitTxResponse=} [properties] Properties to set - */ - function MsgSubmitTxResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSubmitTxResponse sequence_id. - * @member {Long} sequence_id - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @instance - */ - MsgSubmitTxResponse.prototype.sequence_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgSubmitTxResponse channel. - * @member {string} channel - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @instance - */ - MsgSubmitTxResponse.prototype.channel = ""; - - /** - * Encodes the specified MsgSubmitTxResponse message. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTxResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {neutron.interchaintxs.v1.IMsgSubmitTxResponse} message MsgSubmitTxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitTxResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequence_id != null && Object.hasOwnProperty.call(message, "sequence_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence_id); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel); - return writer; - }; - - /** - * Encodes the specified MsgSubmitTxResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTxResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {neutron.interchaintxs.v1.IMsgSubmitTxResponse} message MsgSubmitTxResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitTxResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSubmitTxResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.v1.MsgSubmitTxResponse} MsgSubmitTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitTxResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.v1.MsgSubmitTxResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence_id = reader.uint64(); - break; - case 2: - message.channel = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSubmitTxResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.v1.MsgSubmitTxResponse} MsgSubmitTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitTxResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitTxResponse message. - * @function verify - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitTxResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequence_id != null && message.hasOwnProperty("sequence_id")) - if (!$util.isInteger(message.sequence_id) && !(message.sequence_id && $util.isInteger(message.sequence_id.low) && $util.isInteger(message.sequence_id.high))) - return "sequence_id: integer|Long expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; - return null; - }; - - /** - * Creates a MsgSubmitTxResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.v1.MsgSubmitTxResponse} MsgSubmitTxResponse - */ - MsgSubmitTxResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.v1.MsgSubmitTxResponse) - return object; - var message = new $root.neutron.interchaintxs.v1.MsgSubmitTxResponse(); - if (object.sequence_id != null) - if ($util.Long) - (message.sequence_id = $util.Long.fromValue(object.sequence_id)).unsigned = true; - else if (typeof object.sequence_id === "string") - message.sequence_id = parseInt(object.sequence_id, 10); - else if (typeof object.sequence_id === "number") - message.sequence_id = object.sequence_id; - else if (typeof object.sequence_id === "object") - message.sequence_id = new $util.LongBits(object.sequence_id.low >>> 0, object.sequence_id.high >>> 0).toNumber(true); - if (object.channel != null) - message.channel = String(object.channel); - return message; - }; - - /** - * Creates a plain object from a MsgSubmitTxResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @static - * @param {neutron.interchaintxs.v1.MsgSubmitTxResponse} message MsgSubmitTxResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitTxResponse.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_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence_id = options.longs === String ? "0" : 0; - object.channel = ""; - } - if (message.sequence_id != null && message.hasOwnProperty("sequence_id")) - if (typeof message.sequence_id === "number") - object.sequence_id = options.longs === String ? String(message.sequence_id) : message.sequence_id; - else - object.sequence_id = options.longs === String ? $util.Long.prototype.toString.call(message.sequence_id) : options.longs === Number ? new $util.LongBits(message.sequence_id.low >>> 0, message.sequence_id.high >>> 0).toNumber(true) : message.sequence_id; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - return object; - }; - - /** - * Converts this MsgSubmitTxResponse to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.v1.MsgSubmitTxResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitTxResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSubmitTxResponse; - })(); - - v1.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof neutron.interchaintxs.v1 - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {neutron.interchaintxs.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {neutron.interchaintxs.v1.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {neutron.interchaintxs.IParams|null|undefined} params - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {neutron.interchaintxs.v1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.interchaintxs.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {neutron.interchaintxs.v1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.v1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.v1.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.neutron.interchaintxs.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.v1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.interchaintxs.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.v1.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.v1.MsgUpdateParams) - return object; - var message = new $root.neutron.interchaintxs.v1.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.interchaintxs.v1.MsgUpdateParams.params: object expected"); - message.params = $root.neutron.interchaintxs.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @static - * @param {neutron.interchaintxs.v1.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.interchaintxs.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.v1.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - v1.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof neutron.interchaintxs.v1 - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof neutron.interchaintxs.v1 - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {neutron.interchaintxs.v1.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {neutron.interchaintxs.v1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {neutron.interchaintxs.v1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.v1.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.v1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.v1.MsgUpdateParamsResponse) - return object; - return new $root.neutron.interchaintxs.v1.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @static - * @param {neutron.interchaintxs.v1.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.v1.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - return v1; - })(); - - interchaintxs.Params = (function() { - - /** - * Properties of a Params. - * @memberof neutron.interchaintxs - * @interface IParams - * @property {Long|null} [msg_submit_tx_max_messages] Params msg_submit_tx_max_messages - */ - - /** - * Constructs a new Params. - * @memberof neutron.interchaintxs - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {neutron.interchaintxs.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 msg_submit_tx_max_messages. - * @member {Long} msg_submit_tx_max_messages - * @memberof neutron.interchaintxs.Params - * @instance - */ - Params.prototype.msg_submit_tx_max_messages = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.interchaintxs.Params.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.Params - * @static - * @param {neutron.interchaintxs.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.msg_submit_tx_max_messages != null && Object.hasOwnProperty.call(message, "msg_submit_tx_max_messages")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.msg_submit_tx_max_messages); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.interchaintxs.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.Params - * @static - * @param {neutron.interchaintxs.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 neutron.interchaintxs.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.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.neutron.interchaintxs.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.msg_submit_tx_max_messages = 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 neutron.interchaintxs.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.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 neutron.interchaintxs.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.msg_submit_tx_max_messages != null && message.hasOwnProperty("msg_submit_tx_max_messages")) - if (!$util.isInteger(message.msg_submit_tx_max_messages) && !(message.msg_submit_tx_max_messages && $util.isInteger(message.msg_submit_tx_max_messages.low) && $util.isInteger(message.msg_submit_tx_max_messages.high))) - return "msg_submit_tx_max_messages: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.Params - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.Params) - return object; - var message = new $root.neutron.interchaintxs.Params(); - if (object.msg_submit_tx_max_messages != null) - if ($util.Long) - (message.msg_submit_tx_max_messages = $util.Long.fromValue(object.msg_submit_tx_max_messages)).unsigned = true; - else if (typeof object.msg_submit_tx_max_messages === "string") - message.msg_submit_tx_max_messages = parseInt(object.msg_submit_tx_max_messages, 10); - else if (typeof object.msg_submit_tx_max_messages === "number") - message.msg_submit_tx_max_messages = object.msg_submit_tx_max_messages; - else if (typeof object.msg_submit_tx_max_messages === "object") - message.msg_submit_tx_max_messages = new $util.LongBits(object.msg_submit_tx_max_messages.low >>> 0, object.msg_submit_tx_max_messages.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 neutron.interchaintxs.Params - * @static - * @param {neutron.interchaintxs.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.msg_submit_tx_max_messages = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.msg_submit_tx_max_messages = options.longs === String ? "0" : 0; - if (message.msg_submit_tx_max_messages != null && message.hasOwnProperty("msg_submit_tx_max_messages")) - if (typeof message.msg_submit_tx_max_messages === "number") - object.msg_submit_tx_max_messages = options.longs === String ? String(message.msg_submit_tx_max_messages) : message.msg_submit_tx_max_messages; - else - object.msg_submit_tx_max_messages = options.longs === String ? $util.Long.prototype.toString.call(message.msg_submit_tx_max_messages) : options.longs === Number ? new $util.LongBits(message.msg_submit_tx_max_messages.low >>> 0, message.msg_submit_tx_max_messages.high >>> 0).toNumber(true) : message.msg_submit_tx_max_messages; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - interchaintxs.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.interchaintxs - * @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; - - /** - * Callback as used by {@link neutron.interchaintxs.Query#params}. - * @memberof neutron.interchaintxs.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchaintxs.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.interchaintxs.Query - * @instance - * @param {neutron.interchaintxs.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.interchaintxs.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.neutron.interchaintxs.QueryParamsRequest, $root.neutron.interchaintxs.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.interchaintxs.Query - * @instance - * @param {neutron.interchaintxs.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.interchaintxs.Query#interchainAccountAddress}. - * @memberof neutron.interchaintxs.Query - * @typedef InterchainAccountAddressCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.interchaintxs.QueryInterchainAccountAddressResponse} [response] QueryInterchainAccountAddressResponse - */ - - /** - * Calls InterchainAccountAddress. - * @function interchainAccountAddress - * @memberof neutron.interchaintxs.Query - * @instance - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressRequest} request QueryInterchainAccountAddressRequest message or plain object - * @param {neutron.interchaintxs.Query.InterchainAccountAddressCallback} callback Node-style callback called with the error, if any, and QueryInterchainAccountAddressResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.interchainAccountAddress = function interchainAccountAddress(request, callback) { - return this.rpcCall(interchainAccountAddress, $root.neutron.interchaintxs.QueryInterchainAccountAddressRequest, $root.neutron.interchaintxs.QueryInterchainAccountAddressResponse, request, callback); - }, "name", { value: "InterchainAccountAddress" }); - - /** - * Calls InterchainAccountAddress. - * @function interchainAccountAddress - * @memberof neutron.interchaintxs.Query - * @instance - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressRequest} request QueryInterchainAccountAddressRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - interchaintxs.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof neutron.interchaintxs - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof neutron.interchaintxs - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {neutron.interchaintxs.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.interchaintxs.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {neutron.interchaintxs.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {neutron.interchaintxs.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.QueryParamsRequest) - return object; - return new $root.neutron.interchaintxs.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.QueryParamsRequest - * @static - * @param {neutron.interchaintxs.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - interchaintxs.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof neutron.interchaintxs - * @interface IQueryParamsResponse - * @property {neutron.interchaintxs.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof neutron.interchaintxs - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {neutron.interchaintxs.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {neutron.interchaintxs.IParams|null|undefined} params - * @memberof neutron.interchaintxs.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.interchaintxs.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {neutron.interchaintxs.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.interchaintxs.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {neutron.interchaintxs.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.interchaintxs.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.interchaintxs.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.QueryParamsResponse) - return object; - var message = new $root.neutron.interchaintxs.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.interchaintxs.QueryParamsResponse.params: object expected"); - message.params = $root.neutron.interchaintxs.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.QueryParamsResponse - * @static - * @param {neutron.interchaintxs.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.interchaintxs.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - interchaintxs.QueryInterchainAccountAddressRequest = (function() { - - /** - * Properties of a QueryInterchainAccountAddressRequest. - * @memberof neutron.interchaintxs - * @interface IQueryInterchainAccountAddressRequest - * @property {string|null} [owner_address] QueryInterchainAccountAddressRequest owner_address - * @property {string|null} [interchain_account_id] QueryInterchainAccountAddressRequest interchain_account_id - * @property {string|null} [connection_id] QueryInterchainAccountAddressRequest connection_id - */ - - /** - * Constructs a new QueryInterchainAccountAddressRequest. - * @memberof neutron.interchaintxs - * @classdesc Represents a QueryInterchainAccountAddressRequest. - * @implements IQueryInterchainAccountAddressRequest - * @constructor - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressRequest=} [properties] Properties to set - */ - function QueryInterchainAccountAddressRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryInterchainAccountAddressRequest owner_address. - * @member {string} owner_address - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @instance - */ - QueryInterchainAccountAddressRequest.prototype.owner_address = ""; - - /** - * QueryInterchainAccountAddressRequest interchain_account_id. - * @member {string} interchain_account_id - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @instance - */ - QueryInterchainAccountAddressRequest.prototype.interchain_account_id = ""; - - /** - * QueryInterchainAccountAddressRequest connection_id. - * @member {string} connection_id - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @instance - */ - QueryInterchainAccountAddressRequest.prototype.connection_id = ""; - - /** - * Encodes the specified QueryInterchainAccountAddressRequest message. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressRequest.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressRequest} message QueryInterchainAccountAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountAddressRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owner_address != null && Object.hasOwnProperty.call(message, "owner_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.owner_address); - if (message.interchain_account_id != null && Object.hasOwnProperty.call(message, "interchain_account_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.interchain_account_id); - if (message.connection_id != null && Object.hasOwnProperty.call(message, "connection_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.connection_id); - return writer; - }; - - /** - * Encodes the specified QueryInterchainAccountAddressRequest message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressRequest} message QueryInterchainAccountAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryInterchainAccountAddressRequest message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.QueryInterchainAccountAddressRequest} QueryInterchainAccountAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountAddressRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.QueryInterchainAccountAddressRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.owner_address = reader.string(); - break; - case 2: - message.interchain_account_id = reader.string(); - break; - case 3: - message.connection_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryInterchainAccountAddressRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.QueryInterchainAccountAddressRequest} QueryInterchainAccountAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountAddressRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryInterchainAccountAddressRequest message. - * @function verify - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryInterchainAccountAddressRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owner_address != null && message.hasOwnProperty("owner_address")) - if (!$util.isString(message.owner_address)) - return "owner_address: string expected"; - if (message.interchain_account_id != null && message.hasOwnProperty("interchain_account_id")) - if (!$util.isString(message.interchain_account_id)) - return "interchain_account_id: string expected"; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - if (!$util.isString(message.connection_id)) - return "connection_id: string expected"; - return null; - }; - - /** - * Creates a QueryInterchainAccountAddressRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.QueryInterchainAccountAddressRequest} QueryInterchainAccountAddressRequest - */ - QueryInterchainAccountAddressRequest.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.QueryInterchainAccountAddressRequest) - return object; - var message = new $root.neutron.interchaintxs.QueryInterchainAccountAddressRequest(); - if (object.owner_address != null) - message.owner_address = String(object.owner_address); - if (object.interchain_account_id != null) - message.interchain_account_id = String(object.interchain_account_id); - if (object.connection_id != null) - message.connection_id = String(object.connection_id); - return message; - }; - - /** - * Creates a plain object from a QueryInterchainAccountAddressRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @static - * @param {neutron.interchaintxs.QueryInterchainAccountAddressRequest} message QueryInterchainAccountAddressRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryInterchainAccountAddressRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.owner_address = ""; - object.interchain_account_id = ""; - object.connection_id = ""; - } - if (message.owner_address != null && message.hasOwnProperty("owner_address")) - object.owner_address = message.owner_address; - if (message.interchain_account_id != null && message.hasOwnProperty("interchain_account_id")) - object.interchain_account_id = message.interchain_account_id; - if (message.connection_id != null && message.hasOwnProperty("connection_id")) - object.connection_id = message.connection_id; - return object; - }; - - /** - * Converts this QueryInterchainAccountAddressRequest to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressRequest - * @instance - * @returns {Object.} JSON object - */ - QueryInterchainAccountAddressRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryInterchainAccountAddressRequest; - })(); - - interchaintxs.QueryInterchainAccountAddressResponse = (function() { - - /** - * Properties of a QueryInterchainAccountAddressResponse. - * @memberof neutron.interchaintxs - * @interface IQueryInterchainAccountAddressResponse - * @property {string|null} [interchain_account_address] QueryInterchainAccountAddressResponse interchain_account_address - */ - - /** - * Constructs a new QueryInterchainAccountAddressResponse. - * @memberof neutron.interchaintxs - * @classdesc Represents a QueryInterchainAccountAddressResponse. - * @implements IQueryInterchainAccountAddressResponse - * @constructor - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressResponse=} [properties] Properties to set - */ - function QueryInterchainAccountAddressResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryInterchainAccountAddressResponse interchain_account_address. - * @member {string} interchain_account_address - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @instance - */ - QueryInterchainAccountAddressResponse.prototype.interchain_account_address = ""; - - /** - * Encodes the specified QueryInterchainAccountAddressResponse message. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressResponse.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressResponse} message QueryInterchainAccountAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountAddressResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.interchain_account_address != null && Object.hasOwnProperty.call(message, "interchain_account_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.interchain_account_address); - return writer; - }; - - /** - * Encodes the specified QueryInterchainAccountAddressResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {neutron.interchaintxs.IQueryInterchainAccountAddressResponse} message QueryInterchainAccountAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryInterchainAccountAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryInterchainAccountAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.QueryInterchainAccountAddressResponse} QueryInterchainAccountAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountAddressResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.QueryInterchainAccountAddressResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.interchain_account_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryInterchainAccountAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.QueryInterchainAccountAddressResponse} QueryInterchainAccountAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryInterchainAccountAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryInterchainAccountAddressResponse message. - * @function verify - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryInterchainAccountAddressResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.interchain_account_address != null && message.hasOwnProperty("interchain_account_address")) - if (!$util.isString(message.interchain_account_address)) - return "interchain_account_address: string expected"; - return null; - }; - - /** - * Creates a QueryInterchainAccountAddressResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.QueryInterchainAccountAddressResponse} QueryInterchainAccountAddressResponse - */ - QueryInterchainAccountAddressResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.QueryInterchainAccountAddressResponse) - return object; - var message = new $root.neutron.interchaintxs.QueryInterchainAccountAddressResponse(); - if (object.interchain_account_address != null) - message.interchain_account_address = String(object.interchain_account_address); - return message; - }; - - /** - * Creates a plain object from a QueryInterchainAccountAddressResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @static - * @param {neutron.interchaintxs.QueryInterchainAccountAddressResponse} message QueryInterchainAccountAddressResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryInterchainAccountAddressResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.interchain_account_address = ""; - if (message.interchain_account_address != null && message.hasOwnProperty("interchain_account_address")) - object.interchain_account_address = message.interchain_account_address; - return object; - }; - - /** - * Converts this QueryInterchainAccountAddressResponse to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.QueryInterchainAccountAddressResponse - * @instance - * @returns {Object.} JSON object - */ - QueryInterchainAccountAddressResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryInterchainAccountAddressResponse; - })(); - - interchaintxs.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof neutron.interchaintxs - * @interface IGenesisState - * @property {neutron.interchaintxs.IParams|null} [params] GenesisState params - */ - - /** - * Constructs a new GenesisState. - * @memberof neutron.interchaintxs - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {neutron.interchaintxs.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {neutron.interchaintxs.IParams|null|undefined} params - * @memberof neutron.interchaintxs.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.interchaintxs.GenesisState.verify|verify} messages. - * @function encode - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {neutron.interchaintxs.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.neutron.interchaintxs.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.interchaintxs.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {neutron.interchaintxs.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.interchaintxs.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.interchaintxs.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.neutron.interchaintxs.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.interchaintxs.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.neutron.interchaintxs.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {neutron.interchaintxs.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.interchaintxs.GenesisState) - return object; - var message = new $root.neutron.interchaintxs.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".neutron.interchaintxs.GenesisState.params: object expected"); - message.params = $root.neutron.interchaintxs.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.interchaintxs.GenesisState - * @static - * @param {neutron.interchaintxs.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.neutron.interchaintxs.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof neutron.interchaintxs.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - return interchaintxs; - })(); - - neutron.transfer = (function() { - - /** - * Namespace transfer. - * @memberof neutron - * @namespace - */ - var transfer = {}; - - transfer.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof neutron.transfer - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link neutron.transfer.Msg#transfer}. - * @memberof neutron.transfer.Msg - * @typedef TransferCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {neutron.transfer.MsgTransferResponse} [response] MsgTransferResponse - */ - - /** - * Calls Transfer. - * @function transfer - * @memberof neutron.transfer.Msg - * @instance - * @param {neutron.transfer.IMsgTransfer} request MsgTransfer message or plain object - * @param {neutron.transfer.Msg.TransferCallback} callback Node-style callback called with the error, if any, and MsgTransferResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.transfer = function transfer(request, callback) { - return this.rpcCall(transfer, $root.neutron.transfer.MsgTransfer, $root.neutron.transfer.MsgTransferResponse, request, callback); - }, "name", { value: "Transfer" }); - - /** - * Calls Transfer. - * @function transfer - * @memberof neutron.transfer.Msg - * @instance - * @param {neutron.transfer.IMsgTransfer} request MsgTransfer message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - transfer.MsgTransfer = (function() { - - /** - * Properties of a MsgTransfer. - * @memberof neutron.transfer - * @interface IMsgTransfer - * @property {string|null} [source_port] MsgTransfer source_port - * @property {string|null} [source_channel] MsgTransfer source_channel - * @property {cosmos.base.v1beta1.ICoin|null} [token] MsgTransfer token - * @property {string|null} [sender] MsgTransfer sender - * @property {string|null} [receiver] MsgTransfer receiver - * @property {ibc.core.client.v1.IHeight|null} [timeout_height] MsgTransfer timeout_height - * @property {Long|null} [timeout_timestamp] MsgTransfer timeout_timestamp - * @property {string|null} [memo] MsgTransfer memo - * @property {neutron.feerefunder.IFee|null} [fee] MsgTransfer fee - */ - - /** - * Constructs a new MsgTransfer. - * @memberof neutron.transfer - * @classdesc Represents a MsgTransfer. - * @implements IMsgTransfer - * @constructor - * @param {neutron.transfer.IMsgTransfer=} [properties] Properties to set - */ - function MsgTransfer(properties) { - if (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 source_port. - * @member {string} source_port - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.source_port = ""; - - /** - * MsgTransfer source_channel. - * @member {string} source_channel - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.source_channel = ""; - - /** - * MsgTransfer token. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} token - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.token = null; - - /** - * MsgTransfer sender. - * @member {string} sender - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.sender = ""; - - /** - * MsgTransfer receiver. - * @member {string} receiver - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.receiver = ""; - - /** - * MsgTransfer timeout_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} timeout_height - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeout_height = null; - - /** - * MsgTransfer timeout_timestamp. - * @member {Long} timeout_timestamp - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeout_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTransfer memo. - * @member {string} memo - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.memo = ""; - - /** - * MsgTransfer fee. - * @member {neutron.feerefunder.IFee|null|undefined} fee - * @memberof neutron.transfer.MsgTransfer - * @instance - */ - MsgTransfer.prototype.fee = null; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link neutron.transfer.MsgTransfer.verify|verify} messages. - * @function encode - * @memberof neutron.transfer.MsgTransfer - * @static - * @param {neutron.transfer.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.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_channel); - if (message.token != null && Object.hasOwnProperty.call(message, "token")) - $root.cosmos.base.v1beta1.Coin.encode(message.token, 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).string(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); - if (message.timeout_height != null && Object.hasOwnProperty.call(message, "timeout_height")) - $root.ibc.core.client.v1.Height.encode(message.timeout_height, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.timeout_timestamp != null && Object.hasOwnProperty.call(message, "timeout_timestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeout_timestamp); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.memo); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.neutron.feerefunder.Fee.encode(message.fee, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link neutron.transfer.MsgTransfer.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.transfer.MsgTransfer - * @static - * @param {neutron.transfer.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 neutron.transfer.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.transfer.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.neutron.transfer.MsgTransfer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.source_port = reader.string(); - break; - case 2: - message.source_channel = reader.string(); - break; - case 3: - message.token = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 4: - message.sender = reader.string(); - break; - case 5: - message.receiver = reader.string(); - break; - case 6: - message.timeout_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 7: - message.timeout_timestamp = reader.uint64(); - break; - case 8: - message.memo = reader.string(); - break; - case 9: - message.fee = $root.neutron.feerefunder.Fee.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.transfer.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.transfer.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 neutron.transfer.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.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.token != null && message.hasOwnProperty("token")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.token); - if (error) - return "token." + 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"; - if (message.timeout_height != null && message.hasOwnProperty("timeout_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.timeout_height); - if (error) - return "timeout_height." + error; - } - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (!$util.isInteger(message.timeout_timestamp) && !(message.timeout_timestamp && $util.isInteger(message.timeout_timestamp.low) && $util.isInteger(message.timeout_timestamp.high))) - return "timeout_timestamp: integer|Long expected"; - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - if (message.fee != null && message.hasOwnProperty("fee")) { - var error = $root.neutron.feerefunder.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - return null; - }; - - /** - * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.transfer.MsgTransfer - * @static - * @param {Object.} object Plain object - * @returns {neutron.transfer.MsgTransfer} MsgTransfer - */ - MsgTransfer.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.transfer.MsgTransfer) - return object; - var message = new $root.neutron.transfer.MsgTransfer(); - if (object.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.token != null) { - if (typeof object.token !== "object") - throw TypeError(".neutron.transfer.MsgTransfer.token: object expected"); - message.token = $root.cosmos.base.v1beta1.Coin.fromObject(object.token); - } - if (object.sender != null) - message.sender = String(object.sender); - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.timeout_height != null) { - if (typeof object.timeout_height !== "object") - throw TypeError(".neutron.transfer.MsgTransfer.timeout_height: object expected"); - message.timeout_height = $root.ibc.core.client.v1.Height.fromObject(object.timeout_height); - } - if (object.timeout_timestamp != null) - if ($util.Long) - (message.timeout_timestamp = $util.Long.fromValue(object.timeout_timestamp)).unsigned = true; - else if (typeof object.timeout_timestamp === "string") - message.timeout_timestamp = parseInt(object.timeout_timestamp, 10); - else if (typeof object.timeout_timestamp === "number") - message.timeout_timestamp = object.timeout_timestamp; - else if (typeof object.timeout_timestamp === "object") - message.timeout_timestamp = new $util.LongBits(object.timeout_timestamp.low >>> 0, object.timeout_timestamp.high >>> 0).toNumber(true); - if (object.memo != null) - message.memo = String(object.memo); - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".neutron.transfer.MsgTransfer.fee: object expected"); - message.fee = $root.neutron.feerefunder.Fee.fromObject(object.fee); - } - return message; - }; - - /** - * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.transfer.MsgTransfer - * @static - * @param {neutron.transfer.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.defaults) { - object.source_port = ""; - object.source_channel = ""; - object.token = null; - object.sender = ""; - object.receiver = ""; - object.timeout_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeout_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout_timestamp = options.longs === String ? "0" : 0; - object.memo = ""; - object.fee = null; - } - if (message.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.token != null && message.hasOwnProperty("token")) - object.token = $root.cosmos.base.v1beta1.Coin.toObject(message.token, options); - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.timeout_height != null && message.hasOwnProperty("timeout_height")) - object.timeout_height = $root.ibc.core.client.v1.Height.toObject(message.timeout_height, options); - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (typeof message.timeout_timestamp === "number") - object.timeout_timestamp = options.longs === String ? String(message.timeout_timestamp) : message.timeout_timestamp; - else - object.timeout_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeout_timestamp) : options.longs === Number ? new $util.LongBits(message.timeout_timestamp.low >>> 0, message.timeout_timestamp.high >>> 0).toNumber(true) : message.timeout_timestamp; - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.neutron.feerefunder.Fee.toObject(message.fee, options); - return object; - }; - - /** - * Converts this MsgTransfer to JSON. - * @function toJSON - * @memberof neutron.transfer.MsgTransfer - * @instance - * @returns {Object.} JSON object - */ - MsgTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTransfer; - })(); - - transfer.MsgTransferResponse = (function() { - - /** - * Properties of a MsgTransferResponse. - * @memberof neutron.transfer - * @interface IMsgTransferResponse - * @property {Long|null} [sequence_id] MsgTransferResponse sequence_id - * @property {string|null} [channel] MsgTransferResponse channel - */ - - /** - * Constructs a new MsgTransferResponse. - * @memberof neutron.transfer - * @classdesc Represents a MsgTransferResponse. - * @implements IMsgTransferResponse - * @constructor - * @param {neutron.transfer.IMsgTransferResponse=} [properties] Properties to set - */ - function MsgTransferResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgTransferResponse sequence_id. - * @member {Long} sequence_id - * @memberof neutron.transfer.MsgTransferResponse - * @instance - */ - MsgTransferResponse.prototype.sequence_id = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTransferResponse channel. - * @member {string} channel - * @memberof neutron.transfer.MsgTransferResponse - * @instance - */ - MsgTransferResponse.prototype.channel = ""; - - /** - * Encodes the specified MsgTransferResponse message. Does not implicitly {@link neutron.transfer.MsgTransferResponse.verify|verify} messages. - * @function encode - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {neutron.transfer.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransferResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequence_id != null && Object.hasOwnProperty.call(message, "sequence_id")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence_id); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel); - return writer; - }; - - /** - * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link neutron.transfer.MsgTransferResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {neutron.transfer.IMsgTransferResponse} message MsgTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer. - * @function decode - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {neutron.transfer.MsgTransferResponse} MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransferResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.neutron.transfer.MsgTransferResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence_id = reader.uint64(); - break; - case 2: - message.channel = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {neutron.transfer.MsgTransferResponse} MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransferResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTransferResponse message. - * @function verify - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTransferResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequence_id != null && message.hasOwnProperty("sequence_id")) - if (!$util.isInteger(message.sequence_id) && !(message.sequence_id && $util.isInteger(message.sequence_id.low) && $util.isInteger(message.sequence_id.high))) - return "sequence_id: integer|Long expected"; - if (message.channel != null && message.hasOwnProperty("channel")) - if (!$util.isString(message.channel)) - return "channel: string expected"; - return null; - }; - - /** - * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {Object.} object Plain object - * @returns {neutron.transfer.MsgTransferResponse} MsgTransferResponse - */ - MsgTransferResponse.fromObject = function fromObject(object) { - if (object instanceof $root.neutron.transfer.MsgTransferResponse) - return object; - var message = new $root.neutron.transfer.MsgTransferResponse(); - if (object.sequence_id != null) - if ($util.Long) - (message.sequence_id = $util.Long.fromValue(object.sequence_id)).unsigned = true; - else if (typeof object.sequence_id === "string") - message.sequence_id = parseInt(object.sequence_id, 10); - else if (typeof object.sequence_id === "number") - message.sequence_id = object.sequence_id; - else if (typeof object.sequence_id === "object") - message.sequence_id = new $util.LongBits(object.sequence_id.low >>> 0, object.sequence_id.high >>> 0).toNumber(true); - if (object.channel != null) - message.channel = String(object.channel); - return message; - }; - - /** - * Creates a plain object from a MsgTransferResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof neutron.transfer.MsgTransferResponse - * @static - * @param {neutron.transfer.MsgTransferResponse} message MsgTransferResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTransferResponse.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_id = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence_id = options.longs === String ? "0" : 0; - object.channel = ""; - } - if (message.sequence_id != null && message.hasOwnProperty("sequence_id")) - if (typeof message.sequence_id === "number") - object.sequence_id = options.longs === String ? String(message.sequence_id) : message.sequence_id; - else - object.sequence_id = options.longs === String ? $util.Long.prototype.toString.call(message.sequence_id) : options.longs === Number ? new $util.LongBits(message.sequence_id.low >>> 0, message.sequence_id.high >>> 0).toNumber(true) : message.sequence_id; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = message.channel; - return object; - }; - - /** - * Converts this MsgTransferResponse to JSON. - * @function toJSON - * @memberof neutron.transfer.MsgTransferResponse - * @instance - * @returns {Object.} JSON object - */ - MsgTransferResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgTransferResponse; - })(); - - transfer.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof neutron.transfer - * @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; - - /** - * Callback as used by {@link neutron.transfer.Query#denomTrace}. - * @memberof neutron.transfer.Query - * @typedef DenomTraceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} [response] QueryDenomTraceResponse - */ - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @param {neutron.transfer.Query.DenomTraceCallback} callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTrace = function denomTrace(request, callback) { - return this.rpcCall(denomTrace, $root.ibc.applications.transfer.v1.QueryDenomTraceRequest, $root.ibc.applications.transfer.v1.QueryDenomTraceResponse, request, callback); - }, "name", { value: "DenomTrace" }); - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.transfer.Query#denomTraces}. - * @memberof neutron.transfer.Query - * @typedef DenomTracesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} [response] QueryDenomTracesResponse - */ - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @param {neutron.transfer.Query.DenomTracesCallback} callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTraces = function denomTraces(request, callback) { - return this.rpcCall(denomTraces, $root.ibc.applications.transfer.v1.QueryDenomTracesRequest, $root.ibc.applications.transfer.v1.QueryDenomTracesResponse, request, callback); - }, "name", { value: "DenomTraces" }); - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.transfer.Query#params}. - * @memberof neutron.transfer.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {neutron.transfer.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.transfer.v1.QueryParamsRequest, $root.ibc.applications.transfer.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link neutron.transfer.Query#denomHash}. - * @memberof neutron.transfer.Query - * @typedef DenomHashCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} [response] QueryDenomHashResponse - */ - - /** - * Calls DenomHash. - * @function denomHash - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @param {neutron.transfer.Query.DenomHashCallback} callback Node-style callback called with the error, if any, and QueryDenomHashResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomHash = function denomHash(request, callback) { - return this.rpcCall(denomHash, $root.ibc.applications.transfer.v1.QueryDenomHashRequest, $root.ibc.applications.transfer.v1.QueryDenomHashResponse, request, callback); - }, "name", { value: "DenomHash" }); - - /** - * Calls DenomHash. - * @function denomHash - * @memberof neutron.transfer.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - return transfer; - })(); - - return neutron; - })(); - - $root.gogoproto = (function() { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - var gogoproto = {}; - - return gogoproto; - })(); - - $root.ibc = (function() { - - /** - * Namespace ibc. - * @exports ibc - * @namespace - */ - var ibc = {}; - - ibc.core = (function() { - - /** - * Namespace core. - * @memberof ibc - * @namespace - */ - var core = {}; - - core.channel = (function() { - - /** - * Namespace channel. - * @memberof ibc.core - * @namespace - */ - var channel = {}; - - channel.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.channel - * @namespace - */ - var v1 = {}; - - v1.Channel = (function() { - - /** - * Properties of a Channel. - * @memberof ibc.core.channel.v1 - * @interface IChannel - * @property {ibc.core.channel.v1.State|null} [state] Channel state - * @property {ibc.core.channel.v1.Order|null} [ordering] Channel ordering - * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] Channel counterparty - * @property {Array.|null} [connection_hops] Channel connection_hops - * @property {string|null} [version] Channel version - */ - - /** - * Constructs a new Channel. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Channel. - * @implements IChannel - * @constructor - * @param {ibc.core.channel.v1.IChannel=} [properties] Properties to set - */ - function Channel(properties) { - this.connection_hops = []; - if (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 {ibc.core.channel.v1.State} state - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.state = 0; - - /** - * Channel ordering. - * @member {ibc.core.channel.v1.Order} ordering - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.ordering = 0; - - /** - * Channel counterparty. - * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.counterparty = null; - - /** - * Channel connection_hops. - * @member {Array.} connection_hops - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.connection_hops = $util.emptyArray; - - /** - * Channel version. - * @member {string} version - * @memberof ibc.core.channel.v1.Channel - * @instance - */ - Channel.prototype.version = ""; - - /** - * Encodes the specified Channel message. Does not implicitly {@link ibc.core.channel.v1.Channel.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connection_hops != null && message.connection_hops.length) - for (var i = 0; i < message.connection_hops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_hops[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 ibc.core.channel.v1.Channel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.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.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.connection_hops && message.connection_hops.length)) - message.connection_hops = []; - message.connection_hops.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 ibc.core.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.ibc.core.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connection_hops != null && message.hasOwnProperty("connection_hops")) { - if (!Array.isArray(message.connection_hops)) - return "connection_hops: array expected"; - for (var i = 0; i < message.connection_hops.length; ++i) - if (!$util.isString(message.connection_hops[i])) - return "connection_hops: 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 ibc.core.channel.v1.Channel - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Channel} Channel - */ - Channel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Channel) - return object; - var message = new $root.ibc.core.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(".ibc.core.channel.v1.Channel.counterparty: object expected"); - message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connection_hops) { - if (!Array.isArray(object.connection_hops)) - throw TypeError(".ibc.core.channel.v1.Channel.connection_hops: array expected"); - message.connection_hops = []; - for (var i = 0; i < object.connection_hops.length; ++i) - message.connection_hops[i] = String(object.connection_hops[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 ibc.core.channel.v1.Channel - * @static - * @param {ibc.core.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.connection_hops = []; - 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.ibc.core.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connection_hops && message.connection_hops.length) { - object.connection_hops = []; - for (var j = 0; j < message.connection_hops.length; ++j) - object.connection_hops[j] = message.connection_hops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this Channel to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Channel - * @instance - * @returns {Object.} JSON object - */ - Channel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Channel; - })(); - - v1.IdentifiedChannel = (function() { - - /** - * Properties of an IdentifiedChannel. - * @memberof ibc.core.channel.v1 - * @interface IIdentifiedChannel - * @property {ibc.core.channel.v1.State|null} [state] IdentifiedChannel state - * @property {ibc.core.channel.v1.Order|null} [ordering] IdentifiedChannel ordering - * @property {ibc.core.channel.v1.ICounterparty|null} [counterparty] IdentifiedChannel counterparty - * @property {Array.|null} [connection_hops] IdentifiedChannel connection_hops - * @property {string|null} [version] IdentifiedChannel version - * @property {string|null} [port_id] IdentifiedChannel port_id - * @property {string|null} [channel_id] IdentifiedChannel channel_id - */ - - /** - * Constructs a new IdentifiedChannel. - * @memberof ibc.core.channel.v1 - * @classdesc Represents an IdentifiedChannel. - * @implements IIdentifiedChannel - * @constructor - * @param {ibc.core.channel.v1.IIdentifiedChannel=} [properties] Properties to set - */ - function IdentifiedChannel(properties) { - this.connection_hops = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedChannel state. - * @member {ibc.core.channel.v1.State} state - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.state = 0; - - /** - * IdentifiedChannel ordering. - * @member {ibc.core.channel.v1.Order} ordering - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.ordering = 0; - - /** - * IdentifiedChannel counterparty. - * @member {ibc.core.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.counterparty = null; - - /** - * IdentifiedChannel connection_hops. - * @member {Array.} connection_hops - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.connection_hops = $util.emptyArray; - - /** - * IdentifiedChannel version. - * @member {string} version - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.version = ""; - - /** - * IdentifiedChannel port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.port_id = ""; - - /** - * IdentifiedChannel channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - */ - IdentifiedChannel.prototype.channel_id = ""; - - /** - * Encodes the specified IdentifiedChannel message. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedChannel.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.ibc.core.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connection_hops != null && message.connection_hops.length) - for (var i = 0; i < message.connection_hops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connection_hops[i]); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified IdentifiedChannel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IIdentifiedChannel} message IdentifiedChannel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedChannel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedChannel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.IdentifiedChannel(); - 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.ibc.core.channel.v1.Counterparty.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.connection_hops && message.connection_hops.length)) - message.connection_hops = []; - message.connection_hops.push(reader.string()); - break; - case 5: - message.version = reader.string(); - break; - case 6: - message.port_id = reader.string(); - break; - case 7: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedChannel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedChannel message. - * @function verify - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedChannel.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.ibc.core.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connection_hops != null && message.hasOwnProperty("connection_hops")) { - if (!Array.isArray(message.connection_hops)) - return "connection_hops: array expected"; - for (var i = 0; i < message.connection_hops.length; ++i) - if (!$util.isString(message.connection_hops[i])) - return "connection_hops: string[] expected"; - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates an IdentifiedChannel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.IdentifiedChannel} IdentifiedChannel - */ - IdentifiedChannel.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.IdentifiedChannel) - return object; - var message = new $root.ibc.core.channel.v1.IdentifiedChannel(); - 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(".ibc.core.channel.v1.IdentifiedChannel.counterparty: object expected"); - message.counterparty = $root.ibc.core.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connection_hops) { - if (!Array.isArray(object.connection_hops)) - throw TypeError(".ibc.core.channel.v1.IdentifiedChannel.connection_hops: array expected"); - message.connection_hops = []; - for (var i = 0; i < object.connection_hops.length; ++i) - message.connection_hops[i] = String(object.connection_hops[i]); - } - if (object.version != null) - message.version = String(object.version); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from an IdentifiedChannel message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @static - * @param {ibc.core.channel.v1.IdentifiedChannel} message IdentifiedChannel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedChannel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connection_hops = []; - 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 = ""; - object.port_id = ""; - object.channel_id = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.ibc.core.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.ibc.core.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.ibc.core.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connection_hops && message.connection_hops.length) { - object.connection_hops = []; - for (var j = 0; j < message.connection_hops.length; ++j) - object.connection_hops[j] = message.connection_hops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this IdentifiedChannel to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.IdentifiedChannel - * @instance - * @returns {Object.} JSON object - */ - IdentifiedChannel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedChannel; - })(); - - /** - * State enum. - * @name ibc.core.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 ibc.core.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 ibc.core.channel.v1 - * @interface ICounterparty - * @property {string|null} [port_id] Counterparty port_id - * @property {string|null} [channel_id] Counterparty channel_id - */ - - /** - * Constructs a new Counterparty. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {ibc.core.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 port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.port_id = ""; - - /** - * Counterparty channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.channel_id = ""; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.Counterparty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = 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 ibc.core.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Counterparty) - return object; - var message = new $root.ibc.core.channel.v1.Counterparty(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.Counterparty - * @static - * @param {ibc.core.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.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof ibc.core.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 ibc.core.channel.v1 - * @interface IPacket - * @property {Long|null} [sequence] Packet sequence - * @property {string|null} [source_port] Packet source_port - * @property {string|null} [source_channel] Packet source_channel - * @property {string|null} [destination_port] Packet destination_port - * @property {string|null} [destination_channel] Packet destination_channel - * @property {Uint8Array|null} [data] Packet data - * @property {ibc.core.client.v1.IHeight|null} [timeout_height] Packet timeout_height - * @property {Long|null} [timeout_timestamp] Packet timeout_timestamp - */ - - /** - * Constructs a new Packet. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a Packet. - * @implements IPacket - * @constructor - * @param {ibc.core.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 {Long} sequence - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Packet source_port. - * @member {string} source_port - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.source_port = ""; - - /** - * Packet source_channel. - * @member {string} source_channel - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.source_channel = ""; - - /** - * Packet destination_port. - * @member {string} destination_port - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.destination_port = ""; - - /** - * Packet destination_channel. - * @member {string} destination_channel - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.destination_channel = ""; - - /** - * Packet data. - * @member {Uint8Array} data - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.data = $util.newBuffer([]); - - /** - * Packet timeout_height. - * @member {ibc.core.client.v1.IHeight|null|undefined} timeout_height - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.timeout_height = null; - - /** - * Packet timeout_timestamp. - * @member {Long} timeout_timestamp - * @memberof ibc.core.channel.v1.Packet - * @instance - */ - Packet.prototype.timeout_timestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Packet message. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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.source_port != null && Object.hasOwnProperty.call(message, "source_port")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_port); - if (message.source_channel != null && Object.hasOwnProperty.call(message, "source_channel")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.source_channel); - if (message.destination_port != null && Object.hasOwnProperty.call(message, "destination_port")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destination_port); - if (message.destination_channel != null && Object.hasOwnProperty.call(message, "destination_channel")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.destination_channel); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.data); - if (message.timeout_height != null && Object.hasOwnProperty.call(message, "timeout_height")) - $root.ibc.core.client.v1.Height.encode(message.timeout_height, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.timeout_timestamp != null && Object.hasOwnProperty.call(message, "timeout_timestamp")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.timeout_timestamp); - return writer; - }; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Packet.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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 ibc.core.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.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.ibc.core.channel.v1.Packet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sequence = reader.uint64(); - break; - case 2: - message.source_port = reader.string(); - break; - case 3: - message.source_channel = reader.string(); - break; - case 4: - message.destination_port = reader.string(); - break; - case 5: - message.destination_channel = reader.string(); - break; - case 6: - message.data = reader.bytes(); - break; - case 7: - message.timeout_height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 8: - message.timeout_timestamp = 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 ibc.core.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.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 ibc.core.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.source_port != null && message.hasOwnProperty("source_port")) - if (!$util.isString(message.source_port)) - return "source_port: string expected"; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - if (!$util.isString(message.source_channel)) - return "source_channel: string expected"; - if (message.destination_port != null && message.hasOwnProperty("destination_port")) - if (!$util.isString(message.destination_port)) - return "destination_port: string expected"; - if (message.destination_channel != null && message.hasOwnProperty("destination_channel")) - if (!$util.isString(message.destination_channel)) - return "destination_channel: 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.timeout_height != null && message.hasOwnProperty("timeout_height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.timeout_height); - if (error) - return "timeout_height." + error; - } - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (!$util.isInteger(message.timeout_timestamp) && !(message.timeout_timestamp && $util.isInteger(message.timeout_timestamp.low) && $util.isInteger(message.timeout_timestamp.high))) - return "timeout_timestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a Packet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Packet - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Packet} Packet - */ - Packet.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Packet) - return object; - var message = new $root.ibc.core.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.source_port != null) - message.source_port = String(object.source_port); - if (object.source_channel != null) - message.source_channel = String(object.source_channel); - if (object.destination_port != null) - message.destination_port = String(object.destination_port); - if (object.destination_channel != null) - message.destination_channel = String(object.destination_channel); - 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.timeout_height != null) { - if (typeof object.timeout_height !== "object") - throw TypeError(".ibc.core.channel.v1.Packet.timeout_height: object expected"); - message.timeout_height = $root.ibc.core.client.v1.Height.fromObject(object.timeout_height); - } - if (object.timeout_timestamp != null) - if ($util.Long) - (message.timeout_timestamp = $util.Long.fromValue(object.timeout_timestamp)).unsigned = true; - else if (typeof object.timeout_timestamp === "string") - message.timeout_timestamp = parseInt(object.timeout_timestamp, 10); - else if (typeof object.timeout_timestamp === "number") - message.timeout_timestamp = object.timeout_timestamp; - else if (typeof object.timeout_timestamp === "object") - message.timeout_timestamp = new $util.LongBits(object.timeout_timestamp.low >>> 0, object.timeout_timestamp.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 ibc.core.channel.v1.Packet - * @static - * @param {ibc.core.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.source_port = ""; - object.source_channel = ""; - object.destination_port = ""; - object.destination_channel = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.timeout_height = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeout_timestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeout_timestamp = 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.source_port != null && message.hasOwnProperty("source_port")) - object.source_port = message.source_port; - if (message.source_channel != null && message.hasOwnProperty("source_channel")) - object.source_channel = message.source_channel; - if (message.destination_port != null && message.hasOwnProperty("destination_port")) - object.destination_port = message.destination_port; - if (message.destination_channel != null && message.hasOwnProperty("destination_channel")) - object.destination_channel = message.destination_channel; - 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.timeout_height != null && message.hasOwnProperty("timeout_height")) - object.timeout_height = $root.ibc.core.client.v1.Height.toObject(message.timeout_height, options); - if (message.timeout_timestamp != null && message.hasOwnProperty("timeout_timestamp")) - if (typeof message.timeout_timestamp === "number") - object.timeout_timestamp = options.longs === String ? String(message.timeout_timestamp) : message.timeout_timestamp; - else - object.timeout_timestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeout_timestamp) : options.longs === Number ? new $util.LongBits(message.timeout_timestamp.low >>> 0, message.timeout_timestamp.high >>> 0).toNumber(true) : message.timeout_timestamp; - return object; - }; - - /** - * Converts this Packet to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Packet - * @instance - * @returns {Object.} JSON object - */ - Packet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Packet; - })(); - - v1.PacketState = (function() { - - /** - * Properties of a PacketState. - * @memberof ibc.core.channel.v1 - * @interface IPacketState - * @property {string|null} [port_id] PacketState port_id - * @property {string|null} [channel_id] PacketState channel_id - * @property {Long|null} [sequence] PacketState sequence - * @property {Uint8Array|null} [data] PacketState data - */ - - /** - * Constructs a new PacketState. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketState. - * @implements IPacketState - * @constructor - * @param {ibc.core.channel.v1.IPacketState=} [properties] Properties to set - */ - function PacketState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketState port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.port_id = ""; - - /** - * PacketState channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.channel_id = ""; - - /** - * PacketState sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PacketState data. - * @member {Uint8Array} data - * @memberof ibc.core.channel.v1.PacketState - * @instance - */ - PacketState.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified PacketState message. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified PacketState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.IPacketState} message PacketState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketState} PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - case 4: - message.data = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketState} PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketState message. - * @function verify - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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.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 PacketState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketState} PacketState - */ - PacketState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketState) - return object; - var message = new $root.ibc.core.channel.v1.PacketState(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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.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 PacketState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketState - * @static - * @param {ibc.core.channel.v1.PacketState} message PacketState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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 (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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.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 PacketState to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketState - * @instance - * @returns {Object.} JSON object - */ - PacketState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketState; - })(); - - v1.PacketId = (function() { - - /** - * Properties of a PacketId. - * @memberof ibc.core.channel.v1 - * @interface IPacketId - * @property {string|null} [port_id] PacketId port_id - * @property {string|null} [channel_id] PacketId channel_id - * @property {Long|null} [sequence] PacketId sequence - */ - - /** - * Constructs a new PacketId. - * @memberof ibc.core.channel.v1 - * @classdesc Represents a PacketId. - * @implements IPacketId - * @constructor - * @param {ibc.core.channel.v1.IPacketId=} [properties] Properties to set - */ - function PacketId(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PacketId port_id. - * @member {string} port_id - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.port_id = ""; - - /** - * PacketId channel_id. - * @member {string} channel_id - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.channel_id = ""; - - /** - * PacketId sequence. - * @member {Long} sequence - * @memberof ibc.core.channel.v1.PacketId - * @instance - */ - PacketId.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PacketId message. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.IPacketId} message PacketId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketId.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified PacketId message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.IPacketId} message PacketId message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PacketId.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PacketId message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.PacketId} PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketId.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.PacketId(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - case 3: - message.sequence = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PacketId message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.PacketId} PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PacketId.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PacketId message. - * @function verify - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PacketId.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string 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 PacketId message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.PacketId} PacketId - */ - PacketId.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.PacketId) - return object; - var message = new $root.ibc.core.channel.v1.PacketId(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - 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 PacketId message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.PacketId - * @static - * @param {ibc.core.channel.v1.PacketId} message PacketId - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PacketId.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - 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.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - 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 PacketId to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.PacketId - * @instance - * @returns {Object.} JSON object - */ - PacketId.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PacketId; - })(); - - v1.Acknowledgement = (function() { - - /** - * Properties of an Acknowledgement. - * @memberof ibc.core.channel.v1 - * @interface IAcknowledgement - * @property {Uint8Array|null} [result] Acknowledgement result - * @property {string|null} [error] Acknowledgement error - */ - - /** - * Constructs a new Acknowledgement. - * @memberof ibc.core.channel.v1 - * @classdesc Represents an Acknowledgement. - * @implements IAcknowledgement - * @constructor - * @param {ibc.core.channel.v1.IAcknowledgement=} [properties] Properties to set - */ - function Acknowledgement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Acknowledgement result. - * @member {Uint8Array|null|undefined} result - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Acknowledgement.prototype.result = null; - - /** - * Acknowledgement error. - * @member {string|null|undefined} error - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Acknowledgement.prototype.error = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Acknowledgement response. - * @member {"result"|"error"|undefined} response - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - */ - Object.defineProperty(Acknowledgement.prototype, "response", { - get: $util.oneOfGetter($oneOfFields = ["result", "error"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified Acknowledgement message. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @function encode - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Acknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 21, wireType 2 =*/170).bytes(message.result); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 22, wireType 2 =*/178).string(message.error); - return writer; - }; - - /** - * Encodes the specified Acknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.IAcknowledgement} message Acknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Acknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Acknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.channel.v1.Acknowledgement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 21: - message.result = reader.bytes(); - break; - case 22: - message.error = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Acknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Acknowledgement message. - * @function verify - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Acknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.result != null && message.hasOwnProperty("result")) { - properties.response = 1; - if (!(message.result && typeof message.result.length === "number" || $util.isString(message.result))) - return "result: buffer expected"; - } - if (message.error != null && message.hasOwnProperty("error")) { - if (properties.response === 1) - return "response: multiple values"; - properties.response = 1; - if (!$util.isString(message.error)) - return "error: string expected"; - } - return null; - }; - - /** - * Creates an Acknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.channel.v1.Acknowledgement} Acknowledgement - */ - Acknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.channel.v1.Acknowledgement) - return object; - var message = new $root.ibc.core.channel.v1.Acknowledgement(); - if (object.result != null) - if (typeof object.result === "string") - $util.base64.decode(object.result, message.result = $util.newBuffer($util.base64.length(object.result)), 0); - else if (object.result.length) - message.result = object.result; - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an Acknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.channel.v1.Acknowledgement - * @static - * @param {ibc.core.channel.v1.Acknowledgement} message Acknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Acknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.result != null && message.hasOwnProperty("result")) { - object.result = options.bytes === String ? $util.base64.encode(message.result, 0, message.result.length) : options.bytes === Array ? Array.prototype.slice.call(message.result) : message.result; - if (options.oneofs) - object.response = "result"; - } - if (message.error != null && message.hasOwnProperty("error")) { - object.error = message.error; - if (options.oneofs) - object.response = "error"; - } - return object; - }; - - /** - * Converts this Acknowledgement to JSON. - * @function toJSON - * @memberof ibc.core.channel.v1.Acknowledgement - * @instance - * @returns {Object.} JSON object - */ - Acknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Acknowledgement; - })(); - - return v1; - })(); - - return channel; - })(); - - core.client = (function() { - - /** - * Namespace client. - * @memberof ibc.core - * @namespace - */ - var client = {}; - - client.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.core.client - * @namespace - */ - var v1 = {}; - - v1.IdentifiedClientState = (function() { - - /** - * Properties of an IdentifiedClientState. - * @memberof ibc.core.client.v1 - * @interface IIdentifiedClientState - * @property {string|null} [client_id] IdentifiedClientState client_id - * @property {google.protobuf.IAny|null} [client_state] IdentifiedClientState client_state - */ - - /** - * Constructs a new IdentifiedClientState. - * @memberof ibc.core.client.v1 - * @classdesc Represents an IdentifiedClientState. - * @implements IIdentifiedClientState - * @constructor - * @param {ibc.core.client.v1.IIdentifiedClientState=} [properties] Properties to set - */ - function IdentifiedClientState(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IdentifiedClientState client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - */ - IdentifiedClientState.prototype.client_id = ""; - - /** - * IdentifiedClientState client_state. - * @member {google.protobuf.IAny|null|undefined} client_state - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - */ - IdentifiedClientState.prototype.client_state = null; - - /** - * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedClientState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.client_state != null && Object.hasOwnProperty.call(message, "client_state")) - $root.google.protobuf.Any.encode(message.client_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IIdentifiedClientState} message IdentifiedClientState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifiedClientState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedClientState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.IdentifiedClientState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - message.client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifiedClientState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifiedClientState message. - * @function verify - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifiedClientState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.client_state != null && message.hasOwnProperty("client_state")) { - var error = $root.google.protobuf.Any.verify(message.client_state); - if (error) - return "client_state." + error; - } - return null; - }; - - /** - * Creates an IdentifiedClientState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.IdentifiedClientState} IdentifiedClientState - */ - IdentifiedClientState.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.IdentifiedClientState) - return object; - var message = new $root.ibc.core.client.v1.IdentifiedClientState(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.client_state != null) { - if (typeof object.client_state !== "object") - throw TypeError(".ibc.core.client.v1.IdentifiedClientState.client_state: object expected"); - message.client_state = $root.google.protobuf.Any.fromObject(object.client_state); - } - return message; - }; - - /** - * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.IdentifiedClientState - * @static - * @param {ibc.core.client.v1.IdentifiedClientState} message IdentifiedClientState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifiedClientState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.client_id = ""; - object.client_state = null; - } - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.client_state != null && message.hasOwnProperty("client_state")) - object.client_state = $root.google.protobuf.Any.toObject(message.client_state, options); - return object; - }; - - /** - * Converts this IdentifiedClientState to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.IdentifiedClientState - * @instance - * @returns {Object.} JSON object - */ - IdentifiedClientState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IdentifiedClientState; - })(); - - v1.ConsensusStateWithHeight = (function() { - - /** - * Properties of a ConsensusStateWithHeight. - * @memberof ibc.core.client.v1 - * @interface IConsensusStateWithHeight - * @property {ibc.core.client.v1.IHeight|null} [height] ConsensusStateWithHeight height - * @property {google.protobuf.IAny|null} [consensus_state] ConsensusStateWithHeight consensus_state - */ - - /** - * Constructs a new ConsensusStateWithHeight. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ConsensusStateWithHeight. - * @implements IConsensusStateWithHeight - * @constructor - * @param {ibc.core.client.v1.IConsensusStateWithHeight=} [properties] Properties to set - */ - function ConsensusStateWithHeight(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConsensusStateWithHeight height. - * @member {ibc.core.client.v1.IHeight|null|undefined} height - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - */ - ConsensusStateWithHeight.prototype.height = null; - - /** - * ConsensusStateWithHeight consensus_state. - * @member {google.protobuf.IAny|null|undefined} consensus_state - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - */ - ConsensusStateWithHeight.prototype.consensus_state = null; - - /** - * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateWithHeight.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - $root.ibc.core.client.v1.Height.encode(message.height, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensus_state != null && Object.hasOwnProperty.call(message, "consensus_state")) - $root.google.protobuf.Any.encode(message.consensus_state, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.IConsensusStateWithHeight} message ConsensusStateWithHeight message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusStateWithHeight.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateWithHeight.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = $root.ibc.core.client.v1.Height.decode(reader, reader.uint32()); - break; - case 2: - message.consensus_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusStateWithHeight.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusStateWithHeight message. - * @function verify - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusStateWithHeight.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.height != null && message.hasOwnProperty("height")) { - var error = $root.ibc.core.client.v1.Height.verify(message.height); - if (error) - return "height." + error; - } - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) { - var error = $root.google.protobuf.Any.verify(message.consensus_state); - if (error) - return "consensus_state." + error; - } - return null; - }; - - /** - * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ConsensusStateWithHeight} ConsensusStateWithHeight - */ - ConsensusStateWithHeight.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ConsensusStateWithHeight) - return object; - var message = new $root.ibc.core.client.v1.ConsensusStateWithHeight(); - if (object.height != null) { - if (typeof object.height !== "object") - throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.height: object expected"); - message.height = $root.ibc.core.client.v1.Height.fromObject(object.height); - } - if (object.consensus_state != null) { - if (typeof object.consensus_state !== "object") - throw TypeError(".ibc.core.client.v1.ConsensusStateWithHeight.consensus_state: object expected"); - message.consensus_state = $root.google.protobuf.Any.fromObject(object.consensus_state); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @static - * @param {ibc.core.client.v1.ConsensusStateWithHeight} message ConsensusStateWithHeight - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusStateWithHeight.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.height = null; - object.consensus_state = null; - } - if (message.height != null && message.hasOwnProperty("height")) - object.height = $root.ibc.core.client.v1.Height.toObject(message.height, options); - if (message.consensus_state != null && message.hasOwnProperty("consensus_state")) - object.consensus_state = $root.google.protobuf.Any.toObject(message.consensus_state, options); - return object; - }; - - /** - * Converts this ConsensusStateWithHeight to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ConsensusStateWithHeight - * @instance - * @returns {Object.} JSON object - */ - ConsensusStateWithHeight.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusStateWithHeight; - })(); - - v1.ClientConsensusStates = (function() { - - /** - * Properties of a ClientConsensusStates. - * @memberof ibc.core.client.v1 - * @interface IClientConsensusStates - * @property {string|null} [client_id] ClientConsensusStates client_id - * @property {Array.|null} [consensus_states] ClientConsensusStates consensus_states - */ - - /** - * Constructs a new ClientConsensusStates. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ClientConsensusStates. - * @implements IClientConsensusStates - * @constructor - * @param {ibc.core.client.v1.IClientConsensusStates=} [properties] Properties to set - */ - function ClientConsensusStates(properties) { - this.consensus_states = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientConsensusStates client_id. - * @member {string} client_id - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - */ - ClientConsensusStates.prototype.client_id = ""; - - /** - * ClientConsensusStates consensus_states. - * @member {Array.} consensus_states - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - */ - ClientConsensusStates.prototype.consensus_states = $util.emptyArray; - - /** - * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientConsensusStates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.client_id != null && Object.hasOwnProperty.call(message, "client_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.client_id); - if (message.consensus_states != null && message.consensus_states.length) - for (var i = 0; i < message.consensus_states.length; ++i) - $root.ibc.core.client.v1.ConsensusStateWithHeight.encode(message.consensus_states[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.IClientConsensusStates} message ClientConsensusStates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientConsensusStates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientConsensusStates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientConsensusStates(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.client_id = reader.string(); - break; - case 2: - if (!(message.consensus_states && message.consensus_states.length)) - message.consensus_states = []; - message.consensus_states.push($root.ibc.core.client.v1.ConsensusStateWithHeight.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientConsensusStates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientConsensusStates message. - * @function verify - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientConsensusStates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.client_id != null && message.hasOwnProperty("client_id")) - if (!$util.isString(message.client_id)) - return "client_id: string expected"; - if (message.consensus_states != null && message.hasOwnProperty("consensus_states")) { - if (!Array.isArray(message.consensus_states)) - return "consensus_states: array expected"; - for (var i = 0; i < message.consensus_states.length; ++i) { - var error = $root.ibc.core.client.v1.ConsensusStateWithHeight.verify(message.consensus_states[i]); - if (error) - return "consensus_states." + error; - } - } - return null; - }; - - /** - * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ClientConsensusStates} ClientConsensusStates - */ - ClientConsensusStates.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ClientConsensusStates) - return object; - var message = new $root.ibc.core.client.v1.ClientConsensusStates(); - if (object.client_id != null) - message.client_id = String(object.client_id); - if (object.consensus_states) { - if (!Array.isArray(object.consensus_states)) - throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensus_states: array expected"); - message.consensus_states = []; - for (var i = 0; i < object.consensus_states.length; ++i) { - if (typeof object.consensus_states[i] !== "object") - throw TypeError(".ibc.core.client.v1.ClientConsensusStates.consensus_states: object expected"); - message.consensus_states[i] = $root.ibc.core.client.v1.ConsensusStateWithHeight.fromObject(object.consensus_states[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ClientConsensusStates - * @static - * @param {ibc.core.client.v1.ClientConsensusStates} message ClientConsensusStates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientConsensusStates.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.consensus_states = []; - if (options.defaults) - object.client_id = ""; - if (message.client_id != null && message.hasOwnProperty("client_id")) - object.client_id = message.client_id; - if (message.consensus_states && message.consensus_states.length) { - object.consensus_states = []; - for (var j = 0; j < message.consensus_states.length; ++j) - object.consensus_states[j] = $root.ibc.core.client.v1.ConsensusStateWithHeight.toObject(message.consensus_states[j], options); - } - return object; - }; - - /** - * Converts this ClientConsensusStates to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ClientConsensusStates - * @instance - * @returns {Object.} JSON object - */ - ClientConsensusStates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientConsensusStates; - })(); - - v1.ClientUpdateProposal = (function() { - - /** - * Properties of a ClientUpdateProposal. - * @memberof ibc.core.client.v1 - * @interface IClientUpdateProposal - * @property {string|null} [title] ClientUpdateProposal title - * @property {string|null} [description] ClientUpdateProposal description - * @property {string|null} [subject_client_id] ClientUpdateProposal subject_client_id - * @property {string|null} [substitute_client_id] ClientUpdateProposal substitute_client_id - */ - - /** - * Constructs a new ClientUpdateProposal. - * @memberof ibc.core.client.v1 - * @classdesc Represents a ClientUpdateProposal. - * @implements IClientUpdateProposal - * @constructor - * @param {ibc.core.client.v1.IClientUpdateProposal=} [properties] Properties to set - */ - function ClientUpdateProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientUpdateProposal title. - * @member {string} title - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.title = ""; - - /** - * ClientUpdateProposal description. - * @member {string} description - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.description = ""; - - /** - * ClientUpdateProposal subject_client_id. - * @member {string} subject_client_id - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.subject_client_id = ""; - - /** - * ClientUpdateProposal substitute_client_id. - * @member {string} substitute_client_id - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - */ - ClientUpdateProposal.prototype.substitute_client_id = ""; - - /** - * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientUpdateProposal.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.subject_client_id != null && Object.hasOwnProperty.call(message, "subject_client_id")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subject_client_id); - if (message.substitute_client_id != null && Object.hasOwnProperty.call(message, "substitute_client_id")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.substitute_client_id); - return writer; - }; - - /** - * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.IClientUpdateProposal} message ClientUpdateProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientUpdateProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientUpdateProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.ClientUpdateProposal(); - 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.subject_client_id = reader.string(); - break; - case 4: - message.substitute_client_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientUpdateProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientUpdateProposal message. - * @function verify - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientUpdateProposal.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.subject_client_id != null && message.hasOwnProperty("subject_client_id")) - if (!$util.isString(message.subject_client_id)) - return "subject_client_id: string expected"; - if (message.substitute_client_id != null && message.hasOwnProperty("substitute_client_id")) - if (!$util.isString(message.substitute_client_id)) - return "substitute_client_id: string expected"; - return null; - }; - - /** - * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.ClientUpdateProposal} ClientUpdateProposal - */ - ClientUpdateProposal.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.ClientUpdateProposal) - return object; - var message = new $root.ibc.core.client.v1.ClientUpdateProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.subject_client_id != null) - message.subject_client_id = String(object.subject_client_id); - if (object.substitute_client_id != null) - message.substitute_client_id = String(object.substitute_client_id); - return message; - }; - - /** - * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @static - * @param {ibc.core.client.v1.ClientUpdateProposal} message ClientUpdateProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientUpdateProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.subject_client_id = ""; - object.substitute_client_id = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.subject_client_id != null && message.hasOwnProperty("subject_client_id")) - object.subject_client_id = message.subject_client_id; - if (message.substitute_client_id != null && message.hasOwnProperty("substitute_client_id")) - object.substitute_client_id = message.substitute_client_id; - return object; - }; - - /** - * Converts this ClientUpdateProposal to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.ClientUpdateProposal - * @instance - * @returns {Object.} JSON object - */ - ClientUpdateProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ClientUpdateProposal; - })(); - - v1.UpgradeProposal = (function() { - - /** - * Properties of an UpgradeProposal. - * @memberof ibc.core.client.v1 - * @interface IUpgradeProposal - * @property {string|null} [title] UpgradeProposal title - * @property {string|null} [description] UpgradeProposal description - * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] UpgradeProposal plan - * @property {google.protobuf.IAny|null} [upgraded_client_state] UpgradeProposal upgraded_client_state - */ - - /** - * Constructs a new UpgradeProposal. - * @memberof ibc.core.client.v1 - * @classdesc Represents an UpgradeProposal. - * @implements IUpgradeProposal - * @constructor - * @param {ibc.core.client.v1.IUpgradeProposal=} [properties] Properties to set - */ - function UpgradeProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpgradeProposal title. - * @member {string} title - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.title = ""; - - /** - * UpgradeProposal description. - * @member {string} description - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.description = ""; - - /** - * UpgradeProposal plan. - * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.plan = null; - - /** - * UpgradeProposal upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - */ - UpgradeProposal.prototype.upgraded_client_state = null; - - /** - * Encodes the specified UpgradeProposal message. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.IUpgradeProposal} message UpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeProposal.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.upgrade.v1beta1.Plan.encode(message.plan, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpgradeProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.IUpgradeProposal} message UpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.UpgradeProposal(); - 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.upgrade.v1beta1.Plan.decode(reader, reader.uint32()); - break; - case 4: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpgradeProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpgradeProposal message. - * @function verify - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpgradeProposal.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.upgrade.v1beta1.Plan.verify(message.plan); - if (error) - return "plan." + error; - } - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - var error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates an UpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.UpgradeProposal} UpgradeProposal - */ - UpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.UpgradeProposal) - return object; - var message = new $root.ibc.core.client.v1.UpgradeProposal(); - 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(".ibc.core.client.v1.UpgradeProposal.plan: object expected"); - message.plan = $root.cosmos.upgrade.v1beta1.Plan.fromObject(object.plan); - } - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".ibc.core.client.v1.UpgradeProposal.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from an UpgradeProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.UpgradeProposal - * @static - * @param {ibc.core.client.v1.UpgradeProposal} message UpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.plan = null; - object.upgraded_client_state = 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.upgrade.v1beta1.Plan.toObject(message.plan, options); - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this UpgradeProposal to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.UpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - UpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return UpgradeProposal; - })(); - - v1.Height = (function() { - - /** - * Properties of an Height. - * @memberof ibc.core.client.v1 - * @interface IHeight - * @property {Long|null} [revision_number] Height revision_number - * @property {Long|null} [revision_height] Height revision_height - */ - - /** - * Constructs a new Height. - * @memberof ibc.core.client.v1 - * @classdesc Represents an Height. - * @implements IHeight - * @constructor - * @param {ibc.core.client.v1.IHeight=} [properties] Properties to set - */ - function Height(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Height revision_number. - * @member {Long} revision_number - * @memberof ibc.core.client.v1.Height - * @instance - */ - Height.prototype.revision_number = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Height revision_height. - * @member {Long} revision_height - * @memberof ibc.core.client.v1.Height - * @instance - */ - Height.prototype.revision_height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Height.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.revision_number != null && Object.hasOwnProperty.call(message, "revision_number")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.revision_number); - if (message.revision_height != null && Object.hasOwnProperty.call(message, "revision_height")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.revision_height); - return writer; - }; - - /** - * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.IHeight} message Height message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Height.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Height message from the specified reader or buffer. - * @function decode - * @memberof ibc.core.client.v1.Height - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.v1.Height} Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Height.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.core.client.v1.Height(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.revision_number = reader.uint64(); - break; - case 2: - message.revision_height = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Height message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.core.client.v1.Height - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.v1.Height} Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Height.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Height message. - * @function verify - * @memberof ibc.core.client.v1.Height - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Height.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (!$util.isInteger(message.revision_number) && !(message.revision_number && $util.isInteger(message.revision_number.low) && $util.isInteger(message.revision_number.high))) - return "revision_number: integer|Long expected"; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (!$util.isInteger(message.revision_height) && !(message.revision_height && $util.isInteger(message.revision_height.low) && $util.isInteger(message.revision_height.high))) - return "revision_height: integer|Long expected"; - return null; - }; - - /** - * Creates an Height message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.Height - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.Height} Height - */ - Height.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.Height) - return object; - var message = new $root.ibc.core.client.v1.Height(); - if (object.revision_number != null) - if ($util.Long) - (message.revision_number = $util.Long.fromValue(object.revision_number)).unsigned = true; - else if (typeof object.revision_number === "string") - message.revision_number = parseInt(object.revision_number, 10); - else if (typeof object.revision_number === "number") - message.revision_number = object.revision_number; - else if (typeof object.revision_number === "object") - message.revision_number = new $util.LongBits(object.revision_number.low >>> 0, object.revision_number.high >>> 0).toNumber(true); - if (object.revision_height != null) - if ($util.Long) - (message.revision_height = $util.Long.fromValue(object.revision_height)).unsigned = true; - else if (typeof object.revision_height === "string") - message.revision_height = parseInt(object.revision_height, 10); - else if (typeof object.revision_height === "number") - message.revision_height = object.revision_height; - else if (typeof object.revision_height === "object") - message.revision_height = new $util.LongBits(object.revision_height.low >>> 0, object.revision_height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from an Height message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.Height - * @static - * @param {ibc.core.client.v1.Height} message Height - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Height.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.revision_number = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_number = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.revision_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.revision_height = options.longs === String ? "0" : 0; - } - if (message.revision_number != null && message.hasOwnProperty("revision_number")) - if (typeof message.revision_number === "number") - object.revision_number = options.longs === String ? String(message.revision_number) : message.revision_number; - else - object.revision_number = options.longs === String ? $util.Long.prototype.toString.call(message.revision_number) : options.longs === Number ? new $util.LongBits(message.revision_number.low >>> 0, message.revision_number.high >>> 0).toNumber(true) : message.revision_number; - if (message.revision_height != null && message.hasOwnProperty("revision_height")) - if (typeof message.revision_height === "number") - object.revision_height = options.longs === String ? String(message.revision_height) : message.revision_height; - else - object.revision_height = options.longs === String ? $util.Long.prototype.toString.call(message.revision_height) : options.longs === Number ? new $util.LongBits(message.revision_height.low >>> 0, message.revision_height.high >>> 0).toNumber(true) : message.revision_height; - return object; - }; - - /** - * Converts this Height to JSON. - * @function toJSON - * @memberof ibc.core.client.v1.Height - * @instance - * @returns {Object.} JSON object - */ - Height.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Height; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.core.client.v1 - * @interface IParams - * @property {Array.|null} [allowed_clients] Params allowed_clients - */ - - /** - * Constructs a new Params. - * @memberof ibc.core.client.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.core.client.v1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.allowed_clients = []; - if (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 allowed_clients. - * @member {Array.} allowed_clients - * @memberof ibc.core.client.v1.Params - * @instance - */ - Params.prototype.allowed_clients = $util.emptyArray; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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.allowed_clients != null && message.allowed_clients.length) - for (var i = 0; i < message.allowed_clients.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowed_clients[i]); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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 ibc.core.client.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.core.client.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.ibc.core.client.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.allowed_clients && message.allowed_clients.length)) - message.allowed_clients = []; - message.allowed_clients.push(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 ibc.core.client.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.core.client.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 ibc.core.client.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.allowed_clients != null && message.hasOwnProperty("allowed_clients")) { - if (!Array.isArray(message.allowed_clients)) - return "allowed_clients: array expected"; - for (var i = 0; i < message.allowed_clients.length; ++i) - if (!$util.isString(message.allowed_clients[i])) - return "allowed_clients: string[] expected"; - } - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.core.client.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.core.client.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.core.client.v1.Params) - return object; - var message = new $root.ibc.core.client.v1.Params(); - if (object.allowed_clients) { - if (!Array.isArray(object.allowed_clients)) - throw TypeError(".ibc.core.client.v1.Params.allowed_clients: array expected"); - message.allowed_clients = []; - for (var i = 0; i < object.allowed_clients.length; ++i) - message.allowed_clients[i] = String(object.allowed_clients[i]); - } - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.core.client.v1.Params - * @static - * @param {ibc.core.client.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.arrays || options.defaults) - object.allowed_clients = []; - if (message.allowed_clients && message.allowed_clients.length) { - object.allowed_clients = []; - for (var j = 0; j < message.allowed_clients.length; ++j) - object.allowed_clients[j] = message.allowed_clients[j]; - } - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.core.client.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 client; - })(); - - return core; - })(); - - ibc.applications = (function() { - - /** - * Namespace applications. - * @memberof ibc - * @namespace - */ - var applications = {}; - - applications.transfer = (function() { - - /** - * Namespace transfer. - * @memberof ibc.applications - * @namespace - */ - var transfer = {}; - - transfer.v1 = (function() { - - /** - * Namespace v1. - * @memberof ibc.applications.transfer - * @namespace - */ - var v1 = {}; - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof ibc.applications.transfer.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; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTrace}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomTraceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} [response] QueryDenomTraceResponse - */ - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomTraceCallback} callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTrace = function denomTrace(request, callback) { - return this.rpcCall(denomTrace, $root.ibc.applications.transfer.v1.QueryDenomTraceRequest, $root.ibc.applications.transfer.v1.QueryDenomTraceResponse, request, callback); - }, "name", { value: "DenomTrace" }); - - /** - * Calls DenomTrace. - * @function denomTrace - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} request QueryDenomTraceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTraces}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomTracesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} [response] QueryDenomTracesResponse - */ - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomTracesCallback} callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomTraces = function denomTraces(request, callback) { - return this.rpcCall(denomTraces, $root.ibc.applications.transfer.v1.QueryDenomTracesRequest, $root.ibc.applications.transfer.v1.QueryDenomTracesResponse, request, callback); - }, "name", { value: "DenomTraces" }); - - /** - * Calls DenomTraces. - * @function denomTraces - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} request QueryDenomTracesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#params}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.ibc.applications.transfer.v1.QueryParamsRequest, $root.ibc.applications.transfer.v1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomHash}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef DenomHashCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} [response] QueryDenomHashResponse - */ - - /** - * Calls DenomHash. - * @function denomHash - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.DenomHashCallback} callback Node-style callback called with the error, if any, and QueryDenomHashResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomHash = function denomHash(request, callback) { - return this.rpcCall(denomHash, $root.ibc.applications.transfer.v1.QueryDenomHashRequest, $root.ibc.applications.transfer.v1.QueryDenomHashResponse, request, callback); - }, "name", { value: "DenomHash" }); - - /** - * Calls DenomHash. - * @function denomHash - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} request QueryDenomHashRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#escrowAddress}. - * @memberof ibc.applications.transfer.v1.Query - * @typedef EscrowAddressCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {ibc.applications.transfer.v1.QueryEscrowAddressResponse} [response] QueryEscrowAddressResponse - */ - - /** - * Calls EscrowAddress. - * @function escrowAddress - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} request QueryEscrowAddressRequest message or plain object - * @param {ibc.applications.transfer.v1.Query.EscrowAddressCallback} callback Node-style callback called with the error, if any, and QueryEscrowAddressResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.escrowAddress = function escrowAddress(request, callback) { - return this.rpcCall(escrowAddress, $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest, $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse, request, callback); - }, "name", { value: "EscrowAddress" }); - - /** - * Calls EscrowAddress. - * @function escrowAddress - * @memberof ibc.applications.transfer.v1.Query - * @instance - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} request QueryEscrowAddressRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryDenomTraceRequest = (function() { - - /** - * Properties of a QueryDenomTraceRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTraceRequest - * @property {string|null} [hash] QueryDenomTraceRequest hash - */ - - /** - * Constructs a new QueryDenomTraceRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTraceRequest. - * @implements IQueryDenomTraceRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest=} [properties] Properties to set - */ - function QueryDenomTraceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTraceRequest hash. - * @member {string} hash - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @instance - */ - QueryDenomTraceRequest.prototype.hash = ""; - - /** - * Encodes the specified QueryDenomTraceRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceRequest.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).string(message.hash); - return writer; - }; - - /** - * Encodes the specified QueryDenomTraceRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceRequest} message QueryDenomTraceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTraceRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTraceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!$util.isString(message.hash)) - return "hash: string expected"; - return null; - }; - - /** - * Creates a QueryDenomTraceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTraceRequest} QueryDenomTraceRequest - */ - QueryDenomTraceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTraceRequest(); - if (object.hash != null) - message.hash = String(object.hash); - return message; - }; - - /** - * Creates a plain object from a QueryDenomTraceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTraceRequest} message QueryDenomTraceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTraceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hash = ""; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = message.hash; - return object; - }; - - /** - * Converts this QueryDenomTraceRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTraceRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTraceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTraceRequest; - })(); - - v1.QueryDenomTraceResponse = (function() { - - /** - * Properties of a QueryDenomTraceResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTraceResponse - * @property {ibc.applications.transfer.v1.IDenomTrace|null} [denom_trace] QueryDenomTraceResponse denom_trace - */ - - /** - * Constructs a new QueryDenomTraceResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTraceResponse. - * @implements IQueryDenomTraceResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse=} [properties] Properties to set - */ - function QueryDenomTraceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTraceResponse denom_trace. - * @member {ibc.applications.transfer.v1.IDenomTrace|null|undefined} denom_trace - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @instance - */ - QueryDenomTraceResponse.prototype.denom_trace = null; - - /** - * Encodes the specified QueryDenomTraceResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_trace != null && Object.hasOwnProperty.call(message, "denom_trace")) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_trace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTraceResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTraceResponse} message QueryDenomTraceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTraceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTraceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTraceResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTraceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_trace != null && message.hasOwnProperty("denom_trace")) { - var error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_trace); - if (error) - return "denom_trace." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTraceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTraceResponse} QueryDenomTraceResponse - */ - QueryDenomTraceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTraceResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTraceResponse(); - if (object.denom_trace != null) { - if (typeof object.denom_trace !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTraceResponse.denom_trace: object expected"); - message.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_trace); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTraceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTraceResponse} message QueryDenomTraceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTraceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.denom_trace = null; - if (message.denom_trace != null && message.hasOwnProperty("denom_trace")) - object.denom_trace = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_trace, options); - return object; - }; - - /** - * Converts this QueryDenomTraceResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTraceResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTraceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTraceResponse; - })(); - - v1.QueryDenomTracesRequest = (function() { - - /** - * Properties of a QueryDenomTracesRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTracesRequest - * @property {cosmos.base.query.v1beta1.IPageRequest|null} [pagination] QueryDenomTracesRequest pagination - */ - - /** - * Constructs a new QueryDenomTracesRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTracesRequest. - * @implements IQueryDenomTracesRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest=} [properties] Properties to set - */ - function QueryDenomTracesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTracesRequest pagination. - * @member {cosmos.base.query.v1beta1.IPageRequest|null|undefined} pagination - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @instance - */ - QueryDenomTracesRequest.prototype.pagination = null; - - /** - * Encodes the specified QueryDenomTracesRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageRequest.encode(message.pagination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTracesRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesRequest} message QueryDenomTracesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTracesRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTracesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageRequest.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTracesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTracesRequest} QueryDenomTracesRequest - */ - QueryDenomTracesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTracesRequest(); - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesRequest.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageRequest.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTracesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTracesRequest} message QueryDenomTracesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTracesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.pagination = null; - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageRequest.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomTracesRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTracesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTracesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTracesRequest; - })(); - - v1.QueryDenomTracesResponse = (function() { - - /** - * Properties of a QueryDenomTracesResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomTracesResponse - * @property {Array.|null} [denom_traces] QueryDenomTracesResponse denom_traces - * @property {cosmos.base.query.v1beta1.IPageResponse|null} [pagination] QueryDenomTracesResponse pagination - */ - - /** - * Constructs a new QueryDenomTracesResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomTracesResponse. - * @implements IQueryDenomTracesResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse=} [properties] Properties to set - */ - function QueryDenomTracesResponse(properties) { - this.denom_traces = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomTracesResponse denom_traces. - * @member {Array.} denom_traces - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - */ - QueryDenomTracesResponse.prototype.denom_traces = $util.emptyArray; - - /** - * QueryDenomTracesResponse pagination. - * @member {cosmos.base.query.v1beta1.IPageResponse|null|undefined} pagination - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - */ - QueryDenomTracesResponse.prototype.pagination = null; - - /** - * Encodes the specified QueryDenomTracesResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_traces != null && message.denom_traces.length) - for (var i = 0; i < message.denom_traces.length; ++i) - $root.ibc.applications.transfer.v1.DenomTrace.encode(message.denom_traces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pagination != null && Object.hasOwnProperty.call(message, "pagination")) - $root.cosmos.base.query.v1beta1.PageResponse.encode(message.pagination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomTracesResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomTracesResponse} message QueryDenomTracesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomTracesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.denom_traces && message.denom_traces.length)) - message.denom_traces = []; - message.denom_traces.push($root.ibc.applications.transfer.v1.DenomTrace.decode(reader, reader.uint32())); - break; - case 2: - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomTracesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomTracesResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomTracesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_traces != null && message.hasOwnProperty("denom_traces")) { - if (!Array.isArray(message.denom_traces)) - return "denom_traces: array expected"; - for (var i = 0; i < message.denom_traces.length; ++i) { - var error = $root.ibc.applications.transfer.v1.DenomTrace.verify(message.denom_traces[i]); - if (error) - return "denom_traces." + error; - } - } - if (message.pagination != null && message.hasOwnProperty("pagination")) { - var error = $root.cosmos.base.query.v1beta1.PageResponse.verify(message.pagination); - if (error) - return "pagination." + error; - } - return null; - }; - - /** - * Creates a QueryDenomTracesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomTracesResponse} QueryDenomTracesResponse - */ - QueryDenomTracesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomTracesResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomTracesResponse(); - if (object.denom_traces) { - if (!Array.isArray(object.denom_traces)) - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denom_traces: array expected"); - message.denom_traces = []; - for (var i = 0; i < object.denom_traces.length; ++i) { - if (typeof object.denom_traces[i] !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.denom_traces: object expected"); - message.denom_traces[i] = $root.ibc.applications.transfer.v1.DenomTrace.fromObject(object.denom_traces[i]); - } - } - if (object.pagination != null) { - if (typeof object.pagination !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryDenomTracesResponse.pagination: object expected"); - message.pagination = $root.cosmos.base.query.v1beta1.PageResponse.fromObject(object.pagination); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomTracesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomTracesResponse} message QueryDenomTracesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomTracesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.denom_traces = []; - if (options.defaults) - object.pagination = null; - if (message.denom_traces && message.denom_traces.length) { - object.denom_traces = []; - for (var j = 0; j < message.denom_traces.length; ++j) - object.denom_traces[j] = $root.ibc.applications.transfer.v1.DenomTrace.toObject(message.denom_traces[j], options); - } - if (message.pagination != null && message.hasOwnProperty("pagination")) - object.pagination = $root.cosmos.base.query.v1beta1.PageResponse.toObject(message.pagination, options); - return object; - }; - - /** - * Converts this QueryDenomTracesResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomTracesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomTracesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomTracesResponse; - })(); - - v1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsRequest) - return object; - return new $root.ibc.applications.transfer.v1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @static - * @param {ibc.applications.transfer.v1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryParamsResponse - * @property {ibc.applications.transfer.v1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {ibc.applications.transfer.v1.IParams|null|undefined} params - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.ibc.applications.transfer.v1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.ibc.applications.transfer.v1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.ibc.applications.transfer.v1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryParamsResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".ibc.applications.transfer.v1.QueryParamsResponse.params: object expected"); - message.params = $root.ibc.applications.transfer.v1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @static - * @param {ibc.applications.transfer.v1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.ibc.applications.transfer.v1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1.QueryDenomHashRequest = (function() { - - /** - * Properties of a QueryDenomHashRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomHashRequest - * @property {string|null} [trace] QueryDenomHashRequest trace - */ - - /** - * Constructs a new QueryDenomHashRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomHashRequest. - * @implements IQueryDenomHashRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest=} [properties] Properties to set - */ - function QueryDenomHashRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomHashRequest trace. - * @member {string} trace - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @instance - */ - QueryDenomHashRequest.prototype.trace = ""; - - /** - * Encodes the specified QueryDenomHashRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} message QueryDenomHashRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.trace != null && Object.hasOwnProperty.call(message, "trace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.trace); - return writer; - }; - - /** - * Encodes the specified QueryDenomHashRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashRequest} message QueryDenomHashRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomHashRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.trace = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomHashRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomHashRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.trace != null && message.hasOwnProperty("trace")) - if (!$util.isString(message.trace)) - return "trace: string expected"; - return null; - }; - - /** - * Creates a QueryDenomHashRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomHashRequest} QueryDenomHashRequest - */ - QueryDenomHashRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomHashRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomHashRequest(); - if (object.trace != null) - message.trace = String(object.trace); - return message; - }; - - /** - * Creates a plain object from a QueryDenomHashRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @static - * @param {ibc.applications.transfer.v1.QueryDenomHashRequest} message QueryDenomHashRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomHashRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.trace = ""; - if (message.trace != null && message.hasOwnProperty("trace")) - object.trace = message.trace; - return object; - }; - - /** - * Converts this QueryDenomHashRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomHashRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomHashRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomHashRequest; - })(); - - v1.QueryDenomHashResponse = (function() { - - /** - * Properties of a QueryDenomHashResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryDenomHashResponse - * @property {string|null} [hash] QueryDenomHashResponse hash - */ - - /** - * Constructs a new QueryDenomHashResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryDenomHashResponse. - * @implements IQueryDenomHashResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse=} [properties] Properties to set - */ - function QueryDenomHashResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomHashResponse hash. - * @member {string} hash - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @instance - */ - QueryDenomHashResponse.prototype.hash = ""; - - /** - * Encodes the specified QueryDenomHashResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse} message QueryDenomHashResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashResponse.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).string(message.hash); - return writer; - }; - - /** - * Encodes the specified QueryDenomHashResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryDenomHashResponse} message QueryDenomHashResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomHashResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryDenomHashResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomHashResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomHashResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomHashResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!$util.isString(message.hash)) - return "hash: string expected"; - return null; - }; - - /** - * Creates a QueryDenomHashResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryDenomHashResponse} QueryDenomHashResponse - */ - QueryDenomHashResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryDenomHashResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryDenomHashResponse(); - if (object.hash != null) - message.hash = String(object.hash); - return message; - }; - - /** - * Creates a plain object from a QueryDenomHashResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @static - * @param {ibc.applications.transfer.v1.QueryDenomHashResponse} message QueryDenomHashResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomHashResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hash = ""; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = message.hash; - return object; - }; - - /** - * Converts this QueryDenomHashResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryDenomHashResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomHashResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomHashResponse; - })(); - - v1.QueryEscrowAddressRequest = (function() { - - /** - * Properties of a QueryEscrowAddressRequest. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryEscrowAddressRequest - * @property {string|null} [port_id] QueryEscrowAddressRequest port_id - * @property {string|null} [channel_id] QueryEscrowAddressRequest channel_id - */ - - /** - * Constructs a new QueryEscrowAddressRequest. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryEscrowAddressRequest. - * @implements IQueryEscrowAddressRequest - * @constructor - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest=} [properties] Properties to set - */ - function QueryEscrowAddressRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryEscrowAddressRequest port_id. - * @member {string} port_id - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - */ - QueryEscrowAddressRequest.prototype.port_id = ""; - - /** - * QueryEscrowAddressRequest channel_id. - * @member {string} channel_id - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - */ - QueryEscrowAddressRequest.prototype.channel_id = ""; - - /** - * Encodes the specified QueryEscrowAddressRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} message QueryEscrowAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.port_id != null && Object.hasOwnProperty.call(message, "port_id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.port_id); - if (message.channel_id != null && Object.hasOwnProperty.call(message, "channel_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channel_id); - return writer; - }; - - /** - * Encodes the specified QueryEscrowAddressRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressRequest} message QueryEscrowAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.port_id = reader.string(); - break; - case 2: - message.channel_id = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryEscrowAddressRequest message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryEscrowAddressRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.port_id != null && message.hasOwnProperty("port_id")) - if (!$util.isString(message.port_id)) - return "port_id: string expected"; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - if (!$util.isString(message.channel_id)) - return "channel_id: string expected"; - return null; - }; - - /** - * Creates a QueryEscrowAddressRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressRequest} QueryEscrowAddressRequest - */ - QueryEscrowAddressRequest.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressRequest(); - if (object.port_id != null) - message.port_id = String(object.port_id); - if (object.channel_id != null) - message.channel_id = String(object.channel_id); - return message; - }; - - /** - * Creates a plain object from a QueryEscrowAddressRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @static - * @param {ibc.applications.transfer.v1.QueryEscrowAddressRequest} message QueryEscrowAddressRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryEscrowAddressRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.port_id = ""; - object.channel_id = ""; - } - if (message.port_id != null && message.hasOwnProperty("port_id")) - object.port_id = message.port_id; - if (message.channel_id != null && message.hasOwnProperty("channel_id")) - object.channel_id = message.channel_id; - return object; - }; - - /** - * Converts this QueryEscrowAddressRequest to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressRequest - * @instance - * @returns {Object.} JSON object - */ - QueryEscrowAddressRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryEscrowAddressRequest; - })(); - - v1.QueryEscrowAddressResponse = (function() { - - /** - * Properties of a QueryEscrowAddressResponse. - * @memberof ibc.applications.transfer.v1 - * @interface IQueryEscrowAddressResponse - * @property {string|null} [escrow_address] QueryEscrowAddressResponse escrow_address - */ - - /** - * Constructs a new QueryEscrowAddressResponse. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a QueryEscrowAddressResponse. - * @implements IQueryEscrowAddressResponse - * @constructor - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse=} [properties] Properties to set - */ - function QueryEscrowAddressResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryEscrowAddressResponse escrow_address. - * @member {string} escrow_address - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @instance - */ - QueryEscrowAddressResponse.prototype.escrow_address = ""; - - /** - * Encodes the specified QueryEscrowAddressResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse} message QueryEscrowAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.escrow_address != null && Object.hasOwnProperty.call(message, "escrow_address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.escrow_address); - return writer; - }; - - /** - * Encodes the specified QueryEscrowAddressResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.IQueryEscrowAddressResponse} message QueryEscrowAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryEscrowAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.escrow_address = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryEscrowAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryEscrowAddressResponse message. - * @function verify - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryEscrowAddressResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.escrow_address != null && message.hasOwnProperty("escrow_address")) - if (!$util.isString(message.escrow_address)) - return "escrow_address: string expected"; - return null; - }; - - /** - * Creates a QueryEscrowAddressResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.QueryEscrowAddressResponse} QueryEscrowAddressResponse - */ - QueryEscrowAddressResponse.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse) - return object; - var message = new $root.ibc.applications.transfer.v1.QueryEscrowAddressResponse(); - if (object.escrow_address != null) - message.escrow_address = String(object.escrow_address); - return message; - }; - - /** - * Creates a plain object from a QueryEscrowAddressResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @static - * @param {ibc.applications.transfer.v1.QueryEscrowAddressResponse} message QueryEscrowAddressResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryEscrowAddressResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.escrow_address = ""; - if (message.escrow_address != null && message.hasOwnProperty("escrow_address")) - object.escrow_address = message.escrow_address; - return object; - }; - - /** - * Converts this QueryEscrowAddressResponse to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.QueryEscrowAddressResponse - * @instance - * @returns {Object.} JSON object - */ - QueryEscrowAddressResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryEscrowAddressResponse; - })(); - - v1.DenomTrace = (function() { - - /** - * Properties of a DenomTrace. - * @memberof ibc.applications.transfer.v1 - * @interface IDenomTrace - * @property {string|null} [path] DenomTrace path - * @property {string|null} [base_denom] DenomTrace base_denom - */ - - /** - * Constructs a new DenomTrace. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a DenomTrace. - * @implements IDenomTrace - * @constructor - * @param {ibc.applications.transfer.v1.IDenomTrace=} [properties] Properties to set - */ - function DenomTrace(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DenomTrace path. - * @member {string} path - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - */ - DenomTrace.prototype.path = ""; - - /** - * DenomTrace base_denom. - * @member {string} base_denom - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - */ - DenomTrace.prototype.base_denom = ""; - - /** - * Encodes the specified DenomTrace message. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomTrace.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); - if (message.base_denom != null && Object.hasOwnProperty.call(message, "base_denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.base_denom); - return writer; - }; - - /** - * Encodes the specified DenomTrace message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.IDenomTrace} message DenomTrace message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomTrace.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DenomTrace message from the specified reader or buffer. - * @function decode - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomTrace.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ibc.applications.transfer.v1.DenomTrace(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.path = reader.string(); - break; - case 2: - message.base_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DenomTrace message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomTrace.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DenomTrace message. - * @function verify - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DenomTrace.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.base_denom != null && message.hasOwnProperty("base_denom")) - if (!$util.isString(message.base_denom)) - return "base_denom: string expected"; - return null; - }; - - /** - * Creates a DenomTrace message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.DenomTrace} DenomTrace - */ - DenomTrace.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.DenomTrace) - return object; - var message = new $root.ibc.applications.transfer.v1.DenomTrace(); - if (object.path != null) - message.path = String(object.path); - if (object.base_denom != null) - message.base_denom = String(object.base_denom); - return message; - }; - - /** - * Creates a plain object from a DenomTrace message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.DenomTrace - * @static - * @param {ibc.applications.transfer.v1.DenomTrace} message DenomTrace - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DenomTrace.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.path = ""; - object.base_denom = ""; - } - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.base_denom != null && message.hasOwnProperty("base_denom")) - object.base_denom = message.base_denom; - return object; - }; - - /** - * Converts this DenomTrace to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.v1.DenomTrace - * @instance - * @returns {Object.} JSON object - */ - DenomTrace.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DenomTrace; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof ibc.applications.transfer.v1 - * @interface IParams - * @property {boolean|null} [send_enabled] Params send_enabled - * @property {boolean|null} [receive_enabled] Params receive_enabled - */ - - /** - * Constructs a new Params. - * @memberof ibc.applications.transfer.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {ibc.applications.transfer.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 send_enabled. - * @member {boolean} send_enabled - * @memberof ibc.applications.transfer.v1.Params - * @instance - */ - Params.prototype.send_enabled = false; - - /** - * Params receive_enabled. - * @member {boolean} receive_enabled - * @memberof ibc.applications.transfer.v1.Params - * @instance - */ - Params.prototype.receive_enabled = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. - * @function encode - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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.send_enabled != null && Object.hasOwnProperty.call(message, "send_enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.send_enabled); - if (message.receive_enabled != null && Object.hasOwnProperty.call(message, "receive_enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.receive_enabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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 ibc.applications.transfer.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {ibc.applications.transfer.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.ibc.applications.transfer.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.send_enabled = reader.bool(); - break; - case 2: - message.receive_enabled = 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 ibc.applications.transfer.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {ibc.applications.transfer.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 ibc.applications.transfer.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.send_enabled != null && message.hasOwnProperty("send_enabled")) - if (typeof message.send_enabled !== "boolean") - return "send_enabled: boolean expected"; - if (message.receive_enabled != null && message.hasOwnProperty("receive_enabled")) - if (typeof message.receive_enabled !== "boolean") - return "receive_enabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {ibc.applications.transfer.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.ibc.applications.transfer.v1.Params) - return object; - var message = new $root.ibc.applications.transfer.v1.Params(); - if (object.send_enabled != null) - message.send_enabled = Boolean(object.send_enabled); - if (object.receive_enabled != null) - message.receive_enabled = Boolean(object.receive_enabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof ibc.applications.transfer.v1.Params - * @static - * @param {ibc.applications.transfer.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.send_enabled = false; - object.receive_enabled = false; - } - if (message.send_enabled != null && message.hasOwnProperty("send_enabled")) - object.send_enabled = message.send_enabled; - if (message.receive_enabled != null && message.hasOwnProperty("receive_enabled")) - object.receive_enabled = message.receive_enabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof ibc.applications.transfer.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 transfer; - })(); - - return applications; - })(); - - return ibc; - })(); - - $root.cosmos = (function() { - - /** - * Namespace cosmos. - * @exports cosmos - * @namespace - */ - var cosmos = {}; - - cosmos.upgrade = (function() { - - /** - * Namespace upgrade. - * @memberof cosmos - * @namespace - */ - var upgrade = {}; - - upgrade.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.upgrade - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Plan = (function() { - - /** - * Properties of a Plan. - * @memberof cosmos.upgrade.v1beta1 - * @interface IPlan - * @property {string|null} [name] Plan name - * @property {google.protobuf.ITimestamp|null} [time] Plan time - * @property {Long|null} [height] Plan height - * @property {string|null} [info] Plan info - * @property {google.protobuf.IAny|null} [upgraded_client_state] Plan upgraded_client_state - */ - - /** - * Constructs a new Plan. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a Plan. - * @implements IPlan - * @constructor - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.name = ""; - - /** - * Plan time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.time = null; - - /** - * Plan height. - * @member {Long} height - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Plan info. - * @member {string} info - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.info = ""; - - /** - * Plan upgraded_client_state. - * @member {google.protobuf.IAny|null|undefined} upgraded_client_state - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - */ - Plan.prototype.upgraded_client_state = null; - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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); - if (message.upgraded_client_state != null && Object.hasOwnProperty.call(message, "upgraded_client_state")) - $root.google.protobuf.Any.encode(message.upgraded_client_state, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.Plan.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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; - case 5: - message.upgraded_client_state = $root.google.protobuf.Any.decode(reader, reader.uint32()); - 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.upgrade.v1beta1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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"; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) { - var error = $root.google.protobuf.Any.verify(message.upgraded_client_state); - if (error) - return "upgraded_client_state." + error; - } - return null; - }; - - /** - * Creates a Plan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.Plan} Plan - */ - Plan.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.Plan) - return object; - var message = new $root.cosmos.upgrade.v1beta1.Plan(); - if (object.name != null) - message.name = String(object.name); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".cosmos.upgrade.v1beta1.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); - if (object.upgraded_client_state != null) { - if (typeof object.upgraded_client_state !== "object") - throw TypeError(".cosmos.upgrade.v1beta1.Plan.upgraded_client_state: object expected"); - message.upgraded_client_state = $root.google.protobuf.Any.fromObject(object.upgraded_client_state); - } - return message; - }; - - /** - * Creates a plain object from a Plan message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.upgrade.v1beta1.Plan - * @static - * @param {cosmos.upgrade.v1beta1.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 = ""; - object.upgraded_client_state = null; - } - 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; - if (message.upgraded_client_state != null && message.hasOwnProperty("upgraded_client_state")) - object.upgraded_client_state = $root.google.protobuf.Any.toObject(message.upgraded_client_state, options); - return object; - }; - - /** - * Converts this Plan to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.Plan - * @instance - * @returns {Object.} JSON object - */ - Plan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Plan; - })(); - - v1beta1.SoftwareUpgradeProposal = (function() { - - /** - * Properties of a SoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @interface ISoftwareUpgradeProposal - * @property {string|null} [title] SoftwareUpgradeProposal title - * @property {string|null} [description] SoftwareUpgradeProposal description - * @property {cosmos.upgrade.v1beta1.IPlan|null} [plan] SoftwareUpgradeProposal plan - */ - - /** - * Constructs a new SoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a SoftwareUpgradeProposal. - * @implements ISoftwareUpgradeProposal - * @constructor - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.title = ""; - - /** - * SoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.description = ""; - - /** - * SoftwareUpgradeProposal plan. - * @member {cosmos.upgrade.v1beta1.IPlan|null|undefined} plan - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.plan = null; - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.SoftwareUpgradeProposal} SoftwareUpgradeProposal - */ - SoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.SoftwareUpgradeProposal) - return object; - var message = new $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal.plan: object expected"); - message.plan = $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.SoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.Plan.toObject(message.plan, options); - return object; - }; - - /** - * Converts this SoftwareUpgradeProposal to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.SoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - SoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SoftwareUpgradeProposal; - })(); - - v1beta1.CancelSoftwareUpgradeProposal = (function() { - - /** - * Properties of a CancelSoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @interface ICancelSoftwareUpgradeProposal - * @property {string|null} [title] CancelSoftwareUpgradeProposal title - * @property {string|null} [description] CancelSoftwareUpgradeProposal description - */ - - /** - * Constructs a new CancelSoftwareUpgradeProposal. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a CancelSoftwareUpgradeProposal. - * @implements ICancelSoftwareUpgradeProposal - * @constructor - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.title = ""; - - /** - * CancelSoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.description = ""; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal - */ - CancelSoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.CancelSoftwareUpgradeProposal) - return object; - var message = new $root.cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - CancelSoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CancelSoftwareUpgradeProposal; - })(); - - v1beta1.ModuleVersion = (function() { - - /** - * Properties of a ModuleVersion. - * @memberof cosmos.upgrade.v1beta1 - * @interface IModuleVersion - * @property {string|null} [name] ModuleVersion name - * @property {Long|null} [version] ModuleVersion version - */ - - /** - * Constructs a new ModuleVersion. - * @memberof cosmos.upgrade.v1beta1 - * @classdesc Represents a ModuleVersion. - * @implements IModuleVersion - * @constructor - * @param {cosmos.upgrade.v1beta1.IModuleVersion=} [properties] Properties to set - */ - function ModuleVersion(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModuleVersion name. - * @member {string} name - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - */ - ModuleVersion.prototype.name = ""; - - /** - * ModuleVersion version. - * @member {Long} version - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - */ - ModuleVersion.prototype.version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified ModuleVersion message. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @function encode - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.IModuleVersion} message ModuleVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleVersion.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.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.version); - return writer; - }; - - /** - * Encodes the specified ModuleVersion message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.IModuleVersion} message ModuleVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer. - * @function decode - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.upgrade.v1beta1.ModuleVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.version = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleVersion message. - * @function verify - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleVersion.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.version != null && message.hasOwnProperty("version")) - if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high))) - return "version: integer|Long expected"; - return null; - }; - - /** - * Creates a ModuleVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {Object.} object Plain object - * @returns {cosmos.upgrade.v1beta1.ModuleVersion} ModuleVersion - */ - ModuleVersion.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.upgrade.v1beta1.ModuleVersion) - return object; - var message = new $root.cosmos.upgrade.v1beta1.ModuleVersion(); - if (object.name != null) - message.name = String(object.name); - if (object.version != null) - if ($util.Long) - (message.version = $util.Long.fromValue(object.version)).unsigned = true; - else if (typeof object.version === "string") - message.version = parseInt(object.version, 10); - else if (typeof object.version === "number") - message.version = object.version; - else if (typeof object.version === "object") - message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ModuleVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @static - * @param {cosmos.upgrade.v1beta1.ModuleVersion} message ModuleVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.version = options.longs === String ? "0" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.version != null && message.hasOwnProperty("version")) - if (typeof message.version === "number") - object.version = options.longs === String ? String(message.version) : message.version; - else - object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber(true) : message.version; - return object; - }; - - /** - * Converts this ModuleVersion to JSON. - * @function toJSON - * @memberof cosmos.upgrade.v1beta1.ModuleVersion - * @instance - * @returns {Object.} JSON object - */ - ModuleVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ModuleVersion; - })(); - - return v1beta1; - })(); - - return upgrade; - })(); - - cosmos.base = (function() { - - /** - * Namespace base. - * @memberof cosmos - * @namespace - */ - var base = {}; - - base.query = (function() { - - /** - * Namespace query. - * @memberof cosmos.base - * @namespace - */ - var query = {}; - - query.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base.query - * @namespace - */ - var v1beta1 = {}; - - v1beta1.PageRequest = (function() { - - /** - * Properties of a PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageRequest - * @property {Uint8Array|null} [key] PageRequest key - * @property {Long|null} [offset] PageRequest offset - * @property {Long|null} [limit] PageRequest limit - * @property {boolean|null} [count_total] PageRequest count_total - * @property {boolean|null} [reverse] PageRequest reverse - */ - - /** - * Constructs a new PageRequest. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageRequest. - * @implements IPageRequest - * @constructor - * @param {cosmos.base.query.v1beta1.IPageRequest=} [properties] Properties to set - */ - function PageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageRequest key. - * @member {Uint8Array} key - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.key = $util.newBuffer([]); - - /** - * PageRequest offset. - * @member {Long} offset - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest limit. - * @member {Long} limit - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.limit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * PageRequest count_total. - * @member {boolean} count_total - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.count_total = false; - - /** - * PageRequest reverse. - * @member {boolean} reverse - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - */ - PageRequest.prototype.reverse = false; - - /** - * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.offset); - if (message.limit != null && Object.hasOwnProperty.call(message, "limit")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.limit); - if (message.count_total != null && Object.hasOwnProperty.call(message, "count_total")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.count_total); - if (message.reverse != null && Object.hasOwnProperty.call(message, "reverse")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reverse); - return writer; - }; - - /** - * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.IPageRequest} message PageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.offset = reader.uint64(); - break; - case 3: - message.limit = reader.uint64(); - break; - case 4: - message.count_total = reader.bool(); - break; - case 5: - message.reverse = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageRequest message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.limit != null && message.hasOwnProperty("limit")) - if (!$util.isInteger(message.limit) && !(message.limit && $util.isInteger(message.limit.low) && $util.isInteger(message.limit.high))) - return "limit: integer|Long expected"; - if (message.count_total != null && message.hasOwnProperty("count_total")) - if (typeof message.count_total !== "boolean") - return "count_total: boolean expected"; - if (message.reverse != null && message.hasOwnProperty("reverse")) - if (typeof message.reverse !== "boolean") - return "reverse: boolean expected"; - return null; - }; - - /** - * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageRequest} PageRequest - */ - PageRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageRequest) - return object; - var message = new $root.cosmos.base.query.v1beta1.PageRequest(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.offset != null) - if ($util.Long) - (message.offset = $util.Long.fromValue(object.offset)).unsigned = true; - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(true); - if (object.limit != null) - if ($util.Long) - (message.limit = $util.Long.fromValue(object.limit)).unsigned = true; - else if (typeof object.limit === "string") - message.limit = parseInt(object.limit, 10); - else if (typeof object.limit === "number") - message.limit = object.limit; - else if (typeof object.limit === "object") - message.limit = new $util.LongBits(object.limit.low >>> 0, object.limit.high >>> 0).toNumber(true); - if (object.count_total != null) - message.count_total = Boolean(object.count_total); - if (object.reverse != null) - message.reverse = Boolean(object.reverse); - return message; - }; - - /** - * Creates a plain object from a PageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageRequest - * @static - * @param {cosmos.base.query.v1beta1.PageRequest} message PageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - 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, true); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.offset = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.limit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.limit = options.longs === String ? "0" : 0; - object.count_total = false; - object.reverse = false; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber(true) : message.offset; - if (message.limit != null && message.hasOwnProperty("limit")) - if (typeof message.limit === "number") - object.limit = options.longs === String ? String(message.limit) : message.limit; - else - object.limit = options.longs === String ? $util.Long.prototype.toString.call(message.limit) : options.longs === Number ? new $util.LongBits(message.limit.low >>> 0, message.limit.high >>> 0).toNumber(true) : message.limit; - if (message.count_total != null && message.hasOwnProperty("count_total")) - object.count_total = message.count_total; - if (message.reverse != null && message.hasOwnProperty("reverse")) - object.reverse = message.reverse; - return object; - }; - - /** - * Converts this PageRequest to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageRequest - * @instance - * @returns {Object.} JSON object - */ - PageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageRequest; - })(); - - v1beta1.PageResponse = (function() { - - /** - * Properties of a PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @interface IPageResponse - * @property {Uint8Array|null} [next_key] PageResponse next_key - * @property {Long|null} [total] PageResponse total - */ - - /** - * Constructs a new PageResponse. - * @memberof cosmos.base.query.v1beta1 - * @classdesc Represents a PageResponse. - * @implements IPageResponse - * @constructor - * @param {cosmos.base.query.v1beta1.IPageResponse=} [properties] Properties to set - */ - function PageResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PageResponse next_key. - * @member {Uint8Array} next_key - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.next_key = $util.newBuffer([]); - - /** - * PageResponse total. - * @member {Long} total - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - */ - PageResponse.prototype.total = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.next_key != null && Object.hasOwnProperty.call(message, "next_key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.next_key); - if (message.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.total); - return writer; - }; - - /** - * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.IPageResponse} message PageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.base.query.v1beta1.PageResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.next_key = reader.bytes(); - break; - case 2: - message.total = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PageResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PageResponse message. - * @function verify - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PageResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.next_key != null && message.hasOwnProperty("next_key")) - if (!(message.next_key && typeof message.next_key.length === "number" || $util.isString(message.next_key))) - return "next_key: buffer expected"; - if (message.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - return null; - }; - - /** - * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.query.v1beta1.PageResponse} PageResponse - */ - PageResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.query.v1beta1.PageResponse) - return object; - var message = new $root.cosmos.base.query.v1beta1.PageResponse(); - if (object.next_key != null) - if (typeof object.next_key === "string") - $util.base64.decode(object.next_key, message.next_key = $util.newBuffer($util.base64.length(object.next_key)), 0); - else if (object.next_key.length) - message.next_key = object.next_key; - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = true; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a PageResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.base.query.v1beta1.PageResponse - * @static - * @param {cosmos.base.query.v1beta1.PageResponse} message PageResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PageResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.next_key = ""; - else { - object.next_key = []; - if (options.bytes !== Array) - object.next_key = $util.newBuffer(object.next_key); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - } - if (message.next_key != null && message.hasOwnProperty("next_key")) - object.next_key = options.bytes === String ? $util.base64.encode(message.next_key, 0, message.next_key.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_key) : message.next_key; - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber(true) : message.total; - return object; - }; - - /** - * Converts this PageResponse to JSON. - * @function toJSON - * @memberof cosmos.base.query.v1beta1.PageResponse - * @instance - * @returns {Object.} JSON object - */ - PageResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PageResponse; - })(); - - return v1beta1; - })(); - - return query; - })(); - - base.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.base - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos.base.v1beta1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.Coin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.Coin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Coin; - })(); - - v1beta1.DecCoin = (function() { - - /** - * Properties of a DecCoin. - * @memberof cosmos.base.v1beta1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos.base.v1beta1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecCoin) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecCoin; - })(); - - v1beta1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos.base.v1beta1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.IntProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return IntProto; - })(); - - v1beta1.DecProto = (function() { - - /** - * Properties of a DecProto. - * @memberof cosmos.base.v1beta1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos.base.v1beta1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos.base.v1beta1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.base.v1beta1.DecProto) - return object; - var message = new $root.cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @static - * @param {cosmos.base.v1beta1.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.base.v1beta1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DecProto; - })(); - - return v1beta1; - })(); - - return base; - })(); - - cosmos.bank = (function() { - - /** - * Namespace bank. - * @memberof cosmos - * @namespace - */ - var bank = {}; - - bank.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof cosmos.bank - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos.bank.v1beta1 - * @interface IParams - * @property {Array.|null} [send_enabled] Params send_enabled - * @property {boolean|null} [default_send_enabled] Params default_send_enabled - */ - - /** - * Constructs a new Params. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos.bank.v1beta1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.send_enabled = []; - if (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 send_enabled. - * @member {Array.} send_enabled - * @memberof cosmos.bank.v1beta1.Params - * @instance - */ - Params.prototype.send_enabled = $util.emptyArray; - - /** - * Params default_send_enabled. - * @member {boolean} default_send_enabled - * @memberof cosmos.bank.v1beta1.Params - * @instance - */ - Params.prototype.default_send_enabled = false; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.send_enabled != null && message.send_enabled.length) - for (var i = 0; i < message.send_enabled.length; ++i) - $root.cosmos.bank.v1beta1.SendEnabled.encode(message.send_enabled[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.default_send_enabled != null && Object.hasOwnProperty.call(message, "default_send_enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.default_send_enabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.send_enabled && message.send_enabled.length)) - message.send_enabled = []; - message.send_enabled.push($root.cosmos.bank.v1beta1.SendEnabled.decode(reader, reader.uint32())); - break; - case 2: - message.default_send_enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.send_enabled != null && message.hasOwnProperty("send_enabled")) { - if (!Array.isArray(message.send_enabled)) - return "send_enabled: array expected"; - for (var i = 0; i < message.send_enabled.length; ++i) { - var error = $root.cosmos.bank.v1beta1.SendEnabled.verify(message.send_enabled[i]); - if (error) - return "send_enabled." + error; - } - } - if (message.default_send_enabled != null && message.hasOwnProperty("default_send_enabled")) - if (typeof message.default_send_enabled !== "boolean") - return "default_send_enabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Params) - return object; - var message = new $root.cosmos.bank.v1beta1.Params(); - if (object.send_enabled) { - if (!Array.isArray(object.send_enabled)) - throw TypeError(".cosmos.bank.v1beta1.Params.send_enabled: array expected"); - message.send_enabled = []; - for (var i = 0; i < object.send_enabled.length; ++i) { - if (typeof object.send_enabled[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Params.send_enabled: object expected"); - message.send_enabled[i] = $root.cosmos.bank.v1beta1.SendEnabled.fromObject(object.send_enabled[i]); - } - } - if (object.default_send_enabled != null) - message.default_send_enabled = Boolean(object.default_send_enabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Params - * @static - * @param {cosmos.bank.v1beta1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.send_enabled = []; - if (options.defaults) - object.default_send_enabled = false; - if (message.send_enabled && message.send_enabled.length) { - object.send_enabled = []; - for (var j = 0; j < message.send_enabled.length; ++j) - object.send_enabled[j] = $root.cosmos.bank.v1beta1.SendEnabled.toObject(message.send_enabled[j], options); - } - if (message.default_send_enabled != null && message.hasOwnProperty("default_send_enabled")) - object.default_send_enabled = message.default_send_enabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1beta1.SendEnabled = (function() { - - /** - * Properties of a SendEnabled. - * @memberof cosmos.bank.v1beta1 - * @interface ISendEnabled - * @property {string|null} [denom] SendEnabled denom - * @property {boolean|null} [enabled] SendEnabled enabled - */ - - /** - * Constructs a new SendEnabled. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a SendEnabled. - * @implements ISendEnabled - * @constructor - * @param {cosmos.bank.v1beta1.ISendEnabled=} [properties] Properties to set - */ - function SendEnabled(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SendEnabled denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.SendEnabled - * @instance - */ - SendEnabled.prototype.denom = ""; - - /** - * SendEnabled enabled. - * @member {boolean} enabled - * @memberof cosmos.bank.v1beta1.SendEnabled - * @instance - */ - SendEnabled.prototype.enabled = false; - - /** - * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SendEnabled.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enabled); - return writer; - }; - - /** - * Encodes the specified SendEnabled message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.ISendEnabled} message SendEnabled message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SendEnabled.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SendEnabled message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SendEnabled.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.SendEnabled(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.enabled = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SendEnabled message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SendEnabled.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SendEnabled message. - * @function verify - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SendEnabled.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a SendEnabled message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.SendEnabled} SendEnabled - */ - SendEnabled.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.SendEnabled) - return object; - var message = new $root.cosmos.bank.v1beta1.SendEnabled(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a SendEnabled message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.SendEnabled - * @static - * @param {cosmos.bank.v1beta1.SendEnabled} message SendEnabled - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SendEnabled.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.denom = ""; - object.enabled = false; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this SendEnabled to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.SendEnabled - * @instance - * @returns {Object.} JSON object - */ - SendEnabled.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SendEnabled; - })(); - - v1beta1.Input = (function() { - - /** - * Properties of an Input. - * @memberof cosmos.bank.v1beta1 - * @interface IInput - * @property {string|null} [address] Input address - * @property {Array.|null} [coins] Input coins - */ - - /** - * Constructs a new Input. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents an Input. - * @implements IInput - * @constructor - * @param {cosmos.bank.v1beta1.IInput=} [properties] Properties to set - */ - function Input(properties) { - this.coins = []; - if (properties) - for (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 {string} address - * @memberof cosmos.bank.v1beta1.Input - * @instance - */ - Input.prototype.address = ""; - - /** - * Input coins. - * @member {Array.} coins - * @memberof cosmos.bank.v1beta1.Input - * @instance - */ - Input.prototype.coins = $util.emptyArray; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.coins != null && message.coins.length) - for (var i = 0; i < message.coins.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Input.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Input message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Input(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Input message. - * @function verify - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Input.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (var i = 0; i < message.coins.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Input} Input - */ - Input.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Input) - return object; - var message = new $root.cosmos.bank.v1beta1.Input(); - if (object.address != null) - message.address = String(object.address); - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos.bank.v1beta1.Input.coins: array expected"); - message.coins = []; - for (var i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Input.coins: object expected"); - message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Input - * @static - * @param {cosmos.bank.v1beta1.Input} message Input - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Input.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (var j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Input to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Input - * @instance - * @returns {Object.} JSON object - */ - Input.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Input; - })(); - - v1beta1.Output = (function() { - - /** - * Properties of an Output. - * @memberof cosmos.bank.v1beta1 - * @interface IOutput - * @property {string|null} [address] Output address - * @property {Array.|null} [coins] Output coins - */ - - /** - * Constructs a new Output. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents an Output. - * @implements IOutput - * @constructor - * @param {cosmos.bank.v1beta1.IOutput=} [properties] Properties to set - */ - function Output(properties) { - this.coins = []; - if (properties) - for (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 {string} address - * @memberof cosmos.bank.v1beta1.Output - * @instance - */ - Output.prototype.address = ""; - - /** - * Output coins. - * @member {Array.} coins - * @memberof cosmos.bank.v1beta1.Output - * @instance - */ - Output.prototype.coins = $util.emptyArray; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.address); - if (message.coins != null && message.coins.length) - for (var i = 0; i < message.coins.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Output.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Output message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Output(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.string(); - break; - case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Output message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Output message. - * @function verify - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Output.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!$util.isString(message.address)) - return "address: string expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (var i = 0; i < message.coins.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates an Output message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Output} Output - */ - Output.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Output) - return object; - var message = new $root.cosmos.bank.v1beta1.Output(); - if (object.address != null) - message.address = String(object.address); - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos.bank.v1beta1.Output.coins: array expected"); - message.coins = []; - for (var i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Output.coins: object expected"); - message.coins[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Output - * @static - * @param {cosmos.bank.v1beta1.Output} message Output - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Output.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - object.address = ""; - if (message.address != null && message.hasOwnProperty("address")) - object.address = message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (var j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Output to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Output - * @instance - * @returns {Object.} JSON object - */ - Output.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Output; - })(); - - v1beta1.Supply = (function() { - - /** - * Properties of a Supply. - * @memberof cosmos.bank.v1beta1 - * @interface ISupply - * @property {Array.|null} [total] Supply total - */ - - /** - * Constructs a new Supply. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Supply. - * @implements ISupply - * @constructor - * @param {cosmos.bank.v1beta1.ISupply=} [properties] Properties to set - */ - function Supply(properties) { - this.total = []; - if (properties) - for (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.bank.v1beta1.Supply - * @instance - */ - Supply.prototype.total = $util.emptyArray; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Supply.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.total != null && message.total.length) - for (var i = 0; i < message.total.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Supply.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.ISupply} message Supply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Supply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.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.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Supply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Supply message. - * @function verify - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Supply.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.total != null && message.hasOwnProperty("total")) { - if (!Array.isArray(message.total)) - return "total: array expected"; - for (var i = 0; i < message.total.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.total[i]); - if (error) - return "total." + error; - } - } - return null; - }; - - /** - * Creates a Supply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Supply} Supply - */ - Supply.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Supply) - return object; - var message = new $root.cosmos.bank.v1beta1.Supply(); - if (object.total) { - if (!Array.isArray(object.total)) - throw TypeError(".cosmos.bank.v1beta1.Supply.total: array expected"); - message.total = []; - for (var i = 0; i < object.total.length; ++i) { - if (typeof object.total[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Supply.total: object expected"); - message.total[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.total[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Supply message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Supply - * @static - * @param {cosmos.bank.v1beta1.Supply} message Supply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Supply.toObject = function toObject(message, options) { - if (!options) - options = {}; - 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.base.v1beta1.Coin.toObject(message.total[j], options); - } - return object; - }; - - /** - * Converts this Supply to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Supply - * @instance - * @returns {Object.} JSON object - */ - Supply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Supply; - })(); - - v1beta1.DenomUnit = (function() { - - /** - * Properties of a DenomUnit. - * @memberof cosmos.bank.v1beta1 - * @interface IDenomUnit - * @property {string|null} [denom] DenomUnit denom - * @property {number|null} [exponent] DenomUnit exponent - * @property {Array.|null} [aliases] DenomUnit aliases - */ - - /** - * Constructs a new DenomUnit. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a DenomUnit. - * @implements IDenomUnit - * @constructor - * @param {cosmos.bank.v1beta1.IDenomUnit=} [properties] Properties to set - */ - function DenomUnit(properties) { - this.aliases = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DenomUnit denom. - * @member {string} denom - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - */ - DenomUnit.prototype.denom = ""; - - /** - * DenomUnit exponent. - * @member {number} exponent - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - */ - DenomUnit.prototype.exponent = 0; - - /** - * DenomUnit aliases. - * @member {Array.} aliases - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - */ - DenomUnit.prototype.aliases = $util.emptyArray; - - /** - * Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomUnit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - if (message.exponent != null && Object.hasOwnProperty.call(message, "exponent")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.exponent); - if (message.aliases != null && message.aliases.length) - for (var i = 0; i < message.aliases.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.aliases[i]); - return writer; - }; - - /** - * Encodes the specified DenomUnit message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.IDenomUnit} message DenomUnit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomUnit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DenomUnit message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomUnit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.DenomUnit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.exponent = reader.uint32(); - break; - case 3: - if (!(message.aliases && message.aliases.length)) - message.aliases = []; - message.aliases.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DenomUnit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomUnit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DenomUnit message. - * @function verify - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DenomUnit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.exponent != null && message.hasOwnProperty("exponent")) - if (!$util.isInteger(message.exponent)) - return "exponent: integer expected"; - if (message.aliases != null && message.hasOwnProperty("aliases")) { - if (!Array.isArray(message.aliases)) - return "aliases: array expected"; - for (var i = 0; i < message.aliases.length; ++i) - if (!$util.isString(message.aliases[i])) - return "aliases: string[] expected"; - } - return null; - }; - - /** - * Creates a DenomUnit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.DenomUnit} DenomUnit - */ - DenomUnit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.DenomUnit) - return object; - var message = new $root.cosmos.bank.v1beta1.DenomUnit(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.exponent != null) - message.exponent = object.exponent >>> 0; - if (object.aliases) { - if (!Array.isArray(object.aliases)) - throw TypeError(".cosmos.bank.v1beta1.DenomUnit.aliases: array expected"); - message.aliases = []; - for (var i = 0; i < object.aliases.length; ++i) - message.aliases[i] = String(object.aliases[i]); - } - return message; - }; - - /** - * Creates a plain object from a DenomUnit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.DenomUnit - * @static - * @param {cosmos.bank.v1beta1.DenomUnit} message DenomUnit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DenomUnit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.aliases = []; - if (options.defaults) { - object.denom = ""; - object.exponent = 0; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.exponent != null && message.hasOwnProperty("exponent")) - object.exponent = message.exponent; - if (message.aliases && message.aliases.length) { - object.aliases = []; - for (var j = 0; j < message.aliases.length; ++j) - object.aliases[j] = message.aliases[j]; - } - return object; - }; - - /** - * Converts this DenomUnit to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.DenomUnit - * @instance - * @returns {Object.} JSON object - */ - DenomUnit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DenomUnit; - })(); - - v1beta1.Metadata = (function() { - - /** - * Properties of a Metadata. - * @memberof cosmos.bank.v1beta1 - * @interface IMetadata - * @property {string|null} [description] Metadata description - * @property {Array.|null} [denom_units] Metadata denom_units - * @property {string|null} [base] Metadata base - * @property {string|null} [display] Metadata display - * @property {string|null} [name] Metadata name - * @property {string|null} [symbol] Metadata symbol - */ - - /** - * Constructs a new Metadata. - * @memberof cosmos.bank.v1beta1 - * @classdesc Represents a Metadata. - * @implements IMetadata - * @constructor - * @param {cosmos.bank.v1beta1.IMetadata=} [properties] Properties to set - */ - function Metadata(properties) { - this.denom_units = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Metadata description. - * @member {string} description - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.description = ""; - - /** - * Metadata denom_units. - * @member {Array.} denom_units - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.denom_units = $util.emptyArray; - - /** - * Metadata base. - * @member {string} base - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.base = ""; - - /** - * Metadata display. - * @member {string} display - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.display = ""; - - /** - * Metadata name. - * @member {string} name - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.name = ""; - - /** - * Metadata symbol. - * @member {string} symbol - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - */ - Metadata.prototype.symbol = ""; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. - * @function encode - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.denom_units != null && message.denom_units.length) - for (var i = 0; i < message.denom_units.length; ++i) - $root.cosmos.bank.v1beta1.DenomUnit.encode(message.denom_units[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.base != null && Object.hasOwnProperty.call(message, "base")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.base); - if (message.display != null && Object.hasOwnProperty.call(message, "display")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.display); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.name); - if (message.symbol != null && Object.hasOwnProperty.call(message, "symbol")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.symbol); - return writer; - }; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.IMetadata} message Metadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @function decode - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos.bank.v1beta1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos.bank.v1beta1.Metadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.description = reader.string(); - break; - case 2: - if (!(message.denom_units && message.denom_units.length)) - message.denom_units = []; - message.denom_units.push($root.cosmos.bank.v1beta1.DenomUnit.decode(reader, reader.uint32())); - break; - case 3: - message.base = reader.string(); - break; - case 4: - message.display = reader.string(); - break; - case 5: - message.name = reader.string(); - break; - case 6: - message.symbol = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos.bank.v1beta1.Metadata} Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metadata message. - * @function verify - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.denom_units != null && message.hasOwnProperty("denom_units")) { - if (!Array.isArray(message.denom_units)) - return "denom_units: array expected"; - for (var i = 0; i < message.denom_units.length; ++i) { - var error = $root.cosmos.bank.v1beta1.DenomUnit.verify(message.denom_units[i]); - if (error) - return "denom_units." + error; - } - } - if (message.base != null && message.hasOwnProperty("base")) - if (!$util.isString(message.base)) - return "base: string expected"; - if (message.display != null && message.hasOwnProperty("display")) - if (!$util.isString(message.display)) - return "display: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.symbol != null && message.hasOwnProperty("symbol")) - if (!$util.isString(message.symbol)) - return "symbol: string expected"; - return null; - }; - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {Object.} object Plain object - * @returns {cosmos.bank.v1beta1.Metadata} Metadata - */ - Metadata.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos.bank.v1beta1.Metadata) - return object; - var message = new $root.cosmos.bank.v1beta1.Metadata(); - if (object.description != null) - message.description = String(object.description); - if (object.denom_units) { - if (!Array.isArray(object.denom_units)) - throw TypeError(".cosmos.bank.v1beta1.Metadata.denom_units: array expected"); - message.denom_units = []; - for (var i = 0; i < object.denom_units.length; ++i) { - if (typeof object.denom_units[i] !== "object") - throw TypeError(".cosmos.bank.v1beta1.Metadata.denom_units: object expected"); - message.denom_units[i] = $root.cosmos.bank.v1beta1.DenomUnit.fromObject(object.denom_units[i]); - } - } - if (object.base != null) - message.base = String(object.base); - if (object.display != null) - message.display = String(object.display); - if (object.name != null) - message.name = String(object.name); - if (object.symbol != null) - message.symbol = String(object.symbol); - return message; - }; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos.bank.v1beta1.Metadata - * @static - * @param {cosmos.bank.v1beta1.Metadata} message Metadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.denom_units = []; - if (options.defaults) { - object.description = ""; - object.base = ""; - object.display = ""; - object.name = ""; - object.symbol = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.denom_units && message.denom_units.length) { - object.denom_units = []; - for (var j = 0; j < message.denom_units.length; ++j) - object.denom_units[j] = $root.cosmos.bank.v1beta1.DenomUnit.toObject(message.denom_units[j], options); - } - if (message.base != null && message.hasOwnProperty("base")) - object.base = message.base; - if (message.display != null && message.hasOwnProperty("display")) - object.display = message.display; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.symbol != null && message.hasOwnProperty("symbol")) - object.symbol = message.symbol; - return object; - }; - - /** - * Converts this Metadata to JSON. - * @function toJSON - * @memberof cosmos.bank.v1beta1.Metadata - * @instance - * @returns {Object.} JSON object - */ - Metadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Metadata; - })(); - - return v1beta1; - })(); - - return bank; - })(); - - return cosmos; - })(); - - $root.cosmos_proto = (function() { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - var cosmos_proto = {}; - - cosmos_proto.InterfaceDescriptor = (function() { - - /** - * Properties of an InterfaceDescriptor. - * @memberof cosmos_proto - * @interface IInterfaceDescriptor - * @property {string|null} [name] InterfaceDescriptor name - * @property {string|null} [description] InterfaceDescriptor description - */ - - /** - * Constructs a new InterfaceDescriptor. - * @memberof cosmos_proto - * @classdesc Represents an InterfaceDescriptor. - * @implements IInterfaceDescriptor - * @constructor - * @param {cosmos_proto.IInterfaceDescriptor=} [properties] Properties to set - */ - function InterfaceDescriptor(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * InterfaceDescriptor name. - * @member {string} name - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.name = ""; - - /** - * InterfaceDescriptor description. - * @member {string} description - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - */ - InterfaceDescriptor.prototype.description = ""; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.IInterfaceDescriptor} message InterfaceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - InterfaceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.InterfaceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - InterfaceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an InterfaceDescriptor message. - * @function verify - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - InterfaceDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.InterfaceDescriptor} InterfaceDescriptor - */ - InterfaceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.InterfaceDescriptor) - return object; - var message = new $root.cosmos_proto.InterfaceDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.InterfaceDescriptor - * @static - * @param {cosmos_proto.InterfaceDescriptor} message InterfaceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - InterfaceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.InterfaceDescriptor - * @instance - * @returns {Object.} JSON object - */ - InterfaceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return InterfaceDescriptor; - })(); - - cosmos_proto.ScalarDescriptor = (function() { - - /** - * Properties of a ScalarDescriptor. - * @memberof cosmos_proto - * @interface IScalarDescriptor - * @property {string|null} [name] ScalarDescriptor name - * @property {string|null} [description] ScalarDescriptor description - * @property {Array.|null} [field_type] ScalarDescriptor field_type - * @property {string|null} [legacy_amino_encoding] ScalarDescriptor legacy_amino_encoding - */ - - /** - * Constructs a new ScalarDescriptor. - * @memberof cosmos_proto - * @classdesc Represents a ScalarDescriptor. - * @implements IScalarDescriptor - * @constructor - * @param {cosmos_proto.IScalarDescriptor=} [properties] Properties to set - */ - function ScalarDescriptor(properties) { - this.field_type = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScalarDescriptor name. - * @member {string} name - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.name = ""; - - /** - * ScalarDescriptor description. - * @member {string} description - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.description = ""; - - /** - * ScalarDescriptor field_type. - * @member {Array.} field_type - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.field_type = $util.emptyArray; - - /** - * ScalarDescriptor legacy_amino_encoding. - * @member {string} legacy_amino_encoding - * @memberof cosmos_proto.ScalarDescriptor - * @instance - */ - ScalarDescriptor.prototype.legacy_amino_encoding = ""; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.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.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.field_type != null && message.field_type.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.field_type.length; ++i) - writer.int32(message.field_type[i]); - writer.ldelim(); - } - if (message.legacy_amino_encoding != null && Object.hasOwnProperty.call(message, "legacy_amino_encoding")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.legacy_amino_encoding); - return writer; - }; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.IScalarDescriptor} message ScalarDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScalarDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @function decode - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_proto.ScalarDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.description = reader.string(); - break; - case 3: - if (!(message.field_type && message.field_type.length)) - message.field_type = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.field_type.push(reader.int32()); - } else - message.field_type.push(reader.int32()); - break; - case 4: - message.legacy_amino_encoding = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScalarDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScalarDescriptor message. - * @function verify - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScalarDescriptor.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.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.field_type != null && message.hasOwnProperty("field_type")) { - if (!Array.isArray(message.field_type)) - return "field_type: array expected"; - for (var i = 0; i < message.field_type.length; ++i) - switch (message.field_type[i]) { - default: - return "field_type: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - if (!$util.isString(message.legacy_amino_encoding)) - return "legacy_amino_encoding: string expected"; - return null; - }; - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {Object.} object Plain object - * @returns {cosmos_proto.ScalarDescriptor} ScalarDescriptor - */ - ScalarDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_proto.ScalarDescriptor) - return object; - var message = new $root.cosmos_proto.ScalarDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.description != null) - message.description = String(object.description); - if (object.field_type) { - if (!Array.isArray(object.field_type)) - throw TypeError(".cosmos_proto.ScalarDescriptor.field_type: array expected"); - message.field_type = []; - for (var i = 0; i < object.field_type.length; ++i) - switch (object.field_type[i]) { - default: - case "SCALAR_TYPE_UNSPECIFIED": - case 0: - message.field_type[i] = 0; - break; - case "SCALAR_TYPE_STRING": - case 1: - message.field_type[i] = 1; - break; - case "SCALAR_TYPE_BYTES": - case 2: - message.field_type[i] = 2; - break; - } - } - if (object.legacy_amino_encoding != null) - message.legacy_amino_encoding = String(object.legacy_amino_encoding); - return message; - }; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_proto.ScalarDescriptor - * @static - * @param {cosmos_proto.ScalarDescriptor} message ScalarDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScalarDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.field_type = []; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.legacy_amino_encoding = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.field_type && message.field_type.length) { - object.field_type = []; - for (var j = 0; j < message.field_type.length; ++j) - object.field_type[j] = options.enums === String ? $root.cosmos_proto.ScalarType[message.field_type[j]] : message.field_type[j]; - } - if (message.legacy_amino_encoding != null && message.hasOwnProperty("legacy_amino_encoding")) - object.legacy_amino_encoding = message.legacy_amino_encoding; - return object; - }; - - /** - * Converts this ScalarDescriptor to JSON. - * @function toJSON - * @memberof cosmos_proto.ScalarDescriptor - * @instance - * @returns {Object.} JSON object - */ - ScalarDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ScalarDescriptor; - })(); - - /** - * ScalarType enum. - * @name cosmos_proto.ScalarType - * @enum {number} - * @property {number} SCALAR_TYPE_UNSPECIFIED=0 SCALAR_TYPE_UNSPECIFIED value - * @property {number} SCALAR_TYPE_STRING=1 SCALAR_TYPE_STRING value - * @property {number} SCALAR_TYPE_BYTES=2 SCALAR_TYPE_BYTES value - */ - cosmos_proto.ScalarType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCALAR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCALAR_TYPE_STRING"] = 1; - values[valuesById[2] = "SCALAR_TYPE_BYTES"] = 2; - return values; - })(); - - return cosmos_proto; - })(); - - $root.tendermint = (function() { - - /** - * Namespace tendermint. - * @exports tendermint - * @namespace - */ - var tendermint = {}; - - tendermint.crypto = (function() { - - /** - * Namespace crypto. - * @memberof tendermint - * @namespace - */ - var crypto = {}; - - crypto.Proof = (function() { - - /** - * Properties of a Proof. - * @memberof tendermint.crypto - * @interface IProof - * @property {Long|null} [total] Proof total - * @property {Long|null} [index] Proof index - * @property {Uint8Array|null} [leaf_hash] Proof leaf_hash - * @property {Array.|null} [aunts] Proof aunts - */ - - /** - * Constructs a new Proof. - * @memberof tendermint.crypto - * @classdesc Represents a Proof. - * @implements IProof - * @constructor - * @param {tendermint.crypto.IProof=} [properties] Properties to set - */ - function Proof(properties) { - this.aunts = []; - if (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 total. - * @member {Long} total - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.total = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proof index. - * @member {Long} index - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proof leaf_hash. - * @member {Uint8Array} leaf_hash - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.leaf_hash = $util.newBuffer([]); - - /** - * Proof aunts. - * @member {Array.} aunts - * @memberof tendermint.crypto.Proof - * @instance - */ - Proof.prototype.aunts = $util.emptyArray; - - /** - * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.total); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.index); - if (message.leaf_hash != null && Object.hasOwnProperty.call(message, "leaf_hash")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.leaf_hash); - if (message.aunts != null && message.aunts.length) - for (var i = 0; i < message.aunts.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.aunts[i]); - return writer; - }; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.Proof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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.Proof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.int64(); - break; - case 2: - message.index = reader.int64(); - break; - case 3: - message.leaf_hash = reader.bytes(); - break; - case 4: - if (!(message.aunts && message.aunts.length)) - message.aunts = []; - message.aunts.push(reader.bytes()); - 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.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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.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.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total) && !(message.total && $util.isInteger(message.total.low) && $util.isInteger(message.total.high))) - return "total: integer|Long expected"; - 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.leaf_hash != null && message.hasOwnProperty("leaf_hash")) - if (!(message.leaf_hash && typeof message.leaf_hash.length === "number" || $util.isString(message.leaf_hash))) - return "leaf_hash: buffer expected"; - if (message.aunts != null && message.hasOwnProperty("aunts")) { - if (!Array.isArray(message.aunts)) - return "aunts: array expected"; - for (var i = 0; i < message.aunts.length; ++i) - if (!(message.aunts[i] && typeof message.aunts[i].length === "number" || $util.isString(message.aunts[i]))) - return "aunts: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Proof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.Proof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.Proof} Proof - */ - Proof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.Proof) - return object; - var message = new $root.tendermint.crypto.Proof(); - if (object.total != null) - if ($util.Long) - (message.total = $util.Long.fromValue(object.total)).unsigned = false; - else if (typeof object.total === "string") - message.total = parseInt(object.total, 10); - else if (typeof object.total === "number") - message.total = object.total; - else if (typeof object.total === "object") - message.total = new $util.LongBits(object.total.low >>> 0, object.total.high >>> 0).toNumber(); - 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.leaf_hash != null) - if (typeof object.leaf_hash === "string") - $util.base64.decode(object.leaf_hash, message.leaf_hash = $util.newBuffer($util.base64.length(object.leaf_hash)), 0); - else if (object.leaf_hash.length) - message.leaf_hash = object.leaf_hash; - if (object.aunts) { - if (!Array.isArray(object.aunts)) - throw TypeError(".tendermint.crypto.Proof.aunts: array expected"); - message.aunts = []; - for (var i = 0; i < object.aunts.length; ++i) - if (typeof object.aunts[i] === "string") - $util.base64.decode(object.aunts[i], message.aunts[i] = $util.newBuffer($util.base64.length(object.aunts[i])), 0); - else if (object.aunts[i].length) - message.aunts[i] = object.aunts[i]; - } - return message; - }; - - /** - * Creates a plain object from a Proof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.Proof - * @static - * @param {tendermint.crypto.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.aunts = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.total = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total = options.longs === String ? "0" : 0; - 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.leaf_hash = ""; - else { - object.leaf_hash = []; - if (options.bytes !== Array) - object.leaf_hash = $util.newBuffer(object.leaf_hash); - } - } - if (message.total != null && message.hasOwnProperty("total")) - if (typeof message.total === "number") - object.total = options.longs === String ? String(message.total) : message.total; - else - object.total = options.longs === String ? $util.Long.prototype.toString.call(message.total) : options.longs === Number ? new $util.LongBits(message.total.low >>> 0, message.total.high >>> 0).toNumber() : message.total; - 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.leaf_hash != null && message.hasOwnProperty("leaf_hash")) - object.leaf_hash = options.bytes === String ? $util.base64.encode(message.leaf_hash, 0, message.leaf_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.leaf_hash) : message.leaf_hash; - if (message.aunts && message.aunts.length) { - object.aunts = []; - for (var j = 0; j < message.aunts.length; ++j) - object.aunts[j] = options.bytes === String ? $util.base64.encode(message.aunts[j], 0, message.aunts[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.aunts[j]) : message.aunts[j]; - } - return object; - }; - - /** - * Converts this Proof to JSON. - * @function toJSON - * @memberof tendermint.crypto.Proof - * @instance - * @returns {Object.} JSON object - */ - Proof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Proof; - })(); - - crypto.ValueOp = (function() { - - /** - * Properties of a ValueOp. - * @memberof tendermint.crypto - * @interface IValueOp - * @property {Uint8Array|null} [key] ValueOp key - * @property {tendermint.crypto.IProof|null} [proof] ValueOp proof - */ - - /** - * Constructs a new ValueOp. - * @memberof tendermint.crypto - * @classdesc Represents a ValueOp. - * @implements IValueOp - * @constructor - * @param {tendermint.crypto.IValueOp=} [properties] Properties to set - */ - function ValueOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValueOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.ValueOp - * @instance - */ - ValueOp.prototype.key = $util.newBuffer([]); - - /** - * ValueOp proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.crypto.ValueOp - * @instance - */ - ValueOp.prototype.proof = null; - - /** - * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueOp.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.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.IValueOp} message ValueOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValueOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValueOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.ValueOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.ValueOp} ValueOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueOp.decode = 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.ValueOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.bytes(); - break; - case 2: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValueOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.ValueOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.ValueOp} ValueOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValueOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValueOp message. - * @function verify - * @memberof tendermint.crypto.ValueOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValueOp.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.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.ValueOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ValueOp} ValueOp - */ - ValueOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ValueOp) - return object; - var message = new $root.tendermint.crypto.ValueOp(); - 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.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.crypto.ValueOp.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a ValueOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.ValueOp - * @static - * @param {tendermint.crypto.ValueOp} message ValueOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValueOp.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); - } - object.proof = null; - } - 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.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this ValueOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.ValueOp - * @instance - * @returns {Object.} JSON object - */ - ValueOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValueOp; - })(); - - crypto.DominoOp = (function() { - - /** - * Properties of a DominoOp. - * @memberof tendermint.crypto - * @interface IDominoOp - * @property {string|null} [key] DominoOp key - * @property {string|null} [input] DominoOp input - * @property {string|null} [output] DominoOp output - */ - - /** - * Constructs a new DominoOp. - * @memberof tendermint.crypto - * @classdesc Represents a DominoOp. - * @implements IDominoOp - * @constructor - * @param {tendermint.crypto.IDominoOp=} [properties] Properties to set - */ - function DominoOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DominoOp key. - * @member {string} key - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.key = ""; - - /** - * DominoOp input. - * @member {string} input - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.input = ""; - - /** - * DominoOp output. - * @member {string} output - * @memberof tendermint.crypto.DominoOp - * @instance - */ - DominoOp.prototype.output = ""; - - /** - * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DominoOp.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.input != null && Object.hasOwnProperty.call(message, "input")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input); - if (message.output != null && Object.hasOwnProperty.call(message, "output")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output); - return writer; - }; - - /** - * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.IDominoOp} message DominoOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DominoOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DominoOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.DominoOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.DominoOp} DominoOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DominoOp.decode = 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.DominoOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.key = reader.string(); - break; - case 2: - message.input = reader.string(); - break; - case 3: - message.output = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DominoOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.DominoOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.DominoOp} DominoOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DominoOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DominoOp message. - * @function verify - * @memberof tendermint.crypto.DominoOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DominoOp.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.input != null && message.hasOwnProperty("input")) - if (!$util.isString(message.input)) - return "input: string expected"; - if (message.output != null && message.hasOwnProperty("output")) - if (!$util.isString(message.output)) - return "output: string expected"; - return null; - }; - - /** - * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.DominoOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.DominoOp} DominoOp - */ - DominoOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.DominoOp) - return object; - var message = new $root.tendermint.crypto.DominoOp(); - if (object.key != null) - message.key = String(object.key); - if (object.input != null) - message.input = String(object.input); - if (object.output != null) - message.output = String(object.output); - return message; - }; - - /** - * Creates a plain object from a DominoOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.DominoOp - * @static - * @param {tendermint.crypto.DominoOp} message DominoOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DominoOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.input = ""; - object.output = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.input != null && message.hasOwnProperty("input")) - object.input = message.input; - if (message.output != null && message.hasOwnProperty("output")) - object.output = message.output; - return object; - }; - - /** - * Converts this DominoOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.DominoOp - * @instance - * @returns {Object.} JSON object - */ - DominoOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DominoOp; - })(); - - crypto.ProofOp = (function() { - - /** - * Properties of a ProofOp. - * @memberof tendermint.crypto - * @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 - * @classdesc Represents a ProofOp. - * @implements IProofOp - * @constructor - * @param {tendermint.crypto.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.ProofOp - * @instance - */ - ProofOp.prototype.type = ""; - - /** - * ProofOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.key = $util.newBuffer([]); - - /** - * ProofOp data. - * @member {Uint8Array} data - * @memberof tendermint.crypto.ProofOp - * @instance - */ - ProofOp.prototype.data = $util.newBuffer([]); - - /** - * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.ProofOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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.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.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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.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.ProofOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ProofOp} ProofOp - */ - ProofOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ProofOp) - return object; - var message = new $root.tendermint.crypto.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.ProofOp - * @static - * @param {tendermint.crypto.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.ProofOp - * @instance - * @returns {Object.} JSON object - */ - ProofOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofOp; - })(); - - crypto.ProofOps = (function() { - - /** - * Properties of a ProofOps. - * @memberof tendermint.crypto - * @interface IProofOps - * @property {Array.|null} [ops] ProofOps ops - */ - - /** - * Constructs a new ProofOps. - * @memberof tendermint.crypto - * @classdesc Represents a ProofOps. - * @implements IProofOps - * @constructor - * @param {tendermint.crypto.IProofOps=} [properties] Properties to set - */ - function ProofOps(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]]; - } - - /** - * ProofOps ops. - * @member {Array.} ops - * @memberof tendermint.crypto.ProofOps - * @instance - */ - ProofOps.prototype.ops = $util.emptyArray; - - /** - * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOps.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.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.IProofOps} message ProofOps message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOps.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ProofOps message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.ProofOps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.ProofOps} ProofOps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOps.decode = 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.ProofOps(); - 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.ProofOp.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ProofOps message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.ProofOps - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.ProofOps} ProofOps - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOps.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProofOps message. - * @function verify - * @memberof tendermint.crypto.ProofOps - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProofOps.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.ProofOp.verify(message.ops[i]); - if (error) - return "ops." + error; - } - } - return null; - }; - - /** - * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.ProofOps - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.ProofOps} ProofOps - */ - ProofOps.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.ProofOps) - return object; - var message = new $root.tendermint.crypto.ProofOps(); - if (object.ops) { - if (!Array.isArray(object.ops)) - throw TypeError(".tendermint.crypto.ProofOps.ops: array expected"); - message.ops = []; - for (var i = 0; i < object.ops.length; ++i) { - if (typeof object.ops[i] !== "object") - throw TypeError(".tendermint.crypto.ProofOps.ops: object expected"); - message.ops[i] = $root.tendermint.crypto.ProofOp.fromObject(object.ops[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ProofOps message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.ProofOps - * @static - * @param {tendermint.crypto.ProofOps} message ProofOps - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofOps.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.ProofOp.toObject(message.ops[j], options); - } - return object; - }; - - /** - * Converts this ProofOps to JSON. - * @function toJSON - * @memberof tendermint.crypto.ProofOps - * @instance - * @returns {Object.} JSON object - */ - ProofOps.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ProofOps; - })(); - - crypto.PublicKey = (function() { - - /** - * Properties of a PublicKey. - * @memberof tendermint.crypto - * @interface IPublicKey - * @property {Uint8Array|null} [ed25519] PublicKey ed25519 - * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 - */ - - /** - * Constructs a new PublicKey. - * @memberof tendermint.crypto - * @classdesc Represents a PublicKey. - * @implements IPublicKey - * @constructor - * @param {tendermint.crypto.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 ed25519. - * @member {Uint8Array|null|undefined} ed25519 - * @memberof tendermint.crypto.PublicKey - * @instance - */ - PublicKey.prototype.ed25519 = null; - - /** - * PublicKey secp256k1. - * @member {Uint8Array|null|undefined} secp256k1 - * @memberof tendermint.crypto.PublicKey - * @instance - */ - PublicKey.prototype.secp256k1 = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PublicKey sum. - * @member {"ed25519"|"secp256k1"|undefined} sum - * @memberof tendermint.crypto.PublicKey - * @instance - */ - Object.defineProperty(PublicKey.prototype, "sum", { - get: $util.oneOfGetter($oneOfFields = ["ed25519", "secp256k1"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.ed25519); - if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.secp256k1); - return writer; - }; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.PublicKey.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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 tendermint.crypto.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.crypto.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.tendermint.crypto.PublicKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ed25519 = reader.bytes(); - break; - case 2: - message.secp256k1 = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PublicKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.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 tendermint.crypto.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.ed25519 != null && message.hasOwnProperty("ed25519")) { - properties.sum = 1; - if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) - return "ed25519: buffer expected"; - } - if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) - return "secp256k1: buffer expected"; - } - return null; - }; - - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.PublicKey - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.PublicKey} PublicKey - */ - PublicKey.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.PublicKey) - return object; - var message = new $root.tendermint.crypto.PublicKey(); - 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.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; - return message; - }; - - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.PublicKey - * @static - * @param {tendermint.crypto.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.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.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"; - } - return object; - }; - - /** - * Converts this PublicKey to JSON. - * @function toJSON - * @memberof tendermint.crypto.PublicKey - * @instance - * @returns {Object.} JSON object - */ - PublicKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PublicKey; - })(); - - return crypto; - })(); - - tendermint.abci = (function() { - - /** - * Namespace abci. - * @memberof tendermint - * @namespace - */ - var abci = {}; - - abci.Request = (function() { - - /** - * Properties of a Request. - * @memberof tendermint.abci - * @interface IRequest - * @property {tendermint.abci.IRequestEcho|null} [echo] Request echo - * @property {tendermint.abci.IRequestFlush|null} [flush] Request flush - * @property {tendermint.abci.IRequestInfo|null} [info] Request info - * @property {tendermint.abci.IRequestSetOption|null} [set_option] Request set_option - * @property {tendermint.abci.IRequestInitChain|null} [init_chain] Request init_chain - * @property {tendermint.abci.IRequestQuery|null} [query] Request query - * @property {tendermint.abci.IRequestBeginBlock|null} [begin_block] Request begin_block - * @property {tendermint.abci.IRequestCheckTx|null} [check_tx] Request check_tx - * @property {tendermint.abci.IRequestDeliverTx|null} [deliver_tx] Request deliver_tx - * @property {tendermint.abci.IRequestEndBlock|null} [end_block] Request end_block - * @property {tendermint.abci.IRequestCommit|null} [commit] Request commit - * @property {tendermint.abci.IRequestListSnapshots|null} [list_snapshots] Request list_snapshots - * @property {tendermint.abci.IRequestOfferSnapshot|null} [offer_snapshot] Request offer_snapshot - * @property {tendermint.abci.IRequestLoadSnapshotChunk|null} [load_snapshot_chunk] Request load_snapshot_chunk - * @property {tendermint.abci.IRequestApplySnapshotChunk|null} [apply_snapshot_chunk] Request apply_snapshot_chunk - */ - - /** - * Constructs a new Request. - * @memberof tendermint.abci - * @classdesc Represents a Request. - * @implements IRequest - * @constructor - * @param {tendermint.abci.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.IRequestEcho|null|undefined} echo - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.echo = null; - - /** - * Request flush. - * @member {tendermint.abci.IRequestFlush|null|undefined} flush - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.flush = null; - - /** - * Request info. - * @member {tendermint.abci.IRequestInfo|null|undefined} info - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.info = null; - - /** - * Request set_option. - * @member {tendermint.abci.IRequestSetOption|null|undefined} set_option - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.set_option = null; - - /** - * Request init_chain. - * @member {tendermint.abci.IRequestInitChain|null|undefined} init_chain - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.init_chain = null; - - /** - * Request query. - * @member {tendermint.abci.IRequestQuery|null|undefined} query - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.query = null; - - /** - * Request begin_block. - * @member {tendermint.abci.IRequestBeginBlock|null|undefined} begin_block - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.begin_block = null; - - /** - * Request check_tx. - * @member {tendermint.abci.IRequestCheckTx|null|undefined} check_tx - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.check_tx = null; - - /** - * Request deliver_tx. - * @member {tendermint.abci.IRequestDeliverTx|null|undefined} deliver_tx - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.deliver_tx = null; - - /** - * Request end_block. - * @member {tendermint.abci.IRequestEndBlock|null|undefined} end_block - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.end_block = null; - - /** - * Request commit. - * @member {tendermint.abci.IRequestCommit|null|undefined} commit - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.commit = null; - - /** - * Request list_snapshots. - * @member {tendermint.abci.IRequestListSnapshots|null|undefined} list_snapshots - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.list_snapshots = null; - - /** - * Request offer_snapshot. - * @member {tendermint.abci.IRequestOfferSnapshot|null|undefined} offer_snapshot - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.offer_snapshot = null; - - /** - * Request load_snapshot_chunk. - * @member {tendermint.abci.IRequestLoadSnapshotChunk|null|undefined} load_snapshot_chunk - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.load_snapshot_chunk = null; - - /** - * Request apply_snapshot_chunk. - * @member {tendermint.abci.IRequestApplySnapshotChunk|null|undefined} apply_snapshot_chunk - * @memberof tendermint.abci.Request - * @instance - */ - Request.prototype.apply_snapshot_chunk = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Request value. - * @member {"echo"|"flush"|"info"|"set_option"|"init_chain"|"query"|"begin_block"|"check_tx"|"deliver_tx"|"end_block"|"commit"|"list_snapshots"|"offer_snapshot"|"load_snapshot_chunk"|"apply_snapshot_chunk"|undefined} value - * @memberof tendermint.abci.Request - * @instance - */ - Object.defineProperty(Request.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["echo", "flush", "info", "set_option", "init_chain", "query", "begin_block", "check_tx", "deliver_tx", "end_block", "commit", "list_snapshots", "offer_snapshot", "load_snapshot_chunk", "apply_snapshot_chunk"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.Request - * @static - * @param {tendermint.abci.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.RequestEcho.encode(message.echo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) - $root.tendermint.abci.RequestFlush.encode(message.flush, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.tendermint.abci.RequestInfo.encode(message.info, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.set_option != null && Object.hasOwnProperty.call(message, "set_option")) - $root.tendermint.abci.RequestSetOption.encode(message.set_option, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.init_chain != null && Object.hasOwnProperty.call(message, "init_chain")) - $root.tendermint.abci.RequestInitChain.encode(message.init_chain, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.tendermint.abci.RequestQuery.encode(message.query, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.begin_block != null && Object.hasOwnProperty.call(message, "begin_block")) - $root.tendermint.abci.RequestBeginBlock.encode(message.begin_block, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.check_tx != null && Object.hasOwnProperty.call(message, "check_tx")) - $root.tendermint.abci.RequestCheckTx.encode(message.check_tx, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.deliver_tx != null && Object.hasOwnProperty.call(message, "deliver_tx")) - $root.tendermint.abci.RequestDeliverTx.encode(message.deliver_tx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.end_block != null && Object.hasOwnProperty.call(message, "end_block")) - $root.tendermint.abci.RequestEndBlock.encode(message.end_block, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.abci.RequestCommit.encode(message.commit, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.list_snapshots != null && Object.hasOwnProperty.call(message, "list_snapshots")) - $root.tendermint.abci.RequestListSnapshots.encode(message.list_snapshots, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.offer_snapshot != null && Object.hasOwnProperty.call(message, "offer_snapshot")) - $root.tendermint.abci.RequestOfferSnapshot.encode(message.offer_snapshot, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.load_snapshot_chunk != null && Object.hasOwnProperty.call(message, "load_snapshot_chunk")) - $root.tendermint.abci.RequestLoadSnapshotChunk.encode(message.load_snapshot_chunk, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.apply_snapshot_chunk != null && Object.hasOwnProperty.call(message, "apply_snapshot_chunk")) - $root.tendermint.abci.RequestApplySnapshotChunk.encode(message.apply_snapshot_chunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.Request.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.Request - * @static - * @param {tendermint.abci.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.Request - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.Request(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.echo = $root.tendermint.abci.RequestEcho.decode(reader, reader.uint32()); - break; - case 2: - message.flush = $root.tendermint.abci.RequestFlush.decode(reader, reader.uint32()); - break; - case 3: - message.info = $root.tendermint.abci.RequestInfo.decode(reader, reader.uint32()); - break; - case 4: - message.set_option = $root.tendermint.abci.RequestSetOption.decode(reader, reader.uint32()); - break; - case 5: - message.init_chain = $root.tendermint.abci.RequestInitChain.decode(reader, reader.uint32()); - break; - case 6: - message.query = $root.tendermint.abci.RequestQuery.decode(reader, reader.uint32()); - break; - case 7: - message.begin_block = $root.tendermint.abci.RequestBeginBlock.decode(reader, reader.uint32()); - break; - case 8: - message.check_tx = $root.tendermint.abci.RequestCheckTx.decode(reader, reader.uint32()); - break; - case 9: - message.deliver_tx = $root.tendermint.abci.RequestDeliverTx.decode(reader, reader.uint32()); - break; - case 10: - message.end_block = $root.tendermint.abci.RequestEndBlock.decode(reader, reader.uint32()); - break; - case 11: - message.commit = $root.tendermint.abci.RequestCommit.decode(reader, reader.uint32()); - break; - case 12: - message.list_snapshots = $root.tendermint.abci.RequestListSnapshots.decode(reader, reader.uint32()); - break; - case 13: - message.offer_snapshot = $root.tendermint.abci.RequestOfferSnapshot.decode(reader, reader.uint32()); - break; - case 14: - message.load_snapshot_chunk = $root.tendermint.abci.RequestLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 15: - message.apply_snapshot_chunk = $root.tendermint.abci.RequestApplySnapshotChunk.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.Request - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.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.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.RequestInfo.verify(message.info); - if (error) - return "info." + error; - } - } - if (message.set_option != null && message.hasOwnProperty("set_option")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestSetOption.verify(message.set_option); - if (error) - return "set_option." + error; - } - } - if (message.init_chain != null && message.hasOwnProperty("init_chain")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestInitChain.verify(message.init_chain); - if (error) - return "init_chain." + error; - } - } - if (message.query != null && message.hasOwnProperty("query")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestQuery.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.begin_block != null && message.hasOwnProperty("begin_block")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestBeginBlock.verify(message.begin_block); - if (error) - return "begin_block." + error; - } - } - if (message.check_tx != null && message.hasOwnProperty("check_tx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestCheckTx.verify(message.check_tx); - if (error) - return "check_tx." + error; - } - } - if (message.deliver_tx != null && message.hasOwnProperty("deliver_tx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestDeliverTx.verify(message.deliver_tx); - if (error) - return "deliver_tx." + error; - } - } - if (message.end_block != null && message.hasOwnProperty("end_block")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestEndBlock.verify(message.end_block); - if (error) - return "end_block." + error; - } - } - if (message.commit != null && message.hasOwnProperty("commit")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestCommit.verify(message.commit); - if (error) - return "commit." + error; - } - } - if (message.list_snapshots != null && message.hasOwnProperty("list_snapshots")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestListSnapshots.verify(message.list_snapshots); - if (error) - return "list_snapshots." + error; - } - } - if (message.offer_snapshot != null && message.hasOwnProperty("offer_snapshot")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestOfferSnapshot.verify(message.offer_snapshot); - if (error) - return "offer_snapshot." + error; - } - } - if (message.load_snapshot_chunk != null && message.hasOwnProperty("load_snapshot_chunk")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestLoadSnapshotChunk.verify(message.load_snapshot_chunk); - if (error) - return "load_snapshot_chunk." + error; - } - } - if (message.apply_snapshot_chunk != null && message.hasOwnProperty("apply_snapshot_chunk")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.RequestApplySnapshotChunk.verify(message.apply_snapshot_chunk); - if (error) - return "apply_snapshot_chunk." + error; - } - } - return null; - }; - - /** - * Creates a Request message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.Request - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.Request} Request - */ - Request.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.Request) - return object; - var message = new $root.tendermint.abci.Request(); - if (object.echo != null) { - if (typeof object.echo !== "object") - throw TypeError(".tendermint.abci.Request.echo: object expected"); - message.echo = $root.tendermint.abci.RequestEcho.fromObject(object.echo); - } - if (object.flush != null) { - if (typeof object.flush !== "object") - throw TypeError(".tendermint.abci.Request.flush: object expected"); - message.flush = $root.tendermint.abci.RequestFlush.fromObject(object.flush); - } - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".tendermint.abci.Request.info: object expected"); - message.info = $root.tendermint.abci.RequestInfo.fromObject(object.info); - } - if (object.set_option != null) { - if (typeof object.set_option !== "object") - throw TypeError(".tendermint.abci.Request.set_option: object expected"); - message.set_option = $root.tendermint.abci.RequestSetOption.fromObject(object.set_option); - } - if (object.init_chain != null) { - if (typeof object.init_chain !== "object") - throw TypeError(".tendermint.abci.Request.init_chain: object expected"); - message.init_chain = $root.tendermint.abci.RequestInitChain.fromObject(object.init_chain); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".tendermint.abci.Request.query: object expected"); - message.query = $root.tendermint.abci.RequestQuery.fromObject(object.query); - } - if (object.begin_block != null) { - if (typeof object.begin_block !== "object") - throw TypeError(".tendermint.abci.Request.begin_block: object expected"); - message.begin_block = $root.tendermint.abci.RequestBeginBlock.fromObject(object.begin_block); - } - if (object.check_tx != null) { - if (typeof object.check_tx !== "object") - throw TypeError(".tendermint.abci.Request.check_tx: object expected"); - message.check_tx = $root.tendermint.abci.RequestCheckTx.fromObject(object.check_tx); - } - if (object.deliver_tx != null) { - if (typeof object.deliver_tx !== "object") - throw TypeError(".tendermint.abci.Request.deliver_tx: object expected"); - message.deliver_tx = $root.tendermint.abci.RequestDeliverTx.fromObject(object.deliver_tx); - } - if (object.end_block != null) { - if (typeof object.end_block !== "object") - throw TypeError(".tendermint.abci.Request.end_block: object expected"); - message.end_block = $root.tendermint.abci.RequestEndBlock.fromObject(object.end_block); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.abci.Request.commit: object expected"); - message.commit = $root.tendermint.abci.RequestCommit.fromObject(object.commit); - } - if (object.list_snapshots != null) { - if (typeof object.list_snapshots !== "object") - throw TypeError(".tendermint.abci.Request.list_snapshots: object expected"); - message.list_snapshots = $root.tendermint.abci.RequestListSnapshots.fromObject(object.list_snapshots); - } - if (object.offer_snapshot != null) { - if (typeof object.offer_snapshot !== "object") - throw TypeError(".tendermint.abci.Request.offer_snapshot: object expected"); - message.offer_snapshot = $root.tendermint.abci.RequestOfferSnapshot.fromObject(object.offer_snapshot); - } - if (object.load_snapshot_chunk != null) { - if (typeof object.load_snapshot_chunk !== "object") - throw TypeError(".tendermint.abci.Request.load_snapshot_chunk: object expected"); - message.load_snapshot_chunk = $root.tendermint.abci.RequestLoadSnapshotChunk.fromObject(object.load_snapshot_chunk); - } - if (object.apply_snapshot_chunk != null) { - if (typeof object.apply_snapshot_chunk !== "object") - throw TypeError(".tendermint.abci.Request.apply_snapshot_chunk: object expected"); - message.apply_snapshot_chunk = $root.tendermint.abci.RequestApplySnapshotChunk.fromObject(object.apply_snapshot_chunk); - } - return message; - }; - - /** - * Creates a plain object from a Request message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.Request - * @static - * @param {tendermint.abci.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.RequestEcho.toObject(message.echo, options); - if (options.oneofs) - object.value = "echo"; - } - if (message.flush != null && message.hasOwnProperty("flush")) { - object.flush = $root.tendermint.abci.RequestFlush.toObject(message.flush, options); - if (options.oneofs) - object.value = "flush"; - } - if (message.info != null && message.hasOwnProperty("info")) { - object.info = $root.tendermint.abci.RequestInfo.toObject(message.info, options); - if (options.oneofs) - object.value = "info"; - } - if (message.set_option != null && message.hasOwnProperty("set_option")) { - object.set_option = $root.tendermint.abci.RequestSetOption.toObject(message.set_option, options); - if (options.oneofs) - object.value = "set_option"; - } - if (message.init_chain != null && message.hasOwnProperty("init_chain")) { - object.init_chain = $root.tendermint.abci.RequestInitChain.toObject(message.init_chain, options); - if (options.oneofs) - object.value = "init_chain"; - } - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.tendermint.abci.RequestQuery.toObject(message.query, options); - if (options.oneofs) - object.value = "query"; - } - if (message.begin_block != null && message.hasOwnProperty("begin_block")) { - object.begin_block = $root.tendermint.abci.RequestBeginBlock.toObject(message.begin_block, options); - if (options.oneofs) - object.value = "begin_block"; - } - if (message.check_tx != null && message.hasOwnProperty("check_tx")) { - object.check_tx = $root.tendermint.abci.RequestCheckTx.toObject(message.check_tx, options); - if (options.oneofs) - object.value = "check_tx"; - } - if (message.deliver_tx != null && message.hasOwnProperty("deliver_tx")) { - object.deliver_tx = $root.tendermint.abci.RequestDeliverTx.toObject(message.deliver_tx, options); - if (options.oneofs) - object.value = "deliver_tx"; - } - if (message.end_block != null && message.hasOwnProperty("end_block")) { - object.end_block = $root.tendermint.abci.RequestEndBlock.toObject(message.end_block, options); - if (options.oneofs) - object.value = "end_block"; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - object.commit = $root.tendermint.abci.RequestCommit.toObject(message.commit, options); - if (options.oneofs) - object.value = "commit"; - } - if (message.list_snapshots != null && message.hasOwnProperty("list_snapshots")) { - object.list_snapshots = $root.tendermint.abci.RequestListSnapshots.toObject(message.list_snapshots, options); - if (options.oneofs) - object.value = "list_snapshots"; - } - if (message.offer_snapshot != null && message.hasOwnProperty("offer_snapshot")) { - object.offer_snapshot = $root.tendermint.abci.RequestOfferSnapshot.toObject(message.offer_snapshot, options); - if (options.oneofs) - object.value = "offer_snapshot"; - } - if (message.load_snapshot_chunk != null && message.hasOwnProperty("load_snapshot_chunk")) { - object.load_snapshot_chunk = $root.tendermint.abci.RequestLoadSnapshotChunk.toObject(message.load_snapshot_chunk, options); - if (options.oneofs) - object.value = "load_snapshot_chunk"; - } - if (message.apply_snapshot_chunk != null && message.hasOwnProperty("apply_snapshot_chunk")) { - object.apply_snapshot_chunk = $root.tendermint.abci.RequestApplySnapshotChunk.toObject(message.apply_snapshot_chunk, options); - if (options.oneofs) - object.value = "apply_snapshot_chunk"; - } - return object; - }; - - /** - * Converts this Request to JSON. - * @function toJSON - * @memberof tendermint.abci.Request - * @instance - * @returns {Object.} JSON object - */ - Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Request; - })(); - - abci.RequestEcho = (function() { - - /** - * Properties of a RequestEcho. - * @memberof tendermint.abci - * @interface IRequestEcho - * @property {string|null} [message] RequestEcho message - */ - - /** - * Constructs a new RequestEcho. - * @memberof tendermint.abci - * @classdesc Represents a RequestEcho. - * @implements IRequestEcho - * @constructor - * @param {tendermint.abci.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.RequestEcho - * @instance - */ - RequestEcho.prototype.message = ""; - - /** - * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.RequestEcho.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestEcho - * @static - * @param {tendermint.abci.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.RequestEcho.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestEcho - * @static - * @param {tendermint.abci.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.RequestEcho - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestEcho - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestEcho - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestEcho} RequestEcho - */ - RequestEcho.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestEcho) - return object; - var message = new $root.tendermint.abci.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.RequestEcho - * @static - * @param {tendermint.abci.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.RequestEcho - * @instance - * @returns {Object.} JSON object - */ - RequestEcho.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestEcho; - })(); - - abci.RequestFlush = (function() { - - /** - * Properties of a RequestFlush. - * @memberof tendermint.abci - * @interface IRequestFlush - */ - - /** - * Constructs a new RequestFlush. - * @memberof tendermint.abci - * @classdesc Represents a RequestFlush. - * @implements IRequestFlush - * @constructor - * @param {tendermint.abci.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]]; - } - - /** - * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.RequestFlush.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestFlush - * @static - * @param {tendermint.abci.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.RequestFlush.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestFlush - * @static - * @param {tendermint.abci.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.RequestFlush - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestFlush - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestFlush - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestFlush} RequestFlush - */ - RequestFlush.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestFlush) - return object; - return new $root.tendermint.abci.RequestFlush(); - }; - - /** - * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestFlush - * @static - * @param {tendermint.abci.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.RequestFlush - * @instance - * @returns {Object.} JSON object - */ - RequestFlush.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestFlush; - })(); - - abci.RequestInfo = (function() { - - /** - * Properties of a RequestInfo. - * @memberof tendermint.abci - * @interface IRequestInfo - * @property {string|null} [version] RequestInfo version - * @property {Long|null} [block_version] RequestInfo block_version - * @property {Long|null} [p2p_version] RequestInfo p2p_version - */ - - /** - * Constructs a new RequestInfo. - * @memberof tendermint.abci - * @classdesc Represents a RequestInfo. - * @implements IRequestInfo - * @constructor - * @param {tendermint.abci.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.RequestInfo - * @instance - */ - RequestInfo.prototype.version = ""; - - /** - * RequestInfo block_version. - * @member {Long} block_version - * @memberof tendermint.abci.RequestInfo - * @instance - */ - RequestInfo.prototype.block_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RequestInfo p2p_version. - * @member {Long} p2p_version - * @memberof tendermint.abci.RequestInfo - * @instance - */ - RequestInfo.prototype.p2p_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestInfo - * @static - * @param {tendermint.abci.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.block_version != null && Object.hasOwnProperty.call(message, "block_version")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.block_version); - if (message.p2p_version != null && Object.hasOwnProperty.call(message, "p2p_version")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.p2p_version); - return writer; - }; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.RequestInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestInfo - * @static - * @param {tendermint.abci.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.RequestInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.RequestInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = reader.string(); - break; - case 2: - message.block_version = reader.uint64(); - break; - case 3: - message.p2p_version = 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.RequestInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.block_version != null && message.hasOwnProperty("block_version")) - if (!$util.isInteger(message.block_version) && !(message.block_version && $util.isInteger(message.block_version.low) && $util.isInteger(message.block_version.high))) - return "block_version: integer|Long expected"; - if (message.p2p_version != null && message.hasOwnProperty("p2p_version")) - if (!$util.isInteger(message.p2p_version) && !(message.p2p_version && $util.isInteger(message.p2p_version.low) && $util.isInteger(message.p2p_version.high))) - return "p2p_version: 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.RequestInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestInfo} RequestInfo - */ - RequestInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestInfo) - return object; - var message = new $root.tendermint.abci.RequestInfo(); - if (object.version != null) - message.version = String(object.version); - if (object.block_version != null) - if ($util.Long) - (message.block_version = $util.Long.fromValue(object.block_version)).unsigned = true; - else if (typeof object.block_version === "string") - message.block_version = parseInt(object.block_version, 10); - else if (typeof object.block_version === "number") - message.block_version = object.block_version; - else if (typeof object.block_version === "object") - message.block_version = new $util.LongBits(object.block_version.low >>> 0, object.block_version.high >>> 0).toNumber(true); - if (object.p2p_version != null) - if ($util.Long) - (message.p2p_version = $util.Long.fromValue(object.p2p_version)).unsigned = true; - else if (typeof object.p2p_version === "string") - message.p2p_version = parseInt(object.p2p_version, 10); - else if (typeof object.p2p_version === "number") - message.p2p_version = object.p2p_version; - else if (typeof object.p2p_version === "object") - message.p2p_version = new $util.LongBits(object.p2p_version.low >>> 0, object.p2p_version.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.RequestInfo - * @static - * @param {tendermint.abci.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.block_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_version = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.p2p_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.p2p_version = options.longs === String ? "0" : 0; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.block_version != null && message.hasOwnProperty("block_version")) - if (typeof message.block_version === "number") - object.block_version = options.longs === String ? String(message.block_version) : message.block_version; - else - object.block_version = options.longs === String ? $util.Long.prototype.toString.call(message.block_version) : options.longs === Number ? new $util.LongBits(message.block_version.low >>> 0, message.block_version.high >>> 0).toNumber(true) : message.block_version; - if (message.p2p_version != null && message.hasOwnProperty("p2p_version")) - if (typeof message.p2p_version === "number") - object.p2p_version = options.longs === String ? String(message.p2p_version) : message.p2p_version; - else - object.p2p_version = options.longs === String ? $util.Long.prototype.toString.call(message.p2p_version) : options.longs === Number ? new $util.LongBits(message.p2p_version.low >>> 0, message.p2p_version.high >>> 0).toNumber(true) : message.p2p_version; - return object; - }; - - /** - * Converts this RequestInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestInfo - * @instance - * @returns {Object.} JSON object - */ - RequestInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestInfo; - })(); - - abci.RequestSetOption = (function() { - - /** - * Properties of a RequestSetOption. - * @memberof tendermint.abci - * @interface IRequestSetOption - * @property {string|null} [key] RequestSetOption key - * @property {string|null} [value] RequestSetOption value - */ - - /** - * Constructs a new RequestSetOption. - * @memberof tendermint.abci - * @classdesc Represents a RequestSetOption. - * @implements IRequestSetOption - * @constructor - * @param {tendermint.abci.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.RequestSetOption - * @instance - */ - RequestSetOption.prototype.key = ""; - - /** - * RequestSetOption value. - * @member {string} value - * @memberof tendermint.abci.RequestSetOption - * @instance - */ - RequestSetOption.prototype.value = ""; - - /** - * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.RequestSetOption.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestSetOption - * @static - * @param {tendermint.abci.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.RequestSetOption.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestSetOption - * @static - * @param {tendermint.abci.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.RequestSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestSetOption - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestSetOption} RequestSetOption - */ - RequestSetOption.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestSetOption) - return object; - var message = new $root.tendermint.abci.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.RequestSetOption - * @static - * @param {tendermint.abci.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.RequestSetOption - * @instance - * @returns {Object.} JSON object - */ - RequestSetOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestSetOption; - })(); - - abci.RequestInitChain = (function() { - - /** - * Properties of a RequestInitChain. - * @memberof tendermint.abci - * @interface IRequestInitChain - * @property {google.protobuf.ITimestamp|null} [time] RequestInitChain time - * @property {string|null} [chain_id] RequestInitChain chain_id - * @property {tendermint.abci.IConsensusParams|null} [consensus_params] RequestInitChain consensus_params - * @property {Array.|null} [validators] RequestInitChain validators - * @property {Uint8Array|null} [app_state_bytes] RequestInitChain app_state_bytes - * @property {Long|null} [initial_height] RequestInitChain initial_height - */ - - /** - * Constructs a new RequestInitChain. - * @memberof tendermint.abci - * @classdesc Represents a RequestInitChain. - * @implements IRequestInitChain - * @constructor - * @param {tendermint.abci.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.RequestInitChain - * @instance - */ - RequestInitChain.prototype.time = null; - - /** - * RequestInitChain chain_id. - * @member {string} chain_id - * @memberof tendermint.abci.RequestInitChain - * @instance - */ - RequestInitChain.prototype.chain_id = ""; - - /** - * RequestInitChain consensus_params. - * @member {tendermint.abci.IConsensusParams|null|undefined} consensus_params - * @memberof tendermint.abci.RequestInitChain - * @instance - */ - RequestInitChain.prototype.consensus_params = null; - - /** - * RequestInitChain validators. - * @member {Array.} validators - * @memberof tendermint.abci.RequestInitChain - * @instance - */ - RequestInitChain.prototype.validators = $util.emptyArray; - - /** - * RequestInitChain app_state_bytes. - * @member {Uint8Array} app_state_bytes - * @memberof tendermint.abci.RequestInitChain - * @instance - */ - RequestInitChain.prototype.app_state_bytes = $util.newBuffer([]); - - /** - * RequestInitChain initial_height. - * @member {Long} initial_height - * @memberof tendermint.abci.RequestInitChain - * @instance - */ - RequestInitChain.prototype.initial_height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestInitChain - * @static - * @param {tendermint.abci.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.chain_id != null && Object.hasOwnProperty.call(message, "chain_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.chain_id); - if (message.consensus_params != null && Object.hasOwnProperty.call(message, "consensus_params")) - $root.tendermint.abci.ConsensusParams.encode(message.consensus_params, 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.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.app_state_bytes != null && Object.hasOwnProperty.call(message, "app_state_bytes")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.app_state_bytes); - if (message.initial_height != null && Object.hasOwnProperty.call(message, "initial_height")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.initial_height); - return writer; - }; - - /** - * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.RequestInitChain.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestInitChain - * @static - * @param {tendermint.abci.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.RequestInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.chain_id = reader.string(); - break; - case 3: - message.consensus_params = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 5: - message.app_state_bytes = reader.bytes(); - break; - case 6: - message.initial_height = reader.int64(); - 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.RequestInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.chain_id != null && message.hasOwnProperty("chain_id")) - if (!$util.isString(message.chain_id)) - return "chain_id: string expected"; - if (message.consensus_params != null && message.hasOwnProperty("consensus_params")) { - var error = $root.tendermint.abci.ConsensusParams.verify(message.consensus_params); - if (error) - return "consensus_params." + 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.ValidatorUpdate.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - if (message.app_state_bytes != null && message.hasOwnProperty("app_state_bytes")) - if (!(message.app_state_bytes && typeof message.app_state_bytes.length === "number" || $util.isString(message.app_state_bytes))) - return "app_state_bytes: buffer expected"; - if (message.initial_height != null && message.hasOwnProperty("initial_height")) - if (!$util.isInteger(message.initial_height) && !(message.initial_height && $util.isInteger(message.initial_height.low) && $util.isInteger(message.initial_height.high))) - return "initial_height: integer|Long expected"; - return null; - }; - - /** - * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.RequestInitChain - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestInitChain} RequestInitChain - */ - RequestInitChain.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestInitChain) - return object; - var message = new $root.tendermint.abci.RequestInitChain(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".tendermint.abci.RequestInitChain.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.chain_id != null) - message.chain_id = String(object.chain_id); - if (object.consensus_params != null) { - if (typeof object.consensus_params !== "object") - throw TypeError(".tendermint.abci.RequestInitChain.consensus_params: object expected"); - message.consensus_params = $root.tendermint.abci.ConsensusParams.fromObject(object.consensus_params); - } - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.abci.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.RequestInitChain.validators: object expected"); - message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); - } - } - if (object.app_state_bytes != null) - if (typeof object.app_state_bytes === "string") - $util.base64.decode(object.app_state_bytes, message.app_state_bytes = $util.newBuffer($util.base64.length(object.app_state_bytes)), 0); - else if (object.app_state_bytes.length) - message.app_state_bytes = object.app_state_bytes; - if (object.initial_height != null) - if ($util.Long) - (message.initial_height = $util.Long.fromValue(object.initial_height)).unsigned = false; - else if (typeof object.initial_height === "string") - message.initial_height = parseInt(object.initial_height, 10); - else if (typeof object.initial_height === "number") - message.initial_height = object.initial_height; - else if (typeof object.initial_height === "object") - message.initial_height = new $util.LongBits(object.initial_height.low >>> 0, object.initial_height.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestInitChain - * @static - * @param {tendermint.abci.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.chain_id = ""; - object.consensus_params = null; - if (options.bytes === String) - object.app_state_bytes = ""; - else { - object.app_state_bytes = []; - if (options.bytes !== Array) - object.app_state_bytes = $util.newBuffer(object.app_state_bytes); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.initial_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.initial_height = options.longs === String ? "0" : 0; - } - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - object.chain_id = message.chain_id; - if (message.consensus_params != null && message.hasOwnProperty("consensus_params")) - object.consensus_params = $root.tendermint.abci.ConsensusParams.toObject(message.consensus_params, options); - if (message.validators && message.validators.length) { - object.validators = []; - for (var j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); - } - if (message.app_state_bytes != null && message.hasOwnProperty("app_state_bytes")) - object.app_state_bytes = options.bytes === String ? $util.base64.encode(message.app_state_bytes, 0, message.app_state_bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_state_bytes) : message.app_state_bytes; - if (message.initial_height != null && message.hasOwnProperty("initial_height")) - if (typeof message.initial_height === "number") - object.initial_height = options.longs === String ? String(message.initial_height) : message.initial_height; - else - object.initial_height = options.longs === String ? $util.Long.prototype.toString.call(message.initial_height) : options.longs === Number ? new $util.LongBits(message.initial_height.low >>> 0, message.initial_height.high >>> 0).toNumber() : message.initial_height; - return object; - }; - - /** - * Converts this RequestInitChain to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestInitChain - * @instance - * @returns {Object.} JSON object - */ - RequestInitChain.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestInitChain; - })(); - - abci.RequestQuery = (function() { - - /** - * Properties of a RequestQuery. - * @memberof tendermint.abci - * @interface IRequestQuery - * @property {Uint8Array|null} [data] RequestQuery data - * @property {string|null} [path] RequestQuery path - * @property {Long|null} [height] RequestQuery height - * @property {boolean|null} [prove] RequestQuery prove - */ - - /** - * Constructs a new RequestQuery. - * @memberof tendermint.abci - * @classdesc Represents a RequestQuery. - * @implements IRequestQuery - * @constructor - * @param {tendermint.abci.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.RequestQuery - * @instance - */ - RequestQuery.prototype.data = $util.newBuffer([]); - - /** - * RequestQuery path. - * @member {string} path - * @memberof tendermint.abci.RequestQuery - * @instance - */ - RequestQuery.prototype.path = ""; - - /** - * RequestQuery height. - * @member {Long} height - * @memberof tendermint.abci.RequestQuery - * @instance - */ - RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RequestQuery prove. - * @member {boolean} prove - * @memberof tendermint.abci.RequestQuery - * @instance - */ - RequestQuery.prototype.prove = false; - - /** - * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.RequestQuery.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestQuery - * @static - * @param {tendermint.abci.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.RequestQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestQuery - * @static - * @param {tendermint.abci.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.RequestQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestQuery - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestQuery} RequestQuery - */ - RequestQuery.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestQuery) - return object; - var message = new $root.tendermint.abci.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.RequestQuery - * @static - * @param {tendermint.abci.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.RequestQuery - * @instance - * @returns {Object.} JSON object - */ - RequestQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestQuery; - })(); - - abci.RequestBeginBlock = (function() { - - /** - * Properties of a RequestBeginBlock. - * @memberof tendermint.abci - * @interface IRequestBeginBlock - * @property {Uint8Array|null} [hash] RequestBeginBlock hash - * @property {tendermint.types.IHeader|null} [header] RequestBeginBlock header - * @property {tendermint.abci.ILastCommitInfo|null} [last_commit_info] RequestBeginBlock last_commit_info - * @property {Array.|null} [byzantine_validators] RequestBeginBlock byzantine_validators - */ - - /** - * Constructs a new RequestBeginBlock. - * @memberof tendermint.abci - * @classdesc Represents a RequestBeginBlock. - * @implements IRequestBeginBlock - * @constructor - * @param {tendermint.abci.IRequestBeginBlock=} [properties] Properties to set - */ - function RequestBeginBlock(properties) { - this.byzantine_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]]; - } - - /** - * RequestBeginBlock hash. - * @member {Uint8Array} hash - * @memberof tendermint.abci.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.hash = $util.newBuffer([]); - - /** - * RequestBeginBlock header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.abci.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.header = null; - - /** - * RequestBeginBlock last_commit_info. - * @member {tendermint.abci.ILastCommitInfo|null|undefined} last_commit_info - * @memberof tendermint.abci.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.last_commit_info = null; - - /** - * RequestBeginBlock byzantine_validators. - * @member {Array.} byzantine_validators - * @memberof tendermint.abci.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.byzantine_validators = $util.emptyArray; - - /** - * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.RequestBeginBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestBeginBlock - * @static - * @param {tendermint.abci.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.types.Header.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.last_commit_info != null && Object.hasOwnProperty.call(message, "last_commit_info")) - $root.tendermint.abci.LastCommitInfo.encode(message.last_commit_info, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.byzantine_validators != null && message.byzantine_validators.length) - for (var i = 0; i < message.byzantine_validators.length; ++i) - $root.tendermint.abci.Evidence.encode(message.byzantine_validators[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.RequestBeginBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestBeginBlock - * @static - * @param {tendermint.abci.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.RequestBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.types.Header.decode(reader, reader.uint32()); - break; - case 3: - message.last_commit_info = $root.tendermint.abci.LastCommitInfo.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.byzantine_validators && message.byzantine_validators.length)) - message.byzantine_validators = []; - message.byzantine_validators.push($root.tendermint.abci.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.RequestBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.last_commit_info != null && message.hasOwnProperty("last_commit_info")) { - var error = $root.tendermint.abci.LastCommitInfo.verify(message.last_commit_info); - if (error) - return "last_commit_info." + error; - } - if (message.byzantine_validators != null && message.hasOwnProperty("byzantine_validators")) { - if (!Array.isArray(message.byzantine_validators)) - return "byzantine_validators: array expected"; - for (var i = 0; i < message.byzantine_validators.length; ++i) { - var error = $root.tendermint.abci.Evidence.verify(message.byzantine_validators[i]); - if (error) - return "byzantine_validators." + error; - } - } - return null; - }; - - /** - * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.RequestBeginBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestBeginBlock} RequestBeginBlock - */ - RequestBeginBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestBeginBlock) - return object; - var message = new $root.tendermint.abci.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.RequestBeginBlock.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.last_commit_info != null) { - if (typeof object.last_commit_info !== "object") - throw TypeError(".tendermint.abci.RequestBeginBlock.last_commit_info: object expected"); - message.last_commit_info = $root.tendermint.abci.LastCommitInfo.fromObject(object.last_commit_info); - } - if (object.byzantine_validators) { - if (!Array.isArray(object.byzantine_validators)) - throw TypeError(".tendermint.abci.RequestBeginBlock.byzantine_validators: array expected"); - message.byzantine_validators = []; - for (var i = 0; i < object.byzantine_validators.length; ++i) { - if (typeof object.byzantine_validators[i] !== "object") - throw TypeError(".tendermint.abci.RequestBeginBlock.byzantine_validators: object expected"); - message.byzantine_validators[i] = $root.tendermint.abci.Evidence.fromObject(object.byzantine_validators[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestBeginBlock - * @static - * @param {tendermint.abci.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.byzantine_validators = []; - 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.last_commit_info = 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.types.Header.toObject(message.header, options); - if (message.last_commit_info != null && message.hasOwnProperty("last_commit_info")) - object.last_commit_info = $root.tendermint.abci.LastCommitInfo.toObject(message.last_commit_info, options); - if (message.byzantine_validators && message.byzantine_validators.length) { - object.byzantine_validators = []; - for (var j = 0; j < message.byzantine_validators.length; ++j) - object.byzantine_validators[j] = $root.tendermint.abci.Evidence.toObject(message.byzantine_validators[j], options); - } - return object; - }; - - /** - * Converts this RequestBeginBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.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.CheckTxType - * @enum {number} - * @property {number} NEW=0 NEW value - * @property {number} RECHECK=1 RECHECK value - */ - abci.CheckTxType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NEW"] = 0; - values[valuesById[1] = "RECHECK"] = 1; - return values; - })(); - - abci.RequestCheckTx = (function() { - - /** - * Properties of a RequestCheckTx. - * @memberof tendermint.abci - * @interface IRequestCheckTx - * @property {Uint8Array|null} [tx] RequestCheckTx tx - * @property {tendermint.abci.CheckTxType|null} [type] RequestCheckTx type - */ - - /** - * Constructs a new RequestCheckTx. - * @memberof tendermint.abci - * @classdesc Represents a RequestCheckTx. - * @implements IRequestCheckTx - * @constructor - * @param {tendermint.abci.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.RequestCheckTx - * @instance - */ - RequestCheckTx.prototype.tx = $util.newBuffer([]); - - /** - * RequestCheckTx type. - * @member {tendermint.abci.CheckTxType} type - * @memberof tendermint.abci.RequestCheckTx - * @instance - */ - RequestCheckTx.prototype.type = 0; - - /** - * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.RequestCheckTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestCheckTx - * @static - * @param {tendermint.abci.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.RequestCheckTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestCheckTx - * @static - * @param {tendermint.abci.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.RequestCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestCheckTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestCheckTx} RequestCheckTx - */ - RequestCheckTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestCheckTx) - return object; - var message = new $root.tendermint.abci.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.RequestCheckTx - * @static - * @param {tendermint.abci.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.CheckTxType[message.type] : message.type; - return object; - }; - - /** - * Converts this RequestCheckTx to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestCheckTx - * @instance - * @returns {Object.} JSON object - */ - RequestCheckTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestCheckTx; - })(); - - abci.RequestDeliverTx = (function() { - - /** - * Properties of a RequestDeliverTx. - * @memberof tendermint.abci - * @interface IRequestDeliverTx - * @property {Uint8Array|null} [tx] RequestDeliverTx tx - */ - - /** - * Constructs a new RequestDeliverTx. - * @memberof tendermint.abci - * @classdesc Represents a RequestDeliverTx. - * @implements IRequestDeliverTx - * @constructor - * @param {tendermint.abci.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.RequestDeliverTx - * @instance - */ - RequestDeliverTx.prototype.tx = $util.newBuffer([]); - - /** - * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.RequestDeliverTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestDeliverTx - * @static - * @param {tendermint.abci.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.RequestDeliverTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestDeliverTx - * @static - * @param {tendermint.abci.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.RequestDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestDeliverTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestDeliverTx} RequestDeliverTx - */ - RequestDeliverTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestDeliverTx) - return object; - var message = new $root.tendermint.abci.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.RequestDeliverTx - * @static - * @param {tendermint.abci.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.RequestDeliverTx - * @instance - * @returns {Object.} JSON object - */ - RequestDeliverTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestDeliverTx; - })(); - - abci.RequestEndBlock = (function() { - - /** - * Properties of a RequestEndBlock. - * @memberof tendermint.abci - * @interface IRequestEndBlock - * @property {Long|null} [height] RequestEndBlock height - */ - - /** - * Constructs a new RequestEndBlock. - * @memberof tendermint.abci - * @classdesc Represents a RequestEndBlock. - * @implements IRequestEndBlock - * @constructor - * @param {tendermint.abci.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 {Long} height - * @memberof tendermint.abci.RequestEndBlock - * @instance - */ - RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.RequestEndBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestEndBlock - * @static - * @param {tendermint.abci.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.RequestEndBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestEndBlock - * @static - * @param {tendermint.abci.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.RequestEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestEndBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestEndBlock} RequestEndBlock - */ - RequestEndBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestEndBlock) - return object; - var message = new $root.tendermint.abci.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.RequestEndBlock - * @static - * @param {tendermint.abci.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.RequestEndBlock - * @instance - * @returns {Object.} JSON object - */ - RequestEndBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestEndBlock; - })(); - - abci.RequestCommit = (function() { - - /** - * Properties of a RequestCommit. - * @memberof tendermint.abci - * @interface IRequestCommit - */ - - /** - * Constructs a new RequestCommit. - * @memberof tendermint.abci - * @classdesc Represents a RequestCommit. - * @implements IRequestCommit - * @constructor - * @param {tendermint.abci.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]]; - } - - /** - * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.RequestCommit.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestCommit - * @static - * @param {tendermint.abci.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.RequestCommit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestCommit - * @static - * @param {tendermint.abci.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.RequestCommit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.RequestCommit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.RequestCommit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestCommit} RequestCommit - */ - RequestCommit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestCommit) - return object; - return new $root.tendermint.abci.RequestCommit(); - }; - - /** - * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestCommit - * @static - * @param {tendermint.abci.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.RequestCommit - * @instance - * @returns {Object.} JSON object - */ - RequestCommit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestCommit; - })(); - - abci.RequestListSnapshots = (function() { - - /** - * Properties of a RequestListSnapshots. - * @memberof tendermint.abci - * @interface IRequestListSnapshots - */ - - /** - * Constructs a new RequestListSnapshots. - * @memberof tendermint.abci - * @classdesc Represents a RequestListSnapshots. - * @implements IRequestListSnapshots - * @constructor - * @param {tendermint.abci.IRequestListSnapshots=} [properties] Properties to set - */ - function RequestListSnapshots(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified RequestListSnapshots message. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestListSnapshots.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RequestListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {tendermint.abci.IRequestListSnapshots} message RequestListSnapshots message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestListSnapshots message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestListSnapshots.decode = 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.RequestListSnapshots(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RequestListSnapshots message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestListSnapshots.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestListSnapshots message. - * @function verify - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestListSnapshots.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RequestListSnapshots message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestListSnapshots} RequestListSnapshots - */ - RequestListSnapshots.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestListSnapshots) - return object; - return new $root.tendermint.abci.RequestListSnapshots(); - }; - - /** - * Creates a plain object from a RequestListSnapshots message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestListSnapshots - * @static - * @param {tendermint.abci.RequestListSnapshots} message RequestListSnapshots - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestListSnapshots.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RequestListSnapshots to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestListSnapshots - * @instance - * @returns {Object.} JSON object - */ - RequestListSnapshots.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestListSnapshots; - })(); - - abci.RequestOfferSnapshot = (function() { - - /** - * Properties of a RequestOfferSnapshot. - * @memberof tendermint.abci - * @interface IRequestOfferSnapshot - * @property {tendermint.abci.ISnapshot|null} [snapshot] RequestOfferSnapshot snapshot - * @property {Uint8Array|null} [app_hash] RequestOfferSnapshot app_hash - */ - - /** - * Constructs a new RequestOfferSnapshot. - * @memberof tendermint.abci - * @classdesc Represents a RequestOfferSnapshot. - * @implements IRequestOfferSnapshot - * @constructor - * @param {tendermint.abci.IRequestOfferSnapshot=} [properties] Properties to set - */ - function RequestOfferSnapshot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RequestOfferSnapshot snapshot. - * @member {tendermint.abci.ISnapshot|null|undefined} snapshot - * @memberof tendermint.abci.RequestOfferSnapshot - * @instance - */ - RequestOfferSnapshot.prototype.snapshot = null; - - /** - * RequestOfferSnapshot app_hash. - * @member {Uint8Array} app_hash - * @memberof tendermint.abci.RequestOfferSnapshot - * @instance - */ - RequestOfferSnapshot.prototype.app_hash = $util.newBuffer([]); - - /** - * Encodes the specified RequestOfferSnapshot message. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestOfferSnapshot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - $root.tendermint.abci.Snapshot.encode(message.snapshot, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.app_hash != null && Object.hasOwnProperty.call(message, "app_hash")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.app_hash); - return writer; - }; - - /** - * Encodes the specified RequestOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {tendermint.abci.IRequestOfferSnapshot} message RequestOfferSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestOfferSnapshot message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestOfferSnapshot.decode = 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.RequestOfferSnapshot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.snapshot = $root.tendermint.abci.Snapshot.decode(reader, reader.uint32()); - break; - case 2: - message.app_hash = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RequestOfferSnapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestOfferSnapshot message. - * @function verify - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestOfferSnapshot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.snapshot != null && message.hasOwnProperty("snapshot")) { - var error = $root.tendermint.abci.Snapshot.verify(message.snapshot); - if (error) - return "snapshot." + error; - } - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - if (!(message.app_hash && typeof message.app_hash.length === "number" || $util.isString(message.app_hash))) - return "app_hash: buffer expected"; - return null; - }; - - /** - * Creates a RequestOfferSnapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestOfferSnapshot} RequestOfferSnapshot - */ - RequestOfferSnapshot.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestOfferSnapshot) - return object; - var message = new $root.tendermint.abci.RequestOfferSnapshot(); - if (object.snapshot != null) { - if (typeof object.snapshot !== "object") - throw TypeError(".tendermint.abci.RequestOfferSnapshot.snapshot: object expected"); - message.snapshot = $root.tendermint.abci.Snapshot.fromObject(object.snapshot); - } - if (object.app_hash != null) - if (typeof object.app_hash === "string") - $util.base64.decode(object.app_hash, message.app_hash = $util.newBuffer($util.base64.length(object.app_hash)), 0); - else if (object.app_hash.length) - message.app_hash = object.app_hash; - return message; - }; - - /** - * Creates a plain object from a RequestOfferSnapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestOfferSnapshot - * @static - * @param {tendermint.abci.RequestOfferSnapshot} message RequestOfferSnapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestOfferSnapshot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.snapshot = null; - if (options.bytes === String) - object.app_hash = ""; - else { - object.app_hash = []; - if (options.bytes !== Array) - object.app_hash = $util.newBuffer(object.app_hash); - } - } - if (message.snapshot != null && message.hasOwnProperty("snapshot")) - object.snapshot = $root.tendermint.abci.Snapshot.toObject(message.snapshot, options); - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - object.app_hash = options.bytes === String ? $util.base64.encode(message.app_hash, 0, message.app_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_hash) : message.app_hash; - return object; - }; - - /** - * Converts this RequestOfferSnapshot to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestOfferSnapshot - * @instance - * @returns {Object.} JSON object - */ - RequestOfferSnapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestOfferSnapshot; - })(); - - abci.RequestLoadSnapshotChunk = (function() { - - /** - * Properties of a RequestLoadSnapshotChunk. - * @memberof tendermint.abci - * @interface IRequestLoadSnapshotChunk - * @property {Long|null} [height] RequestLoadSnapshotChunk height - * @property {number|null} [format] RequestLoadSnapshotChunk format - * @property {number|null} [chunk] RequestLoadSnapshotChunk chunk - */ - - /** - * Constructs a new RequestLoadSnapshotChunk. - * @memberof tendermint.abci - * @classdesc Represents a RequestLoadSnapshotChunk. - * @implements IRequestLoadSnapshotChunk - * @constructor - * @param {tendermint.abci.IRequestLoadSnapshotChunk=} [properties] Properties to set - */ - function RequestLoadSnapshotChunk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RequestLoadSnapshotChunk height. - * @member {Long} height - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @instance - */ - RequestLoadSnapshotChunk.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RequestLoadSnapshotChunk format. - * @member {number} format - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @instance - */ - RequestLoadSnapshotChunk.prototype.format = 0; - - /** - * RequestLoadSnapshotChunk chunk. - * @member {number} chunk - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @instance - */ - RequestLoadSnapshotChunk.prototype.chunk = 0; - - /** - * Encodes the specified RequestLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestLoadSnapshotChunk.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).uint64(message.height); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); - if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunk); - return writer; - }; - - /** - * Encodes the specified RequestLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {tendermint.abci.IRequestLoadSnapshotChunk} message RequestLoadSnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestLoadSnapshotChunk.decode = 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.RequestLoadSnapshotChunk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.uint64(); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunk = reader.uint32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestLoadSnapshotChunk message. - * @function verify - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestLoadSnapshotChunk.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.format != null && message.hasOwnProperty("format")) - if (!$util.isInteger(message.format)) - return "format: integer expected"; - if (message.chunk != null && message.hasOwnProperty("chunk")) - if (!$util.isInteger(message.chunk)) - return "chunk: integer expected"; - return null; - }; - - /** - * Creates a RequestLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestLoadSnapshotChunk} RequestLoadSnapshotChunk - */ - RequestLoadSnapshotChunk.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestLoadSnapshotChunk) - return object; - var message = new $root.tendermint.abci.RequestLoadSnapshotChunk(); - 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); - if (object.format != null) - message.format = object.format >>> 0; - if (object.chunk != null) - message.chunk = object.chunk >>> 0; - return message; - }; - - /** - * Creates a plain object from a RequestLoadSnapshotChunk message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @static - * @param {tendermint.abci.RequestLoadSnapshotChunk} message RequestLoadSnapshotChunk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestLoadSnapshotChunk.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.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.format = 0; - object.chunk = 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(true) : message.height; - if (message.format != null && message.hasOwnProperty("format")) - object.format = message.format; - if (message.chunk != null && message.hasOwnProperty("chunk")) - object.chunk = message.chunk; - return object; - }; - - /** - * Converts this RequestLoadSnapshotChunk to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestLoadSnapshotChunk - * @instance - * @returns {Object.} JSON object - */ - RequestLoadSnapshotChunk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestLoadSnapshotChunk; - })(); - - abci.RequestApplySnapshotChunk = (function() { - - /** - * Properties of a RequestApplySnapshotChunk. - * @memberof tendermint.abci - * @interface IRequestApplySnapshotChunk - * @property {number|null} [index] RequestApplySnapshotChunk index - * @property {Uint8Array|null} [chunk] RequestApplySnapshotChunk chunk - * @property {string|null} [sender] RequestApplySnapshotChunk sender - */ - - /** - * Constructs a new RequestApplySnapshotChunk. - * @memberof tendermint.abci - * @classdesc Represents a RequestApplySnapshotChunk. - * @implements IRequestApplySnapshotChunk - * @constructor - * @param {tendermint.abci.IRequestApplySnapshotChunk=} [properties] Properties to set - */ - function RequestApplySnapshotChunk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RequestApplySnapshotChunk index. - * @member {number} index - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @instance - */ - RequestApplySnapshotChunk.prototype.index = 0; - - /** - * RequestApplySnapshotChunk chunk. - * @member {Uint8Array} chunk - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @instance - */ - RequestApplySnapshotChunk.prototype.chunk = $util.newBuffer([]); - - /** - * RequestApplySnapshotChunk sender. - * @member {string} sender - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @instance - */ - RequestApplySnapshotChunk.prototype.sender = ""; - - /** - * Encodes the specified RequestApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestApplySnapshotChunk.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).uint32(message.index); - if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.chunk); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sender); - return writer; - }; - - /** - * Encodes the specified RequestApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {tendermint.abci.IRequestApplySnapshotChunk} message RequestApplySnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestApplySnapshotChunk.decode = 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.RequestApplySnapshotChunk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.chunk = reader.bytes(); - break; - case 3: - message.sender = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestApplySnapshotChunk message. - * @function verify - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestApplySnapshotChunk.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)) - return "index: integer expected"; - if (message.chunk != null && message.hasOwnProperty("chunk")) - if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) - return "chunk: buffer expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - return null; - }; - - /** - * Creates a RequestApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.RequestApplySnapshotChunk} RequestApplySnapshotChunk - */ - RequestApplySnapshotChunk.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.RequestApplySnapshotChunk) - return object; - var message = new $root.tendermint.abci.RequestApplySnapshotChunk(); - if (object.index != null) - message.index = object.index >>> 0; - if (object.chunk != null) - if (typeof object.chunk === "string") - $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); - else if (object.chunk.length) - message.chunk = object.chunk; - if (object.sender != null) - message.sender = String(object.sender); - return message; - }; - - /** - * Creates a plain object from a RequestApplySnapshotChunk message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @static - * @param {tendermint.abci.RequestApplySnapshotChunk} message RequestApplySnapshotChunk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestApplySnapshotChunk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.index = 0; - if (options.bytes === String) - object.chunk = ""; - else { - object.chunk = []; - if (options.bytes !== Array) - object.chunk = $util.newBuffer(object.chunk); - } - object.sender = ""; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.chunk != null && message.hasOwnProperty("chunk")) - object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - return object; - }; - - /** - * Converts this RequestApplySnapshotChunk to JSON. - * @function toJSON - * @memberof tendermint.abci.RequestApplySnapshotChunk - * @instance - * @returns {Object.} JSON object - */ - RequestApplySnapshotChunk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return RequestApplySnapshotChunk; - })(); - - abci.Response = (function() { - - /** - * Properties of a Response. - * @memberof tendermint.abci - * @interface IResponse - * @property {tendermint.abci.IResponseException|null} [exception] Response exception - * @property {tendermint.abci.IResponseEcho|null} [echo] Response echo - * @property {tendermint.abci.IResponseFlush|null} [flush] Response flush - * @property {tendermint.abci.IResponseInfo|null} [info] Response info - * @property {tendermint.abci.IResponseSetOption|null} [set_option] Response set_option - * @property {tendermint.abci.IResponseInitChain|null} [init_chain] Response init_chain - * @property {tendermint.abci.IResponseQuery|null} [query] Response query - * @property {tendermint.abci.IResponseBeginBlock|null} [begin_block] Response begin_block - * @property {tendermint.abci.IResponseCheckTx|null} [check_tx] Response check_tx - * @property {tendermint.abci.IResponseDeliverTx|null} [deliver_tx] Response deliver_tx - * @property {tendermint.abci.IResponseEndBlock|null} [end_block] Response end_block - * @property {tendermint.abci.IResponseCommit|null} [commit] Response commit - * @property {tendermint.abci.IResponseListSnapshots|null} [list_snapshots] Response list_snapshots - * @property {tendermint.abci.IResponseOfferSnapshot|null} [offer_snapshot] Response offer_snapshot - * @property {tendermint.abci.IResponseLoadSnapshotChunk|null} [load_snapshot_chunk] Response load_snapshot_chunk - * @property {tendermint.abci.IResponseApplySnapshotChunk|null} [apply_snapshot_chunk] Response apply_snapshot_chunk - */ - - /** - * Constructs a new Response. - * @memberof tendermint.abci - * @classdesc Represents a Response. - * @implements IResponse - * @constructor - * @param {tendermint.abci.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.IResponseException|null|undefined} exception - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.exception = null; - - /** - * Response echo. - * @member {tendermint.abci.IResponseEcho|null|undefined} echo - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.echo = null; - - /** - * Response flush. - * @member {tendermint.abci.IResponseFlush|null|undefined} flush - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.flush = null; - - /** - * Response info. - * @member {tendermint.abci.IResponseInfo|null|undefined} info - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.info = null; - - /** - * Response set_option. - * @member {tendermint.abci.IResponseSetOption|null|undefined} set_option - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.set_option = null; - - /** - * Response init_chain. - * @member {tendermint.abci.IResponseInitChain|null|undefined} init_chain - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.init_chain = null; - - /** - * Response query. - * @member {tendermint.abci.IResponseQuery|null|undefined} query - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.query = null; - - /** - * Response begin_block. - * @member {tendermint.abci.IResponseBeginBlock|null|undefined} begin_block - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.begin_block = null; - - /** - * Response check_tx. - * @member {tendermint.abci.IResponseCheckTx|null|undefined} check_tx - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.check_tx = null; - - /** - * Response deliver_tx. - * @member {tendermint.abci.IResponseDeliverTx|null|undefined} deliver_tx - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.deliver_tx = null; - - /** - * Response end_block. - * @member {tendermint.abci.IResponseEndBlock|null|undefined} end_block - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.end_block = null; - - /** - * Response commit. - * @member {tendermint.abci.IResponseCommit|null|undefined} commit - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.commit = null; - - /** - * Response list_snapshots. - * @member {tendermint.abci.IResponseListSnapshots|null|undefined} list_snapshots - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.list_snapshots = null; - - /** - * Response offer_snapshot. - * @member {tendermint.abci.IResponseOfferSnapshot|null|undefined} offer_snapshot - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.offer_snapshot = null; - - /** - * Response load_snapshot_chunk. - * @member {tendermint.abci.IResponseLoadSnapshotChunk|null|undefined} load_snapshot_chunk - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.load_snapshot_chunk = null; - - /** - * Response apply_snapshot_chunk. - * @member {tendermint.abci.IResponseApplySnapshotChunk|null|undefined} apply_snapshot_chunk - * @memberof tendermint.abci.Response - * @instance - */ - Response.prototype.apply_snapshot_chunk = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Response value. - * @member {"exception"|"echo"|"flush"|"info"|"set_option"|"init_chain"|"query"|"begin_block"|"check_tx"|"deliver_tx"|"end_block"|"commit"|"list_snapshots"|"offer_snapshot"|"load_snapshot_chunk"|"apply_snapshot_chunk"|undefined} value - * @memberof tendermint.abci.Response - * @instance - */ - Object.defineProperty(Response.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["exception", "echo", "flush", "info", "set_option", "init_chain", "query", "begin_block", "check_tx", "deliver_tx", "end_block", "commit", "list_snapshots", "offer_snapshot", "load_snapshot_chunk", "apply_snapshot_chunk"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.Response - * @static - * @param {tendermint.abci.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.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.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.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.ResponseInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.set_option != null && Object.hasOwnProperty.call(message, "set_option")) - $root.tendermint.abci.ResponseSetOption.encode(message.set_option, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.init_chain != null && Object.hasOwnProperty.call(message, "init_chain")) - $root.tendermint.abci.ResponseInitChain.encode(message.init_chain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.tendermint.abci.ResponseQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.begin_block != null && Object.hasOwnProperty.call(message, "begin_block")) - $root.tendermint.abci.ResponseBeginBlock.encode(message.begin_block, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.check_tx != null && Object.hasOwnProperty.call(message, "check_tx")) - $root.tendermint.abci.ResponseCheckTx.encode(message.check_tx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.deliver_tx != null && Object.hasOwnProperty.call(message, "deliver_tx")) - $root.tendermint.abci.ResponseDeliverTx.encode(message.deliver_tx, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.end_block != null && Object.hasOwnProperty.call(message, "end_block")) - $root.tendermint.abci.ResponseEndBlock.encode(message.end_block, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.abci.ResponseCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.list_snapshots != null && Object.hasOwnProperty.call(message, "list_snapshots")) - $root.tendermint.abci.ResponseListSnapshots.encode(message.list_snapshots, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.offer_snapshot != null && Object.hasOwnProperty.call(message, "offer_snapshot")) - $root.tendermint.abci.ResponseOfferSnapshot.encode(message.offer_snapshot, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.load_snapshot_chunk != null && Object.hasOwnProperty.call(message, "load_snapshot_chunk")) - $root.tendermint.abci.ResponseLoadSnapshotChunk.encode(message.load_snapshot_chunk, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.apply_snapshot_chunk != null && Object.hasOwnProperty.call(message, "apply_snapshot_chunk")) - $root.tendermint.abci.ResponseApplySnapshotChunk.encode(message.apply_snapshot_chunk, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.Response.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.Response - * @static - * @param {tendermint.abci.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.Response - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.Response(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.exception = $root.tendermint.abci.ResponseException.decode(reader, reader.uint32()); - break; - case 2: - message.echo = $root.tendermint.abci.ResponseEcho.decode(reader, reader.uint32()); - break; - case 3: - message.flush = $root.tendermint.abci.ResponseFlush.decode(reader, reader.uint32()); - break; - case 4: - message.info = $root.tendermint.abci.ResponseInfo.decode(reader, reader.uint32()); - break; - case 5: - message.set_option = $root.tendermint.abci.ResponseSetOption.decode(reader, reader.uint32()); - break; - case 6: - message.init_chain = $root.tendermint.abci.ResponseInitChain.decode(reader, reader.uint32()); - break; - case 7: - message.query = $root.tendermint.abci.ResponseQuery.decode(reader, reader.uint32()); - break; - case 8: - message.begin_block = $root.tendermint.abci.ResponseBeginBlock.decode(reader, reader.uint32()); - break; - case 9: - message.check_tx = $root.tendermint.abci.ResponseCheckTx.decode(reader, reader.uint32()); - break; - case 10: - message.deliver_tx = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); - break; - case 11: - message.end_block = $root.tendermint.abci.ResponseEndBlock.decode(reader, reader.uint32()); - break; - case 12: - message.commit = $root.tendermint.abci.ResponseCommit.decode(reader, reader.uint32()); - break; - case 13: - message.list_snapshots = $root.tendermint.abci.ResponseListSnapshots.decode(reader, reader.uint32()); - break; - case 14: - message.offer_snapshot = $root.tendermint.abci.ResponseOfferSnapshot.decode(reader, reader.uint32()); - break; - case 15: - message.load_snapshot_chunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.decode(reader, reader.uint32()); - break; - case 16: - message.apply_snapshot_chunk = $root.tendermint.abci.ResponseApplySnapshotChunk.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.Response - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.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.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.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.ResponseInfo.verify(message.info); - if (error) - return "info." + error; - } - } - if (message.set_option != null && message.hasOwnProperty("set_option")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseSetOption.verify(message.set_option); - if (error) - return "set_option." + error; - } - } - if (message.init_chain != null && message.hasOwnProperty("init_chain")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseInitChain.verify(message.init_chain); - if (error) - return "init_chain." + error; - } - } - if (message.query != null && message.hasOwnProperty("query")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseQuery.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.begin_block != null && message.hasOwnProperty("begin_block")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseBeginBlock.verify(message.begin_block); - if (error) - return "begin_block." + error; - } - } - if (message.check_tx != null && message.hasOwnProperty("check_tx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseCheckTx.verify(message.check_tx); - if (error) - return "check_tx." + error; - } - } - if (message.deliver_tx != null && message.hasOwnProperty("deliver_tx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.deliver_tx); - if (error) - return "deliver_tx." + error; - } - } - if (message.end_block != null && message.hasOwnProperty("end_block")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseEndBlock.verify(message.end_block); - if (error) - return "end_block." + error; - } - } - if (message.commit != null && message.hasOwnProperty("commit")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseCommit.verify(message.commit); - if (error) - return "commit." + error; - } - } - if (message.list_snapshots != null && message.hasOwnProperty("list_snapshots")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseListSnapshots.verify(message.list_snapshots); - if (error) - return "list_snapshots." + error; - } - } - if (message.offer_snapshot != null && message.hasOwnProperty("offer_snapshot")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseOfferSnapshot.verify(message.offer_snapshot); - if (error) - return "offer_snapshot." + error; - } - } - if (message.load_snapshot_chunk != null && message.hasOwnProperty("load_snapshot_chunk")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseLoadSnapshotChunk.verify(message.load_snapshot_chunk); - if (error) - return "load_snapshot_chunk." + error; - } - } - if (message.apply_snapshot_chunk != null && message.hasOwnProperty("apply_snapshot_chunk")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.ResponseApplySnapshotChunk.verify(message.apply_snapshot_chunk); - if (error) - return "apply_snapshot_chunk." + error; - } - } - return null; - }; - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.Response - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.Response} Response - */ - Response.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.Response) - return object; - var message = new $root.tendermint.abci.Response(); - if (object.exception != null) { - if (typeof object.exception !== "object") - throw TypeError(".tendermint.abci.Response.exception: object expected"); - message.exception = $root.tendermint.abci.ResponseException.fromObject(object.exception); - } - if (object.echo != null) { - if (typeof object.echo !== "object") - throw TypeError(".tendermint.abci.Response.echo: object expected"); - message.echo = $root.tendermint.abci.ResponseEcho.fromObject(object.echo); - } - if (object.flush != null) { - if (typeof object.flush !== "object") - throw TypeError(".tendermint.abci.Response.flush: object expected"); - message.flush = $root.tendermint.abci.ResponseFlush.fromObject(object.flush); - } - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".tendermint.abci.Response.info: object expected"); - message.info = $root.tendermint.abci.ResponseInfo.fromObject(object.info); - } - if (object.set_option != null) { - if (typeof object.set_option !== "object") - throw TypeError(".tendermint.abci.Response.set_option: object expected"); - message.set_option = $root.tendermint.abci.ResponseSetOption.fromObject(object.set_option); - } - if (object.init_chain != null) { - if (typeof object.init_chain !== "object") - throw TypeError(".tendermint.abci.Response.init_chain: object expected"); - message.init_chain = $root.tendermint.abci.ResponseInitChain.fromObject(object.init_chain); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".tendermint.abci.Response.query: object expected"); - message.query = $root.tendermint.abci.ResponseQuery.fromObject(object.query); - } - if (object.begin_block != null) { - if (typeof object.begin_block !== "object") - throw TypeError(".tendermint.abci.Response.begin_block: object expected"); - message.begin_block = $root.tendermint.abci.ResponseBeginBlock.fromObject(object.begin_block); - } - if (object.check_tx != null) { - if (typeof object.check_tx !== "object") - throw TypeError(".tendermint.abci.Response.check_tx: object expected"); - message.check_tx = $root.tendermint.abci.ResponseCheckTx.fromObject(object.check_tx); - } - if (object.deliver_tx != null) { - if (typeof object.deliver_tx !== "object") - throw TypeError(".tendermint.abci.Response.deliver_tx: object expected"); - message.deliver_tx = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.deliver_tx); - } - if (object.end_block != null) { - if (typeof object.end_block !== "object") - throw TypeError(".tendermint.abci.Response.end_block: object expected"); - message.end_block = $root.tendermint.abci.ResponseEndBlock.fromObject(object.end_block); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.abci.Response.commit: object expected"); - message.commit = $root.tendermint.abci.ResponseCommit.fromObject(object.commit); - } - if (object.list_snapshots != null) { - if (typeof object.list_snapshots !== "object") - throw TypeError(".tendermint.abci.Response.list_snapshots: object expected"); - message.list_snapshots = $root.tendermint.abci.ResponseListSnapshots.fromObject(object.list_snapshots); - } - if (object.offer_snapshot != null) { - if (typeof object.offer_snapshot !== "object") - throw TypeError(".tendermint.abci.Response.offer_snapshot: object expected"); - message.offer_snapshot = $root.tendermint.abci.ResponseOfferSnapshot.fromObject(object.offer_snapshot); - } - if (object.load_snapshot_chunk != null) { - if (typeof object.load_snapshot_chunk !== "object") - throw TypeError(".tendermint.abci.Response.load_snapshot_chunk: object expected"); - message.load_snapshot_chunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.fromObject(object.load_snapshot_chunk); - } - if (object.apply_snapshot_chunk != null) { - if (typeof object.apply_snapshot_chunk !== "object") - throw TypeError(".tendermint.abci.Response.apply_snapshot_chunk: object expected"); - message.apply_snapshot_chunk = $root.tendermint.abci.ResponseApplySnapshotChunk.fromObject(object.apply_snapshot_chunk); - } - return message; - }; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.Response - * @static - * @param {tendermint.abci.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.ResponseException.toObject(message.exception, options); - if (options.oneofs) - object.value = "exception"; - } - if (message.echo != null && message.hasOwnProperty("echo")) { - object.echo = $root.tendermint.abci.ResponseEcho.toObject(message.echo, options); - if (options.oneofs) - object.value = "echo"; - } - if (message.flush != null && message.hasOwnProperty("flush")) { - object.flush = $root.tendermint.abci.ResponseFlush.toObject(message.flush, options); - if (options.oneofs) - object.value = "flush"; - } - if (message.info != null && message.hasOwnProperty("info")) { - object.info = $root.tendermint.abci.ResponseInfo.toObject(message.info, options); - if (options.oneofs) - object.value = "info"; - } - if (message.set_option != null && message.hasOwnProperty("set_option")) { - object.set_option = $root.tendermint.abci.ResponseSetOption.toObject(message.set_option, options); - if (options.oneofs) - object.value = "set_option"; - } - if (message.init_chain != null && message.hasOwnProperty("init_chain")) { - object.init_chain = $root.tendermint.abci.ResponseInitChain.toObject(message.init_chain, options); - if (options.oneofs) - object.value = "init_chain"; - } - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.tendermint.abci.ResponseQuery.toObject(message.query, options); - if (options.oneofs) - object.value = "query"; - } - if (message.begin_block != null && message.hasOwnProperty("begin_block")) { - object.begin_block = $root.tendermint.abci.ResponseBeginBlock.toObject(message.begin_block, options); - if (options.oneofs) - object.value = "begin_block"; - } - if (message.check_tx != null && message.hasOwnProperty("check_tx")) { - object.check_tx = $root.tendermint.abci.ResponseCheckTx.toObject(message.check_tx, options); - if (options.oneofs) - object.value = "check_tx"; - } - if (message.deliver_tx != null && message.hasOwnProperty("deliver_tx")) { - object.deliver_tx = $root.tendermint.abci.ResponseDeliverTx.toObject(message.deliver_tx, options); - if (options.oneofs) - object.value = "deliver_tx"; - } - if (message.end_block != null && message.hasOwnProperty("end_block")) { - object.end_block = $root.tendermint.abci.ResponseEndBlock.toObject(message.end_block, options); - if (options.oneofs) - object.value = "end_block"; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - object.commit = $root.tendermint.abci.ResponseCommit.toObject(message.commit, options); - if (options.oneofs) - object.value = "commit"; - } - if (message.list_snapshots != null && message.hasOwnProperty("list_snapshots")) { - object.list_snapshots = $root.tendermint.abci.ResponseListSnapshots.toObject(message.list_snapshots, options); - if (options.oneofs) - object.value = "list_snapshots"; - } - if (message.offer_snapshot != null && message.hasOwnProperty("offer_snapshot")) { - object.offer_snapshot = $root.tendermint.abci.ResponseOfferSnapshot.toObject(message.offer_snapshot, options); - if (options.oneofs) - object.value = "offer_snapshot"; - } - if (message.load_snapshot_chunk != null && message.hasOwnProperty("load_snapshot_chunk")) { - object.load_snapshot_chunk = $root.tendermint.abci.ResponseLoadSnapshotChunk.toObject(message.load_snapshot_chunk, options); - if (options.oneofs) - object.value = "load_snapshot_chunk"; - } - if (message.apply_snapshot_chunk != null && message.hasOwnProperty("apply_snapshot_chunk")) { - object.apply_snapshot_chunk = $root.tendermint.abci.ResponseApplySnapshotChunk.toObject(message.apply_snapshot_chunk, options); - if (options.oneofs) - object.value = "apply_snapshot_chunk"; - } - return object; - }; - - /** - * Converts this Response to JSON. - * @function toJSON - * @memberof tendermint.abci.Response - * @instance - * @returns {Object.} JSON object - */ - Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Response; - })(); - - abci.ResponseException = (function() { - - /** - * Properties of a ResponseException. - * @memberof tendermint.abci - * @interface IResponseException - * @property {string|null} [error] ResponseException error - */ - - /** - * Constructs a new ResponseException. - * @memberof tendermint.abci - * @classdesc Represents a ResponseException. - * @implements IResponseException - * @constructor - * @param {tendermint.abci.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.ResponseException - * @instance - */ - ResponseException.prototype.error = ""; - - /** - * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.ResponseException.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseException - * @static - * @param {tendermint.abci.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.ResponseException.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseException - * @static - * @param {tendermint.abci.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.ResponseException - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.ResponseException - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.ResponseException - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseException} ResponseException - */ - ResponseException.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseException) - return object; - var message = new $root.tendermint.abci.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.ResponseException - * @static - * @param {tendermint.abci.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.ResponseException - * @instance - * @returns {Object.} JSON object - */ - ResponseException.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseException; - })(); - - abci.ResponseEcho = (function() { - - /** - * Properties of a ResponseEcho. - * @memberof tendermint.abci - * @interface IResponseEcho - * @property {string|null} [message] ResponseEcho message - */ - - /** - * Constructs a new ResponseEcho. - * @memberof tendermint.abci - * @classdesc Represents a ResponseEcho. - * @implements IResponseEcho - * @constructor - * @param {tendermint.abci.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.ResponseEcho - * @instance - */ - ResponseEcho.prototype.message = ""; - - /** - * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.ResponseEcho.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseEcho - * @static - * @param {tendermint.abci.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.ResponseEcho.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseEcho - * @static - * @param {tendermint.abci.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.ResponseEcho - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.ResponseEcho - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.ResponseEcho - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseEcho} ResponseEcho - */ - ResponseEcho.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseEcho) - return object; - var message = new $root.tendermint.abci.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.ResponseEcho - * @static - * @param {tendermint.abci.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.ResponseEcho - * @instance - * @returns {Object.} JSON object - */ - ResponseEcho.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseEcho; - })(); - - abci.ResponseFlush = (function() { - - /** - * Properties of a ResponseFlush. - * @memberof tendermint.abci - * @interface IResponseFlush - */ - - /** - * Constructs a new ResponseFlush. - * @memberof tendermint.abci - * @classdesc Represents a ResponseFlush. - * @implements IResponseFlush - * @constructor - * @param {tendermint.abci.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]]; - } - - /** - * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.ResponseFlush.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseFlush - * @static - * @param {tendermint.abci.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.ResponseFlush.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseFlush - * @static - * @param {tendermint.abci.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.ResponseFlush - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.ResponseFlush - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.ResponseFlush - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseFlush} ResponseFlush - */ - ResponseFlush.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseFlush) - return object; - return new $root.tendermint.abci.ResponseFlush(); - }; - - /** - * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseFlush - * @static - * @param {tendermint.abci.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.ResponseFlush - * @instance - * @returns {Object.} JSON object - */ - ResponseFlush.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseFlush; - })(); - - abci.ResponseInfo = (function() { - - /** - * Properties of a ResponseInfo. - * @memberof tendermint.abci - * @interface IResponseInfo - * @property {string|null} [data] ResponseInfo data - * @property {string|null} [version] ResponseInfo version - * @property {Long|null} [app_version] ResponseInfo app_version - * @property {Long|null} [last_block_height] ResponseInfo last_block_height - * @property {Uint8Array|null} [last_block_app_hash] ResponseInfo last_block_app_hash - */ - - /** - * Constructs a new ResponseInfo. - * @memberof tendermint.abci - * @classdesc Represents a ResponseInfo. - * @implements IResponseInfo - * @constructor - * @param {tendermint.abci.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.ResponseInfo - * @instance - */ - ResponseInfo.prototype.data = ""; - - /** - * ResponseInfo version. - * @member {string} version - * @memberof tendermint.abci.ResponseInfo - * @instance - */ - ResponseInfo.prototype.version = ""; - - /** - * ResponseInfo app_version. - * @member {Long} app_version - * @memberof tendermint.abci.ResponseInfo - * @instance - */ - ResponseInfo.prototype.app_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ResponseInfo last_block_height. - * @member {Long} last_block_height - * @memberof tendermint.abci.ResponseInfo - * @instance - */ - ResponseInfo.prototype.last_block_height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseInfo last_block_app_hash. - * @member {Uint8Array} last_block_app_hash - * @memberof tendermint.abci.ResponseInfo - * @instance - */ - ResponseInfo.prototype.last_block_app_hash = $util.newBuffer([]); - - /** - * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseInfo - * @static - * @param {tendermint.abci.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.app_version != null && Object.hasOwnProperty.call(message, "app_version")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.app_version); - if (message.last_block_height != null && Object.hasOwnProperty.call(message, "last_block_height")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.last_block_height); - if (message.last_block_app_hash != null && Object.hasOwnProperty.call(message, "last_block_app_hash")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.last_block_app_hash); - return writer; - }; - - /** - * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseInfo - * @static - * @param {tendermint.abci.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.ResponseInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.app_version = reader.uint64(); - break; - case 4: - message.last_block_height = reader.int64(); - break; - case 5: - message.last_block_app_hash = 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.ResponseInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.app_version != null && message.hasOwnProperty("app_version")) - if (!$util.isInteger(message.app_version) && !(message.app_version && $util.isInteger(message.app_version.low) && $util.isInteger(message.app_version.high))) - return "app_version: integer|Long expected"; - if (message.last_block_height != null && message.hasOwnProperty("last_block_height")) - if (!$util.isInteger(message.last_block_height) && !(message.last_block_height && $util.isInteger(message.last_block_height.low) && $util.isInteger(message.last_block_height.high))) - return "last_block_height: integer|Long expected"; - if (message.last_block_app_hash != null && message.hasOwnProperty("last_block_app_hash")) - if (!(message.last_block_app_hash && typeof message.last_block_app_hash.length === "number" || $util.isString(message.last_block_app_hash))) - return "last_block_app_hash: 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.ResponseInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseInfo} ResponseInfo - */ - ResponseInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseInfo) - return object; - var message = new $root.tendermint.abci.ResponseInfo(); - if (object.data != null) - message.data = String(object.data); - if (object.version != null) - message.version = String(object.version); - if (object.app_version != null) - if ($util.Long) - (message.app_version = $util.Long.fromValue(object.app_version)).unsigned = true; - else if (typeof object.app_version === "string") - message.app_version = parseInt(object.app_version, 10); - else if (typeof object.app_version === "number") - message.app_version = object.app_version; - else if (typeof object.app_version === "object") - message.app_version = new $util.LongBits(object.app_version.low >>> 0, object.app_version.high >>> 0).toNumber(true); - if (object.last_block_height != null) - if ($util.Long) - (message.last_block_height = $util.Long.fromValue(object.last_block_height)).unsigned = false; - else if (typeof object.last_block_height === "string") - message.last_block_height = parseInt(object.last_block_height, 10); - else if (typeof object.last_block_height === "number") - message.last_block_height = object.last_block_height; - else if (typeof object.last_block_height === "object") - message.last_block_height = new $util.LongBits(object.last_block_height.low >>> 0, object.last_block_height.high >>> 0).toNumber(); - if (object.last_block_app_hash != null) - if (typeof object.last_block_app_hash === "string") - $util.base64.decode(object.last_block_app_hash, message.last_block_app_hash = $util.newBuffer($util.base64.length(object.last_block_app_hash)), 0); - else if (object.last_block_app_hash.length) - message.last_block_app_hash = object.last_block_app_hash; - return message; - }; - - /** - * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseInfo - * @static - * @param {tendermint.abci.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.app_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.app_version = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.last_block_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.last_block_height = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.last_block_app_hash = ""; - else { - object.last_block_app_hash = []; - if (options.bytes !== Array) - object.last_block_app_hash = $util.newBuffer(object.last_block_app_hash); - } - } - if (message.data != null && message.hasOwnProperty("data")) - object.data = message.data; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.app_version != null && message.hasOwnProperty("app_version")) - if (typeof message.app_version === "number") - object.app_version = options.longs === String ? String(message.app_version) : message.app_version; - else - object.app_version = options.longs === String ? $util.Long.prototype.toString.call(message.app_version) : options.longs === Number ? new $util.LongBits(message.app_version.low >>> 0, message.app_version.high >>> 0).toNumber(true) : message.app_version; - if (message.last_block_height != null && message.hasOwnProperty("last_block_height")) - if (typeof message.last_block_height === "number") - object.last_block_height = options.longs === String ? String(message.last_block_height) : message.last_block_height; - else - object.last_block_height = options.longs === String ? $util.Long.prototype.toString.call(message.last_block_height) : options.longs === Number ? new $util.LongBits(message.last_block_height.low >>> 0, message.last_block_height.high >>> 0).toNumber() : message.last_block_height; - if (message.last_block_app_hash != null && message.hasOwnProperty("last_block_app_hash")) - object.last_block_app_hash = options.bytes === String ? $util.base64.encode(message.last_block_app_hash, 0, message.last_block_app_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_block_app_hash) : message.last_block_app_hash; - return object; - }; - - /** - * Converts this ResponseInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseInfo - * @instance - * @returns {Object.} JSON object - */ - ResponseInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseInfo; - })(); - - abci.ResponseSetOption = (function() { - - /** - * Properties of a ResponseSetOption. - * @memberof tendermint.abci - * @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 - * @classdesc Represents a ResponseSetOption. - * @implements IResponseSetOption - * @constructor - * @param {tendermint.abci.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.ResponseSetOption - * @instance - */ - ResponseSetOption.prototype.code = 0; - - /** - * ResponseSetOption log. - * @member {string} log - * @memberof tendermint.abci.ResponseSetOption - * @instance - */ - ResponseSetOption.prototype.log = ""; - - /** - * ResponseSetOption info. - * @member {string} info - * @memberof tendermint.abci.ResponseSetOption - * @instance - */ - ResponseSetOption.prototype.info = ""; - - /** - * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.ResponseSetOption.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseSetOption - * @static - * @param {tendermint.abci.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.ResponseSetOption.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseSetOption - * @static - * @param {tendermint.abci.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.ResponseSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.ResponseSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.ResponseSetOption - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseSetOption} ResponseSetOption - */ - ResponseSetOption.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseSetOption) - return object; - var message = new $root.tendermint.abci.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.ResponseSetOption - * @static - * @param {tendermint.abci.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.ResponseSetOption - * @instance - * @returns {Object.} JSON object - */ - ResponseSetOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseSetOption; - })(); - - abci.ResponseInitChain = (function() { - - /** - * Properties of a ResponseInitChain. - * @memberof tendermint.abci - * @interface IResponseInitChain - * @property {tendermint.abci.IConsensusParams|null} [consensus_params] ResponseInitChain consensus_params - * @property {Array.|null} [validators] ResponseInitChain validators - * @property {Uint8Array|null} [app_hash] ResponseInitChain app_hash - */ - - /** - * Constructs a new ResponseInitChain. - * @memberof tendermint.abci - * @classdesc Represents a ResponseInitChain. - * @implements IResponseInitChain - * @constructor - * @param {tendermint.abci.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 consensus_params. - * @member {tendermint.abci.IConsensusParams|null|undefined} consensus_params - * @memberof tendermint.abci.ResponseInitChain - * @instance - */ - ResponseInitChain.prototype.consensus_params = null; - - /** - * ResponseInitChain validators. - * @member {Array.} validators - * @memberof tendermint.abci.ResponseInitChain - * @instance - */ - ResponseInitChain.prototype.validators = $util.emptyArray; - - /** - * ResponseInitChain app_hash. - * @member {Uint8Array} app_hash - * @memberof tendermint.abci.ResponseInitChain - * @instance - */ - ResponseInitChain.prototype.app_hash = $util.newBuffer([]); - - /** - * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseInitChain - * @static - * @param {tendermint.abci.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.consensus_params != null && Object.hasOwnProperty.call(message, "consensus_params")) - $root.tendermint.abci.ConsensusParams.encode(message.consensus_params, 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.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.app_hash != null && Object.hasOwnProperty.call(message, "app_hash")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.app_hash); - return writer; - }; - - /** - * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.ResponseInitChain.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseInitChain - * @static - * @param {tendermint.abci.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.ResponseInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.ResponseInitChain(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.consensus_params = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 3: - message.app_hash = reader.bytes(); - 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.ResponseInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.consensus_params != null && message.hasOwnProperty("consensus_params")) { - var error = $root.tendermint.abci.ConsensusParams.verify(message.consensus_params); - if (error) - return "consensus_params." + 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.ValidatorUpdate.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - if (!(message.app_hash && typeof message.app_hash.length === "number" || $util.isString(message.app_hash))) - return "app_hash: buffer expected"; - return null; - }; - - /** - * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ResponseInitChain - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseInitChain} ResponseInitChain - */ - ResponseInitChain.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseInitChain) - return object; - var message = new $root.tendermint.abci.ResponseInitChain(); - if (object.consensus_params != null) { - if (typeof object.consensus_params !== "object") - throw TypeError(".tendermint.abci.ResponseInitChain.consensus_params: object expected"); - message.consensus_params = $root.tendermint.abci.ConsensusParams.fromObject(object.consensus_params); - } - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.abci.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.ResponseInitChain.validators: object expected"); - message.validators[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validators[i]); - } - } - if (object.app_hash != null) - if (typeof object.app_hash === "string") - $util.base64.decode(object.app_hash, message.app_hash = $util.newBuffer($util.base64.length(object.app_hash)), 0); - else if (object.app_hash.length) - message.app_hash = object.app_hash; - return message; - }; - - /** - * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseInitChain - * @static - * @param {tendermint.abci.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.consensus_params = null; - if (options.bytes === String) - object.app_hash = ""; - else { - object.app_hash = []; - if (options.bytes !== Array) - object.app_hash = $util.newBuffer(object.app_hash); - } - } - if (message.consensus_params != null && message.hasOwnProperty("consensus_params")) - object.consensus_params = $root.tendermint.abci.ConsensusParams.toObject(message.consensus_params, options); - if (message.validators && message.validators.length) { - object.validators = []; - for (var j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validators[j], options); - } - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - object.app_hash = options.bytes === String ? $util.base64.encode(message.app_hash, 0, message.app_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_hash) : message.app_hash; - return object; - }; - - /** - * Converts this ResponseInitChain to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseInitChain - * @instance - * @returns {Object.} JSON object - */ - ResponseInitChain.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseInitChain; - })(); - - abci.ResponseQuery = (function() { - - /** - * Properties of a ResponseQuery. - * @memberof tendermint.abci - * @interface IResponseQuery - * @property {number|null} [code] ResponseQuery code - * @property {string|null} [log] ResponseQuery log - * @property {string|null} [info] ResponseQuery info - * @property {Long|null} [index] ResponseQuery index - * @property {Uint8Array|null} [key] ResponseQuery key - * @property {Uint8Array|null} [value] ResponseQuery value - * @property {tendermint.crypto.IProofOps|null} [proof_ops] ResponseQuery proof_ops - * @property {Long|null} [height] ResponseQuery height - * @property {string|null} [codespace] ResponseQuery codespace - */ - - /** - * Constructs a new ResponseQuery. - * @memberof tendermint.abci - * @classdesc Represents a ResponseQuery. - * @implements IResponseQuery - * @constructor - * @param {tendermint.abci.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.ResponseQuery - * @instance - */ - ResponseQuery.prototype.code = 0; - - /** - * ResponseQuery log. - * @member {string} log - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.log = ""; - - /** - * ResponseQuery info. - * @member {string} info - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.info = ""; - - /** - * ResponseQuery index. - * @member {Long} index - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseQuery key. - * @member {Uint8Array} key - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.key = $util.newBuffer([]); - - /** - * ResponseQuery value. - * @member {Uint8Array} value - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.value = $util.newBuffer([]); - - /** - * ResponseQuery proof_ops. - * @member {tendermint.crypto.IProofOps|null|undefined} proof_ops - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.proof_ops = null; - - /** - * ResponseQuery height. - * @member {Long} height - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseQuery codespace. - * @member {string} codespace - * @memberof tendermint.abci.ResponseQuery - * @instance - */ - ResponseQuery.prototype.codespace = ""; - - /** - * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.ResponseQuery.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseQuery - * @static - * @param {tendermint.abci.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_ops != null && Object.hasOwnProperty.call(message, "proof_ops")) - $root.tendermint.crypto.ProofOps.encode(message.proof_ops, 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.ResponseQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseQuery - * @static - * @param {tendermint.abci.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.ResponseQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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_ops = $root.tendermint.crypto.ProofOps.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.ResponseQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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_ops != null && message.hasOwnProperty("proof_ops")) { - var error = $root.tendermint.crypto.ProofOps.verify(message.proof_ops); - if (error) - return "proof_ops." + 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.ResponseQuery - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseQuery} ResponseQuery - */ - ResponseQuery.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseQuery) - return object; - var message = new $root.tendermint.abci.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_ops != null) { - if (typeof object.proof_ops !== "object") - throw TypeError(".tendermint.abci.ResponseQuery.proof_ops: object expected"); - message.proof_ops = $root.tendermint.crypto.ProofOps.fromObject(object.proof_ops); - } - 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.ResponseQuery - * @static - * @param {tendermint.abci.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_ops = 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_ops != null && message.hasOwnProperty("proof_ops")) - object.proof_ops = $root.tendermint.crypto.ProofOps.toObject(message.proof_ops, 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.ResponseQuery - * @instance - * @returns {Object.} JSON object - */ - ResponseQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseQuery; - })(); - - abci.ResponseBeginBlock = (function() { - - /** - * Properties of a ResponseBeginBlock. - * @memberof tendermint.abci - * @interface IResponseBeginBlock - * @property {Array.|null} [events] ResponseBeginBlock events - */ - - /** - * Constructs a new ResponseBeginBlock. - * @memberof tendermint.abci - * @classdesc Represents a ResponseBeginBlock. - * @implements IResponseBeginBlock - * @constructor - * @param {tendermint.abci.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.ResponseBeginBlock - * @instance - */ - ResponseBeginBlock.prototype.events = $util.emptyArray; - - /** - * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.ResponseBeginBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseBeginBlock - * @static - * @param {tendermint.abci.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.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.ResponseBeginBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseBeginBlock - * @static - * @param {tendermint.abci.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.ResponseBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.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.ResponseBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.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.ResponseBeginBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseBeginBlock} ResponseBeginBlock - */ - ResponseBeginBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseBeginBlock) - return object; - var message = new $root.tendermint.abci.ResponseBeginBlock(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.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.ResponseBeginBlock.events: object expected"); - message.events[i] = $root.tendermint.abci.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.ResponseBeginBlock - * @static - * @param {tendermint.abci.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.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this ResponseBeginBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseBeginBlock - * @instance - * @returns {Object.} JSON object - */ - ResponseBeginBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseBeginBlock; - })(); - - abci.ResponseCheckTx = (function() { - - /** - * Properties of a ResponseCheckTx. - * @memberof tendermint.abci - * @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 {Long|null} [gas_wanted] ResponseCheckTx gas_wanted - * @property {Long|null} [gas_used] ResponseCheckTx gas_used - * @property {Array.|null} [events] ResponseCheckTx events - * @property {string|null} [codespace] ResponseCheckTx codespace - */ - - /** - * Constructs a new ResponseCheckTx. - * @memberof tendermint.abci - * @classdesc Represents a ResponseCheckTx. - * @implements IResponseCheckTx - * @constructor - * @param {tendermint.abci.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.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.code = 0; - - /** - * ResponseCheckTx data. - * @member {Uint8Array} data - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.data = $util.newBuffer([]); - - /** - * ResponseCheckTx log. - * @member {string} log - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.log = ""; - - /** - * ResponseCheckTx info. - * @member {string} info - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.info = ""; - - /** - * ResponseCheckTx gas_wanted. - * @member {Long} gas_wanted - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.gas_wanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseCheckTx gas_used. - * @member {Long} gas_used - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.gas_used = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseCheckTx events. - * @member {Array.} events - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.events = $util.emptyArray; - - /** - * ResponseCheckTx codespace. - * @member {string} codespace - * @memberof tendermint.abci.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.codespace = ""; - - /** - * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.ResponseCheckTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseCheckTx - * @static - * @param {tendermint.abci.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.gas_wanted != null && Object.hasOwnProperty.call(message, "gas_wanted")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gas_wanted); - if (message.gas_used != null && Object.hasOwnProperty.call(message, "gas_used")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gas_used); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.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.ResponseCheckTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseCheckTx - * @static - * @param {tendermint.abci.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.ResponseCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.gas_wanted = reader.int64(); - break; - case 6: - message.gas_used = reader.int64(); - break; - case 7: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.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.ResponseCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.gas_wanted != null && message.hasOwnProperty("gas_wanted")) - if (!$util.isInteger(message.gas_wanted) && !(message.gas_wanted && $util.isInteger(message.gas_wanted.low) && $util.isInteger(message.gas_wanted.high))) - return "gas_wanted: integer|Long expected"; - if (message.gas_used != null && message.hasOwnProperty("gas_used")) - if (!$util.isInteger(message.gas_used) && !(message.gas_used && $util.isInteger(message.gas_used.low) && $util.isInteger(message.gas_used.high))) - return "gas_used: 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.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.ResponseCheckTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseCheckTx} ResponseCheckTx - */ - ResponseCheckTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseCheckTx) - return object; - var message = new $root.tendermint.abci.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.gas_wanted != null) - if ($util.Long) - (message.gas_wanted = $util.Long.fromValue(object.gas_wanted)).unsigned = false; - else if (typeof object.gas_wanted === "string") - message.gas_wanted = parseInt(object.gas_wanted, 10); - else if (typeof object.gas_wanted === "number") - message.gas_wanted = object.gas_wanted; - else if (typeof object.gas_wanted === "object") - message.gas_wanted = new $util.LongBits(object.gas_wanted.low >>> 0, object.gas_wanted.high >>> 0).toNumber(); - if (object.gas_used != null) - if ($util.Long) - (message.gas_used = $util.Long.fromValue(object.gas_used)).unsigned = false; - else if (typeof object.gas_used === "string") - message.gas_used = parseInt(object.gas_used, 10); - else if (typeof object.gas_used === "number") - message.gas_used = object.gas_used; - else if (typeof object.gas_used === "object") - message.gas_used = new $util.LongBits(object.gas_used.low >>> 0, object.gas_used.high >>> 0).toNumber(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.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.ResponseCheckTx.events: object expected"); - message.events[i] = $root.tendermint.abci.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.ResponseCheckTx - * @static - * @param {tendermint.abci.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.gas_wanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gas_wanted = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gas_used = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gas_used = 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.gas_wanted != null && message.hasOwnProperty("gas_wanted")) - if (typeof message.gas_wanted === "number") - object.gas_wanted = options.longs === String ? String(message.gas_wanted) : message.gas_wanted; - else - object.gas_wanted = options.longs === String ? $util.Long.prototype.toString.call(message.gas_wanted) : options.longs === Number ? new $util.LongBits(message.gas_wanted.low >>> 0, message.gas_wanted.high >>> 0).toNumber() : message.gas_wanted; - if (message.gas_used != null && message.hasOwnProperty("gas_used")) - if (typeof message.gas_used === "number") - object.gas_used = options.longs === String ? String(message.gas_used) : message.gas_used; - else - object.gas_used = options.longs === String ? $util.Long.prototype.toString.call(message.gas_used) : options.longs === Number ? new $util.LongBits(message.gas_used.low >>> 0, message.gas_used.high >>> 0).toNumber() : message.gas_used; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.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.ResponseCheckTx - * @instance - * @returns {Object.} JSON object - */ - ResponseCheckTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseCheckTx; - })(); - - abci.ResponseDeliverTx = (function() { - - /** - * Properties of a ResponseDeliverTx. - * @memberof tendermint.abci - * @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 {Long|null} [gas_wanted] ResponseDeliverTx gas_wanted - * @property {Long|null} [gas_used] ResponseDeliverTx gas_used - * @property {Array.|null} [events] ResponseDeliverTx events - * @property {string|null} [codespace] ResponseDeliverTx codespace - */ - - /** - * Constructs a new ResponseDeliverTx. - * @memberof tendermint.abci - * @classdesc Represents a ResponseDeliverTx. - * @implements IResponseDeliverTx - * @constructor - * @param {tendermint.abci.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.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.code = 0; - - /** - * ResponseDeliverTx data. - * @member {Uint8Array} data - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.data = $util.newBuffer([]); - - /** - * ResponseDeliverTx log. - * @member {string} log - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.log = ""; - - /** - * ResponseDeliverTx info. - * @member {string} info - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.info = ""; - - /** - * ResponseDeliverTx gas_wanted. - * @member {Long} gas_wanted - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.gas_wanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseDeliverTx gas_used. - * @member {Long} gas_used - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.gas_used = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseDeliverTx events. - * @member {Array.} events - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.events = $util.emptyArray; - - /** - * ResponseDeliverTx codespace. - * @member {string} codespace - * @memberof tendermint.abci.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.codespace = ""; - - /** - * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.ResponseDeliverTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseDeliverTx - * @static - * @param {tendermint.abci.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.gas_wanted != null && Object.hasOwnProperty.call(message, "gas_wanted")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gas_wanted); - if (message.gas_used != null && Object.hasOwnProperty.call(message, "gas_used")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gas_used); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.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.ResponseDeliverTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseDeliverTx - * @static - * @param {tendermint.abci.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.ResponseDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.gas_wanted = reader.int64(); - break; - case 6: - message.gas_used = reader.int64(); - break; - case 7: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.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.ResponseDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.gas_wanted != null && message.hasOwnProperty("gas_wanted")) - if (!$util.isInteger(message.gas_wanted) && !(message.gas_wanted && $util.isInteger(message.gas_wanted.low) && $util.isInteger(message.gas_wanted.high))) - return "gas_wanted: integer|Long expected"; - if (message.gas_used != null && message.hasOwnProperty("gas_used")) - if (!$util.isInteger(message.gas_used) && !(message.gas_used && $util.isInteger(message.gas_used.low) && $util.isInteger(message.gas_used.high))) - return "gas_used: 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.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.ResponseDeliverTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseDeliverTx} ResponseDeliverTx - */ - ResponseDeliverTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseDeliverTx) - return object; - var message = new $root.tendermint.abci.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.gas_wanted != null) - if ($util.Long) - (message.gas_wanted = $util.Long.fromValue(object.gas_wanted)).unsigned = false; - else if (typeof object.gas_wanted === "string") - message.gas_wanted = parseInt(object.gas_wanted, 10); - else if (typeof object.gas_wanted === "number") - message.gas_wanted = object.gas_wanted; - else if (typeof object.gas_wanted === "object") - message.gas_wanted = new $util.LongBits(object.gas_wanted.low >>> 0, object.gas_wanted.high >>> 0).toNumber(); - if (object.gas_used != null) - if ($util.Long) - (message.gas_used = $util.Long.fromValue(object.gas_used)).unsigned = false; - else if (typeof object.gas_used === "string") - message.gas_used = parseInt(object.gas_used, 10); - else if (typeof object.gas_used === "number") - message.gas_used = object.gas_used; - else if (typeof object.gas_used === "object") - message.gas_used = new $util.LongBits(object.gas_used.low >>> 0, object.gas_used.high >>> 0).toNumber(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.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.ResponseDeliverTx.events: object expected"); - message.events[i] = $root.tendermint.abci.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.ResponseDeliverTx - * @static - * @param {tendermint.abci.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.gas_wanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gas_wanted = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gas_used = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gas_used = 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.gas_wanted != null && message.hasOwnProperty("gas_wanted")) - if (typeof message.gas_wanted === "number") - object.gas_wanted = options.longs === String ? String(message.gas_wanted) : message.gas_wanted; - else - object.gas_wanted = options.longs === String ? $util.Long.prototype.toString.call(message.gas_wanted) : options.longs === Number ? new $util.LongBits(message.gas_wanted.low >>> 0, message.gas_wanted.high >>> 0).toNumber() : message.gas_wanted; - if (message.gas_used != null && message.hasOwnProperty("gas_used")) - if (typeof message.gas_used === "number") - object.gas_used = options.longs === String ? String(message.gas_used) : message.gas_used; - else - object.gas_used = options.longs === String ? $util.Long.prototype.toString.call(message.gas_used) : options.longs === Number ? new $util.LongBits(message.gas_used.low >>> 0, message.gas_used.high >>> 0).toNumber() : message.gas_used; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.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.ResponseDeliverTx - * @instance - * @returns {Object.} JSON object - */ - ResponseDeliverTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseDeliverTx; - })(); - - abci.ResponseEndBlock = (function() { - - /** - * Properties of a ResponseEndBlock. - * @memberof tendermint.abci - * @interface IResponseEndBlock - * @property {Array.|null} [validator_updates] ResponseEndBlock validator_updates - * @property {tendermint.abci.IConsensusParams|null} [consensus_param_updates] ResponseEndBlock consensus_param_updates - * @property {Array.|null} [events] ResponseEndBlock events - */ - - /** - * Constructs a new ResponseEndBlock. - * @memberof tendermint.abci - * @classdesc Represents a ResponseEndBlock. - * @implements IResponseEndBlock - * @constructor - * @param {tendermint.abci.IResponseEndBlock=} [properties] Properties to set - */ - function ResponseEndBlock(properties) { - this.validator_updates = []; - 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 validator_updates. - * @member {Array.} validator_updates - * @memberof tendermint.abci.ResponseEndBlock - * @instance - */ - ResponseEndBlock.prototype.validator_updates = $util.emptyArray; - - /** - * ResponseEndBlock consensus_param_updates. - * @member {tendermint.abci.IConsensusParams|null|undefined} consensus_param_updates - * @memberof tendermint.abci.ResponseEndBlock - * @instance - */ - ResponseEndBlock.prototype.consensus_param_updates = null; - - /** - * ResponseEndBlock events. - * @member {Array.} events - * @memberof tendermint.abci.ResponseEndBlock - * @instance - */ - ResponseEndBlock.prototype.events = $util.emptyArray; - - /** - * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.ResponseEndBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseEndBlock - * @static - * @param {tendermint.abci.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.validator_updates != null && message.validator_updates.length) - for (var i = 0; i < message.validator_updates.length; ++i) - $root.tendermint.abci.ValidatorUpdate.encode(message.validator_updates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensus_param_updates != null && Object.hasOwnProperty.call(message, "consensus_param_updates")) - $root.tendermint.abci.ConsensusParams.encode(message.consensus_param_updates, 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.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.ResponseEndBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseEndBlock - * @static - * @param {tendermint.abci.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.ResponseEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.ResponseEndBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.validator_updates && message.validator_updates.length)) - message.validator_updates = []; - message.validator_updates.push($root.tendermint.abci.ValidatorUpdate.decode(reader, reader.uint32())); - break; - case 2: - message.consensus_param_updates = $root.tendermint.abci.ConsensusParams.decode(reader, reader.uint32()); - break; - case 3: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.Event.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.ResponseEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.validator_updates != null && message.hasOwnProperty("validator_updates")) { - if (!Array.isArray(message.validator_updates)) - return "validator_updates: array expected"; - for (var i = 0; i < message.validator_updates.length; ++i) { - var error = $root.tendermint.abci.ValidatorUpdate.verify(message.validator_updates[i]); - if (error) - return "validator_updates." + error; - } - } - if (message.consensus_param_updates != null && message.hasOwnProperty("consensus_param_updates")) { - var error = $root.tendermint.abci.ConsensusParams.verify(message.consensus_param_updates); - if (error) - return "consensus_param_updates." + 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.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.ResponseEndBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseEndBlock} ResponseEndBlock - */ - ResponseEndBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseEndBlock) - return object; - var message = new $root.tendermint.abci.ResponseEndBlock(); - if (object.validator_updates) { - if (!Array.isArray(object.validator_updates)) - throw TypeError(".tendermint.abci.ResponseEndBlock.validator_updates: array expected"); - message.validator_updates = []; - for (var i = 0; i < object.validator_updates.length; ++i) { - if (typeof object.validator_updates[i] !== "object") - throw TypeError(".tendermint.abci.ResponseEndBlock.validator_updates: object expected"); - message.validator_updates[i] = $root.tendermint.abci.ValidatorUpdate.fromObject(object.validator_updates[i]); - } - } - if (object.consensus_param_updates != null) { - if (typeof object.consensus_param_updates !== "object") - throw TypeError(".tendermint.abci.ResponseEndBlock.consensus_param_updates: object expected"); - message.consensus_param_updates = $root.tendermint.abci.ConsensusParams.fromObject(object.consensus_param_updates); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.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.ResponseEndBlock.events: object expected"); - message.events[i] = $root.tendermint.abci.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.ResponseEndBlock - * @static - * @param {tendermint.abci.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.validator_updates = []; - object.events = []; - } - if (options.defaults) - object.consensus_param_updates = null; - if (message.validator_updates && message.validator_updates.length) { - object.validator_updates = []; - for (var j = 0; j < message.validator_updates.length; ++j) - object.validator_updates[j] = $root.tendermint.abci.ValidatorUpdate.toObject(message.validator_updates[j], options); - } - if (message.consensus_param_updates != null && message.hasOwnProperty("consensus_param_updates")) - object.consensus_param_updates = $root.tendermint.abci.ConsensusParams.toObject(message.consensus_param_updates, options); - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this ResponseEndBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseEndBlock - * @instance - * @returns {Object.} JSON object - */ - ResponseEndBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseEndBlock; - })(); - - abci.ResponseCommit = (function() { - - /** - * Properties of a ResponseCommit. - * @memberof tendermint.abci - * @interface IResponseCommit - * @property {Uint8Array|null} [data] ResponseCommit data - * @property {Long|null} [retain_height] ResponseCommit retain_height - */ - - /** - * Constructs a new ResponseCommit. - * @memberof tendermint.abci - * @classdesc Represents a ResponseCommit. - * @implements IResponseCommit - * @constructor - * @param {tendermint.abci.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.ResponseCommit - * @instance - */ - ResponseCommit.prototype.data = $util.newBuffer([]); - - /** - * ResponseCommit retain_height. - * @member {Long} retain_height - * @memberof tendermint.abci.ResponseCommit - * @instance - */ - ResponseCommit.prototype.retain_height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseCommit - * @static - * @param {tendermint.abci.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); - if (message.retain_height != null && Object.hasOwnProperty.call(message, "retain_height")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.retain_height); - return writer; - }; - - /** - * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.ResponseCommit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseCommit - * @static - * @param {tendermint.abci.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.ResponseCommit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.ResponseCommit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.data = reader.bytes(); - break; - case 3: - message.retain_height = reader.int64(); - 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.ResponseCommit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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"; - if (message.retain_height != null && message.hasOwnProperty("retain_height")) - if (!$util.isInteger(message.retain_height) && !(message.retain_height && $util.isInteger(message.retain_height.low) && $util.isInteger(message.retain_height.high))) - return "retain_height: integer|Long expected"; - return null; - }; - - /** - * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ResponseCommit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseCommit} ResponseCommit - */ - ResponseCommit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseCommit) - return object; - var message = new $root.tendermint.abci.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; - if (object.retain_height != null) - if ($util.Long) - (message.retain_height = $util.Long.fromValue(object.retain_height)).unsigned = false; - else if (typeof object.retain_height === "string") - message.retain_height = parseInt(object.retain_height, 10); - else if (typeof object.retain_height === "number") - message.retain_height = object.retain_height; - else if (typeof object.retain_height === "object") - message.retain_height = new $util.LongBits(object.retain_height.low >>> 0, object.retain_height.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseCommit - * @static - * @param {tendermint.abci.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 ($util.Long) { - var long = new $util.Long(0, 0, false); - object.retain_height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.retain_height = options.longs === String ? "0" : 0; - } - 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.retain_height != null && message.hasOwnProperty("retain_height")) - if (typeof message.retain_height === "number") - object.retain_height = options.longs === String ? String(message.retain_height) : message.retain_height; - else - object.retain_height = options.longs === String ? $util.Long.prototype.toString.call(message.retain_height) : options.longs === Number ? new $util.LongBits(message.retain_height.low >>> 0, message.retain_height.high >>> 0).toNumber() : message.retain_height; - return object; - }; - - /** - * Converts this ResponseCommit to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseCommit - * @instance - * @returns {Object.} JSON object - */ - ResponseCommit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseCommit; - })(); - - abci.ResponseListSnapshots = (function() { - - /** - * Properties of a ResponseListSnapshots. - * @memberof tendermint.abci - * @interface IResponseListSnapshots - * @property {Array.|null} [snapshots] ResponseListSnapshots snapshots - */ - - /** - * Constructs a new ResponseListSnapshots. - * @memberof tendermint.abci - * @classdesc Represents a ResponseListSnapshots. - * @implements IResponseListSnapshots - * @constructor - * @param {tendermint.abci.IResponseListSnapshots=} [properties] Properties to set - */ - function ResponseListSnapshots(properties) { - this.snapshots = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseListSnapshots snapshots. - * @member {Array.} snapshots - * @memberof tendermint.abci.ResponseListSnapshots - * @instance - */ - ResponseListSnapshots.prototype.snapshots = $util.emptyArray; - - /** - * Encodes the specified ResponseListSnapshots message. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseListSnapshots.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshots != null && message.snapshots.length) - for (var i = 0; i < message.snapshots.length; ++i) - $root.tendermint.abci.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResponseListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {tendermint.abci.IResponseListSnapshots} message ResponseListSnapshots message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseListSnapshots.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResponseListSnapshots message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseListSnapshots.decode = 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.ResponseListSnapshots(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.snapshots && message.snapshots.length)) - message.snapshots = []; - message.snapshots.push($root.tendermint.abci.Snapshot.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseListSnapshots message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseListSnapshots.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseListSnapshots message. - * @function verify - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseListSnapshots.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.snapshots != null && message.hasOwnProperty("snapshots")) { - if (!Array.isArray(message.snapshots)) - return "snapshots: array expected"; - for (var i = 0; i < message.snapshots.length; ++i) { - var error = $root.tendermint.abci.Snapshot.verify(message.snapshots[i]); - if (error) - return "snapshots." + error; - } - } - return null; - }; - - /** - * Creates a ResponseListSnapshots message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseListSnapshots} ResponseListSnapshots - */ - ResponseListSnapshots.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseListSnapshots) - return object; - var message = new $root.tendermint.abci.ResponseListSnapshots(); - if (object.snapshots) { - if (!Array.isArray(object.snapshots)) - throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: array expected"); - message.snapshots = []; - for (var i = 0; i < object.snapshots.length; ++i) { - if (typeof object.snapshots[i] !== "object") - throw TypeError(".tendermint.abci.ResponseListSnapshots.snapshots: object expected"); - message.snapshots[i] = $root.tendermint.abci.Snapshot.fromObject(object.snapshots[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResponseListSnapshots message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseListSnapshots - * @static - * @param {tendermint.abci.ResponseListSnapshots} message ResponseListSnapshots - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseListSnapshots.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.snapshots = []; - if (message.snapshots && message.snapshots.length) { - object.snapshots = []; - for (var j = 0; j < message.snapshots.length; ++j) - object.snapshots[j] = $root.tendermint.abci.Snapshot.toObject(message.snapshots[j], options); - } - return object; - }; - - /** - * Converts this ResponseListSnapshots to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseListSnapshots - * @instance - * @returns {Object.} JSON object - */ - ResponseListSnapshots.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseListSnapshots; - })(); - - abci.ResponseOfferSnapshot = (function() { - - /** - * Properties of a ResponseOfferSnapshot. - * @memberof tendermint.abci - * @interface IResponseOfferSnapshot - * @property {tendermint.abci.ResponseOfferSnapshot.Result|null} [result] ResponseOfferSnapshot result - */ - - /** - * Constructs a new ResponseOfferSnapshot. - * @memberof tendermint.abci - * @classdesc Represents a ResponseOfferSnapshot. - * @implements IResponseOfferSnapshot - * @constructor - * @param {tendermint.abci.IResponseOfferSnapshot=} [properties] Properties to set - */ - function ResponseOfferSnapshot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseOfferSnapshot result. - * @member {tendermint.abci.ResponseOfferSnapshot.Result} result - * @memberof tendermint.abci.ResponseOfferSnapshot - * @instance - */ - ResponseOfferSnapshot.prototype.result = 0; - - /** - * Encodes the specified ResponseOfferSnapshot message. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseOfferSnapshot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - return writer; - }; - - /** - * Encodes the specified ResponseOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {tendermint.abci.IResponseOfferSnapshot} message ResponseOfferSnapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseOfferSnapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResponseOfferSnapshot message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseOfferSnapshot.decode = 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.ResponseOfferSnapshot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseOfferSnapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseOfferSnapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseOfferSnapshot message. - * @function verify - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseOfferSnapshot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - return null; - }; - - /** - * Creates a ResponseOfferSnapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseOfferSnapshot} ResponseOfferSnapshot - */ - ResponseOfferSnapshot.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseOfferSnapshot) - return object; - var message = new $root.tendermint.abci.ResponseOfferSnapshot(); - switch (object.result) { - case "UNKNOWN": - case 0: - message.result = 0; - break; - case "ACCEPT": - case 1: - message.result = 1; - break; - case "ABORT": - case 2: - message.result = 2; - break; - case "REJECT": - case 3: - message.result = 3; - break; - case "REJECT_FORMAT": - case 4: - message.result = 4; - break; - case "REJECT_SENDER": - case 5: - message.result = 5; - break; - } - return message; - }; - - /** - * Creates a plain object from a ResponseOfferSnapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseOfferSnapshot - * @static - * @param {tendermint.abci.ResponseOfferSnapshot} message ResponseOfferSnapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseOfferSnapshot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.result = options.enums === String ? "UNKNOWN" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.tendermint.abci.ResponseOfferSnapshot.Result[message.result] : message.result; - return object; - }; - - /** - * Converts this ResponseOfferSnapshot to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseOfferSnapshot - * @instance - * @returns {Object.} JSON object - */ - ResponseOfferSnapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Result enum. - * @name tendermint.abci.ResponseOfferSnapshot.Result - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} ACCEPT=1 ACCEPT value - * @property {number} ABORT=2 ABORT value - * @property {number} REJECT=3 REJECT value - * @property {number} REJECT_FORMAT=4 REJECT_FORMAT value - * @property {number} REJECT_SENDER=5 REJECT_SENDER value - */ - ResponseOfferSnapshot.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "ACCEPT"] = 1; - values[valuesById[2] = "ABORT"] = 2; - values[valuesById[3] = "REJECT"] = 3; - values[valuesById[4] = "REJECT_FORMAT"] = 4; - values[valuesById[5] = "REJECT_SENDER"] = 5; - return values; - })(); - - return ResponseOfferSnapshot; - })(); - - abci.ResponseLoadSnapshotChunk = (function() { - - /** - * Properties of a ResponseLoadSnapshotChunk. - * @memberof tendermint.abci - * @interface IResponseLoadSnapshotChunk - * @property {Uint8Array|null} [chunk] ResponseLoadSnapshotChunk chunk - */ - - /** - * Constructs a new ResponseLoadSnapshotChunk. - * @memberof tendermint.abci - * @classdesc Represents a ResponseLoadSnapshotChunk. - * @implements IResponseLoadSnapshotChunk - * @constructor - * @param {tendermint.abci.IResponseLoadSnapshotChunk=} [properties] Properties to set - */ - function ResponseLoadSnapshotChunk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseLoadSnapshotChunk chunk. - * @member {Uint8Array} chunk - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @instance - */ - ResponseLoadSnapshotChunk.prototype.chunk = $util.newBuffer([]); - - /** - * Encodes the specified ResponseLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseLoadSnapshotChunk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.chunk != null && Object.hasOwnProperty.call(message, "chunk")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.chunk); - return writer; - }; - - /** - * Encodes the specified ResponseLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {tendermint.abci.IResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseLoadSnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseLoadSnapshotChunk.decode = 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.ResponseLoadSnapshotChunk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.chunk = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseLoadSnapshotChunk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseLoadSnapshotChunk message. - * @function verify - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseLoadSnapshotChunk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.chunk != null && message.hasOwnProperty("chunk")) - if (!(message.chunk && typeof message.chunk.length === "number" || $util.isString(message.chunk))) - return "chunk: buffer expected"; - return null; - }; - - /** - * Creates a ResponseLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseLoadSnapshotChunk} ResponseLoadSnapshotChunk - */ - ResponseLoadSnapshotChunk.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseLoadSnapshotChunk) - return object; - var message = new $root.tendermint.abci.ResponseLoadSnapshotChunk(); - if (object.chunk != null) - if (typeof object.chunk === "string") - $util.base64.decode(object.chunk, message.chunk = $util.newBuffer($util.base64.length(object.chunk)), 0); - else if (object.chunk.length) - message.chunk = object.chunk; - return message; - }; - - /** - * Creates a plain object from a ResponseLoadSnapshotChunk message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @static - * @param {tendermint.abci.ResponseLoadSnapshotChunk} message ResponseLoadSnapshotChunk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseLoadSnapshotChunk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.chunk = ""; - else { - object.chunk = []; - if (options.bytes !== Array) - object.chunk = $util.newBuffer(object.chunk); - } - if (message.chunk != null && message.hasOwnProperty("chunk")) - object.chunk = options.bytes === String ? $util.base64.encode(message.chunk, 0, message.chunk.length) : options.bytes === Array ? Array.prototype.slice.call(message.chunk) : message.chunk; - return object; - }; - - /** - * Converts this ResponseLoadSnapshotChunk to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseLoadSnapshotChunk - * @instance - * @returns {Object.} JSON object - */ - ResponseLoadSnapshotChunk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ResponseLoadSnapshotChunk; - })(); - - abci.ResponseApplySnapshotChunk = (function() { - - /** - * Properties of a ResponseApplySnapshotChunk. - * @memberof tendermint.abci - * @interface IResponseApplySnapshotChunk - * @property {tendermint.abci.ResponseApplySnapshotChunk.Result|null} [result] ResponseApplySnapshotChunk result - * @property {Array.|null} [refetch_chunks] ResponseApplySnapshotChunk refetch_chunks - * @property {Array.|null} [reject_senders] ResponseApplySnapshotChunk reject_senders - */ - - /** - * Constructs a new ResponseApplySnapshotChunk. - * @memberof tendermint.abci - * @classdesc Represents a ResponseApplySnapshotChunk. - * @implements IResponseApplySnapshotChunk - * @constructor - * @param {tendermint.abci.IResponseApplySnapshotChunk=} [properties] Properties to set - */ - function ResponseApplySnapshotChunk(properties) { - this.refetch_chunks = []; - this.reject_senders = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResponseApplySnapshotChunk result. - * @member {tendermint.abci.ResponseApplySnapshotChunk.Result} result - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @instance - */ - ResponseApplySnapshotChunk.prototype.result = 0; - - /** - * ResponseApplySnapshotChunk refetch_chunks. - * @member {Array.} refetch_chunks - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @instance - */ - ResponseApplySnapshotChunk.prototype.refetch_chunks = $util.emptyArray; - - /** - * ResponseApplySnapshotChunk reject_senders. - * @member {Array.} reject_senders - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @instance - */ - ResponseApplySnapshotChunk.prototype.reject_senders = $util.emptyArray; - - /** - * Encodes the specified ResponseApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseApplySnapshotChunk.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.result); - if (message.refetch_chunks != null && message.refetch_chunks.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.refetch_chunks.length; ++i) - writer.uint32(message.refetch_chunks[i]); - writer.ldelim(); - } - if (message.reject_senders != null && message.reject_senders.length) - for (var i = 0; i < message.reject_senders.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.reject_senders[i]); - return writer; - }; - - /** - * Encodes the specified ResponseApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {tendermint.abci.IResponseApplySnapshotChunk} message ResponseApplySnapshotChunk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseApplySnapshotChunk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseApplySnapshotChunk.decode = 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.ResponseApplySnapshotChunk(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.result = reader.int32(); - break; - case 2: - if (!(message.refetch_chunks && message.refetch_chunks.length)) - message.refetch_chunks = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.refetch_chunks.push(reader.uint32()); - } else - message.refetch_chunks.push(reader.uint32()); - break; - case 3: - if (!(message.reject_senders && message.reject_senders.length)) - message.reject_senders = []; - message.reject_senders.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseApplySnapshotChunk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseApplySnapshotChunk message. - * @function verify - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseApplySnapshotChunk.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.result != null && message.hasOwnProperty("result")) - switch (message.result) { - default: - return "result: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.refetch_chunks != null && message.hasOwnProperty("refetch_chunks")) { - if (!Array.isArray(message.refetch_chunks)) - return "refetch_chunks: array expected"; - for (var i = 0; i < message.refetch_chunks.length; ++i) - if (!$util.isInteger(message.refetch_chunks[i])) - return "refetch_chunks: integer[] expected"; - } - if (message.reject_senders != null && message.hasOwnProperty("reject_senders")) { - if (!Array.isArray(message.reject_senders)) - return "reject_senders: array expected"; - for (var i = 0; i < message.reject_senders.length; ++i) - if (!$util.isString(message.reject_senders[i])) - return "reject_senders: string[] expected"; - } - return null; - }; - - /** - * Creates a ResponseApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ResponseApplySnapshotChunk} ResponseApplySnapshotChunk - */ - ResponseApplySnapshotChunk.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ResponseApplySnapshotChunk) - return object; - var message = new $root.tendermint.abci.ResponseApplySnapshotChunk(); - switch (object.result) { - case "UNKNOWN": - case 0: - message.result = 0; - break; - case "ACCEPT": - case 1: - message.result = 1; - break; - case "ABORT": - case 2: - message.result = 2; - break; - case "RETRY": - case 3: - message.result = 3; - break; - case "RETRY_SNAPSHOT": - case 4: - message.result = 4; - break; - case "REJECT_SNAPSHOT": - case 5: - message.result = 5; - break; - } - if (object.refetch_chunks) { - if (!Array.isArray(object.refetch_chunks)) - throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.refetch_chunks: array expected"); - message.refetch_chunks = []; - for (var i = 0; i < object.refetch_chunks.length; ++i) - message.refetch_chunks[i] = object.refetch_chunks[i] >>> 0; - } - if (object.reject_senders) { - if (!Array.isArray(object.reject_senders)) - throw TypeError(".tendermint.abci.ResponseApplySnapshotChunk.reject_senders: array expected"); - message.reject_senders = []; - for (var i = 0; i < object.reject_senders.length; ++i) - message.reject_senders[i] = String(object.reject_senders[i]); - } - return message; - }; - - /** - * Creates a plain object from a ResponseApplySnapshotChunk message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @static - * @param {tendermint.abci.ResponseApplySnapshotChunk} message ResponseApplySnapshotChunk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseApplySnapshotChunk.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.refetch_chunks = []; - object.reject_senders = []; - } - if (options.defaults) - object.result = options.enums === String ? "UNKNOWN" : 0; - if (message.result != null && message.hasOwnProperty("result")) - object.result = options.enums === String ? $root.tendermint.abci.ResponseApplySnapshotChunk.Result[message.result] : message.result; - if (message.refetch_chunks && message.refetch_chunks.length) { - object.refetch_chunks = []; - for (var j = 0; j < message.refetch_chunks.length; ++j) - object.refetch_chunks[j] = message.refetch_chunks[j]; - } - if (message.reject_senders && message.reject_senders.length) { - object.reject_senders = []; - for (var j = 0; j < message.reject_senders.length; ++j) - object.reject_senders[j] = message.reject_senders[j]; - } - return object; - }; - - /** - * Converts this ResponseApplySnapshotChunk to JSON. - * @function toJSON - * @memberof tendermint.abci.ResponseApplySnapshotChunk - * @instance - * @returns {Object.} JSON object - */ - ResponseApplySnapshotChunk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Result enum. - * @name tendermint.abci.ResponseApplySnapshotChunk.Result - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} ACCEPT=1 ACCEPT value - * @property {number} ABORT=2 ABORT value - * @property {number} RETRY=3 RETRY value - * @property {number} RETRY_SNAPSHOT=4 RETRY_SNAPSHOT value - * @property {number} REJECT_SNAPSHOT=5 REJECT_SNAPSHOT value - */ - ResponseApplySnapshotChunk.Result = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "ACCEPT"] = 1; - values[valuesById[2] = "ABORT"] = 2; - values[valuesById[3] = "RETRY"] = 3; - values[valuesById[4] = "RETRY_SNAPSHOT"] = 4; - values[valuesById[5] = "REJECT_SNAPSHOT"] = 5; - return values; - })(); - - return ResponseApplySnapshotChunk; - })(); - - abci.ConsensusParams = (function() { - - /** - * Properties of a ConsensusParams. - * @memberof tendermint.abci - * @interface IConsensusParams - * @property {tendermint.abci.IBlockParams|null} [block] ConsensusParams block - * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence - * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator - * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version - */ - - /** - * Constructs a new ConsensusParams. - * @memberof tendermint.abci - * @classdesc Represents a ConsensusParams. - * @implements IConsensusParams - * @constructor - * @param {tendermint.abci.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.IBlockParams|null|undefined} block - * @memberof tendermint.abci.ConsensusParams - * @instance - */ - ConsensusParams.prototype.block = null; - - /** - * ConsensusParams evidence. - * @member {tendermint.types.IEvidenceParams|null|undefined} evidence - * @memberof tendermint.abci.ConsensusParams - * @instance - */ - ConsensusParams.prototype.evidence = null; - - /** - * ConsensusParams validator. - * @member {tendermint.types.IValidatorParams|null|undefined} validator - * @memberof tendermint.abci.ConsensusParams - * @instance - */ - ConsensusParams.prototype.validator = null; - - /** - * ConsensusParams version. - * @member {tendermint.types.IVersionParams|null|undefined} version - * @memberof tendermint.abci.ConsensusParams - * @instance - */ - ConsensusParams.prototype.version = null; - - /** - * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ConsensusParams - * @static - * @param {tendermint.abci.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.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) - $root.tendermint.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.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.ConsensusParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ConsensusParams - * @static - * @param {tendermint.abci.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.ConsensusParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.ConsensusParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = $root.tendermint.abci.BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = $root.tendermint.types.VersionParams.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.ConsensusParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.BlockParams.verify(message.block); - if (error) - return "block." + error; - } - if (message.evidence != null && message.hasOwnProperty("evidence")) { - var error = $root.tendermint.types.EvidenceParams.verify(message.evidence); - if (error) - return "evidence." + error; - } - if (message.validator != null && message.hasOwnProperty("validator")) { - var error = $root.tendermint.types.ValidatorParams.verify(message.validator); - if (error) - return "validator." + error; - } - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.tendermint.types.VersionParams.verify(message.version); - if (error) - return "version." + error; - } - return null; - }; - - /** - * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.ConsensusParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ConsensusParams} ConsensusParams - */ - ConsensusParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ConsensusParams) - return object; - var message = new $root.tendermint.abci.ConsensusParams(); - if (object.block != null) { - if (typeof object.block !== "object") - throw TypeError(".tendermint.abci.ConsensusParams.block: object expected"); - message.block = $root.tendermint.abci.BlockParams.fromObject(object.block); - } - if (object.evidence != null) { - if (typeof object.evidence !== "object") - throw TypeError(".tendermint.abci.ConsensusParams.evidence: object expected"); - message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); - } - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.abci.ConsensusParams.validator: object expected"); - message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); - } - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".tendermint.abci.ConsensusParams.version: object expected"); - message.version = $root.tendermint.types.VersionParams.fromObject(object.version); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.ConsensusParams - * @static - * @param {tendermint.abci.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; - object.version = null; - } - if (message.block != null && message.hasOwnProperty("block")) - object.block = $root.tendermint.abci.BlockParams.toObject(message.block, options); - if (message.evidence != null && message.hasOwnProperty("evidence")) - object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); - return object; - }; - - /** - * Converts this ConsensusParams to JSON. - * @function toJSON - * @memberof tendermint.abci.ConsensusParams - * @instance - * @returns {Object.} JSON object - */ - ConsensusParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ConsensusParams; - })(); - - abci.BlockParams = (function() { - - /** - * Properties of a BlockParams. - * @memberof tendermint.abci - * @interface IBlockParams - * @property {Long|null} [max_bytes] BlockParams max_bytes - * @property {Long|null} [max_gas] BlockParams max_gas - */ - - /** - * Constructs a new BlockParams. - * @memberof tendermint.abci - * @classdesc Represents a BlockParams. - * @implements IBlockParams - * @constructor - * @param {tendermint.abci.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 max_bytes. - * @member {Long} max_bytes - * @memberof tendermint.abci.BlockParams - * @instance - */ - BlockParams.prototype.max_bytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockParams max_gas. - * @member {Long} max_gas - * @memberof tendermint.abci.BlockParams - * @instance - */ - BlockParams.prototype.max_gas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.BlockParams - * @static - * @param {tendermint.abci.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.max_bytes != null && Object.hasOwnProperty.call(message, "max_bytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.max_bytes); - if (message.max_gas != null && Object.hasOwnProperty.call(message, "max_gas")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max_gas); - return writer; - }; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.BlockParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.BlockParams - * @static - * @param {tendermint.abci.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.BlockParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.BlockParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_bytes = reader.int64(); - break; - case 2: - message.max_gas = 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.BlockParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.max_bytes != null && message.hasOwnProperty("max_bytes")) - if (!$util.isInteger(message.max_bytes) && !(message.max_bytes && $util.isInteger(message.max_bytes.low) && $util.isInteger(message.max_bytes.high))) - return "max_bytes: integer|Long expected"; - if (message.max_gas != null && message.hasOwnProperty("max_gas")) - if (!$util.isInteger(message.max_gas) && !(message.max_gas && $util.isInteger(message.max_gas.low) && $util.isInteger(message.max_gas.high))) - return "max_gas: 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.BlockParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.BlockParams} BlockParams - */ - BlockParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.BlockParams) - return object; - var message = new $root.tendermint.abci.BlockParams(); - if (object.max_bytes != null) - if ($util.Long) - (message.max_bytes = $util.Long.fromValue(object.max_bytes)).unsigned = false; - else if (typeof object.max_bytes === "string") - message.max_bytes = parseInt(object.max_bytes, 10); - else if (typeof object.max_bytes === "number") - message.max_bytes = object.max_bytes; - else if (typeof object.max_bytes === "object") - message.max_bytes = new $util.LongBits(object.max_bytes.low >>> 0, object.max_bytes.high >>> 0).toNumber(); - if (object.max_gas != null) - if ($util.Long) - (message.max_gas = $util.Long.fromValue(object.max_gas)).unsigned = false; - else if (typeof object.max_gas === "string") - message.max_gas = parseInt(object.max_gas, 10); - else if (typeof object.max_gas === "number") - message.max_gas = object.max_gas; - else if (typeof object.max_gas === "object") - message.max_gas = new $util.LongBits(object.max_gas.low >>> 0, object.max_gas.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.BlockParams - * @static - * @param {tendermint.abci.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.max_bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_bytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_gas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_gas = options.longs === String ? "0" : 0; - } - if (message.max_bytes != null && message.hasOwnProperty("max_bytes")) - if (typeof message.max_bytes === "number") - object.max_bytes = options.longs === String ? String(message.max_bytes) : message.max_bytes; - else - object.max_bytes = options.longs === String ? $util.Long.prototype.toString.call(message.max_bytes) : options.longs === Number ? new $util.LongBits(message.max_bytes.low >>> 0, message.max_bytes.high >>> 0).toNumber() : message.max_bytes; - if (message.max_gas != null && message.hasOwnProperty("max_gas")) - if (typeof message.max_gas === "number") - object.max_gas = options.longs === String ? String(message.max_gas) : message.max_gas; - else - object.max_gas = options.longs === String ? $util.Long.prototype.toString.call(message.max_gas) : options.longs === Number ? new $util.LongBits(message.max_gas.low >>> 0, message.max_gas.high >>> 0).toNumber() : message.max_gas; - return object; - }; - - /** - * Converts this BlockParams to JSON. - * @function toJSON - * @memberof tendermint.abci.BlockParams - * @instance - * @returns {Object.} JSON object - */ - BlockParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockParams; - })(); - - abci.LastCommitInfo = (function() { - - /** - * Properties of a LastCommitInfo. - * @memberof tendermint.abci - * @interface ILastCommitInfo - * @property {number|null} [round] LastCommitInfo round - * @property {Array.|null} [votes] LastCommitInfo votes - */ - - /** - * Constructs a new LastCommitInfo. - * @memberof tendermint.abci - * @classdesc Represents a LastCommitInfo. - * @implements ILastCommitInfo - * @constructor - * @param {tendermint.abci.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.LastCommitInfo - * @instance - */ - LastCommitInfo.prototype.round = 0; - - /** - * LastCommitInfo votes. - * @member {Array.} votes - * @memberof tendermint.abci.LastCommitInfo - * @instance - */ - LastCommitInfo.prototype.votes = $util.emptyArray; - - /** - * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.LastCommitInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.LastCommitInfo - * @static - * @param {tendermint.abci.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.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.LastCommitInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.LastCommitInfo - * @static - * @param {tendermint.abci.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.LastCommitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.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.LastCommitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.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.LastCommitInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.LastCommitInfo} LastCommitInfo - */ - LastCommitInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.LastCommitInfo) - return object; - var message = new $root.tendermint.abci.LastCommitInfo(); - if (object.round != null) - message.round = object.round | 0; - if (object.votes) { - if (!Array.isArray(object.votes)) - throw TypeError(".tendermint.abci.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.LastCommitInfo.votes: object expected"); - message.votes[i] = $root.tendermint.abci.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.LastCommitInfo - * @static - * @param {tendermint.abci.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.VoteInfo.toObject(message.votes[j], options); - } - return object; - }; - - /** - * Converts this LastCommitInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.LastCommitInfo - * @instance - * @returns {Object.} JSON object - */ - LastCommitInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LastCommitInfo; - })(); - - abci.Event = (function() { - - /** - * Properties of an Event. - * @memberof tendermint.abci - * @interface IEvent - * @property {string|null} [type] Event type - * @property {Array.|null} [attributes] Event attributes - */ - - /** - * Constructs a new Event. - * @memberof tendermint.abci - * @classdesc Represents an Event. - * @implements IEvent - * @constructor - * @param {tendermint.abci.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.Event - * @instance - */ - Event.prototype.type = ""; - - /** - * Event attributes. - * @member {Array.} attributes - * @memberof tendermint.abci.Event - * @instance - */ - Event.prototype.attributes = $util.emptyArray; - - /** - * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.Event.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.Event - * @static - * @param {tendermint.abci.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.abci.EventAttribute.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.Event.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.Event - * @static - * @param {tendermint.abci.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.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.abci.EventAttribute.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.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.abci.EventAttribute.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.Event - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.Event} Event - */ - Event.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.Event) - return object; - var message = new $root.tendermint.abci.Event(); - if (object.type != null) - message.type = String(object.type); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".tendermint.abci.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.Event.attributes: object expected"); - message.attributes[i] = $root.tendermint.abci.EventAttribute.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.Event - * @static - * @param {tendermint.abci.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.abci.EventAttribute.toObject(message.attributes[j], options); - } - return object; - }; - - /** - * Converts this Event to JSON. - * @function toJSON - * @memberof tendermint.abci.Event - * @instance - * @returns {Object.} JSON object - */ - Event.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Event; - })(); - - abci.EventAttribute = (function() { - - /** - * Properties of an EventAttribute. - * @memberof tendermint.abci - * @interface IEventAttribute - * @property {Uint8Array|null} [key] EventAttribute key - * @property {Uint8Array|null} [value] EventAttribute value - * @property {boolean|null} [index] EventAttribute index - */ - - /** - * Constructs a new EventAttribute. - * @memberof tendermint.abci - * @classdesc Represents an EventAttribute. - * @implements IEventAttribute - * @constructor - * @param {tendermint.abci.IEventAttribute=} [properties] Properties to set - */ - function EventAttribute(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EventAttribute key. - * @member {Uint8Array} key - * @memberof tendermint.abci.EventAttribute - * @instance - */ - EventAttribute.prototype.key = $util.newBuffer([]); - - /** - * EventAttribute value. - * @member {Uint8Array} value - * @memberof tendermint.abci.EventAttribute - * @instance - */ - EventAttribute.prototype.value = $util.newBuffer([]); - - /** - * EventAttribute index. - * @member {boolean} index - * @memberof tendermint.abci.EventAttribute - * @instance - */ - EventAttribute.prototype.index = false; - - /** - * Encodes the specified EventAttribute message. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.EventAttribute - * @static - * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventAttribute.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); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.index); - return writer; - }; - - /** - * Encodes the specified EventAttribute message, length delimited. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.EventAttribute - * @static - * @param {tendermint.abci.IEventAttribute} message EventAttribute message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EventAttribute.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EventAttribute message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.EventAttribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.EventAttribute} EventAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventAttribute.decode = 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.EventAttribute(); - 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; - case 3: - message.index = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EventAttribute message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.EventAttribute - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.EventAttribute} EventAttribute - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EventAttribute.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EventAttribute message. - * @function verify - * @memberof tendermint.abci.EventAttribute - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EventAttribute.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"; - if (message.index != null && message.hasOwnProperty("index")) - if (typeof message.index !== "boolean") - return "index: boolean expected"; - return null; - }; - - /** - * Creates an EventAttribute message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.EventAttribute - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.EventAttribute} EventAttribute - */ - EventAttribute.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.EventAttribute) - return object; - var message = new $root.tendermint.abci.EventAttribute(); - 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.index != null) - message.index = Boolean(object.index); - return message; - }; - - /** - * Creates a plain object from an EventAttribute message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.EventAttribute - * @static - * @param {tendermint.abci.EventAttribute} message EventAttribute - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EventAttribute.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); - } - object.index = false; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.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.index != null && message.hasOwnProperty("index")) - object.index = message.index; - return object; - }; - - /** - * Converts this EventAttribute to JSON. - * @function toJSON - * @memberof tendermint.abci.EventAttribute - * @instance - * @returns {Object.} JSON object - */ - EventAttribute.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EventAttribute; - })(); - - abci.TxResult = (function() { - - /** - * Properties of a TxResult. - * @memberof tendermint.abci - * @interface ITxResult - * @property {Long|null} [height] TxResult height - * @property {number|null} [index] TxResult index - * @property {Uint8Array|null} [tx] TxResult tx - * @property {tendermint.abci.IResponseDeliverTx|null} [result] TxResult result - */ - - /** - * Constructs a new TxResult. - * @memberof tendermint.abci - * @classdesc Represents a TxResult. - * @implements ITxResult - * @constructor - * @param {tendermint.abci.ITxResult=} [properties] Properties to set - */ - function TxResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxResult height. - * @member {Long} height - * @memberof tendermint.abci.TxResult - * @instance - */ - TxResult.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TxResult index. - * @member {number} index - * @memberof tendermint.abci.TxResult - * @instance - */ - TxResult.prototype.index = 0; - - /** - * TxResult tx. - * @member {Uint8Array} tx - * @memberof tendermint.abci.TxResult - * @instance - */ - TxResult.prototype.tx = $util.newBuffer([]); - - /** - * TxResult result. - * @member {tendermint.abci.IResponseDeliverTx|null|undefined} result - * @memberof tendermint.abci.TxResult - * @instance - */ - TxResult.prototype.result = null; - - /** - * Encodes the specified TxResult message. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.TxResult - * @static - * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxResult.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.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.index); - if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.tx); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.tendermint.abci.ResponseDeliverTx.encode(message.result, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxResult message, length delimited. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.TxResult - * @static - * @param {tendermint.abci.ITxResult} message TxResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxResult message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.TxResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.TxResult} TxResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxResult.decode = 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.TxResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.index = reader.uint32(); - break; - case 3: - message.tx = reader.bytes(); - break; - case 4: - message.result = $root.tendermint.abci.ResponseDeliverTx.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.TxResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.TxResult} TxResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxResult message. - * @function verify - * @memberof tendermint.abci.TxResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxResult.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.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer 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.result != null && message.hasOwnProperty("result")) { - var error = $root.tendermint.abci.ResponseDeliverTx.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a TxResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.TxResult - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.TxResult} TxResult - */ - TxResult.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.TxResult) - return object; - var message = new $root.tendermint.abci.TxResult(); - 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.index != null) - message.index = object.index >>> 0; - 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; - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".tendermint.abci.TxResult.result: object expected"); - message.result = $root.tendermint.abci.ResponseDeliverTx.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a TxResult message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.TxResult - * @static - * @param {tendermint.abci.TxResult} message TxResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxResult.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.index = 0; - if (options.bytes === String) - object.tx = ""; - else { - object.tx = []; - if (options.bytes !== Array) - object.tx = $util.newBuffer(object.tx); - } - object.result = null; - } - 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.index != null && message.hasOwnProperty("index")) - object.index = message.index; - 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.result != null && message.hasOwnProperty("result")) - object.result = $root.tendermint.abci.ResponseDeliverTx.toObject(message.result, options); - return object; - }; - - /** - * Converts this TxResult to JSON. - * @function toJSON - * @memberof tendermint.abci.TxResult - * @instance - * @returns {Object.} JSON object - */ - TxResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxResult; - })(); - - abci.Validator = (function() { - - /** - * Properties of a Validator. - * @memberof tendermint.abci - * @interface IValidator - * @property {Uint8Array|null} [address] Validator address - * @property {Long|null} [power] Validator power - */ - - /** - * Constructs a new Validator. - * @memberof tendermint.abci - * @classdesc Represents a Validator. - * @implements IValidator - * @constructor - * @param {tendermint.abci.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.Validator - * @instance - */ - Validator.prototype.address = $util.newBuffer([]); - - /** - * Validator power. - * @member {Long} power - * @memberof tendermint.abci.Validator - * @instance - */ - Validator.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.Validator.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.Validator - * @static - * @param {tendermint.abci.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.Validator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.Validator - * @static - * @param {tendermint.abci.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.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.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.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.Validator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.Validator} Validator - */ - Validator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.Validator) - return object; - var message = new $root.tendermint.abci.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.Validator - * @static - * @param {tendermint.abci.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.Validator - * @instance - * @returns {Object.} JSON object - */ - Validator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Validator; - })(); - - abci.ValidatorUpdate = (function() { - - /** - * Properties of a ValidatorUpdate. - * @memberof tendermint.abci - * @interface IValidatorUpdate - * @property {tendermint.crypto.IPublicKey|null} [pub_key] ValidatorUpdate pub_key - * @property {Long|null} [power] ValidatorUpdate power - */ - - /** - * Constructs a new ValidatorUpdate. - * @memberof tendermint.abci - * @classdesc Represents a ValidatorUpdate. - * @implements IValidatorUpdate - * @constructor - * @param {tendermint.abci.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 pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.abci.ValidatorUpdate - * @instance - */ - ValidatorUpdate.prototype.pub_key = null; - - /** - * ValidatorUpdate power. - * @member {Long} power - * @memberof tendermint.abci.ValidatorUpdate - * @instance - */ - ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.ValidatorUpdate.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.ValidatorUpdate - * @static - * @param {tendermint.abci.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.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, 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.ValidatorUpdate.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.ValidatorUpdate - * @static - * @param {tendermint.abci.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.ValidatorUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.ValidatorUpdate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = $root.tendermint.crypto.PublicKey.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.ValidatorUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.pub_key != null && message.hasOwnProperty("pub_key")) { - var error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + 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.ValidatorUpdate - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.ValidatorUpdate} ValidatorUpdate - */ - ValidatorUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.ValidatorUpdate) - return object; - var message = new $root.tendermint.abci.ValidatorUpdate(); - if (object.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.abci.ValidatorUpdate.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - 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.ValidatorUpdate - * @static - * @param {tendermint.abci.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.pub_key = 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.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, 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.ValidatorUpdate - * @instance - * @returns {Object.} JSON object - */ - ValidatorUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValidatorUpdate; - })(); - - abci.VoteInfo = (function() { - - /** - * Properties of a VoteInfo. - * @memberof tendermint.abci - * @interface IVoteInfo - * @property {tendermint.abci.IValidator|null} [validator] VoteInfo validator - * @property {boolean|null} [signed_last_block] VoteInfo signed_last_block - */ - - /** - * Constructs a new VoteInfo. - * @memberof tendermint.abci - * @classdesc Represents a VoteInfo. - * @implements IVoteInfo - * @constructor - * @param {tendermint.abci.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.IValidator|null|undefined} validator - * @memberof tendermint.abci.VoteInfo - * @instance - */ - VoteInfo.prototype.validator = null; - - /** - * VoteInfo signed_last_block. - * @member {boolean} signed_last_block - * @memberof tendermint.abci.VoteInfo - * @instance - */ - VoteInfo.prototype.signed_last_block = false; - - /** - * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.VoteInfo - * @static - * @param {tendermint.abci.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.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.signed_last_block != null && Object.hasOwnProperty.call(message, "signed_last_block")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.signed_last_block); - return writer; - }; - - /** - * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.VoteInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.VoteInfo - * @static - * @param {tendermint.abci.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.VoteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.VoteInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.validator = $root.tendermint.abci.Validator.decode(reader, reader.uint32()); - break; - case 2: - message.signed_last_block = 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.VoteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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.Validator.verify(message.validator); - if (error) - return "validator." + error; - } - if (message.signed_last_block != null && message.hasOwnProperty("signed_last_block")) - if (typeof message.signed_last_block !== "boolean") - return "signed_last_block: 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.VoteInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.VoteInfo} VoteInfo - */ - VoteInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.VoteInfo) - return object; - var message = new $root.tendermint.abci.VoteInfo(); - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.abci.VoteInfo.validator: object expected"); - message.validator = $root.tendermint.abci.Validator.fromObject(object.validator); - } - if (object.signed_last_block != null) - message.signed_last_block = Boolean(object.signed_last_block); - return message; - }; - - /** - * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.VoteInfo - * @static - * @param {tendermint.abci.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.signed_last_block = false; - } - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.abci.Validator.toObject(message.validator, options); - if (message.signed_last_block != null && message.hasOwnProperty("signed_last_block")) - object.signed_last_block = message.signed_last_block; - return object; - }; - - /** - * Converts this VoteInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.VoteInfo - * @instance - * @returns {Object.} JSON object - */ - VoteInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VoteInfo; - })(); - - /** - * EvidenceType enum. - * @name tendermint.abci.EvidenceType - * @enum {number} - * @property {number} UNKNOWN=0 UNKNOWN value - * @property {number} DUPLICATE_VOTE=1 DUPLICATE_VOTE value - * @property {number} LIGHT_CLIENT_ATTACK=2 LIGHT_CLIENT_ATTACK value - */ - abci.EvidenceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UNKNOWN"] = 0; - values[valuesById[1] = "DUPLICATE_VOTE"] = 1; - values[valuesById[2] = "LIGHT_CLIENT_ATTACK"] = 2; - return values; - })(); - - abci.Evidence = (function() { - - /** - * Properties of an Evidence. - * @memberof tendermint.abci - * @interface IEvidence - * @property {tendermint.abci.EvidenceType|null} [type] Evidence type - * @property {tendermint.abci.IValidator|null} [validator] Evidence validator - * @property {Long|null} [height] Evidence height - * @property {google.protobuf.ITimestamp|null} [time] Evidence time - * @property {Long|null} [total_voting_power] Evidence total_voting_power - */ - - /** - * Constructs a new Evidence. - * @memberof tendermint.abci - * @classdesc Represents an Evidence. - * @implements IEvidence - * @constructor - * @param {tendermint.abci.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 {tendermint.abci.EvidenceType} type - * @memberof tendermint.abci.Evidence - * @instance - */ - Evidence.prototype.type = 0; - - /** - * Evidence validator. - * @member {tendermint.abci.IValidator|null|undefined} validator - * @memberof tendermint.abci.Evidence - * @instance - */ - Evidence.prototype.validator = null; - - /** - * Evidence height. - * @member {Long} height - * @memberof tendermint.abci.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.Evidence - * @instance - */ - Evidence.prototype.time = null; - - /** - * Evidence total_voting_power. - * @member {Long} total_voting_power - * @memberof tendermint.abci.Evidence - * @instance - */ - Evidence.prototype.total_voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.Evidence - * @static - * @param {tendermint.abci.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 0 =*/8).int32(message.type); - if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) - $root.tendermint.abci.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.total_voting_power != null && Object.hasOwnProperty.call(message, "total_voting_power")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.total_voting_power); - return writer; - }; - - /** - * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.Evidence.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.Evidence - * @static - * @param {tendermint.abci.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.Evidence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.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.Evidence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.validator = $root.tendermint.abci.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.total_voting_power = 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.Evidence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.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.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")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.validator != null && message.hasOwnProperty("validator")) { - var error = $root.tendermint.abci.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.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (!$util.isInteger(message.total_voting_power) && !(message.total_voting_power && $util.isInteger(message.total_voting_power.low) && $util.isInteger(message.total_voting_power.high))) - return "total_voting_power: 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.Evidence - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.Evidence} Evidence - */ - Evidence.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.Evidence) - return object; - var message = new $root.tendermint.abci.Evidence(); - switch (object.type) { - case "UNKNOWN": - case 0: - message.type = 0; - break; - case "DUPLICATE_VOTE": - case 1: - message.type = 1; - break; - case "LIGHT_CLIENT_ATTACK": - case 2: - message.type = 2; - break; - } - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.abci.Evidence.validator: object expected"); - message.validator = $root.tendermint.abci.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.Evidence.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.total_voting_power != null) - if ($util.Long) - (message.total_voting_power = $util.Long.fromValue(object.total_voting_power)).unsigned = false; - else if (typeof object.total_voting_power === "string") - message.total_voting_power = parseInt(object.total_voting_power, 10); - else if (typeof object.total_voting_power === "number") - message.total_voting_power = object.total_voting_power; - else if (typeof object.total_voting_power === "object") - message.total_voting_power = new $util.LongBits(object.total_voting_power.low >>> 0, object.total_voting_power.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.Evidence - * @static - * @param {tendermint.abci.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 = options.enums === String ? "UNKNOWN" : 0; - 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.total_voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total_voting_power = options.longs === String ? "0" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.abci.EvidenceType[message.type] : message.type; - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.abci.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.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (typeof message.total_voting_power === "number") - object.total_voting_power = options.longs === String ? String(message.total_voting_power) : message.total_voting_power; - else - object.total_voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.total_voting_power) : options.longs === Number ? new $util.LongBits(message.total_voting_power.low >>> 0, message.total_voting_power.high >>> 0).toNumber() : message.total_voting_power; - return object; - }; - - /** - * Converts this Evidence to JSON. - * @function toJSON - * @memberof tendermint.abci.Evidence - * @instance - * @returns {Object.} JSON object - */ - Evidence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Evidence; - })(); - - abci.Snapshot = (function() { - - /** - * Properties of a Snapshot. - * @memberof tendermint.abci - * @interface ISnapshot - * @property {Long|null} [height] Snapshot height - * @property {number|null} [format] Snapshot format - * @property {number|null} [chunks] Snapshot chunks - * @property {Uint8Array|null} [hash] Snapshot hash - * @property {Uint8Array|null} [metadata] Snapshot metadata - */ - - /** - * Constructs a new Snapshot. - * @memberof tendermint.abci - * @classdesc Represents a Snapshot. - * @implements ISnapshot - * @constructor - * @param {tendermint.abci.ISnapshot=} [properties] Properties to set - */ - function Snapshot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Snapshot height. - * @member {Long} height - * @memberof tendermint.abci.Snapshot - * @instance - */ - Snapshot.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Snapshot format. - * @member {number} format - * @memberof tendermint.abci.Snapshot - * @instance - */ - Snapshot.prototype.format = 0; - - /** - * Snapshot chunks. - * @member {number} chunks - * @memberof tendermint.abci.Snapshot - * @instance - */ - Snapshot.prototype.chunks = 0; - - /** - * Snapshot hash. - * @member {Uint8Array} hash - * @memberof tendermint.abci.Snapshot - * @instance - */ - Snapshot.prototype.hash = $util.newBuffer([]); - - /** - * Snapshot metadata. - * @member {Uint8Array} metadata - * @memberof tendermint.abci.Snapshot - * @instance - */ - Snapshot.prototype.metadata = $util.newBuffer([]); - - /** - * Encodes the specified Snapshot message. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.Snapshot - * @static - * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snapshot.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).uint64(message.height); - if (message.format != null && Object.hasOwnProperty.call(message, "format")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.format); - if (message.chunks != null && Object.hasOwnProperty.call(message, "chunks")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.chunks); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.hash); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.metadata); - return writer; - }; - - /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.Snapshot - * @static - * @param {tendermint.abci.ISnapshot} message Snapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Snapshot message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.Snapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.abci.Snapshot} Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snapshot.decode = 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.Snapshot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.uint64(); - break; - case 2: - message.format = reader.uint32(); - break; - case 3: - message.chunks = reader.uint32(); - break; - case 4: - message.hash = reader.bytes(); - break; - case 5: - message.metadata = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.Snapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.Snapshot} Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Snapshot message. - * @function verify - * @memberof tendermint.abci.Snapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Snapshot.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.format != null && message.hasOwnProperty("format")) - if (!$util.isInteger(message.format)) - return "format: integer expected"; - if (message.chunks != null && message.hasOwnProperty("chunks")) - if (!$util.isInteger(message.chunks)) - return "chunks: 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"; - if (message.metadata != null && message.hasOwnProperty("metadata")) - if (!(message.metadata && typeof message.metadata.length === "number" || $util.isString(message.metadata))) - return "metadata: buffer expected"; - return null; - }; - - /** - * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.Snapshot - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.Snapshot} Snapshot - */ - Snapshot.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.Snapshot) - return object; - var message = new $root.tendermint.abci.Snapshot(); - 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); - if (object.format != null) - message.format = object.format >>> 0; - if (object.chunks != null) - message.chunks = object.chunks >>> 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; - if (object.metadata != null) - if (typeof object.metadata === "string") - $util.base64.decode(object.metadata, message.metadata = $util.newBuffer($util.base64.length(object.metadata)), 0); - else if (object.metadata.length) - message.metadata = object.metadata; - return message; - }; - - /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.Snapshot - * @static - * @param {tendermint.abci.Snapshot} message Snapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Snapshot.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.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.format = 0; - object.chunks = 0; - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } - if (options.bytes === String) - object.metadata = ""; - else { - object.metadata = []; - if (options.bytes !== Array) - object.metadata = $util.newBuffer(object.metadata); - } - } - 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; - if (message.format != null && message.hasOwnProperty("format")) - object.format = message.format; - if (message.chunks != null && message.hasOwnProperty("chunks")) - object.chunks = message.chunks; - 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.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = options.bytes === String ? $util.base64.encode(message.metadata, 0, message.metadata.length) : options.bytes === Array ? Array.prototype.slice.call(message.metadata) : message.metadata; - return object; - }; - - /** - * Converts this Snapshot to JSON. - * @function toJSON - * @memberof tendermint.abci.Snapshot - * @instance - * @returns {Object.} JSON object - */ - Snapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Snapshot; - })(); - - abci.ABCIApplication = (function() { - - /** - * Constructs a new ABCIApplication service. - * @memberof tendermint.abci - * @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; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#echo}. - * @memberof tendermint.abci.ABCIApplication - * @typedef EchoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseEcho} [response] ResponseEcho - */ - - /** - * Calls Echo. - * @function echo - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object - * @param {tendermint.abci.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.RequestEcho, $root.tendermint.abci.ResponseEcho, request, callback); - }, "name", { value: "Echo" }); - - /** - * Calls Echo. - * @function echo - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestEcho} request RequestEcho message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#flush}. - * @memberof tendermint.abci.ABCIApplication - * @typedef FlushCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseFlush} [response] ResponseFlush - */ - - /** - * Calls Flush. - * @function flush - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object - * @param {tendermint.abci.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.RequestFlush, $root.tendermint.abci.ResponseFlush, request, callback); - }, "name", { value: "Flush" }); - - /** - * Calls Flush. - * @function flush - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestFlush} request RequestFlush message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#info}. - * @memberof tendermint.abci.ABCIApplication - * @typedef InfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseInfo} [response] ResponseInfo - */ - - /** - * Calls Info. - * @function info - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object - * @param {tendermint.abci.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.RequestInfo, $root.tendermint.abci.ResponseInfo, request, callback); - }, "name", { value: "Info" }); - - /** - * Calls Info. - * @function info - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestInfo} request RequestInfo message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#setOption}. - * @memberof tendermint.abci.ABCIApplication - * @typedef SetOptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseSetOption} [response] ResponseSetOption - */ - - /** - * Calls SetOption. - * @function setOption - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object - * @param {tendermint.abci.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.RequestSetOption, $root.tendermint.abci.ResponseSetOption, request, callback); - }, "name", { value: "SetOption" }); - - /** - * Calls SetOption. - * @function setOption - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestSetOption} request RequestSetOption message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#deliverTx}. - * @memberof tendermint.abci.ABCIApplication - * @typedef DeliverTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseDeliverTx} [response] ResponseDeliverTx - */ - - /** - * Calls DeliverTx. - * @function deliverTx - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object - * @param {tendermint.abci.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.RequestDeliverTx, $root.tendermint.abci.ResponseDeliverTx, request, callback); - }, "name", { value: "DeliverTx" }); - - /** - * Calls DeliverTx. - * @function deliverTx - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestDeliverTx} request RequestDeliverTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#checkTx}. - * @memberof tendermint.abci.ABCIApplication - * @typedef CheckTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseCheckTx} [response] ResponseCheckTx - */ - - /** - * Calls CheckTx. - * @function checkTx - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object - * @param {tendermint.abci.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.RequestCheckTx, $root.tendermint.abci.ResponseCheckTx, request, callback); - }, "name", { value: "CheckTx" }); - - /** - * Calls CheckTx. - * @function checkTx - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestCheckTx} request RequestCheckTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#query}. - * @memberof tendermint.abci.ABCIApplication - * @typedef QueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseQuery} [response] ResponseQuery - */ - - /** - * Calls Query. - * @function query - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object - * @param {tendermint.abci.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.RequestQuery, $root.tendermint.abci.ResponseQuery, request, callback); - }, "name", { value: "Query" }); - - /** - * Calls Query. - * @function query - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestQuery} request RequestQuery message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#commit}. - * @memberof tendermint.abci.ABCIApplication - * @typedef CommitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseCommit} [response] ResponseCommit - */ - - /** - * Calls Commit. - * @function commit - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object - * @param {tendermint.abci.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.RequestCommit, $root.tendermint.abci.ResponseCommit, request, callback); - }, "name", { value: "Commit" }); - - /** - * Calls Commit. - * @function commit - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestCommit} request RequestCommit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#initChain}. - * @memberof tendermint.abci.ABCIApplication - * @typedef InitChainCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseInitChain} [response] ResponseInitChain - */ - - /** - * Calls InitChain. - * @function initChain - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object - * @param {tendermint.abci.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.RequestInitChain, $root.tendermint.abci.ResponseInitChain, request, callback); - }, "name", { value: "InitChain" }); - - /** - * Calls InitChain. - * @function initChain - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestInitChain} request RequestInitChain message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#beginBlock}. - * @memberof tendermint.abci.ABCIApplication - * @typedef BeginBlockCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseBeginBlock} [response] ResponseBeginBlock - */ - - /** - * Calls BeginBlock. - * @function beginBlock - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object - * @param {tendermint.abci.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.RequestBeginBlock, $root.tendermint.abci.ResponseBeginBlock, request, callback); - }, "name", { value: "BeginBlock" }); - - /** - * Calls BeginBlock. - * @function beginBlock - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestBeginBlock} request RequestBeginBlock message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#endBlock}. - * @memberof tendermint.abci.ABCIApplication - * @typedef EndBlockCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseEndBlock} [response] ResponseEndBlock - */ - - /** - * Calls EndBlock. - * @function endBlock - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object - * @param {tendermint.abci.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.RequestEndBlock, $root.tendermint.abci.ResponseEndBlock, request, callback); - }, "name", { value: "EndBlock" }); - - /** - * Calls EndBlock. - * @function endBlock - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestEndBlock} request RequestEndBlock message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#listSnapshots}. - * @memberof tendermint.abci.ABCIApplication - * @typedef ListSnapshotsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseListSnapshots} [response] ResponseListSnapshots - */ - - /** - * Calls ListSnapshots. - * @function listSnapshots - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object - * @param {tendermint.abci.ABCIApplication.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ResponseListSnapshots - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ABCIApplication.prototype.listSnapshots = function listSnapshots(request, callback) { - return this.rpcCall(listSnapshots, $root.tendermint.abci.RequestListSnapshots, $root.tendermint.abci.ResponseListSnapshots, request, callback); - }, "name", { value: "ListSnapshots" }); - - /** - * Calls ListSnapshots. - * @function listSnapshots - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestListSnapshots} request RequestListSnapshots message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#offerSnapshot}. - * @memberof tendermint.abci.ABCIApplication - * @typedef OfferSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseOfferSnapshot} [response] ResponseOfferSnapshot - */ - - /** - * Calls OfferSnapshot. - * @function offerSnapshot - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object - * @param {tendermint.abci.ABCIApplication.OfferSnapshotCallback} callback Node-style callback called with the error, if any, and ResponseOfferSnapshot - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ABCIApplication.prototype.offerSnapshot = function offerSnapshot(request, callback) { - return this.rpcCall(offerSnapshot, $root.tendermint.abci.RequestOfferSnapshot, $root.tendermint.abci.ResponseOfferSnapshot, request, callback); - }, "name", { value: "OfferSnapshot" }); - - /** - * Calls OfferSnapshot. - * @function offerSnapshot - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestOfferSnapshot} request RequestOfferSnapshot message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#loadSnapshotChunk}. - * @memberof tendermint.abci.ABCIApplication - * @typedef LoadSnapshotChunkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseLoadSnapshotChunk} [response] ResponseLoadSnapshotChunk - */ - - /** - * Calls LoadSnapshotChunk. - * @function loadSnapshotChunk - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object - * @param {tendermint.abci.ABCIApplication.LoadSnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseLoadSnapshotChunk - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ABCIApplication.prototype.loadSnapshotChunk = function loadSnapshotChunk(request, callback) { - return this.rpcCall(loadSnapshotChunk, $root.tendermint.abci.RequestLoadSnapshotChunk, $root.tendermint.abci.ResponseLoadSnapshotChunk, request, callback); - }, "name", { value: "LoadSnapshotChunk" }); - - /** - * Calls LoadSnapshotChunk. - * @function loadSnapshotChunk - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestLoadSnapshotChunk} request RequestLoadSnapshotChunk message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#applySnapshotChunk}. - * @memberof tendermint.abci.ABCIApplication - * @typedef ApplySnapshotChunkCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.ResponseApplySnapshotChunk} [response] ResponseApplySnapshotChunk - */ - - /** - * Calls ApplySnapshotChunk. - * @function applySnapshotChunk - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object - * @param {tendermint.abci.ABCIApplication.ApplySnapshotChunkCallback} callback Node-style callback called with the error, if any, and ResponseApplySnapshotChunk - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ABCIApplication.prototype.applySnapshotChunk = function applySnapshotChunk(request, callback) { - return this.rpcCall(applySnapshotChunk, $root.tendermint.abci.RequestApplySnapshotChunk, $root.tendermint.abci.ResponseApplySnapshotChunk, request, callback); - }, "name", { value: "ApplySnapshotChunk" }); - - /** - * Calls ApplySnapshotChunk. - * @function applySnapshotChunk - * @memberof tendermint.abci.ABCIApplication - * @instance - * @param {tendermint.abci.IRequestApplySnapshotChunk} request RequestApplySnapshotChunk message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ABCIApplication; - })(); - - return abci; - })(); - - tendermint.types = (function() { - - /** - * Namespace types. - * @memberof tendermint - * @namespace - */ - var types = {}; - - /** - * BlockIDFlag enum. - * @name tendermint.types.BlockIDFlag - * @enum {number} - * @property {number} BLOCK_ID_FLAG_UNKNOWN=0 BLOCK_ID_FLAG_UNKNOWN value - * @property {number} BLOCK_ID_FLAG_ABSENT=1 BLOCK_ID_FLAG_ABSENT value - * @property {number} BLOCK_ID_FLAG_COMMIT=2 BLOCK_ID_FLAG_COMMIT value - * @property {number} BLOCK_ID_FLAG_NIL=3 BLOCK_ID_FLAG_NIL value - */ - types.BlockIDFlag = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BLOCK_ID_FLAG_UNKNOWN"] = 0; - values[valuesById[1] = "BLOCK_ID_FLAG_ABSENT"] = 1; - values[valuesById[2] = "BLOCK_ID_FLAG_COMMIT"] = 2; - values[valuesById[3] = "BLOCK_ID_FLAG_NIL"] = 3; - return values; - })(); - - /** - * SignedMsgType enum. - * @name tendermint.types.SignedMsgType - * @enum {number} - * @property {number} SIGNED_MSG_TYPE_UNKNOWN=0 SIGNED_MSG_TYPE_UNKNOWN value - * @property {number} SIGNED_MSG_TYPE_PREVOTE=1 SIGNED_MSG_TYPE_PREVOTE value - * @property {number} SIGNED_MSG_TYPE_PRECOMMIT=2 SIGNED_MSG_TYPE_PRECOMMIT value - * @property {number} SIGNED_MSG_TYPE_PROPOSAL=32 SIGNED_MSG_TYPE_PROPOSAL value - */ - types.SignedMsgType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SIGNED_MSG_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "SIGNED_MSG_TYPE_PREVOTE"] = 1; - values[valuesById[2] = "SIGNED_MSG_TYPE_PRECOMMIT"] = 2; - values[valuesById[32] = "SIGNED_MSG_TYPE_PROPOSAL"] = 32; - return values; - })(); - - types.PartSetHeader = (function() { - - /** - * Properties of a PartSetHeader. - * @memberof tendermint.types - * @interface IPartSetHeader - * @property {number|null} [total] PartSetHeader total - * @property {Uint8Array|null} [hash] PartSetHeader hash - */ - - /** - * Constructs a new PartSetHeader. - * @memberof tendermint.types - * @classdesc Represents a PartSetHeader. - * @implements IPartSetHeader - * @constructor - * @param {tendermint.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.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.total = 0; - - /** - * PartSetHeader hash. - * @member {Uint8Array} hash - * @memberof tendermint.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.hash = $util.newBuffer([]); - - /** - * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.types.PartSetHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.types.PartSetHeader - * @static - * @param {tendermint.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).uint32(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.types.PartSetHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.PartSetHeader - * @static - * @param {tendermint.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.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.PartSetHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.total = reader.uint32(); - 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.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.types.PartSetHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.PartSetHeader} PartSetHeader - */ - PartSetHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.PartSetHeader) - return object; - var message = new $root.tendermint.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.types.PartSetHeader - * @static - * @param {tendermint.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.types.PartSetHeader - * @instance - * @returns {Object.} JSON object - */ - PartSetHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return PartSetHeader; - })(); - - types.Part = (function() { - - /** - * Properties of a Part. - * @memberof tendermint.types - * @interface IPart - * @property {number|null} [index] Part index - * @property {Uint8Array|null} [bytes] Part bytes - * @property {tendermint.crypto.IProof|null} [proof] Part proof - */ - - /** - * Constructs a new Part. - * @memberof tendermint.types - * @classdesc Represents a Part. - * @implements IPart - * @constructor - * @param {tendermint.types.IPart=} [properties] Properties to set - */ - function Part(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Part index. - * @member {number} index - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.index = 0; - - /** - * Part bytes. - * @member {Uint8Array} bytes - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.bytes = $util.newBuffer([]); - - /** - * Part proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.types.Part - * @instance - */ - Part.prototype.proof = null; - - /** - * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.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).uint32(message.index); - if (message.bytes != null && Object.hasOwnProperty.call(message, "bytes")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.bytes); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.IPart} message Part message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Part.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Part message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decode = 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.types.Part(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.index = reader.uint32(); - break; - case 2: - message.bytes = reader.bytes(); - break; - case 3: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Part message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Part - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Part} Part - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Part.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Part message. - * @function verify - * @memberof tendermint.types.Part - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Part.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)) - return "index: integer expected"; - if (message.bytes != null && message.hasOwnProperty("bytes")) - if (!(message.bytes && typeof message.bytes.length === "number" || $util.isString(message.bytes))) - return "bytes: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Part - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Part} Part - */ - Part.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Part) - return object; - var message = new $root.tendermint.types.Part(); - if (object.index != null) - message.index = object.index >>> 0; - if (object.bytes != null) - if (typeof object.bytes === "string") - $util.base64.decode(object.bytes, message.bytes = $util.newBuffer($util.base64.length(object.bytes)), 0); - else if (object.bytes.length) - message.bytes = object.bytes; - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.types.Part.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Part - * @static - * @param {tendermint.types.Part} message Part - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Part.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.index = 0; - if (options.bytes === String) - object.bytes = ""; - else { - object.bytes = []; - if (options.bytes !== Array) - object.bytes = $util.newBuffer(object.bytes); - } - object.proof = null; - } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.bytes != null && message.hasOwnProperty("bytes")) - object.bytes = options.bytes === String ? $util.base64.encode(message.bytes, 0, message.bytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.bytes) : message.bytes; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this Part to JSON. - * @function toJSON - * @memberof tendermint.types.Part - * @instance - * @returns {Object.} JSON object - */ - Part.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Part; - })(); - - types.BlockID = (function() { - - /** - * Properties of a BlockID. - * @memberof tendermint.types - * @interface IBlockID - * @property {Uint8Array|null} [hash] BlockID hash - * @property {tendermint.types.IPartSetHeader|null} [part_set_header] BlockID part_set_header - */ - - /** - * Constructs a new BlockID. - * @memberof tendermint.types - * @classdesc Represents a BlockID. - * @implements IBlockID - * @constructor - * @param {tendermint.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.types.BlockID - * @instance - */ - BlockID.prototype.hash = $util.newBuffer([]); - - /** - * BlockID part_set_header. - * @member {tendermint.types.IPartSetHeader|null|undefined} part_set_header - * @memberof tendermint.types.BlockID - * @instance - */ - BlockID.prototype.part_set_header = null; - - /** - * Encodes the specified BlockID message. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.part_set_header != null && Object.hasOwnProperty.call(message, "part_set_header")) - $root.tendermint.types.PartSetHeader.encode(message.part_set_header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.types.BlockID.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.BlockID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.hash = reader.bytes(); - break; - case 2: - message.part_set_header = $root.tendermint.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.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.part_set_header != null && message.hasOwnProperty("part_set_header")) { - var error = $root.tendermint.types.PartSetHeader.verify(message.part_set_header); - if (error) - return "part_set_header." + error; - } - return null; - }; - - /** - * Creates a BlockID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.BlockID - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockID} BlockID - */ - BlockID.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockID) - return object; - var message = new $root.tendermint.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.part_set_header != null) { - if (typeof object.part_set_header !== "object") - throw TypeError(".tendermint.types.BlockID.part_set_header: object expected"); - message.part_set_header = $root.tendermint.types.PartSetHeader.fromObject(object.part_set_header); - } - return message; - }; - - /** - * Creates a plain object from a BlockID message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.BlockID - * @static - * @param {tendermint.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.part_set_header = 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.part_set_header != null && message.hasOwnProperty("part_set_header")) - object.part_set_header = $root.tendermint.types.PartSetHeader.toObject(message.part_set_header, options); - return object; - }; - - /** - * Converts this BlockID to JSON. - * @function toJSON - * @memberof tendermint.types.BlockID - * @instance - * @returns {Object.} JSON object - */ - BlockID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockID; - })(); - - types.Header = (function() { - - /** - * Properties of a Header. - * @memberof tendermint.types - * @interface IHeader - * @property {tendermint.version.IConsensus|null} [version] Header version - * @property {string|null} [chain_id] Header chain_id - * @property {Long|null} [height] Header height - * @property {google.protobuf.ITimestamp|null} [time] Header time - * @property {tendermint.types.IBlockID|null} [last_block_id] Header last_block_id - * @property {Uint8Array|null} [last_commit_hash] Header last_commit_hash - * @property {Uint8Array|null} [data_hash] Header data_hash - * @property {Uint8Array|null} [validators_hash] Header validators_hash - * @property {Uint8Array|null} [next_validators_hash] Header next_validators_hash - * @property {Uint8Array|null} [consensus_hash] Header consensus_hash - * @property {Uint8Array|null} [app_hash] Header app_hash - * @property {Uint8Array|null} [last_results_hash] Header last_results_hash - * @property {Uint8Array|null} [evidence_hash] Header evidence_hash - * @property {Uint8Array|null} [proposer_address] Header proposer_address - */ - - /** - * Constructs a new Header. - * @memberof tendermint.types - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {tendermint.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.version.IConsensus|null|undefined} version - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.version = null; - - /** - * Header chain_id. - * @member {string} chain_id - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.chain_id = ""; - - /** - * Header height. - * @member {Long} height - * @memberof tendermint.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.types.Header - * @instance - */ - Header.prototype.time = null; - - /** - * Header last_block_id. - * @member {tendermint.types.IBlockID|null|undefined} last_block_id - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_block_id = null; - - /** - * Header last_commit_hash. - * @member {Uint8Array} last_commit_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_commit_hash = $util.newBuffer([]); - - /** - * Header data_hash. - * @member {Uint8Array} data_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.data_hash = $util.newBuffer([]); - - /** - * Header validators_hash. - * @member {Uint8Array} validators_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.validators_hash = $util.newBuffer([]); - - /** - * Header next_validators_hash. - * @member {Uint8Array} next_validators_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.next_validators_hash = $util.newBuffer([]); - - /** - * Header consensus_hash. - * @member {Uint8Array} consensus_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.consensus_hash = $util.newBuffer([]); - - /** - * Header app_hash. - * @member {Uint8Array} app_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.app_hash = $util.newBuffer([]); - - /** - * Header last_results_hash. - * @member {Uint8Array} last_results_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.last_results_hash = $util.newBuffer([]); - - /** - * Header evidence_hash. - * @member {Uint8Array} evidence_hash - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.evidence_hash = $util.newBuffer([]); - - /** - * Header proposer_address. - * @member {Uint8Array} proposer_address - * @memberof tendermint.types.Header - * @instance - */ - Header.prototype.proposer_address = $util.newBuffer([]); - - /** - * Encodes the specified Header message. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.version.Consensus.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.chain_id != null && Object.hasOwnProperty.call(message, "chain_id")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.chain_id); - 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.last_block_id != null && Object.hasOwnProperty.call(message, "last_block_id")) - $root.tendermint.types.BlockID.encode(message.last_block_id, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.last_commit_hash != null && Object.hasOwnProperty.call(message, "last_commit_hash")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.last_commit_hash); - if (message.data_hash != null && Object.hasOwnProperty.call(message, "data_hash")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.data_hash); - if (message.validators_hash != null && Object.hasOwnProperty.call(message, "validators_hash")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validators_hash); - if (message.next_validators_hash != null && Object.hasOwnProperty.call(message, "next_validators_hash")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.next_validators_hash); - if (message.consensus_hash != null && Object.hasOwnProperty.call(message, "consensus_hash")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensus_hash); - if (message.app_hash != null && Object.hasOwnProperty.call(message, "app_hash")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.app_hash); - if (message.last_results_hash != null && Object.hasOwnProperty.call(message, "last_results_hash")) - writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.last_results_hash); - if (message.evidence_hash != null && Object.hasOwnProperty.call(message, "evidence_hash")) - writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidence_hash); - if (message.proposer_address != null && Object.hasOwnProperty.call(message, "proposer_address")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposer_address); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.types.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.Header(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.version = $root.tendermint.version.Consensus.decode(reader, reader.uint32()); - break; - case 2: - message.chain_id = 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.last_block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.last_commit_hash = reader.bytes(); - break; - case 7: - message.data_hash = reader.bytes(); - break; - case 8: - message.validators_hash = reader.bytes(); - break; - case 9: - message.next_validators_hash = reader.bytes(); - break; - case 10: - message.consensus_hash = reader.bytes(); - break; - case 11: - message.app_hash = reader.bytes(); - break; - case 12: - message.last_results_hash = reader.bytes(); - break; - case 13: - message.evidence_hash = reader.bytes(); - break; - case 14: - message.proposer_address = 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.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.version.Consensus.verify(message.version); - if (error) - return "version." + error; - } - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - if (!$util.isString(message.chain_id)) - return "chain_id: 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.last_block_id != null && message.hasOwnProperty("last_block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.last_block_id); - if (error) - return "last_block_id." + error; - } - if (message.last_commit_hash != null && message.hasOwnProperty("last_commit_hash")) - if (!(message.last_commit_hash && typeof message.last_commit_hash.length === "number" || $util.isString(message.last_commit_hash))) - return "last_commit_hash: buffer expected"; - if (message.data_hash != null && message.hasOwnProperty("data_hash")) - if (!(message.data_hash && typeof message.data_hash.length === "number" || $util.isString(message.data_hash))) - return "data_hash: buffer expected"; - if (message.validators_hash != null && message.hasOwnProperty("validators_hash")) - if (!(message.validators_hash && typeof message.validators_hash.length === "number" || $util.isString(message.validators_hash))) - return "validators_hash: buffer expected"; - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - if (!(message.next_validators_hash && typeof message.next_validators_hash.length === "number" || $util.isString(message.next_validators_hash))) - return "next_validators_hash: buffer expected"; - if (message.consensus_hash != null && message.hasOwnProperty("consensus_hash")) - if (!(message.consensus_hash && typeof message.consensus_hash.length === "number" || $util.isString(message.consensus_hash))) - return "consensus_hash: buffer expected"; - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - if (!(message.app_hash && typeof message.app_hash.length === "number" || $util.isString(message.app_hash))) - return "app_hash: buffer expected"; - if (message.last_results_hash != null && message.hasOwnProperty("last_results_hash")) - if (!(message.last_results_hash && typeof message.last_results_hash.length === "number" || $util.isString(message.last_results_hash))) - return "last_results_hash: buffer expected"; - if (message.evidence_hash != null && message.hasOwnProperty("evidence_hash")) - if (!(message.evidence_hash && typeof message.evidence_hash.length === "number" || $util.isString(message.evidence_hash))) - return "evidence_hash: buffer expected"; - if (message.proposer_address != null && message.hasOwnProperty("proposer_address")) - if (!(message.proposer_address && typeof message.proposer_address.length === "number" || $util.isString(message.proposer_address))) - return "proposer_address: buffer expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Header - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Header) - return object; - var message = new $root.tendermint.types.Header(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".tendermint.types.Header.version: object expected"); - message.version = $root.tendermint.version.Consensus.fromObject(object.version); - } - if (object.chain_id != null) - message.chain_id = String(object.chain_id); - 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.types.Header.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.last_block_id != null) { - if (typeof object.last_block_id !== "object") - throw TypeError(".tendermint.types.Header.last_block_id: object expected"); - message.last_block_id = $root.tendermint.types.BlockID.fromObject(object.last_block_id); - } - if (object.last_commit_hash != null) - if (typeof object.last_commit_hash === "string") - $util.base64.decode(object.last_commit_hash, message.last_commit_hash = $util.newBuffer($util.base64.length(object.last_commit_hash)), 0); - else if (object.last_commit_hash.length) - message.last_commit_hash = object.last_commit_hash; - if (object.data_hash != null) - if (typeof object.data_hash === "string") - $util.base64.decode(object.data_hash, message.data_hash = $util.newBuffer($util.base64.length(object.data_hash)), 0); - else if (object.data_hash.length) - message.data_hash = object.data_hash; - if (object.validators_hash != null) - if (typeof object.validators_hash === "string") - $util.base64.decode(object.validators_hash, message.validators_hash = $util.newBuffer($util.base64.length(object.validators_hash)), 0); - else if (object.validators_hash.length) - message.validators_hash = object.validators_hash; - if (object.next_validators_hash != null) - if (typeof object.next_validators_hash === "string") - $util.base64.decode(object.next_validators_hash, message.next_validators_hash = $util.newBuffer($util.base64.length(object.next_validators_hash)), 0); - else if (object.next_validators_hash.length) - message.next_validators_hash = object.next_validators_hash; - if (object.consensus_hash != null) - if (typeof object.consensus_hash === "string") - $util.base64.decode(object.consensus_hash, message.consensus_hash = $util.newBuffer($util.base64.length(object.consensus_hash)), 0); - else if (object.consensus_hash.length) - message.consensus_hash = object.consensus_hash; - if (object.app_hash != null) - if (typeof object.app_hash === "string") - $util.base64.decode(object.app_hash, message.app_hash = $util.newBuffer($util.base64.length(object.app_hash)), 0); - else if (object.app_hash.length) - message.app_hash = object.app_hash; - if (object.last_results_hash != null) - if (typeof object.last_results_hash === "string") - $util.base64.decode(object.last_results_hash, message.last_results_hash = $util.newBuffer($util.base64.length(object.last_results_hash)), 0); - else if (object.last_results_hash.length) - message.last_results_hash = object.last_results_hash; - if (object.evidence_hash != null) - if (typeof object.evidence_hash === "string") - $util.base64.decode(object.evidence_hash, message.evidence_hash = $util.newBuffer($util.base64.length(object.evidence_hash)), 0); - else if (object.evidence_hash.length) - message.evidence_hash = object.evidence_hash; - if (object.proposer_address != null) - if (typeof object.proposer_address === "string") - $util.base64.decode(object.proposer_address, message.proposer_address = $util.newBuffer($util.base64.length(object.proposer_address)), 0); - else if (object.proposer_address.length) - message.proposer_address = object.proposer_address; - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Header - * @static - * @param {tendermint.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.chain_id = ""; - 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.last_block_id = null; - if (options.bytes === String) - object.last_commit_hash = ""; - else { - object.last_commit_hash = []; - if (options.bytes !== Array) - object.last_commit_hash = $util.newBuffer(object.last_commit_hash); - } - if (options.bytes === String) - object.data_hash = ""; - else { - object.data_hash = []; - if (options.bytes !== Array) - object.data_hash = $util.newBuffer(object.data_hash); - } - if (options.bytes === String) - object.validators_hash = ""; - else { - object.validators_hash = []; - if (options.bytes !== Array) - object.validators_hash = $util.newBuffer(object.validators_hash); - } - if (options.bytes === String) - object.next_validators_hash = ""; - else { - object.next_validators_hash = []; - if (options.bytes !== Array) - object.next_validators_hash = $util.newBuffer(object.next_validators_hash); - } - if (options.bytes === String) - object.consensus_hash = ""; - else { - object.consensus_hash = []; - if (options.bytes !== Array) - object.consensus_hash = $util.newBuffer(object.consensus_hash); - } - if (options.bytes === String) - object.app_hash = ""; - else { - object.app_hash = []; - if (options.bytes !== Array) - object.app_hash = $util.newBuffer(object.app_hash); - } - if (options.bytes === String) - object.last_results_hash = ""; - else { - object.last_results_hash = []; - if (options.bytes !== Array) - object.last_results_hash = $util.newBuffer(object.last_results_hash); - } - if (options.bytes === String) - object.evidence_hash = ""; - else { - object.evidence_hash = []; - if (options.bytes !== Array) - object.evidence_hash = $util.newBuffer(object.evidence_hash); - } - if (options.bytes === String) - object.proposer_address = ""; - else { - object.proposer_address = []; - if (options.bytes !== Array) - object.proposer_address = $util.newBuffer(object.proposer_address); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.tendermint.version.Consensus.toObject(message.version, options); - if (message.chain_id != null && message.hasOwnProperty("chain_id")) - object.chain_id = message.chain_id; - 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.last_block_id != null && message.hasOwnProperty("last_block_id")) - object.last_block_id = $root.tendermint.types.BlockID.toObject(message.last_block_id, options); - if (message.last_commit_hash != null && message.hasOwnProperty("last_commit_hash")) - object.last_commit_hash = options.bytes === String ? $util.base64.encode(message.last_commit_hash, 0, message.last_commit_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_commit_hash) : message.last_commit_hash; - if (message.data_hash != null && message.hasOwnProperty("data_hash")) - object.data_hash = options.bytes === String ? $util.base64.encode(message.data_hash, 0, message.data_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.data_hash) : message.data_hash; - if (message.validators_hash != null && message.hasOwnProperty("validators_hash")) - object.validators_hash = options.bytes === String ? $util.base64.encode(message.validators_hash, 0, message.validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validators_hash) : message.validators_hash; - if (message.next_validators_hash != null && message.hasOwnProperty("next_validators_hash")) - object.next_validators_hash = options.bytes === String ? $util.base64.encode(message.next_validators_hash, 0, message.next_validators_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.next_validators_hash) : message.next_validators_hash; - if (message.consensus_hash != null && message.hasOwnProperty("consensus_hash")) - object.consensus_hash = options.bytes === String ? $util.base64.encode(message.consensus_hash, 0, message.consensus_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensus_hash) : message.consensus_hash; - if (message.app_hash != null && message.hasOwnProperty("app_hash")) - object.app_hash = options.bytes === String ? $util.base64.encode(message.app_hash, 0, message.app_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.app_hash) : message.app_hash; - if (message.last_results_hash != null && message.hasOwnProperty("last_results_hash")) - object.last_results_hash = options.bytes === String ? $util.base64.encode(message.last_results_hash, 0, message.last_results_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.last_results_hash) : message.last_results_hash; - if (message.evidence_hash != null && message.hasOwnProperty("evidence_hash")) - object.evidence_hash = options.bytes === String ? $util.base64.encode(message.evidence_hash, 0, message.evidence_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidence_hash) : message.evidence_hash; - if (message.proposer_address != null && message.hasOwnProperty("proposer_address")) - object.proposer_address = options.bytes === String ? $util.base64.encode(message.proposer_address, 0, message.proposer_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposer_address) : message.proposer_address; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof tendermint.types.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Header; - })(); - - types.Data = (function() { - - /** - * Properties of a Data. - * @memberof tendermint.types - * @interface IData - * @property {Array.|null} [txs] Data txs - */ - - /** - * Constructs a new Data. - * @memberof tendermint.types - * @classdesc Represents a Data. - * @implements IData - * @constructor - * @param {tendermint.types.IData=} [properties] Properties to set - */ - function Data(properties) { - this.txs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Data txs. - * @member {Array.} txs - * @memberof tendermint.types.Data - * @instance - */ - Data.prototype.txs = $util.emptyArray; - - /** - * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.IData} message Data message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Data.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.txs != null && message.txs.length) - for (var i = 0; i < message.txs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.txs[i]); - return writer; - }; - - /** - * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.IData} message Data message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Data.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Data message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Data - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Data} Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Data.decode = 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.types.Data(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.txs && message.txs.length)) - message.txs = []; - message.txs.push(reader.bytes()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Data message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Data - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Data} Data - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Data.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Data message. - * @function verify - * @memberof tendermint.types.Data - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Data.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.txs != null && message.hasOwnProperty("txs")) { - if (!Array.isArray(message.txs)) - return "txs: array expected"; - for (var i = 0; i < message.txs.length; ++i) - if (!(message.txs[i] && typeof message.txs[i].length === "number" || $util.isString(message.txs[i]))) - return "txs: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Data message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Data - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Data} Data - */ - Data.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Data) - return object; - var message = new $root.tendermint.types.Data(); - if (object.txs) { - if (!Array.isArray(object.txs)) - throw TypeError(".tendermint.types.Data.txs: array expected"); - message.txs = []; - for (var i = 0; i < object.txs.length; ++i) - if (typeof object.txs[i] === "string") - $util.base64.decode(object.txs[i], message.txs[i] = $util.newBuffer($util.base64.length(object.txs[i])), 0); - else if (object.txs[i].length) - message.txs[i] = object.txs[i]; - } - return message; - }; - - /** - * Creates a plain object from a Data message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Data - * @static - * @param {tendermint.types.Data} message Data - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Data.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.txs = []; - if (message.txs && message.txs.length) { - object.txs = []; - for (var j = 0; j < message.txs.length; ++j) - object.txs[j] = options.bytes === String ? $util.base64.encode(message.txs[j], 0, message.txs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.txs[j]) : message.txs[j]; - } - return object; - }; - - /** - * Converts this Data to JSON. - * @function toJSON - * @memberof tendermint.types.Data - * @instance - * @returns {Object.} JSON object - */ - Data.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Data; - })(); - - types.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof tendermint.types - * @interface IVote - * @property {tendermint.types.SignedMsgType|null} [type] Vote type - * @property {Long|null} [height] Vote height - * @property {number|null} [round] Vote round - * @property {tendermint.types.IBlockID|null} [block_id] Vote block_id - * @property {google.protobuf.ITimestamp|null} [timestamp] Vote timestamp - * @property {Uint8Array|null} [validator_address] Vote validator_address - * @property {number|null} [validator_index] Vote validator_index - * @property {Uint8Array|null} [signature] Vote signature - */ - - /** - * Constructs a new Vote. - * @memberof tendermint.types - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {tendermint.types.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 type. - * @member {tendermint.types.SignedMsgType} type - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.type = 0; - - /** - * Vote height. - * @member {Long} height - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Vote round. - * @member {number} round - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.round = 0; - - /** - * Vote block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.block_id = null; - - /** - * Vote timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.timestamp = null; - - /** - * Vote validator_address. - * @member {Uint8Array} validator_address - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.validator_address = $util.newBuffer([]); - - /** - * Vote validator_index. - * @member {number} validator_index - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.validator_index = 0; - - /** - * Vote signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.Vote - * @instance - */ - Vote.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.validator_address != null && Object.hasOwnProperty.call(message, "validator_address")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.validator_address); - if (message.validator_index != null && Object.hasOwnProperty.call(message, "validator_index")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.validator_index); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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 tendermint.types.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.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.tendermint.types.Vote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 5: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 6: - message.validator_address = reader.bytes(); - break; - case 7: - message.validator_index = reader.int32(); - break; - case 8: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Vote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.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 tendermint.types.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 32: - break; - } - 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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - if (!(message.validator_address && typeof message.validator_address.length === "number" || $util.isString(message.validator_address))) - return "validator_address: buffer expected"; - if (message.validator_index != null && message.hasOwnProperty("validator_index")) - if (!$util.isInteger(message.validator_index)) - return "validator_index: integer expected"; - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Vote - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Vote) - return object; - var message = new $root.tendermint.types.Vote(); - switch (object.type) { - case "SIGNED_MSG_TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "SIGNED_MSG_TYPE_PREVOTE": - case 1: - message.type = 1; - break; - case "SIGNED_MSG_TYPE_PRECOMMIT": - case 2: - message.type = 2; - break; - case "SIGNED_MSG_TYPE_PROPOSAL": - case 32: - message.type = 32; - break; - } - 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.round != null) - message.round = object.round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Vote.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.Vote.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.validator_address != null) - if (typeof object.validator_address === "string") - $util.base64.decode(object.validator_address, message.validator_address = $util.newBuffer($util.base64.length(object.validator_address)), 0); - else if (object.validator_address.length) - message.validator_address = object.validator_address; - if (object.validator_index != null) - message.validator_index = object.validator_index | 0; - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Vote - * @static - * @param {tendermint.types.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) { - object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; - 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.round = 0; - object.block_id = null; - object.timestamp = null; - if (options.bytes === String) - object.validator_address = ""; - else { - object.validator_address = []; - if (options.bytes !== Array) - object.validator_address = $util.newBuffer(object.validator_address); - } - object.validator_index = 0; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - object.validator_address = options.bytes === String ? $util.base64.encode(message.validator_address, 0, message.validator_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.validator_address) : message.validator_address; - if (message.validator_index != null && message.hasOwnProperty("validator_index")) - object.validator_index = message.validator_index; - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof tendermint.types.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Vote; - })(); - - types.Commit = (function() { - - /** - * Properties of a Commit. - * @memberof tendermint.types - * @interface ICommit - * @property {Long|null} [height] Commit height - * @property {number|null} [round] Commit round - * @property {tendermint.types.IBlockID|null} [block_id] Commit block_id - * @property {Array.|null} [signatures] Commit signatures - */ - - /** - * Constructs a new Commit. - * @memberof tendermint.types - * @classdesc Represents a Commit. - * @implements ICommit - * @constructor - * @param {tendermint.types.ICommit=} [properties] Properties to set - */ - function Commit(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]]; - } - - /** - * Commit height. - * @member {Long} height - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Commit round. - * @member {number} round - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.round = 0; - - /** - * Commit block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.block_id = null; - - /** - * Commit signatures. - * @member {Array.} signatures - * @memberof tendermint.types.Commit - * @instance - */ - Commit.prototype.signatures = $util.emptyArray; - - /** - * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.ICommit} message Commit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commit.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.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - $root.tendermint.types.CommitSig.encode(message.signatures[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.ICommit} message Commit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Commit message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.Commit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.Commit} Commit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commit.decode = 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.types.Commit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.height = reader.int64(); - break; - case 2: - message.round = reader.int32(); - break; - case 3: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 4: - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push($root.tendermint.types.CommitSig.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Commit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Commit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.Commit} Commit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Commit message. - * @function verify - * @memberof tendermint.types.Commit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Commit.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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + 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) { - var error = $root.tendermint.types.CommitSig.verify(message.signatures[i]); - if (error) - return "signatures." + error; - } - } - return null; - }; - - /** - * Creates a Commit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Commit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Commit} Commit - */ - Commit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Commit) - return object; - var message = new $root.tendermint.types.Commit(); - 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.round != null) - message.round = object.round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Commit.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".tendermint.types.Commit.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) { - if (typeof object.signatures[i] !== "object") - throw TypeError(".tendermint.types.Commit.signatures: object expected"); - message.signatures[i] = $root.tendermint.types.CommitSig.fromObject(object.signatures[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Commit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Commit - * @static - * @param {tendermint.types.Commit} message Commit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Commit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.signatures = []; - 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.round = 0; - object.block_id = null; - } - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = $root.tendermint.types.CommitSig.toObject(message.signatures[j], options); - } - return object; - }; - - /** - * Converts this Commit to JSON. - * @function toJSON - * @memberof tendermint.types.Commit - * @instance - * @returns {Object.} JSON object - */ - Commit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Commit; - })(); - - types.CommitSig = (function() { - - /** - * Properties of a CommitSig. - * @memberof tendermint.types - * @interface ICommitSig - * @property {tendermint.types.BlockIDFlag|null} [block_id_flag] CommitSig block_id_flag - * @property {Uint8Array|null} [validator_address] CommitSig validator_address - * @property {google.protobuf.ITimestamp|null} [timestamp] CommitSig timestamp - * @property {Uint8Array|null} [signature] CommitSig signature - */ - - /** - * Constructs a new CommitSig. - * @memberof tendermint.types - * @classdesc Represents a CommitSig. - * @implements ICommitSig - * @constructor - * @param {tendermint.types.ICommitSig=} [properties] Properties to set - */ - function CommitSig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitSig block_id_flag. - * @member {tendermint.types.BlockIDFlag} block_id_flag - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.block_id_flag = 0; - - /** - * CommitSig validator_address. - * @member {Uint8Array} validator_address - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.validator_address = $util.newBuffer([]); - - /** - * CommitSig timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.timestamp = null; - - /** - * CommitSig signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.CommitSig - * @instance - */ - CommitSig.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @function encode - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_id_flag != null && Object.hasOwnProperty.call(message, "block_id_flag")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.block_id_flag); - if (message.validator_address != null && Object.hasOwnProperty.call(message, "validator_address")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validator_address); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.ICommitSig} message CommitSig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommitSig message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.CommitSig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.CommitSig} CommitSig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSig.decode = 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.types.CommitSig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id_flag = reader.int32(); - break; - case 2: - message.validator_address = reader.bytes(); - break; - case 3: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 4: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommitSig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.CommitSig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.CommitSig} CommitSig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitSig message. - * @function verify - * @memberof tendermint.types.CommitSig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitSig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_id_flag != null && message.hasOwnProperty("block_id_flag")) - switch (message.block_id_flag) { - default: - return "block_id_flag: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - if (!(message.validator_address && typeof message.validator_address.length === "number" || $util.isString(message.validator_address))) - return "validator_address: buffer expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.CommitSig - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.CommitSig} CommitSig - */ - CommitSig.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.CommitSig) - return object; - var message = new $root.tendermint.types.CommitSig(); - switch (object.block_id_flag) { - case "BLOCK_ID_FLAG_UNKNOWN": - case 0: - message.block_id_flag = 0; - break; - case "BLOCK_ID_FLAG_ABSENT": - case 1: - message.block_id_flag = 1; - break; - case "BLOCK_ID_FLAG_COMMIT": - case 2: - message.block_id_flag = 2; - break; - case "BLOCK_ID_FLAG_NIL": - case 3: - message.block_id_flag = 3; - break; - } - if (object.validator_address != null) - if (typeof object.validator_address === "string") - $util.base64.decode(object.validator_address, message.validator_address = $util.newBuffer($util.base64.length(object.validator_address)), 0); - else if (object.validator_address.length) - message.validator_address = object.validator_address; - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.CommitSig.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a CommitSig message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.CommitSig - * @static - * @param {tendermint.types.CommitSig} message CommitSig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitSig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.block_id_flag = options.enums === String ? "BLOCK_ID_FLAG_UNKNOWN" : 0; - if (options.bytes === String) - object.validator_address = ""; - else { - object.validator_address = []; - if (options.bytes !== Array) - object.validator_address = $util.newBuffer(object.validator_address); - } - object.timestamp = null; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.block_id_flag != null && message.hasOwnProperty("block_id_flag")) - object.block_id_flag = options.enums === String ? $root.tendermint.types.BlockIDFlag[message.block_id_flag] : message.block_id_flag; - if (message.validator_address != null && message.hasOwnProperty("validator_address")) - object.validator_address = options.bytes === String ? $util.base64.encode(message.validator_address, 0, message.validator_address.length) : options.bytes === Array ? Array.prototype.slice.call(message.validator_address) : message.validator_address; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this CommitSig to JSON. - * @function toJSON - * @memberof tendermint.types.CommitSig - * @instance - * @returns {Object.} JSON object - */ - CommitSig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CommitSig; - })(); - - types.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof tendermint.types - * @interface IProposal - * @property {tendermint.types.SignedMsgType|null} [type] Proposal type - * @property {Long|null} [height] Proposal height - * @property {number|null} [round] Proposal round - * @property {number|null} [pol_round] Proposal pol_round - * @property {tendermint.types.IBlockID|null} [block_id] Proposal block_id - * @property {google.protobuf.ITimestamp|null} [timestamp] Proposal timestamp - * @property {Uint8Array|null} [signature] Proposal signature - */ - - /** - * Constructs a new Proposal. - * @memberof tendermint.types - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {tendermint.types.IProposal=} [properties] Properties to set - */ - function Proposal(properties) { - if (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 type. - * @member {tendermint.types.SignedMsgType} type - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.type = 0; - - /** - * Proposal height. - * @member {Long} height - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Proposal round. - * @member {number} round - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.round = 0; - - /** - * Proposal pol_round. - * @member {number} pol_round - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.pol_round = 0; - - /** - * Proposal block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.block_id = null; - - /** - * Proposal timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.timestamp = null; - - /** - * Proposal signature. - * @member {Uint8Array} signature - * @memberof tendermint.types.Proposal - * @instance - */ - Proposal.prototype.signature = $util.newBuffer([]); - - /** - * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.height); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.round); - if (message.pol_round != null && Object.hasOwnProperty.call(message, "pol_round")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pol_round); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.signature != null && Object.hasOwnProperty.call(message, "signature")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signature); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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 tendermint.types.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.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.tendermint.types.Proposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.type = reader.int32(); - break; - case 2: - message.height = reader.int64(); - break; - case 3: - message.round = reader.int32(); - break; - case 4: - message.pol_round = reader.int32(); - break; - case 5: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 6: - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - case 7: - message.signature = reader.bytes(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Proposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.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 tendermint.types.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.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 32: - break; - } - 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.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.pol_round != null && message.hasOwnProperty("pol_round")) - if (!$util.isInteger(message.pol_round)) - return "pol_round: integer expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.signature != null && message.hasOwnProperty("signature")) - if (!(message.signature && typeof message.signature.length === "number" || $util.isString(message.signature))) - return "signature: buffer expected"; - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.Proposal - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Proposal) - return object; - var message = new $root.tendermint.types.Proposal(); - switch (object.type) { - case "SIGNED_MSG_TYPE_UNKNOWN": - case 0: - message.type = 0; - break; - case "SIGNED_MSG_TYPE_PREVOTE": - case 1: - message.type = 1; - break; - case "SIGNED_MSG_TYPE_PRECOMMIT": - case 2: - message.type = 2; - break; - case "SIGNED_MSG_TYPE_PROPOSAL": - case 32: - message.type = 32; - break; - } - 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.round != null) - message.round = object.round | 0; - if (object.pol_round != null) - message.pol_round = object.pol_round | 0; - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.Proposal.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".tendermint.types.Proposal.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.signature != null) - if (typeof object.signature === "string") - $util.base64.decode(object.signature, message.signature = $util.newBuffer($util.base64.length(object.signature)), 0); - else if (object.signature.length) - message.signature = object.signature; - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.Proposal - * @static - * @param {tendermint.types.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.defaults) { - object.type = options.enums === String ? "SIGNED_MSG_TYPE_UNKNOWN" : 0; - 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.round = 0; - object.pol_round = 0; - object.block_id = null; - object.timestamp = null; - if (options.bytes === String) - object.signature = ""; - else { - object.signature = []; - if (options.bytes !== Array) - object.signature = $util.newBuffer(object.signature); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.types.SignedMsgType[message.type] : message.type; - 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.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.pol_round != null && message.hasOwnProperty("pol_round")) - object.pol_round = message.pol_round; - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.signature != null && message.hasOwnProperty("signature")) - object.signature = options.bytes === String ? $util.base64.encode(message.signature, 0, message.signature.length) : options.bytes === Array ? Array.prototype.slice.call(message.signature) : message.signature; - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof tendermint.types.Proposal - * @instance - * @returns {Object.} JSON object - */ - Proposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Proposal; - })(); - - types.SignedHeader = (function() { - - /** - * Properties of a SignedHeader. - * @memberof tendermint.types - * @interface ISignedHeader - * @property {tendermint.types.IHeader|null} [header] SignedHeader header - * @property {tendermint.types.ICommit|null} [commit] SignedHeader commit - */ - - /** - * Constructs a new SignedHeader. - * @memberof tendermint.types - * @classdesc Represents a SignedHeader. - * @implements ISignedHeader - * @constructor - * @param {tendermint.types.ISignedHeader=} [properties] Properties to set - */ - function SignedHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SignedHeader header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.types.SignedHeader - * @instance - */ - SignedHeader.prototype.header = null; - - /** - * SignedHeader commit. - * @member {tendermint.types.ICommit|null|undefined} commit - * @memberof tendermint.types.SignedHeader - * @instance - */ - SignedHeader.prototype.commit = null; - - /** - * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignedHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.types.Commit.encode(message.commit, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.ISignedHeader} message SignedHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignedHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SignedHeader message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.SignedHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.SignedHeader} SignedHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignedHeader.decode = 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.types.SignedHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); - break; - case 2: - message.commit = $root.tendermint.types.Commit.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SignedHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.SignedHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.SignedHeader} SignedHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignedHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignedHeader message. - * @function verify - * @memberof tendermint.types.SignedHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignedHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.tendermint.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - var error = $root.tendermint.types.Commit.verify(message.commit); - if (error) - return "commit." + error; - } - return null; - }; - - /** - * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.SignedHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.SignedHeader} SignedHeader - */ - SignedHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.SignedHeader) - return object; - var message = new $root.tendermint.types.SignedHeader(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.types.SignedHeader.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.types.SignedHeader.commit: object expected"); - message.commit = $root.tendermint.types.Commit.fromObject(object.commit); - } - return message; - }; - - /** - * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.SignedHeader - * @static - * @param {tendermint.types.SignedHeader} message SignedHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignedHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.header = null; - object.commit = null; - } - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.types.Header.toObject(message.header, options); - if (message.commit != null && message.hasOwnProperty("commit")) - object.commit = $root.tendermint.types.Commit.toObject(message.commit, options); - return object; - }; - - /** - * Converts this SignedHeader to JSON. - * @function toJSON - * @memberof tendermint.types.SignedHeader - * @instance - * @returns {Object.} JSON object - */ - SignedHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SignedHeader; - })(); - - types.LightBlock = (function() { - - /** - * Properties of a LightBlock. - * @memberof tendermint.types - * @interface ILightBlock - * @property {tendermint.types.ISignedHeader|null} [signed_header] LightBlock signed_header - * @property {tendermint.types.IValidatorSet|null} [validator_set] LightBlock validator_set - */ - - /** - * Constructs a new LightBlock. - * @memberof tendermint.types - * @classdesc Represents a LightBlock. - * @implements ILightBlock - * @constructor - * @param {tendermint.types.ILightBlock=} [properties] Properties to set - */ - function LightBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LightBlock signed_header. - * @member {tendermint.types.ISignedHeader|null|undefined} signed_header - * @memberof tendermint.types.LightBlock - * @instance - */ - LightBlock.prototype.signed_header = null; - - /** - * LightBlock validator_set. - * @member {tendermint.types.IValidatorSet|null|undefined} validator_set - * @memberof tendermint.types.LightBlock - * @instance - */ - LightBlock.prototype.validator_set = null; - - /** - * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LightBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signed_header != null && Object.hasOwnProperty.call(message, "signed_header")) - $root.tendermint.types.SignedHeader.encode(message.signed_header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validator_set != null && Object.hasOwnProperty.call(message, "validator_set")) - $root.tendermint.types.ValidatorSet.encode(message.validator_set, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.ILightBlock} message LightBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LightBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LightBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.LightBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.LightBlock} LightBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LightBlock.decode = 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.types.LightBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.signed_header = $root.tendermint.types.SignedHeader.decode(reader, reader.uint32()); - break; - case 2: - message.validator_set = $root.tendermint.types.ValidatorSet.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LightBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.LightBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.LightBlock} LightBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LightBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LightBlock message. - * @function verify - * @memberof tendermint.types.LightBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LightBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signed_header != null && message.hasOwnProperty("signed_header")) { - var error = $root.tendermint.types.SignedHeader.verify(message.signed_header); - if (error) - return "signed_header." + error; - } - if (message.validator_set != null && message.hasOwnProperty("validator_set")) { - var error = $root.tendermint.types.ValidatorSet.verify(message.validator_set); - if (error) - return "validator_set." + error; - } - return null; - }; - - /** - * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.LightBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.LightBlock} LightBlock - */ - LightBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.LightBlock) - return object; - var message = new $root.tendermint.types.LightBlock(); - if (object.signed_header != null) { - if (typeof object.signed_header !== "object") - throw TypeError(".tendermint.types.LightBlock.signed_header: object expected"); - message.signed_header = $root.tendermint.types.SignedHeader.fromObject(object.signed_header); - } - if (object.validator_set != null) { - if (typeof object.validator_set !== "object") - throw TypeError(".tendermint.types.LightBlock.validator_set: object expected"); - message.validator_set = $root.tendermint.types.ValidatorSet.fromObject(object.validator_set); - } - return message; - }; - - /** - * Creates a plain object from a LightBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.LightBlock - * @static - * @param {tendermint.types.LightBlock} message LightBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LightBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.signed_header = null; - object.validator_set = null; - } - if (message.signed_header != null && message.hasOwnProperty("signed_header")) - object.signed_header = $root.tendermint.types.SignedHeader.toObject(message.signed_header, options); - if (message.validator_set != null && message.hasOwnProperty("validator_set")) - object.validator_set = $root.tendermint.types.ValidatorSet.toObject(message.validator_set, options); - return object; - }; - - /** - * Converts this LightBlock to JSON. - * @function toJSON - * @memberof tendermint.types.LightBlock - * @instance - * @returns {Object.} JSON object - */ - LightBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return LightBlock; - })(); - - types.BlockMeta = (function() { - - /** - * Properties of a BlockMeta. - * @memberof tendermint.types - * @interface IBlockMeta - * @property {tendermint.types.IBlockID|null} [block_id] BlockMeta block_id - * @property {Long|null} [block_size] BlockMeta block_size - * @property {tendermint.types.IHeader|null} [header] BlockMeta header - * @property {Long|null} [num_txs] BlockMeta num_txs - */ - - /** - * Constructs a new BlockMeta. - * @memberof tendermint.types - * @classdesc Represents a BlockMeta. - * @implements IBlockMeta - * @constructor - * @param {tendermint.types.IBlockMeta=} [properties] Properties to set - */ - function BlockMeta(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * BlockMeta block_id. - * @member {tendermint.types.IBlockID|null|undefined} block_id - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.block_id = null; - - /** - * BlockMeta block_size. - * @member {Long} block_size - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.block_size = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockMeta header. - * @member {tendermint.types.IHeader|null|undefined} header - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.header = null; - - /** - * BlockMeta num_txs. - * @member {Long} num_txs - * @memberof tendermint.types.BlockMeta - * @instance - */ - BlockMeta.prototype.num_txs = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockMeta.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_id != null && Object.hasOwnProperty.call(message, "block_id")) - $root.tendermint.types.BlockID.encode(message.block_id, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.block_size != null && Object.hasOwnProperty.call(message, "block_size")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.block_size); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.types.Header.encode(message.header, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.num_txs != null && Object.hasOwnProperty.call(message, "num_txs")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.num_txs); - return writer; - }; - - /** - * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.IBlockMeta} message BlockMeta message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockMeta.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BlockMeta message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.BlockMeta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.BlockMeta} BlockMeta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockMeta.decode = 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.types.BlockMeta(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_id = $root.tendermint.types.BlockID.decode(reader, reader.uint32()); - break; - case 2: - message.block_size = reader.int64(); - break; - case 3: - message.header = $root.tendermint.types.Header.decode(reader, reader.uint32()); - break; - case 4: - message.num_txs = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BlockMeta message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.BlockMeta - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.BlockMeta} BlockMeta - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockMeta.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlockMeta message. - * @function verify - * @memberof tendermint.types.BlockMeta - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlockMeta.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_id != null && message.hasOwnProperty("block_id")) { - var error = $root.tendermint.types.BlockID.verify(message.block_id); - if (error) - return "block_id." + error; - } - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (!$util.isInteger(message.block_size) && !(message.block_size && $util.isInteger(message.block_size.low) && $util.isInteger(message.block_size.high))) - return "block_size: integer|Long expected"; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.tendermint.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.num_txs != null && message.hasOwnProperty("num_txs")) - if (!$util.isInteger(message.num_txs) && !(message.num_txs && $util.isInteger(message.num_txs.low) && $util.isInteger(message.num_txs.high))) - return "num_txs: integer|Long expected"; - return null; - }; - - /** - * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.BlockMeta - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockMeta} BlockMeta - */ - BlockMeta.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockMeta) - return object; - var message = new $root.tendermint.types.BlockMeta(); - if (object.block_id != null) { - if (typeof object.block_id !== "object") - throw TypeError(".tendermint.types.BlockMeta.block_id: object expected"); - message.block_id = $root.tendermint.types.BlockID.fromObject(object.block_id); - } - if (object.block_size != null) - if ($util.Long) - (message.block_size = $util.Long.fromValue(object.block_size)).unsigned = false; - else if (typeof object.block_size === "string") - message.block_size = parseInt(object.block_size, 10); - else if (typeof object.block_size === "number") - message.block_size = object.block_size; - else if (typeof object.block_size === "object") - message.block_size = new $util.LongBits(object.block_size.low >>> 0, object.block_size.high >>> 0).toNumber(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.types.BlockMeta.header: object expected"); - message.header = $root.tendermint.types.Header.fromObject(object.header); - } - if (object.num_txs != null) - if ($util.Long) - (message.num_txs = $util.Long.fromValue(object.num_txs)).unsigned = false; - else if (typeof object.num_txs === "string") - message.num_txs = parseInt(object.num_txs, 10); - else if (typeof object.num_txs === "number") - message.num_txs = object.num_txs; - else if (typeof object.num_txs === "object") - message.num_txs = new $util.LongBits(object.num_txs.low >>> 0, object.num_txs.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.BlockMeta - * @static - * @param {tendermint.types.BlockMeta} message BlockMeta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockMeta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.block_id = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.block_size = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_size = options.longs === String ? "0" : 0; - object.header = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.num_txs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.num_txs = options.longs === String ? "0" : 0; - } - if (message.block_id != null && message.hasOwnProperty("block_id")) - object.block_id = $root.tendermint.types.BlockID.toObject(message.block_id, options); - if (message.block_size != null && message.hasOwnProperty("block_size")) - if (typeof message.block_size === "number") - object.block_size = options.longs === String ? String(message.block_size) : message.block_size; - else - object.block_size = options.longs === String ? $util.Long.prototype.toString.call(message.block_size) : options.longs === Number ? new $util.LongBits(message.block_size.low >>> 0, message.block_size.high >>> 0).toNumber() : message.block_size; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.types.Header.toObject(message.header, options); - if (message.num_txs != null && message.hasOwnProperty("num_txs")) - if (typeof message.num_txs === "number") - object.num_txs = options.longs === String ? String(message.num_txs) : message.num_txs; - else - object.num_txs = options.longs === String ? $util.Long.prototype.toString.call(message.num_txs) : options.longs === Number ? new $util.LongBits(message.num_txs.low >>> 0, message.num_txs.high >>> 0).toNumber() : message.num_txs; - return object; - }; - - /** - * Converts this BlockMeta to JSON. - * @function toJSON - * @memberof tendermint.types.BlockMeta - * @instance - * @returns {Object.} JSON object - */ - BlockMeta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BlockMeta; - })(); - - types.TxProof = (function() { - - /** - * Properties of a TxProof. - * @memberof tendermint.types - * @interface ITxProof - * @property {Uint8Array|null} [root_hash] TxProof root_hash - * @property {Uint8Array|null} [data] TxProof data - * @property {tendermint.crypto.IProof|null} [proof] TxProof proof - */ - - /** - * Constructs a new TxProof. - * @memberof tendermint.types - * @classdesc Represents a TxProof. - * @implements ITxProof - * @constructor - * @param {tendermint.types.ITxProof=} [properties] Properties to set - */ - function TxProof(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TxProof root_hash. - * @member {Uint8Array} root_hash - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.root_hash = $util.newBuffer([]); - - /** - * TxProof data. - * @member {Uint8Array} data - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.data = $util.newBuffer([]); - - /** - * TxProof proof. - * @member {tendermint.crypto.IProof|null|undefined} proof - * @memberof tendermint.types.TxProof - * @instance - */ - TxProof.prototype.proof = null; - - /** - * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @function encode - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.root_hash != null && Object.hasOwnProperty.call(message, "root_hash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.root_hash); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.Proof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.ITxProof} message TxProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TxProof message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.TxProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.TxProof} TxProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxProof.decode = 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.types.TxProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.root_hash = reader.bytes(); - break; - case 2: - message.data = reader.bytes(); - break; - case 3: - message.proof = $root.tendermint.crypto.Proof.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TxProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.TxProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.TxProof} TxProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxProof message. - * @function verify - * @memberof tendermint.types.TxProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.root_hash != null && message.hasOwnProperty("root_hash")) - if (!(message.root_hash && typeof message.root_hash.length === "number" || $util.isString(message.root_hash))) - return "root_hash: 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"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a TxProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.TxProof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.TxProof} TxProof - */ - TxProof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.TxProof) - return object; - var message = new $root.tendermint.types.TxProof(); - if (object.root_hash != null) - if (typeof object.root_hash === "string") - $util.base64.decode(object.root_hash, message.root_hash = $util.newBuffer($util.base64.length(object.root_hash)), 0); - else if (object.root_hash.length) - message.root_hash = object.root_hash; - 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.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.types.TxProof.proof: object expected"); - message.proof = $root.tendermint.crypto.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a TxProof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.TxProof - * @static - * @param {tendermint.types.TxProof} message TxProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.root_hash = ""; - else { - object.root_hash = []; - if (options.bytes !== Array) - object.root_hash = $util.newBuffer(object.root_hash); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.proof = null; - } - if (message.root_hash != null && message.hasOwnProperty("root_hash")) - object.root_hash = options.bytes === String ? $util.base64.encode(message.root_hash, 0, message.root_hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.root_hash) : message.root_hash; - 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.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this TxProof to JSON. - * @function toJSON - * @memberof tendermint.types.TxProof - * @instance - * @returns {Object.} JSON object - */ - TxProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return TxProof; - })(); - - types.ValidatorSet = (function() { - - /** - * Properties of a ValidatorSet. - * @memberof tendermint.types - * @interface IValidatorSet - * @property {Array.|null} [validators] ValidatorSet validators - * @property {tendermint.types.IValidator|null} [proposer] ValidatorSet proposer - * @property {Long|null} [total_voting_power] ValidatorSet total_voting_power - */ - - /** - * Constructs a new ValidatorSet. - * @memberof tendermint.types - * @classdesc Represents a ValidatorSet. - * @implements IValidatorSet - * @constructor - * @param {tendermint.types.IValidatorSet=} [properties] Properties to set - */ - function ValidatorSet(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]]; - } - - /** - * ValidatorSet validators. - * @member {Array.} validators - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.validators = $util.emptyArray; - - /** - * ValidatorSet proposer. - * @member {tendermint.types.IValidator|null|undefined} proposer - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.proposer = null; - - /** - * ValidatorSet total_voting_power. - * @member {Long} total_voting_power - * @memberof tendermint.types.ValidatorSet - * @instance - */ - ValidatorSet.prototype.total_voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @function encode - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validators != null && message.validators.length) - for (var i = 0; i < message.validators.length; ++i) - $root.tendermint.types.Validator.encode(message.validators[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - $root.tendermint.types.Validator.encode(message.proposer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.total_voting_power != null && Object.hasOwnProperty.call(message, "total_voting_power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.total_voting_power); - return writer; - }; - - /** - * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.IValidatorSet} message ValidatorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.ValidatorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.ValidatorSet} ValidatorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSet.decode = 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.types.ValidatorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.types.Validator.decode(reader, reader.uint32())); - break; - case 2: - message.proposer = $root.tendermint.types.Validator.decode(reader, reader.uint32()); - break; - case 3: - message.total_voting_power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.ValidatorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.ValidatorSet} ValidatorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorSet message. - * @function verify - * @memberof tendermint.types.ValidatorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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.types.Validator.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - if (message.proposer != null && message.hasOwnProperty("proposer")) { - var error = $root.tendermint.types.Validator.verify(message.proposer); - if (error) - return "proposer." + error; - } - if (message.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (!$util.isInteger(message.total_voting_power) && !(message.total_voting_power && $util.isInteger(message.total_voting_power.low) && $util.isInteger(message.total_voting_power.high))) - return "total_voting_power: integer|Long expected"; - return null; - }; - - /** - * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.ValidatorSet - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.ValidatorSet} ValidatorSet - */ - ValidatorSet.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.ValidatorSet) - return object; - var message = new $root.tendermint.types.ValidatorSet(); - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.types.ValidatorSet.validators: array expected"); - message.validators = []; - for (var i = 0; i < object.validators.length; ++i) { - if (typeof object.validators[i] !== "object") - throw TypeError(".tendermint.types.ValidatorSet.validators: object expected"); - message.validators[i] = $root.tendermint.types.Validator.fromObject(object.validators[i]); - } - } - if (object.proposer != null) { - if (typeof object.proposer !== "object") - throw TypeError(".tendermint.types.ValidatorSet.proposer: object expected"); - message.proposer = $root.tendermint.types.Validator.fromObject(object.proposer); - } - if (object.total_voting_power != null) - if ($util.Long) - (message.total_voting_power = $util.Long.fromValue(object.total_voting_power)).unsigned = false; - else if (typeof object.total_voting_power === "string") - message.total_voting_power = parseInt(object.total_voting_power, 10); - else if (typeof object.total_voting_power === "number") - message.total_voting_power = object.total_voting_power; - else if (typeof object.total_voting_power === "object") - message.total_voting_power = new $util.LongBits(object.total_voting_power.low >>> 0, object.total_voting_power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.ValidatorSet - * @static - * @param {tendermint.types.ValidatorSet} message ValidatorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validators = []; - if (options.defaults) { - object.proposer = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.total_voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.total_voting_power = options.longs === String ? "0" : 0; - } - if (message.validators && message.validators.length) { - object.validators = []; - for (var j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.types.Validator.toObject(message.validators[j], options); - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = $root.tendermint.types.Validator.toObject(message.proposer, options); - if (message.total_voting_power != null && message.hasOwnProperty("total_voting_power")) - if (typeof message.total_voting_power === "number") - object.total_voting_power = options.longs === String ? String(message.total_voting_power) : message.total_voting_power; - else - object.total_voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.total_voting_power) : options.longs === Number ? new $util.LongBits(message.total_voting_power.low >>> 0, message.total_voting_power.high >>> 0).toNumber() : message.total_voting_power; - return object; - }; - - /** - * Converts this ValidatorSet to JSON. - * @function toJSON - * @memberof tendermint.types.ValidatorSet - * @instance - * @returns {Object.} JSON object - */ - ValidatorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValidatorSet; - })(); - - types.Validator = (function() { - - /** - * Properties of a Validator. - * @memberof tendermint.types - * @interface IValidator - * @property {Uint8Array|null} [address] Validator address - * @property {tendermint.crypto.IPublicKey|null} [pub_key] Validator pub_key - * @property {Long|null} [voting_power] Validator voting_power - * @property {Long|null} [proposer_priority] Validator proposer_priority - */ - - /** - * Constructs a new Validator. - * @memberof tendermint.types - * @classdesc Represents a Validator. - * @implements IValidator - * @constructor - * @param {tendermint.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.types.Validator - * @instance - */ - Validator.prototype.address = $util.newBuffer([]); - - /** - * Validator pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.pub_key = null; - - /** - * Validator voting_power. - * @member {Long} voting_power - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Validator proposer_priority. - * @member {Long} proposer_priority - * @memberof tendermint.types.Validator - * @instance - */ - Validator.prototype.proposer_priority = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. - * @function encode - * @memberof tendermint.types.Validator - * @static - * @param {tendermint.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.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.voting_power != null && Object.hasOwnProperty.call(message, "voting_power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.voting_power); - if (message.proposer_priority != null && Object.hasOwnProperty.call(message, "proposer_priority")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.proposer_priority); - return writer; - }; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.types.Validator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.Validator - * @static - * @param {tendermint.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.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.Validator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.address = reader.bytes(); - break; - case 2: - message.pub_key = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); - break; - case 3: - message.voting_power = reader.int64(); - break; - case 4: - message.proposer_priority = 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.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.pub_key != null && message.hasOwnProperty("pub_key")) { - var error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (!$util.isInteger(message.voting_power) && !(message.voting_power && $util.isInteger(message.voting_power.low) && $util.isInteger(message.voting_power.high))) - return "voting_power: integer|Long expected"; - if (message.proposer_priority != null && message.hasOwnProperty("proposer_priority")) - if (!$util.isInteger(message.proposer_priority) && !(message.proposer_priority && $util.isInteger(message.proposer_priority.low) && $util.isInteger(message.proposer_priority.high))) - return "proposer_priority: 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.types.Validator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.Validator} Validator - */ - Validator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.Validator) - return object; - var message = new $root.tendermint.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.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.types.Validator.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - if (object.voting_power != null) - if ($util.Long) - (message.voting_power = $util.Long.fromValue(object.voting_power)).unsigned = false; - else if (typeof object.voting_power === "string") - message.voting_power = parseInt(object.voting_power, 10); - else if (typeof object.voting_power === "number") - message.voting_power = object.voting_power; - else if (typeof object.voting_power === "object") - message.voting_power = new $util.LongBits(object.voting_power.low >>> 0, object.voting_power.high >>> 0).toNumber(); - if (object.proposer_priority != null) - if ($util.Long) - (message.proposer_priority = $util.Long.fromValue(object.proposer_priority)).unsigned = false; - else if (typeof object.proposer_priority === "string") - message.proposer_priority = parseInt(object.proposer_priority, 10); - else if (typeof object.proposer_priority === "number") - message.proposer_priority = object.proposer_priority; - else if (typeof object.proposer_priority === "object") - message.proposer_priority = new $util.LongBits(object.proposer_priority.low >>> 0, object.proposer_priority.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.types.Validator - * @static - * @param {tendermint.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); - } - object.pub_key = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.voting_power = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.proposer_priority = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposer_priority = 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.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, options); - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (typeof message.voting_power === "number") - object.voting_power = options.longs === String ? String(message.voting_power) : message.voting_power; - else - object.voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.voting_power) : options.longs === Number ? new $util.LongBits(message.voting_power.low >>> 0, message.voting_power.high >>> 0).toNumber() : message.voting_power; - if (message.proposer_priority != null && message.hasOwnProperty("proposer_priority")) - if (typeof message.proposer_priority === "number") - object.proposer_priority = options.longs === String ? String(message.proposer_priority) : message.proposer_priority; - else - object.proposer_priority = options.longs === String ? $util.Long.prototype.toString.call(message.proposer_priority) : options.longs === Number ? new $util.LongBits(message.proposer_priority.low >>> 0, message.proposer_priority.high >>> 0).toNumber() : message.proposer_priority; - return object; - }; - - /** - * Converts this Validator to JSON. - * @function toJSON - * @memberof tendermint.types.Validator - * @instance - * @returns {Object.} JSON object - */ - Validator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Validator; - })(); - - types.SimpleValidator = (function() { - - /** - * Properties of a SimpleValidator. - * @memberof tendermint.types - * @interface ISimpleValidator - * @property {tendermint.crypto.IPublicKey|null} [pub_key] SimpleValidator pub_key - * @property {Long|null} [voting_power] SimpleValidator voting_power - */ - - /** - * Constructs a new SimpleValidator. - * @memberof tendermint.types - * @classdesc Represents a SimpleValidator. - * @implements ISimpleValidator - * @constructor - * @param {tendermint.types.ISimpleValidator=} [properties] Properties to set - */ - function SimpleValidator(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SimpleValidator pub_key. - * @member {tendermint.crypto.IPublicKey|null|undefined} pub_key - * @memberof tendermint.types.SimpleValidator - * @instance - */ - SimpleValidator.prototype.pub_key = null; - - /** - * SimpleValidator voting_power. - * @member {Long} voting_power - * @memberof tendermint.types.SimpleValidator - * @instance - */ - SimpleValidator.prototype.voting_power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @function encode - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleValidator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pub_key != null && Object.hasOwnProperty.call(message, "pub_key")) - $root.tendermint.crypto.PublicKey.encode(message.pub_key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.voting_power != null && Object.hasOwnProperty.call(message, "voting_power")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.voting_power); - return writer; - }; - - /** - * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.ISimpleValidator} message SimpleValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimpleValidator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.SimpleValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.SimpleValidator} SimpleValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleValidator.decode = 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.types.SimpleValidator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.pub_key = $root.tendermint.crypto.PublicKey.decode(reader, reader.uint32()); - break; - case 2: - message.voting_power = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.SimpleValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.SimpleValidator} SimpleValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimpleValidator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimpleValidator message. - * @function verify - * @memberof tendermint.types.SimpleValidator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimpleValidator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pub_key != null && message.hasOwnProperty("pub_key")) { - var error = $root.tendermint.crypto.PublicKey.verify(message.pub_key); - if (error) - return "pub_key." + error; - } - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (!$util.isInteger(message.voting_power) && !(message.voting_power && $util.isInteger(message.voting_power.low) && $util.isInteger(message.voting_power.high))) - return "voting_power: integer|Long expected"; - return null; - }; - - /** - * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.SimpleValidator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.SimpleValidator} SimpleValidator - */ - SimpleValidator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.SimpleValidator) - return object; - var message = new $root.tendermint.types.SimpleValidator(); - if (object.pub_key != null) { - if (typeof object.pub_key !== "object") - throw TypeError(".tendermint.types.SimpleValidator.pub_key: object expected"); - message.pub_key = $root.tendermint.crypto.PublicKey.fromObject(object.pub_key); - } - if (object.voting_power != null) - if ($util.Long) - (message.voting_power = $util.Long.fromValue(object.voting_power)).unsigned = false; - else if (typeof object.voting_power === "string") - message.voting_power = parseInt(object.voting_power, 10); - else if (typeof object.voting_power === "number") - message.voting_power = object.voting_power; - else if (typeof object.voting_power === "object") - message.voting_power = new $util.LongBits(object.voting_power.low >>> 0, object.voting_power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.SimpleValidator - * @static - * @param {tendermint.types.SimpleValidator} message SimpleValidator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimpleValidator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pub_key = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.voting_power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.voting_power = options.longs === String ? "0" : 0; - } - if (message.pub_key != null && message.hasOwnProperty("pub_key")) - object.pub_key = $root.tendermint.crypto.PublicKey.toObject(message.pub_key, options); - if (message.voting_power != null && message.hasOwnProperty("voting_power")) - if (typeof message.voting_power === "number") - object.voting_power = options.longs === String ? String(message.voting_power) : message.voting_power; - else - object.voting_power = options.longs === String ? $util.Long.prototype.toString.call(message.voting_power) : options.longs === Number ? new $util.LongBits(message.voting_power.low >>> 0, message.voting_power.high >>> 0).toNumber() : message.voting_power; - return object; - }; - - /** - * Converts this SimpleValidator to JSON. - * @function toJSON - * @memberof tendermint.types.SimpleValidator - * @instance - * @returns {Object.} JSON object - */ - SimpleValidator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return SimpleValidator; - })(); - - types.ConsensusParams = (function() { - - /** - * Properties of a ConsensusParams. - * @memberof tendermint.types - * @interface IConsensusParams - * @property {tendermint.types.IBlockParams|null} [block] ConsensusParams block - * @property {tendermint.types.IEvidenceParams|null} [evidence] ConsensusParams evidence - * @property {tendermint.types.IValidatorParams|null} [validator] ConsensusParams validator - * @property {tendermint.types.IVersionParams|null} [version] ConsensusParams version - */ - - /** - * Constructs a new ConsensusParams. - * @memberof tendermint.types - * @classdesc Represents a ConsensusParams. - * @implements IConsensusParams - * @constructor - * @param {tendermint.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.types.IBlockParams|null|undefined} block - * @memberof tendermint.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.block = null; - - /** - * ConsensusParams evidence. - * @member {tendermint.types.IEvidenceParams|null|undefined} evidence - * @memberof tendermint.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.evidence = null; - - /** - * ConsensusParams validator. - * @member {tendermint.types.IValidatorParams|null|undefined} validator - * @memberof tendermint.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.validator = null; - - /** - * ConsensusParams version. - * @member {tendermint.types.IVersionParams|null|undefined} version - * @memberof tendermint.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.version = null; - - /** - * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. - * @function encode - * @memberof tendermint.types.ConsensusParams - * @static - * @param {tendermint.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.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.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.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.tendermint.types.VersionParams.encode(message.version, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.types.ConsensusParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.ConsensusParams - * @static - * @param {tendermint.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.types.ConsensusParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.ConsensusParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block = $root.tendermint.types.BlockParams.decode(reader, reader.uint32()); - break; - case 2: - message.evidence = $root.tendermint.types.EvidenceParams.decode(reader, reader.uint32()); - break; - case 3: - message.validator = $root.tendermint.types.ValidatorParams.decode(reader, reader.uint32()); - break; - case 4: - message.version = $root.tendermint.types.VersionParams.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.types.ConsensusParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.types.BlockParams.verify(message.block); - if (error) - return "block." + error; - } - if (message.evidence != null && message.hasOwnProperty("evidence")) { - var error = $root.tendermint.types.EvidenceParams.verify(message.evidence); - if (error) - return "evidence." + error; - } - if (message.validator != null && message.hasOwnProperty("validator")) { - var error = $root.tendermint.types.ValidatorParams.verify(message.validator); - if (error) - return "validator." + error; - } - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.tendermint.types.VersionParams.verify(message.version); - if (error) - return "version." + error; - } - return null; - }; - - /** - * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.ConsensusParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.ConsensusParams} ConsensusParams - */ - ConsensusParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.ConsensusParams) - return object; - var message = new $root.tendermint.types.ConsensusParams(); - if (object.block != null) { - if (typeof object.block !== "object") - throw TypeError(".tendermint.types.ConsensusParams.block: object expected"); - message.block = $root.tendermint.types.BlockParams.fromObject(object.block); - } - if (object.evidence != null) { - if (typeof object.evidence !== "object") - throw TypeError(".tendermint.types.ConsensusParams.evidence: object expected"); - message.evidence = $root.tendermint.types.EvidenceParams.fromObject(object.evidence); - } - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.types.ConsensusParams.validator: object expected"); - message.validator = $root.tendermint.types.ValidatorParams.fromObject(object.validator); - } - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".tendermint.types.ConsensusParams.version: object expected"); - message.version = $root.tendermint.types.VersionParams.fromObject(object.version); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.ConsensusParams - * @static - * @param {tendermint.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; - object.version = null; - } - if (message.block != null && message.hasOwnProperty("block")) - object.block = $root.tendermint.types.BlockParams.toObject(message.block, options); - if (message.evidence != null && message.hasOwnProperty("evidence")) - object.evidence = $root.tendermint.types.EvidenceParams.toObject(message.evidence, options); - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.types.ValidatorParams.toObject(message.validator, options); - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.tendermint.types.VersionParams.toObject(message.version, options); - return object; - }; - - /** - * Converts this ConsensusParams to JSON. - * @function toJSON - * @memberof tendermint.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.types - * @interface IBlockParams - * @property {Long|null} [max_bytes] BlockParams max_bytes - * @property {Long|null} [max_gas] BlockParams max_gas - * @property {Long|null} [time_iota_ms] BlockParams time_iota_ms - */ - - /** - * Constructs a new BlockParams. - * @memberof tendermint.types - * @classdesc Represents a BlockParams. - * @implements IBlockParams - * @constructor - * @param {tendermint.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 max_bytes. - * @member {Long} max_bytes - * @memberof tendermint.types.BlockParams - * @instance - */ - BlockParams.prototype.max_bytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockParams max_gas. - * @member {Long} max_gas - * @memberof tendermint.types.BlockParams - * @instance - */ - BlockParams.prototype.max_gas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockParams time_iota_ms. - * @member {Long} time_iota_ms - * @memberof tendermint.types.BlockParams - * @instance - */ - BlockParams.prototype.time_iota_ms = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. - * @function encode - * @memberof tendermint.types.BlockParams - * @static - * @param {tendermint.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.max_bytes != null && Object.hasOwnProperty.call(message, "max_bytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.max_bytes); - if (message.max_gas != null && Object.hasOwnProperty.call(message, "max_gas")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.max_gas); - if (message.time_iota_ms != null && Object.hasOwnProperty.call(message, "time_iota_ms")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.time_iota_ms); - return writer; - }; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.types.BlockParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.BlockParams - * @static - * @param {tendermint.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.types.BlockParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.BlockParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_bytes = reader.int64(); - break; - case 2: - message.max_gas = reader.int64(); - break; - case 3: - message.time_iota_ms = 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.types.BlockParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.max_bytes != null && message.hasOwnProperty("max_bytes")) - if (!$util.isInteger(message.max_bytes) && !(message.max_bytes && $util.isInteger(message.max_bytes.low) && $util.isInteger(message.max_bytes.high))) - return "max_bytes: integer|Long expected"; - if (message.max_gas != null && message.hasOwnProperty("max_gas")) - if (!$util.isInteger(message.max_gas) && !(message.max_gas && $util.isInteger(message.max_gas.low) && $util.isInteger(message.max_gas.high))) - return "max_gas: integer|Long expected"; - if (message.time_iota_ms != null && message.hasOwnProperty("time_iota_ms")) - if (!$util.isInteger(message.time_iota_ms) && !(message.time_iota_ms && $util.isInteger(message.time_iota_ms.low) && $util.isInteger(message.time_iota_ms.high))) - return "time_iota_ms: 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.types.BlockParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.BlockParams} BlockParams - */ - BlockParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.BlockParams) - return object; - var message = new $root.tendermint.types.BlockParams(); - if (object.max_bytes != null) - if ($util.Long) - (message.max_bytes = $util.Long.fromValue(object.max_bytes)).unsigned = false; - else if (typeof object.max_bytes === "string") - message.max_bytes = parseInt(object.max_bytes, 10); - else if (typeof object.max_bytes === "number") - message.max_bytes = object.max_bytes; - else if (typeof object.max_bytes === "object") - message.max_bytes = new $util.LongBits(object.max_bytes.low >>> 0, object.max_bytes.high >>> 0).toNumber(); - if (object.max_gas != null) - if ($util.Long) - (message.max_gas = $util.Long.fromValue(object.max_gas)).unsigned = false; - else if (typeof object.max_gas === "string") - message.max_gas = parseInt(object.max_gas, 10); - else if (typeof object.max_gas === "number") - message.max_gas = object.max_gas; - else if (typeof object.max_gas === "object") - message.max_gas = new $util.LongBits(object.max_gas.low >>> 0, object.max_gas.high >>> 0).toNumber(); - if (object.time_iota_ms != null) - if ($util.Long) - (message.time_iota_ms = $util.Long.fromValue(object.time_iota_ms)).unsigned = false; - else if (typeof object.time_iota_ms === "string") - message.time_iota_ms = parseInt(object.time_iota_ms, 10); - else if (typeof object.time_iota_ms === "number") - message.time_iota_ms = object.time_iota_ms; - else if (typeof object.time_iota_ms === "object") - message.time_iota_ms = new $util.LongBits(object.time_iota_ms.low >>> 0, object.time_iota_ms.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.types.BlockParams - * @static - * @param {tendermint.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.max_bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_bytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_gas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_gas = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.time_iota_ms = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.time_iota_ms = options.longs === String ? "0" : 0; - } - if (message.max_bytes != null && message.hasOwnProperty("max_bytes")) - if (typeof message.max_bytes === "number") - object.max_bytes = options.longs === String ? String(message.max_bytes) : message.max_bytes; - else - object.max_bytes = options.longs === String ? $util.Long.prototype.toString.call(message.max_bytes) : options.longs === Number ? new $util.LongBits(message.max_bytes.low >>> 0, message.max_bytes.high >>> 0).toNumber() : message.max_bytes; - if (message.max_gas != null && message.hasOwnProperty("max_gas")) - if (typeof message.max_gas === "number") - object.max_gas = options.longs === String ? String(message.max_gas) : message.max_gas; - else - object.max_gas = options.longs === String ? $util.Long.prototype.toString.call(message.max_gas) : options.longs === Number ? new $util.LongBits(message.max_gas.low >>> 0, message.max_gas.high >>> 0).toNumber() : message.max_gas; - if (message.time_iota_ms != null && message.hasOwnProperty("time_iota_ms")) - if (typeof message.time_iota_ms === "number") - object.time_iota_ms = options.longs === String ? String(message.time_iota_ms) : message.time_iota_ms; - else - object.time_iota_ms = options.longs === String ? $util.Long.prototype.toString.call(message.time_iota_ms) : options.longs === Number ? new $util.LongBits(message.time_iota_ms.low >>> 0, message.time_iota_ms.high >>> 0).toNumber() : message.time_iota_ms; - return object; - }; - - /** - * Converts this BlockParams to JSON. - * @function toJSON - * @memberof tendermint.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.types - * @interface IEvidenceParams - * @property {Long|null} [max_age_num_blocks] EvidenceParams max_age_num_blocks - * @property {google.protobuf.IDuration|null} [max_age_duration] EvidenceParams max_age_duration - * @property {Long|null} [max_bytes] EvidenceParams max_bytes - */ - - /** - * Constructs a new EvidenceParams. - * @memberof tendermint.types - * @classdesc Represents an EvidenceParams. - * @implements IEvidenceParams - * @constructor - * @param {tendermint.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 max_age_num_blocks. - * @member {Long} max_age_num_blocks - * @memberof tendermint.types.EvidenceParams - * @instance - */ - EvidenceParams.prototype.max_age_num_blocks = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * EvidenceParams max_age_duration. - * @member {google.protobuf.IDuration|null|undefined} max_age_duration - * @memberof tendermint.types.EvidenceParams - * @instance - */ - EvidenceParams.prototype.max_age_duration = null; - - /** - * EvidenceParams max_bytes. - * @member {Long} max_bytes - * @memberof tendermint.types.EvidenceParams - * @instance - */ - EvidenceParams.prototype.max_bytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. - * @function encode - * @memberof tendermint.types.EvidenceParams - * @static - * @param {tendermint.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.max_age_num_blocks != null && Object.hasOwnProperty.call(message, "max_age_num_blocks")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.max_age_num_blocks); - if (message.max_age_duration != null && Object.hasOwnProperty.call(message, "max_age_duration")) - $root.google.protobuf.Duration.encode(message.max_age_duration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.max_bytes != null && Object.hasOwnProperty.call(message, "max_bytes")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.max_bytes); - return writer; - }; - - /** - * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.types.EvidenceParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.EvidenceParams - * @static - * @param {tendermint.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.types.EvidenceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.EvidenceParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.max_age_num_blocks = reader.int64(); - break; - case 2: - message.max_age_duration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - case 3: - message.max_bytes = reader.int64(); - 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.types.EvidenceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.max_age_num_blocks != null && message.hasOwnProperty("max_age_num_blocks")) - if (!$util.isInteger(message.max_age_num_blocks) && !(message.max_age_num_blocks && $util.isInteger(message.max_age_num_blocks.low) && $util.isInteger(message.max_age_num_blocks.high))) - return "max_age_num_blocks: integer|Long expected"; - if (message.max_age_duration != null && message.hasOwnProperty("max_age_duration")) { - var error = $root.google.protobuf.Duration.verify(message.max_age_duration); - if (error) - return "max_age_duration." + error; - } - if (message.max_bytes != null && message.hasOwnProperty("max_bytes")) - if (!$util.isInteger(message.max_bytes) && !(message.max_bytes && $util.isInteger(message.max_bytes.low) && $util.isInteger(message.max_bytes.high))) - return "max_bytes: integer|Long expected"; - return null; - }; - - /** - * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.EvidenceParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.EvidenceParams} EvidenceParams - */ - EvidenceParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.EvidenceParams) - return object; - var message = new $root.tendermint.types.EvidenceParams(); - if (object.max_age_num_blocks != null) - if ($util.Long) - (message.max_age_num_blocks = $util.Long.fromValue(object.max_age_num_blocks)).unsigned = false; - else if (typeof object.max_age_num_blocks === "string") - message.max_age_num_blocks = parseInt(object.max_age_num_blocks, 10); - else if (typeof object.max_age_num_blocks === "number") - message.max_age_num_blocks = object.max_age_num_blocks; - else if (typeof object.max_age_num_blocks === "object") - message.max_age_num_blocks = new $util.LongBits(object.max_age_num_blocks.low >>> 0, object.max_age_num_blocks.high >>> 0).toNumber(); - if (object.max_age_duration != null) { - if (typeof object.max_age_duration !== "object") - throw TypeError(".tendermint.types.EvidenceParams.max_age_duration: object expected"); - message.max_age_duration = $root.google.protobuf.Duration.fromObject(object.max_age_duration); - } - if (object.max_bytes != null) - if ($util.Long) - (message.max_bytes = $util.Long.fromValue(object.max_bytes)).unsigned = false; - else if (typeof object.max_bytes === "string") - message.max_bytes = parseInt(object.max_bytes, 10); - else if (typeof object.max_bytes === "number") - message.max_bytes = object.max_bytes; - else if (typeof object.max_bytes === "object") - message.max_bytes = new $util.LongBits(object.max_bytes.low >>> 0, object.max_bytes.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.EvidenceParams - * @static - * @param {tendermint.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.max_age_num_blocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_age_num_blocks = options.longs === String ? "0" : 0; - object.max_age_duration = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.max_bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.max_bytes = options.longs === String ? "0" : 0; - } - if (message.max_age_num_blocks != null && message.hasOwnProperty("max_age_num_blocks")) - if (typeof message.max_age_num_blocks === "number") - object.max_age_num_blocks = options.longs === String ? String(message.max_age_num_blocks) : message.max_age_num_blocks; - else - object.max_age_num_blocks = options.longs === String ? $util.Long.prototype.toString.call(message.max_age_num_blocks) : options.longs === Number ? new $util.LongBits(message.max_age_num_blocks.low >>> 0, message.max_age_num_blocks.high >>> 0).toNumber() : message.max_age_num_blocks; - if (message.max_age_duration != null && message.hasOwnProperty("max_age_duration")) - object.max_age_duration = $root.google.protobuf.Duration.toObject(message.max_age_duration, options); - if (message.max_bytes != null && message.hasOwnProperty("max_bytes")) - if (typeof message.max_bytes === "number") - object.max_bytes = options.longs === String ? String(message.max_bytes) : message.max_bytes; - else - object.max_bytes = options.longs === String ? $util.Long.prototype.toString.call(message.max_bytes) : options.longs === Number ? new $util.LongBits(message.max_bytes.low >>> 0, message.max_bytes.high >>> 0).toNumber() : message.max_bytes; - return object; - }; - - /** - * Converts this EvidenceParams to JSON. - * @function toJSON - * @memberof tendermint.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.types - * @interface IValidatorParams - * @property {Array.|null} [pub_key_types] ValidatorParams pub_key_types - */ - - /** - * Constructs a new ValidatorParams. - * @memberof tendermint.types - * @classdesc Represents a ValidatorParams. - * @implements IValidatorParams - * @constructor - * @param {tendermint.types.IValidatorParams=} [properties] Properties to set - */ - function ValidatorParams(properties) { - this.pub_key_types = []; - if (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 pub_key_types. - * @member {Array.} pub_key_types - * @memberof tendermint.types.ValidatorParams - * @instance - */ - ValidatorParams.prototype.pub_key_types = $util.emptyArray; - - /** - * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. - * @function encode - * @memberof tendermint.types.ValidatorParams - * @static - * @param {tendermint.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.pub_key_types != null && message.pub_key_types.length) - for (var i = 0; i < message.pub_key_types.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pub_key_types[i]); - return writer; - }; - - /** - * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.types.ValidatorParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.ValidatorParams - * @static - * @param {tendermint.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.types.ValidatorParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.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.types.ValidatorParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.pub_key_types && message.pub_key_types.length)) - message.pub_key_types = []; - message.pub_key_types.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.types.ValidatorParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.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.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.pub_key_types != null && message.hasOwnProperty("pub_key_types")) { - if (!Array.isArray(message.pub_key_types)) - return "pub_key_types: array expected"; - for (var i = 0; i < message.pub_key_types.length; ++i) - if (!$util.isString(message.pub_key_types[i])) - return "pub_key_types: string[] expected"; - } - return null; - }; - - /** - * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.ValidatorParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.ValidatorParams} ValidatorParams - */ - ValidatorParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.ValidatorParams) - return object; - var message = new $root.tendermint.types.ValidatorParams(); - if (object.pub_key_types) { - if (!Array.isArray(object.pub_key_types)) - throw TypeError(".tendermint.types.ValidatorParams.pub_key_types: array expected"); - message.pub_key_types = []; - for (var i = 0; i < object.pub_key_types.length; ++i) - message.pub_key_types[i] = String(object.pub_key_types[i]); - } - return message; - }; - - /** - * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.ValidatorParams - * @static - * @param {tendermint.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.pub_key_types = []; - if (message.pub_key_types && message.pub_key_types.length) { - object.pub_key_types = []; - for (var j = 0; j < message.pub_key_types.length; ++j) - object.pub_key_types[j] = message.pub_key_types[j]; - } - return object; - }; - - /** - * Converts this ValidatorParams to JSON. - * @function toJSON - * @memberof tendermint.types.ValidatorParams - * @instance - * @returns {Object.} JSON object - */ - ValidatorParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ValidatorParams; - })(); - - types.VersionParams = (function() { - - /** - * Properties of a VersionParams. - * @memberof tendermint.types - * @interface IVersionParams - * @property {Long|null} [app_version] VersionParams app_version - */ - - /** - * Constructs a new VersionParams. - * @memberof tendermint.types - * @classdesc Represents a VersionParams. - * @implements IVersionParams - * @constructor - * @param {tendermint.types.IVersionParams=} [properties] Properties to set - */ - function VersionParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * VersionParams app_version. - * @member {Long} app_version - * @memberof tendermint.types.VersionParams - * @instance - */ - VersionParams.prototype.app_version = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified VersionParams message. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. - * @function encode - * @memberof tendermint.types.VersionParams - * @static - * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.app_version != null && Object.hasOwnProperty.call(message, "app_version")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.app_version); - return writer; - }; - - /** - * Encodes the specified VersionParams message, length delimited. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.VersionParams - * @static - * @param {tendermint.types.IVersionParams} message VersionParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VersionParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VersionParams message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.VersionParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.VersionParams} VersionParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionParams.decode = 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.types.VersionParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.app_version = reader.uint64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VersionParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.VersionParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.VersionParams} VersionParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VersionParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VersionParams message. - * @function verify - * @memberof tendermint.types.VersionParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VersionParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.app_version != null && message.hasOwnProperty("app_version")) - if (!$util.isInteger(message.app_version) && !(message.app_version && $util.isInteger(message.app_version.low) && $util.isInteger(message.app_version.high))) - return "app_version: integer|Long expected"; - return null; - }; - - /** - * Creates a VersionParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.VersionParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.VersionParams} VersionParams - */ - VersionParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.VersionParams) - return object; - var message = new $root.tendermint.types.VersionParams(); - if (object.app_version != null) - if ($util.Long) - (message.app_version = $util.Long.fromValue(object.app_version)).unsigned = true; - else if (typeof object.app_version === "string") - message.app_version = parseInt(object.app_version, 10); - else if (typeof object.app_version === "number") - message.app_version = object.app_version; - else if (typeof object.app_version === "object") - message.app_version = new $util.LongBits(object.app_version.low >>> 0, object.app_version.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a VersionParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.VersionParams - * @static - * @param {tendermint.types.VersionParams} message VersionParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VersionParams.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.app_version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.app_version = options.longs === String ? "0" : 0; - if (message.app_version != null && message.hasOwnProperty("app_version")) - if (typeof message.app_version === "number") - object.app_version = options.longs === String ? String(message.app_version) : message.app_version; - else - object.app_version = options.longs === String ? $util.Long.prototype.toString.call(message.app_version) : options.longs === Number ? new $util.LongBits(message.app_version.low >>> 0, message.app_version.high >>> 0).toNumber(true) : message.app_version; - return object; - }; - - /** - * Converts this VersionParams to JSON. - * @function toJSON - * @memberof tendermint.types.VersionParams - * @instance - * @returns {Object.} JSON object - */ - VersionParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return VersionParams; - })(); - - types.HashedParams = (function() { - - /** - * Properties of a HashedParams. - * @memberof tendermint.types - * @interface IHashedParams - * @property {Long|null} [block_max_bytes] HashedParams block_max_bytes - * @property {Long|null} [block_max_gas] HashedParams block_max_gas - */ - - /** - * Constructs a new HashedParams. - * @memberof tendermint.types - * @classdesc Represents a HashedParams. - * @implements IHashedParams - * @constructor - * @param {tendermint.types.IHashedParams=} [properties] Properties to set - */ - function HashedParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HashedParams block_max_bytes. - * @member {Long} block_max_bytes - * @memberof tendermint.types.HashedParams - * @instance - */ - HashedParams.prototype.block_max_bytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * HashedParams block_max_gas. - * @member {Long} block_max_gas - * @memberof tendermint.types.HashedParams - * @instance - */ - HashedParams.prototype.block_max_gas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Encodes the specified HashedParams message. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. - * @function encode - * @memberof tendermint.types.HashedParams - * @static - * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HashedParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block_max_bytes != null && Object.hasOwnProperty.call(message, "block_max_bytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.block_max_bytes); - if (message.block_max_gas != null && Object.hasOwnProperty.call(message, "block_max_gas")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.block_max_gas); - return writer; - }; - - /** - * Encodes the specified HashedParams message, length delimited. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.types.HashedParams - * @static - * @param {tendermint.types.IHashedParams} message HashedParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HashedParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HashedParams message from the specified reader or buffer. - * @function decode - * @memberof tendermint.types.HashedParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.types.HashedParams} HashedParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HashedParams.decode = 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.types.HashedParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.block_max_bytes = reader.int64(); - break; - case 2: - message.block_max_gas = reader.int64(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HashedParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.types.HashedParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.types.HashedParams} HashedParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HashedParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HashedParams message. - * @function verify - * @memberof tendermint.types.HashedParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HashedParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block_max_bytes != null && message.hasOwnProperty("block_max_bytes")) - if (!$util.isInteger(message.block_max_bytes) && !(message.block_max_bytes && $util.isInteger(message.block_max_bytes.low) && $util.isInteger(message.block_max_bytes.high))) - return "block_max_bytes: integer|Long expected"; - if (message.block_max_gas != null && message.hasOwnProperty("block_max_gas")) - if (!$util.isInteger(message.block_max_gas) && !(message.block_max_gas && $util.isInteger(message.block_max_gas.low) && $util.isInteger(message.block_max_gas.high))) - return "block_max_gas: integer|Long expected"; - return null; - }; - - /** - * Creates a HashedParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.types.HashedParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.types.HashedParams} HashedParams - */ - HashedParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.types.HashedParams) - return object; - var message = new $root.tendermint.types.HashedParams(); - if (object.block_max_bytes != null) - if ($util.Long) - (message.block_max_bytes = $util.Long.fromValue(object.block_max_bytes)).unsigned = false; - else if (typeof object.block_max_bytes === "string") - message.block_max_bytes = parseInt(object.block_max_bytes, 10); - else if (typeof object.block_max_bytes === "number") - message.block_max_bytes = object.block_max_bytes; - else if (typeof object.block_max_bytes === "object") - message.block_max_bytes = new $util.LongBits(object.block_max_bytes.low >>> 0, object.block_max_bytes.high >>> 0).toNumber(); - if (object.block_max_gas != null) - if ($util.Long) - (message.block_max_gas = $util.Long.fromValue(object.block_max_gas)).unsigned = false; - else if (typeof object.block_max_gas === "string") - message.block_max_gas = parseInt(object.block_max_gas, 10); - else if (typeof object.block_max_gas === "number") - message.block_max_gas = object.block_max_gas; - else if (typeof object.block_max_gas === "object") - message.block_max_gas = new $util.LongBits(object.block_max_gas.low >>> 0, object.block_max_gas.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a HashedParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.types.HashedParams - * @static - * @param {tendermint.types.HashedParams} message HashedParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HashedParams.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.block_max_bytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_max_bytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.block_max_gas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.block_max_gas = options.longs === String ? "0" : 0; - } - if (message.block_max_bytes != null && message.hasOwnProperty("block_max_bytes")) - if (typeof message.block_max_bytes === "number") - object.block_max_bytes = options.longs === String ? String(message.block_max_bytes) : message.block_max_bytes; - else - object.block_max_bytes = options.longs === String ? $util.Long.prototype.toString.call(message.block_max_bytes) : options.longs === Number ? new $util.LongBits(message.block_max_bytes.low >>> 0, message.block_max_bytes.high >>> 0).toNumber() : message.block_max_bytes; - if (message.block_max_gas != null && message.hasOwnProperty("block_max_gas")) - if (typeof message.block_max_gas === "number") - object.block_max_gas = options.longs === String ? String(message.block_max_gas) : message.block_max_gas; - else - object.block_max_gas = options.longs === String ? $util.Long.prototype.toString.call(message.block_max_gas) : options.longs === Number ? new $util.LongBits(message.block_max_gas.low >>> 0, message.block_max_gas.high >>> 0).toNumber() : message.block_max_gas; - return object; - }; - - /** - * Converts this HashedParams to JSON. - * @function toJSON - * @memberof tendermint.types.HashedParams - * @instance - * @returns {Object.} JSON object - */ - HashedParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HashedParams; - })(); - - return types; - })(); - - tendermint.version = (function() { - - /** - * Namespace version. - * @memberof tendermint - * @namespace - */ - var version = {}; - - version.App = (function() { - - /** - * Properties of an App. - * @memberof tendermint.version - * @interface IApp - * @property {Long|null} [protocol] App protocol - * @property {string|null} [software] App software - */ - - /** - * Constructs a new App. - * @memberof tendermint.version - * @classdesc Represents an App. - * @implements IApp - * @constructor - * @param {tendermint.version.IApp=} [properties] Properties to set - */ - function App(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * App protocol. - * @member {Long} protocol - * @memberof tendermint.version.App - * @instance - */ - App.prototype.protocol = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * App software. - * @member {string} software - * @memberof tendermint.version.App - * @instance - */ - App.prototype.software = ""; - - /** - * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @function encode - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.IApp} message App message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - App.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.protocol != null && Object.hasOwnProperty.call(message, "protocol")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.protocol); - if (message.software != null && Object.hasOwnProperty.call(message, "software")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.software); - return writer; - }; - - /** - * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.IApp} message App message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - App.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an App message from the specified reader or buffer. - * @function decode - * @memberof tendermint.version.App - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.version.App} App - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - App.decode = 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.version.App(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.protocol = reader.uint64(); - break; - case 2: - message.software = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an App message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.version.App - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.version.App} App - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - App.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an App message. - * @function verify - * @memberof tendermint.version.App - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - App.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (!$util.isInteger(message.protocol) && !(message.protocol && $util.isInteger(message.protocol.low) && $util.isInteger(message.protocol.high))) - return "protocol: integer|Long expected"; - if (message.software != null && message.hasOwnProperty("software")) - if (!$util.isString(message.software)) - return "software: string expected"; - return null; - }; - - /** - * Creates an App message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.version.App - * @static - * @param {Object.} object Plain object - * @returns {tendermint.version.App} App - */ - App.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.version.App) - return object; - var message = new $root.tendermint.version.App(); - if (object.protocol != null) - if ($util.Long) - (message.protocol = $util.Long.fromValue(object.protocol)).unsigned = true; - else if (typeof object.protocol === "string") - message.protocol = parseInt(object.protocol, 10); - else if (typeof object.protocol === "number") - message.protocol = object.protocol; - else if (typeof object.protocol === "object") - message.protocol = new $util.LongBits(object.protocol.low >>> 0, object.protocol.high >>> 0).toNumber(true); - if (object.software != null) - message.software = String(object.software); - return message; - }; - - /** - * Creates a plain object from an App message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.version.App - * @static - * @param {tendermint.version.App} message App - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - App.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.protocol = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.protocol = options.longs === String ? "0" : 0; - object.software = ""; - } - if (message.protocol != null && message.hasOwnProperty("protocol")) - if (typeof message.protocol === "number") - object.protocol = options.longs === String ? String(message.protocol) : message.protocol; - else - object.protocol = options.longs === String ? $util.Long.prototype.toString.call(message.protocol) : options.longs === Number ? new $util.LongBits(message.protocol.low >>> 0, message.protocol.high >>> 0).toNumber(true) : message.protocol; - if (message.software != null && message.hasOwnProperty("software")) - object.software = message.software; - return object; - }; - - /** - * Converts this App to JSON. - * @function toJSON - * @memberof tendermint.version.App - * @instance - * @returns {Object.} JSON object - */ - App.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return App; - })(); - - version.Consensus = (function() { - - /** - * Properties of a Consensus. - * @memberof tendermint.version - * @interface IConsensus - * @property {Long|null} [block] Consensus block - * @property {Long|null} [app] Consensus app - */ - - /** - * Constructs a new Consensus. - * @memberof tendermint.version - * @classdesc Represents a Consensus. - * @implements IConsensus - * @constructor - * @param {tendermint.version.IConsensus=} [properties] Properties to set - */ - function Consensus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Consensus block. - * @member {Long} block - * @memberof tendermint.version.Consensus - * @instance - */ - Consensus.prototype.block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Consensus app. - * @member {Long} app - * @memberof tendermint.version.Consensus - * @instance - */ - Consensus.prototype.app = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @function encode - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consensus.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 Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.IConsensus} message Consensus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Consensus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Consensus message from the specified reader or buffer. - * @function decode - * @memberof tendermint.version.Consensus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {tendermint.version.Consensus} Consensus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consensus.decode = 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.version.Consensus(); - 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 Consensus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.version.Consensus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.version.Consensus} Consensus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Consensus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Consensus message. - * @function verify - * @memberof tendermint.version.Consensus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Consensus.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 Consensus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.version.Consensus - * @static - * @param {Object.} object Plain object - * @returns {tendermint.version.Consensus} Consensus - */ - Consensus.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.version.Consensus) - return object; - var message = new $root.tendermint.version.Consensus(); - 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 Consensus message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.version.Consensus - * @static - * @param {tendermint.version.Consensus} message Consensus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Consensus.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 Consensus to JSON. - * @function toJSON - * @memberof tendermint.version.Consensus - * @instance - * @returns {Object.} JSON object - */ - Consensus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Consensus; - })(); - - return version; - })(); - - return tendermint; - })(); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - 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; - - /** - * 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} [public_dependency] FileDescriptorProto public_dependency - * @property {Array.|null} [weak_dependency] FileDescriptorProto weak_dependency - * @property {Array.|null} [message_type] FileDescriptorProto message_type - * @property {Array.|null} [enum_type] FileDescriptorProto enum_type - * @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} [source_code_info] FileDescriptorProto source_code_info - * @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.public_dependency = []; - this.weak_dependency = []; - this.message_type = []; - this.enum_type = []; - 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 public_dependency. - * @member {Array.} public_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.public_dependency = $util.emptyArray; - - /** - * FileDescriptorProto weak_dependency. - * @member {Array.} weak_dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weak_dependency = $util.emptyArray; - - /** - * FileDescriptorProto message_type. - * @member {Array.} message_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.message_type = $util.emptyArray; - - /** - * FileDescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enum_type = $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 source_code_info. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} source_code_info - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.source_code_info = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * 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.message_type != null && message.message_type.length) - for (var i = 0; i < message.message_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.message_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[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.source_code_info != null && Object.hasOwnProperty.call(message, "source_code_info")) - $root.google.protobuf.SourceCodeInfo.encode(message.source_code_info, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.public_dependency != null && message.public_dependency.length) - for (var i = 0; i < message.public_dependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.public_dependency[i]); - if (message.weak_dependency != null && message.weak_dependency.length) - for (var i = 0; i < message.weak_dependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weak_dependency[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.public_dependency && message.public_dependency.length)) - message.public_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.public_dependency.push(reader.int32()); - } else - message.public_dependency.push(reader.int32()); - break; - case 11: - if (!(message.weak_dependency && message.weak_dependency.length)) - message.weak_dependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weak_dependency.push(reader.int32()); - } else - message.weak_dependency.push(reader.int32()); - break; - case 4: - if (!(message.message_type && message.message_type.length)) - message.message_type = []; - message.message_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.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.source_code_info = $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.public_dependency != null && message.hasOwnProperty("public_dependency")) { - if (!Array.isArray(message.public_dependency)) - return "public_dependency: array expected"; - for (var i = 0; i < message.public_dependency.length; ++i) - if (!$util.isInteger(message.public_dependency[i])) - return "public_dependency: integer[] expected"; - } - if (message.weak_dependency != null && message.hasOwnProperty("weak_dependency")) { - if (!Array.isArray(message.weak_dependency)) - return "weak_dependency: array expected"; - for (var i = 0; i < message.weak_dependency.length; ++i) - if (!$util.isInteger(message.weak_dependency[i])) - return "weak_dependency: integer[] expected"; - } - if (message.message_type != null && message.hasOwnProperty("message_type")) { - if (!Array.isArray(message.message_type)) - return "message_type: array expected"; - for (var i = 0; i < message.message_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.message_type[i]); - if (error) - return "message_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + 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.source_code_info != null && message.hasOwnProperty("source_code_info")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.source_code_info); - if (error) - return "source_code_info." + 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.public_dependency) { - if (!Array.isArray(object.public_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.public_dependency: array expected"); - message.public_dependency = []; - for (var i = 0; i < object.public_dependency.length; ++i) - message.public_dependency[i] = object.public_dependency[i] | 0; - } - if (object.weak_dependency) { - if (!Array.isArray(object.weak_dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weak_dependency: array expected"); - message.weak_dependency = []; - for (var i = 0; i < object.weak_dependency.length; ++i) - message.weak_dependency[i] = object.weak_dependency[i] | 0; - } - if (object.message_type) { - if (!Array.isArray(object.message_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: array expected"); - message.message_type = []; - for (var i = 0; i < object.message_type.length; ++i) { - if (typeof object.message_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.message_type: object expected"); - message.message_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.message_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[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.source_code_info != null) { - if (typeof object.source_code_info !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.source_code_info: object expected"); - message.source_code_info = $root.google.protobuf.SourceCodeInfo.fromObject(object.source_code_info); - } - 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.message_type = []; - object.enum_type = []; - object.service = []; - object.extension = []; - object.public_dependency = []; - object.weak_dependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.source_code_info = 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.message_type && message.message_type.length) { - object.message_type = []; - for (var j = 0; j < message.message_type.length; ++j) - object.message_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.message_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[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.source_code_info != null && message.hasOwnProperty("source_code_info")) - object.source_code_info = $root.google.protobuf.SourceCodeInfo.toObject(message.source_code_info, options); - if (message.public_dependency && message.public_dependency.length) { - object.public_dependency = []; - for (var j = 0; j < message.public_dependency.length; ++j) - object.public_dependency[j] = message.public_dependency[j]; - } - if (message.weak_dependency && message.weak_dependency.length) { - object.weak_dependency = []; - for (var j = 0; j < message.weak_dependency.length; ++j) - object.weak_dependency[j] = message.weak_dependency[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} [nested_type] DescriptorProto nested_type - * @property {Array.|null} [enum_type] DescriptorProto enum_type - * @property {Array.|null} [extension_range] DescriptorProto extension_range - * @property {Array.|null} [oneof_decl] DescriptorProto oneof_decl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reserved_range] DescriptorProto reserved_range - * @property {Array.|null} [reserved_name] DescriptorProto reserved_name - */ - - /** - * 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.nested_type = []; - this.enum_type = []; - this.extension_range = []; - this.oneof_decl = []; - this.reserved_range = []; - this.reserved_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]]; - } - - /** - * 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 nested_type. - * @member {Array.} nested_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nested_type = $util.emptyArray; - - /** - * DescriptorProto enum_type. - * @member {Array.} enum_type - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enum_type = $util.emptyArray; - - /** - * DescriptorProto extension_range. - * @member {Array.} extension_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension_range = $util.emptyArray; - - /** - * DescriptorProto oneof_decl. - * @member {Array.} oneof_decl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneof_decl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reserved_range. - * @member {Array.} reserved_range - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_range = $util.emptyArray; - - /** - * DescriptorProto reserved_name. - * @member {Array.} reserved_name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reserved_name = $util.emptyArray; - - /** - * 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.nested_type != null && message.nested_type.length) - for (var i = 0; i < message.nested_type.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nested_type[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enum_type != null && message.enum_type.length) - for (var i = 0; i < message.enum_type.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enum_type[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extension_range != null && message.extension_range.length) - for (var i = 0; i < message.extension_range.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extension_range[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.oneof_decl != null && message.oneof_decl.length) - for (var i = 0; i < message.oneof_decl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneof_decl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reserved_range != null && message.reserved_range.length) - for (var i = 0; i < message.reserved_range.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reserved_range[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reserved_name != null && message.reserved_name.length) - for (var i = 0; i < message.reserved_name.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reserved_name[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.nested_type && message.nested_type.length)) - message.nested_type = []; - message.nested_type.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enum_type && message.enum_type.length)) - message.enum_type = []; - message.enum_type.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extension_range && message.extension_range.length)) - message.extension_range = []; - message.extension_range.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneof_decl && message.oneof_decl.length)) - message.oneof_decl = []; - message.oneof_decl.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.reserved_range && message.reserved_range.length)) - message.reserved_range = []; - message.reserved_range.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reserved_name && message.reserved_name.length)) - message.reserved_name = []; - message.reserved_name.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.nested_type != null && message.hasOwnProperty("nested_type")) { - if (!Array.isArray(message.nested_type)) - return "nested_type: array expected"; - for (var i = 0; i < message.nested_type.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nested_type[i]); - if (error) - return "nested_type." + error; - } - } - if (message.enum_type != null && message.hasOwnProperty("enum_type")) { - if (!Array.isArray(message.enum_type)) - return "enum_type: array expected"; - for (var i = 0; i < message.enum_type.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enum_type[i]); - if (error) - return "enum_type." + error; - } - } - if (message.extension_range != null && message.hasOwnProperty("extension_range")) { - if (!Array.isArray(message.extension_range)) - return "extension_range: array expected"; - for (var i = 0; i < message.extension_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extension_range[i]); - if (error) - return "extension_range." + error; - } - } - if (message.oneof_decl != null && message.hasOwnProperty("oneof_decl")) { - if (!Array.isArray(message.oneof_decl)) - return "oneof_decl: array expected"; - for (var i = 0; i < message.oneof_decl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneof_decl[i]); - if (error) - return "oneof_decl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reserved_range != null && message.hasOwnProperty("reserved_range")) { - if (!Array.isArray(message.reserved_range)) - return "reserved_range: array expected"; - for (var i = 0; i < message.reserved_range.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reserved_range[i]); - if (error) - return "reserved_range." + error; - } - } - if (message.reserved_name != null && message.hasOwnProperty("reserved_name")) { - if (!Array.isArray(message.reserved_name)) - return "reserved_name: array expected"; - for (var i = 0; i < message.reserved_name.length; ++i) - if (!$util.isString(message.reserved_name[i])) - return "reserved_name: 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.nested_type) { - if (!Array.isArray(object.nested_type)) - throw TypeError(".google.protobuf.DescriptorProto.nested_type: array expected"); - message.nested_type = []; - for (var i = 0; i < object.nested_type.length; ++i) { - if (typeof object.nested_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nested_type: object expected"); - message.nested_type[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nested_type[i]); - } - } - if (object.enum_type) { - if (!Array.isArray(object.enum_type)) - throw TypeError(".google.protobuf.DescriptorProto.enum_type: array expected"); - message.enum_type = []; - for (var i = 0; i < object.enum_type.length; ++i) { - if (typeof object.enum_type[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enum_type: object expected"); - message.enum_type[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enum_type[i]); - } - } - if (object.extension_range) { - if (!Array.isArray(object.extension_range)) - throw TypeError(".google.protobuf.DescriptorProto.extension_range: array expected"); - message.extension_range = []; - for (var i = 0; i < object.extension_range.length; ++i) { - if (typeof object.extension_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension_range: object expected"); - message.extension_range[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extension_range[i]); - } - } - if (object.oneof_decl) { - if (!Array.isArray(object.oneof_decl)) - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: array expected"); - message.oneof_decl = []; - for (var i = 0; i < object.oneof_decl.length; ++i) { - if (typeof object.oneof_decl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneof_decl: object expected"); - message.oneof_decl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneof_decl[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.reserved_range) { - if (!Array.isArray(object.reserved_range)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: array expected"); - message.reserved_range = []; - for (var i = 0; i < object.reserved_range.length; ++i) { - if (typeof object.reserved_range[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reserved_range: object expected"); - message.reserved_range[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reserved_range[i]); - } - } - if (object.reserved_name) { - if (!Array.isArray(object.reserved_name)) - throw TypeError(".google.protobuf.DescriptorProto.reserved_name: array expected"); - message.reserved_name = []; - for (var i = 0; i < object.reserved_name.length; ++i) - message.reserved_name[i] = String(object.reserved_name[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.nested_type = []; - object.enum_type = []; - object.extension_range = []; - object.extension = []; - object.oneof_decl = []; - object.reserved_range = []; - object.reserved_name = []; - } - 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.nested_type && message.nested_type.length) { - object.nested_type = []; - for (var j = 0; j < message.nested_type.length; ++j) - object.nested_type[j] = $root.google.protobuf.DescriptorProto.toObject(message.nested_type[j], options); - } - if (message.enum_type && message.enum_type.length) { - object.enum_type = []; - for (var j = 0; j < message.enum_type.length; ++j) - object.enum_type[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enum_type[j], options); - } - if (message.extension_range && message.extension_range.length) { - object.extension_range = []; - for (var j = 0; j < message.extension_range.length; ++j) - object.extension_range[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extension_range[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.oneof_decl && message.oneof_decl.length) { - object.oneof_decl = []; - for (var j = 0; j < message.oneof_decl.length; ++j) - object.oneof_decl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneof_decl[j], options); - } - if (message.reserved_range && message.reserved_range.length) { - object.reserved_range = []; - for (var j = 0; j < message.reserved_range.length; ++j) - object.reserved_range[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reserved_range[j], options); - } - if (message.reserved_name && message.reserved_name.length) { - object.reserved_name = []; - for (var j = 0; j < message.reserved_name.length; ++j) - object.reserved_name[j] = message.reserved_name[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; - - /** - * 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; - - /** - * 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} [type_name] FieldDescriptorProto type_name - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [default_value] FieldDescriptorProto default_value - * @property {number|null} [oneof_index] FieldDescriptorProto oneof_index - * @property {string|null} [json_name] FieldDescriptorProto json_name - * @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 type_name. - * @member {string} type_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type_name = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto default_value. - * @member {string} default_value - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.default_value = ""; - - /** - * FieldDescriptorProto oneof_index. - * @member {number} oneof_index - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneof_index = 0; - - /** - * FieldDescriptorProto json_name. - * @member {string} json_name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.json_name = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * 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.type_name != null && Object.hasOwnProperty.call(message, "type_name")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.type_name); - if (message.default_value != null && Object.hasOwnProperty.call(message, "default_value")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.default_value); - 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.oneof_index != null && Object.hasOwnProperty.call(message, "oneof_index")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneof_index); - if (message.json_name != null && Object.hasOwnProperty.call(message, "json_name")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.json_name); - 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.type_name = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.default_value = reader.string(); - break; - case 9: - message.oneof_index = reader.int32(); - break; - case 10: - message.json_name = 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.type_name != null && message.hasOwnProperty("type_name")) - if (!$util.isString(message.type_name)) - return "type_name: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.default_value != null && message.hasOwnProperty("default_value")) - if (!$util.isString(message.default_value)) - return "default_value: string expected"; - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - if (!$util.isInteger(message.oneof_index)) - return "oneof_index: integer expected"; - if (message.json_name != null && message.hasOwnProperty("json_name")) - if (!$util.isString(message.json_name)) - return "json_name: 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.type_name != null) - message.type_name = String(object.type_name); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.default_value != null) - message.default_value = String(object.default_value); - if (object.oneof_index != null) - message.oneof_index = object.oneof_index | 0; - if (object.json_name != null) - message.json_name = String(object.json_name); - 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.type_name = ""; - object.default_value = ""; - object.options = null; - object.oneof_index = 0; - object.json_name = ""; - } - 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.type_name != null && message.hasOwnProperty("type_name")) - object.type_name = message.type_name; - if (message.default_value != null && message.hasOwnProperty("default_value")) - object.default_value = message.default_value; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneof_index != null && message.hasOwnProperty("oneof_index")) - object.oneof_index = message.oneof_index; - if (message.json_name != null && message.hasOwnProperty("json_name")) - object.json_name = message.json_name; - 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; - - /** - * 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; - - /** - * 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; - - /** - * 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; - - /** - * 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} [input_type] MethodDescriptorProto input_type - * @property {string|null} [output_type] MethodDescriptorProto output_type - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [client_streaming] MethodDescriptorProto client_streaming - * @property {boolean|null} [server_streaming] MethodDescriptorProto server_streaming - */ - - /** - * 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 input_type. - * @member {string} input_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.input_type = ""; - - /** - * MethodDescriptorProto output_type. - * @member {string} output_type - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.output_type = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto client_streaming. - * @member {boolean} client_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.client_streaming = false; - - /** - * MethodDescriptorProto server_streaming. - * @member {boolean} server_streaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.server_streaming = false; - - /** - * 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.input_type != null && Object.hasOwnProperty.call(message, "input_type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.input_type); - if (message.output_type != null && Object.hasOwnProperty.call(message, "output_type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.output_type); - 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.client_streaming != null && Object.hasOwnProperty.call(message, "client_streaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.client_streaming); - if (message.server_streaming != null && Object.hasOwnProperty.call(message, "server_streaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.server_streaming); - 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.input_type = reader.string(); - break; - case 3: - message.output_type = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.client_streaming = reader.bool(); - break; - case 6: - message.server_streaming = 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.input_type != null && message.hasOwnProperty("input_type")) - if (!$util.isString(message.input_type)) - return "input_type: string expected"; - if (message.output_type != null && message.hasOwnProperty("output_type")) - if (!$util.isString(message.output_type)) - return "output_type: 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.client_streaming != null && message.hasOwnProperty("client_streaming")) - if (typeof message.client_streaming !== "boolean") - return "client_streaming: boolean expected"; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - if (typeof message.server_streaming !== "boolean") - return "server_streaming: 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.input_type != null) - message.input_type = String(object.input_type); - if (object.output_type != null) - message.output_type = String(object.output_type); - 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.client_streaming != null) - message.client_streaming = Boolean(object.client_streaming); - if (object.server_streaming != null) - message.server_streaming = Boolean(object.server_streaming); - 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.input_type = ""; - object.output_type = ""; - object.options = null; - object.client_streaming = false; - object.server_streaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.input_type != null && message.hasOwnProperty("input_type")) - object.input_type = message.input_type; - if (message.output_type != null && message.hasOwnProperty("output_type")) - object.output_type = message.output_type; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.client_streaming != null && message.hasOwnProperty("client_streaming")) - object.client_streaming = message.client_streaming; - if (message.server_streaming != null && message.hasOwnProperty("server_streaming")) - object.server_streaming = message.server_streaming; - 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} [java_package] FileOptions java_package - * @property {string|null} [java_outer_classname] FileOptions java_outer_classname - * @property {boolean|null} [java_multiple_files] FileOptions java_multiple_files - * @property {boolean|null} [java_generate_equals_and_hash] FileOptions java_generate_equals_and_hash - * @property {boolean|null} [java_string_check_utf8] FileOptions java_string_check_utf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimize_for] FileOptions optimize_for - * @property {string|null} [go_package] FileOptions go_package - * @property {boolean|null} [cc_generic_services] FileOptions cc_generic_services - * @property {boolean|null} [java_generic_services] FileOptions java_generic_services - * @property {boolean|null} [py_generic_services] FileOptions py_generic_services - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [cc_enable_arenas] FileOptions cc_enable_arenas - * @property {string|null} [objc_class_prefix] FileOptions objc_class_prefix - * @property {string|null} [csharp_namespace] FileOptions csharp_namespace - * @property {Array.|null} [uninterpreted_option] FileOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters_all"] FileOptions .gogoproto.goproto_getters_all - * @property {boolean|null} [".gogoproto.goproto_enum_prefix_all"] FileOptions .gogoproto.goproto_enum_prefix_all - * @property {boolean|null} [".gogoproto.goproto_stringer_all"] FileOptions .gogoproto.goproto_stringer_all - * @property {boolean|null} [".gogoproto.verbose_equal_all"] FileOptions .gogoproto.verbose_equal_all - * @property {boolean|null} [".gogoproto.face_all"] FileOptions .gogoproto.face_all - * @property {boolean|null} [".gogoproto.gostring_all"] FileOptions .gogoproto.gostring_all - * @property {boolean|null} [".gogoproto.populate_all"] FileOptions .gogoproto.populate_all - * @property {boolean|null} [".gogoproto.stringer_all"] FileOptions .gogoproto.stringer_all - * @property {boolean|null} [".gogoproto.onlyone_all"] FileOptions .gogoproto.onlyone_all - * @property {boolean|null} [".gogoproto.equal_all"] FileOptions .gogoproto.equal_all - * @property {boolean|null} [".gogoproto.description_all"] FileOptions .gogoproto.description_all - * @property {boolean|null} [".gogoproto.testgen_all"] FileOptions .gogoproto.testgen_all - * @property {boolean|null} [".gogoproto.benchgen_all"] FileOptions .gogoproto.benchgen_all - * @property {boolean|null} [".gogoproto.marshaler_all"] FileOptions .gogoproto.marshaler_all - * @property {boolean|null} [".gogoproto.unmarshaler_all"] FileOptions .gogoproto.unmarshaler_all - * @property {boolean|null} [".gogoproto.stable_marshaler_all"] FileOptions .gogoproto.stable_marshaler_all - * @property {boolean|null} [".gogoproto.sizer_all"] FileOptions .gogoproto.sizer_all - * @property {boolean|null} [".gogoproto.goproto_enum_stringer_all"] FileOptions .gogoproto.goproto_enum_stringer_all - * @property {boolean|null} [".gogoproto.enum_stringer_all"] FileOptions .gogoproto.enum_stringer_all - * @property {boolean|null} [".gogoproto.unsafe_marshaler_all"] FileOptions .gogoproto.unsafe_marshaler_all - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler_all"] FileOptions .gogoproto.unsafe_unmarshaler_all - * @property {boolean|null} [".gogoproto.goproto_extensions_map_all"] FileOptions .gogoproto.goproto_extensions_map_all - * @property {boolean|null} [".gogoproto.goproto_unrecognized_all"] FileOptions .gogoproto.goproto_unrecognized_all - * @property {boolean|null} [".gogoproto.gogoproto_import"] FileOptions .gogoproto.gogoproto_import - * @property {boolean|null} [".gogoproto.protosizer_all"] FileOptions .gogoproto.protosizer_all - * @property {boolean|null} [".gogoproto.compare_all"] FileOptions .gogoproto.compare_all - * @property {boolean|null} [".gogoproto.typedecl_all"] FileOptions .gogoproto.typedecl_all - * @property {boolean|null} [".gogoproto.enumdecl_all"] FileOptions .gogoproto.enumdecl_all - * @property {boolean|null} [".gogoproto.goproto_registration"] FileOptions .gogoproto.goproto_registration - * @property {boolean|null} [".gogoproto.messagename_all"] FileOptions .gogoproto.messagename_all - * @property {boolean|null} [".gogoproto.goproto_sizecache_all"] FileOptions .gogoproto.goproto_sizecache_all - * @property {boolean|null} [".gogoproto.goproto_unkeyed_all"] FileOptions .gogoproto.goproto_unkeyed_all - * @property {Array.|null} [".cosmos_proto.declare_interface"] FileOptions .cosmos_proto.declare_interface - * @property {Array.|null} [".cosmos_proto.declare_scalar"] FileOptions .cosmos_proto.declare_scalar - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.declare_interface"] = []; - this[".cosmos_proto.declare_scalar"] = []; - if (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 java_package. - * @member {string} java_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_package = ""; - - /** - * FileOptions java_outer_classname. - * @member {string} java_outer_classname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_outer_classname = ""; - - /** - * FileOptions java_multiple_files. - * @member {boolean} java_multiple_files - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_multiple_files = false; - - /** - * FileOptions java_generate_equals_and_hash. - * @member {boolean} java_generate_equals_and_hash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generate_equals_and_hash = false; - - /** - * FileOptions java_string_check_utf8. - * @member {boolean} java_string_check_utf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_string_check_utf8 = false; - - /** - * FileOptions optimize_for. - * @member {google.protobuf.FileOptions.OptimizeMode} optimize_for - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimize_for = 1; - - /** - * FileOptions go_package. - * @member {string} go_package - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.go_package = ""; - - /** - * FileOptions cc_generic_services. - * @member {boolean} cc_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_generic_services = false; - - /** - * FileOptions java_generic_services. - * @member {boolean} java_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.java_generic_services = false; - - /** - * FileOptions py_generic_services. - * @member {boolean} py_generic_services - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.py_generic_services = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions cc_enable_arenas. - * @member {boolean} cc_enable_arenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.cc_enable_arenas = false; - - /** - * FileOptions objc_class_prefix. - * @member {string} objc_class_prefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objc_class_prefix = ""; - - /** - * FileOptions csharp_namespace. - * @member {string} csharp_namespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharp_namespace = ""; - - /** - * FileOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * FileOptions .gogoproto.goproto_getters_all. - * @member {boolean} .gogoproto.goproto_getters_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_getters_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_prefix_all. - * @member {boolean} .gogoproto.goproto_enum_prefix_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_prefix_all"] = false; - - /** - * FileOptions .gogoproto.goproto_stringer_all. - * @member {boolean} .gogoproto.goproto_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_stringer_all"] = false; - - /** - * FileOptions .gogoproto.verbose_equal_all. - * @member {boolean} .gogoproto.verbose_equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verbose_equal_all"] = false; - - /** - * FileOptions .gogoproto.face_all. - * @member {boolean} .gogoproto.face_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.face_all"] = false; - - /** - * FileOptions .gogoproto.gostring_all. - * @member {boolean} .gogoproto.gostring_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostring_all"] = false; - - /** - * FileOptions .gogoproto.populate_all. - * @member {boolean} .gogoproto.populate_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populate_all"] = false; - - /** - * FileOptions .gogoproto.stringer_all. - * @member {boolean} .gogoproto.stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringer_all"] = false; - - /** - * FileOptions .gogoproto.onlyone_all. - * @member {boolean} .gogoproto.onlyone_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyone_all"] = false; - - /** - * FileOptions .gogoproto.equal_all. - * @member {boolean} .gogoproto.equal_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equal_all"] = false; - - /** - * FileOptions .gogoproto.description_all. - * @member {boolean} .gogoproto.description_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.description_all"] = false; - - /** - * FileOptions .gogoproto.testgen_all. - * @member {boolean} .gogoproto.testgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgen_all"] = false; - - /** - * FileOptions .gogoproto.benchgen_all. - * @member {boolean} .gogoproto.benchgen_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgen_all"] = false; - - /** - * FileOptions .gogoproto.marshaler_all. - * @member {boolean} .gogoproto.marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unmarshaler_all. - * @member {boolean} .gogoproto.unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.stable_marshaler_all. - * @member {boolean} .gogoproto.stable_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stable_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.sizer_all. - * @member {boolean} .gogoproto.sizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizer_all"] = false; - - /** - * FileOptions .gogoproto.goproto_enum_stringer_all. - * @member {boolean} .gogoproto.goproto_enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.enum_stringer_all. - * @member {boolean} .gogoproto.enum_stringer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enum_stringer_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_marshaler_all. - * @member {boolean} .gogoproto.unsafe_marshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_marshaler_all"] = false; - - /** - * FileOptions .gogoproto.unsafe_unmarshaler_all. - * @member {boolean} .gogoproto.unsafe_unmarshaler_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafe_unmarshaler_all"] = false; - - /** - * FileOptions .gogoproto.goproto_extensions_map_all. - * @member {boolean} .gogoproto.goproto_extensions_map_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_extensions_map_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unrecognized_all. - * @member {boolean} .gogoproto.goproto_unrecognized_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unrecognized_all"] = false; - - /** - * FileOptions .gogoproto.gogoproto_import. - * @member {boolean} .gogoproto.gogoproto_import - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoproto_import"] = false; - - /** - * FileOptions .gogoproto.protosizer_all. - * @member {boolean} .gogoproto.protosizer_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizer_all"] = false; - - /** - * FileOptions .gogoproto.compare_all. - * @member {boolean} .gogoproto.compare_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compare_all"] = false; - - /** - * FileOptions .gogoproto.typedecl_all. - * @member {boolean} .gogoproto.typedecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedecl_all"] = false; - - /** - * FileOptions .gogoproto.enumdecl_all. - * @member {boolean} .gogoproto.enumdecl_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdecl_all"] = false; - - /** - * FileOptions .gogoproto.goproto_registration. - * @member {boolean} .gogoproto.goproto_registration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_registration"] = false; - - /** - * FileOptions .gogoproto.messagename_all. - * @member {boolean} .gogoproto.messagename_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagename_all"] = false; - - /** - * FileOptions .gogoproto.goproto_sizecache_all. - * @member {boolean} .gogoproto.goproto_sizecache_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_sizecache_all"] = false; - - /** - * FileOptions .gogoproto.goproto_unkeyed_all. - * @member {boolean} .gogoproto.goproto_unkeyed_all - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goproto_unkeyed_all"] = false; - - /** - * FileOptions .cosmos_proto.declare_interface. - * @member {Array.} .cosmos_proto.declare_interface - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_interface"] = $util.emptyArray; - - /** - * FileOptions .cosmos_proto.declare_scalar. - * @member {Array.} .cosmos_proto.declare_scalar - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".cosmos_proto.declare_scalar"] = $util.emptyArray; - - /** - * 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.java_package != null && Object.hasOwnProperty.call(message, "java_package")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.java_package); - if (message.java_outer_classname != null && Object.hasOwnProperty.call(message, "java_outer_classname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.java_outer_classname); - if (message.optimize_for != null && Object.hasOwnProperty.call(message, "optimize_for")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimize_for); - if (message.java_multiple_files != null && Object.hasOwnProperty.call(message, "java_multiple_files")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.java_multiple_files); - if (message.go_package != null && Object.hasOwnProperty.call(message, "go_package")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.go_package); - if (message.cc_generic_services != null && Object.hasOwnProperty.call(message, "cc_generic_services")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.cc_generic_services); - if (message.java_generic_services != null && Object.hasOwnProperty.call(message, "java_generic_services")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.java_generic_services); - if (message.py_generic_services != null && Object.hasOwnProperty.call(message, "py_generic_services")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.py_generic_services); - if (message.java_generate_equals_and_hash != null && Object.hasOwnProperty.call(message, "java_generate_equals_and_hash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.java_generate_equals_and_hash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.java_string_check_utf8 != null && Object.hasOwnProperty.call(message, "java_string_check_utf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.java_string_check_utf8); - if (message.cc_enable_arenas != null && Object.hasOwnProperty.call(message, "cc_enable_arenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.cc_enable_arenas); - if (message.objc_class_prefix != null && Object.hasOwnProperty.call(message, "objc_class_prefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objc_class_prefix); - if (message.csharp_namespace != null && Object.hasOwnProperty.call(message, "csharp_namespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharp_namespace); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters_all")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goproto_getters_all"]); - if (message[".gogoproto.goproto_enum_prefix_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix_all")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goproto_enum_prefix_all"]); - if (message[".gogoproto.goproto_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer_all")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goproto_stringer_all"]); - if (message[".gogoproto.verbose_equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal_all")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verbose_equal_all"]); - if (message[".gogoproto.face_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face_all")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.face_all"]); - if (message[".gogoproto.gostring_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring_all")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostring_all"]); - if (message[".gogoproto.populate_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate_all")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populate_all"]); - if (message[".gogoproto.stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer_all")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringer_all"]); - if (message[".gogoproto.onlyone_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone_all")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyone_all"]); - if (message[".gogoproto.equal_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal_all")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equal_all"]); - if (message[".gogoproto.description_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description_all")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.description_all"]); - if (message[".gogoproto.testgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen_all")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgen_all"]); - if (message[".gogoproto.benchgen_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen_all")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgen_all"]); - if (message[".gogoproto.marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler_all")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshaler_all"]); - if (message[".gogoproto.unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler_all")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshaler_all"]); - if (message[".gogoproto.stable_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler_all")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stable_marshaler_all"]); - if (message[".gogoproto.sizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer_all")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizer_all"]); - if (message[".gogoproto.goproto_enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer_all")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goproto_enum_stringer_all"]); - if (message[".gogoproto.enum_stringer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer_all")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enum_stringer_all"]); - if (message[".gogoproto.unsafe_marshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler_all")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafe_marshaler_all"]); - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler_all")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafe_unmarshaler_all"]); - if (message[".gogoproto.goproto_extensions_map_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map_all")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goproto_extensions_map_all"]); - if (message[".gogoproto.goproto_unrecognized_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized_all")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goproto_unrecognized_all"]); - if (message[".gogoproto.gogoproto_import"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoproto_import")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoproto_import"]); - if (message[".gogoproto.protosizer_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer_all")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizer_all"]); - if (message[".gogoproto.compare_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare_all")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compare_all"]); - if (message[".gogoproto.typedecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl_all")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedecl_all"]); - if (message[".gogoproto.enumdecl_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl_all")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdecl_all"]); - if (message[".gogoproto.goproto_registration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_registration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goproto_registration"]); - if (message[".gogoproto.messagename_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename_all")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagename_all"]); - if (message[".gogoproto.goproto_sizecache_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache_all")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goproto_sizecache_all"]); - if (message[".gogoproto.goproto_unkeyed_all"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed_all")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goproto_unkeyed_all"]); - if (message[".cosmos_proto.declare_interface"] != null && message[".cosmos_proto.declare_interface"].length) - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) - $root.cosmos_proto.InterfaceDescriptor.encode(message[".cosmos_proto.declare_interface"][i], writer.uint32(/* id 793021, wireType 2 =*/6344170).fork()).ldelim(); - if (message[".cosmos_proto.declare_scalar"] != null && message[".cosmos_proto.declare_scalar"].length) - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) - $root.cosmos_proto.ScalarDescriptor.encode(message[".cosmos_proto.declare_scalar"][i], writer.uint32(/* id 793022, wireType 2 =*/6344178).fork()).ldelim(); - 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.java_package = reader.string(); - break; - case 8: - message.java_outer_classname = reader.string(); - break; - case 10: - message.java_multiple_files = reader.bool(); - break; - case 20: - message.java_generate_equals_and_hash = reader.bool(); - break; - case 27: - message.java_string_check_utf8 = reader.bool(); - break; - case 9: - message.optimize_for = reader.int32(); - break; - case 11: - message.go_package = reader.string(); - break; - case 16: - message.cc_generic_services = reader.bool(); - break; - case 17: - message.java_generic_services = reader.bool(); - break; - case 18: - message.py_generic_services = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.cc_enable_arenas = reader.bool(); - break; - case 36: - message.objc_class_prefix = reader.string(); - break; - case 37: - message.csharp_namespace = reader.string(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goproto_getters_all"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goproto_enum_prefix_all"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goproto_stringer_all"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verbose_equal_all"] = reader.bool(); - break; - case 63005: - message[".gogoproto.face_all"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostring_all"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populate_all"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringer_all"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyone_all"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equal_all"] = reader.bool(); - break; - case 63014: - message[".gogoproto.description_all"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgen_all"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgen_all"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshaler_all"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshaler_all"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stable_marshaler_all"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizer_all"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goproto_enum_stringer_all"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enum_stringer_all"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafe_marshaler_all"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafe_unmarshaler_all"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goproto_extensions_map_all"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goproto_unrecognized_all"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoproto_import"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizer_all"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compare_all"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedecl_all"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdecl_all"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goproto_registration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagename_all"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goproto_sizecache_all"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goproto_unkeyed_all"] = reader.bool(); - break; - case 793021: - if (!(message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length)) - message[".cosmos_proto.declare_interface"] = []; - message[".cosmos_proto.declare_interface"].push($root.cosmos_proto.InterfaceDescriptor.decode(reader, reader.uint32())); - break; - case 793022: - if (!(message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length)) - message[".cosmos_proto.declare_scalar"] = []; - message[".cosmos_proto.declare_scalar"].push($root.cosmos_proto.ScalarDescriptor.decode(reader, reader.uint32())); - 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.java_package != null && message.hasOwnProperty("java_package")) - if (!$util.isString(message.java_package)) - return "java_package: string expected"; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - if (!$util.isString(message.java_outer_classname)) - return "java_outer_classname: string expected"; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - if (typeof message.java_multiple_files !== "boolean") - return "java_multiple_files: boolean expected"; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - if (typeof message.java_generate_equals_and_hash !== "boolean") - return "java_generate_equals_and_hash: boolean expected"; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - if (typeof message.java_string_check_utf8 !== "boolean") - return "java_string_check_utf8: boolean expected"; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - switch (message.optimize_for) { - default: - return "optimize_for: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.go_package != null && message.hasOwnProperty("go_package")) - if (!$util.isString(message.go_package)) - return "go_package: string expected"; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - if (typeof message.cc_generic_services !== "boolean") - return "cc_generic_services: boolean expected"; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - if (typeof message.java_generic_services !== "boolean") - return "java_generic_services: boolean expected"; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - if (typeof message.py_generic_services !== "boolean") - return "py_generic_services: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - if (typeof message.cc_enable_arenas !== "boolean") - return "cc_enable_arenas: boolean expected"; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - if (!$util.isString(message.objc_class_prefix)) - return "objc_class_prefix: string expected"; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - if (!$util.isString(message.csharp_namespace)) - return "csharp_namespace: string expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - if (typeof message[".gogoproto.goproto_getters_all"] !== "boolean") - return ".gogoproto.goproto_getters_all: boolean expected"; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - if (typeof message[".gogoproto.goproto_enum_prefix_all"] !== "boolean") - return ".gogoproto.goproto_enum_prefix_all: boolean expected"; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - if (typeof message[".gogoproto.goproto_stringer_all"] !== "boolean") - return ".gogoproto.goproto_stringer_all: boolean expected"; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - if (typeof message[".gogoproto.verbose_equal_all"] !== "boolean") - return ".gogoproto.verbose_equal_all: boolean expected"; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - if (typeof message[".gogoproto.face_all"] !== "boolean") - return ".gogoproto.face_all: boolean expected"; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - if (typeof message[".gogoproto.gostring_all"] !== "boolean") - return ".gogoproto.gostring_all: boolean expected"; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - if (typeof message[".gogoproto.populate_all"] !== "boolean") - return ".gogoproto.populate_all: boolean expected"; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - if (typeof message[".gogoproto.stringer_all"] !== "boolean") - return ".gogoproto.stringer_all: boolean expected"; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - if (typeof message[".gogoproto.onlyone_all"] !== "boolean") - return ".gogoproto.onlyone_all: boolean expected"; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - if (typeof message[".gogoproto.equal_all"] !== "boolean") - return ".gogoproto.equal_all: boolean expected"; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - if (typeof message[".gogoproto.description_all"] !== "boolean") - return ".gogoproto.description_all: boolean expected"; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - if (typeof message[".gogoproto.testgen_all"] !== "boolean") - return ".gogoproto.testgen_all: boolean expected"; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - if (typeof message[".gogoproto.benchgen_all"] !== "boolean") - return ".gogoproto.benchgen_all: boolean expected"; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - if (typeof message[".gogoproto.marshaler_all"] !== "boolean") - return ".gogoproto.marshaler_all: boolean expected"; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - if (typeof message[".gogoproto.unmarshaler_all"] !== "boolean") - return ".gogoproto.unmarshaler_all: boolean expected"; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - if (typeof message[".gogoproto.stable_marshaler_all"] !== "boolean") - return ".gogoproto.stable_marshaler_all: boolean expected"; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - if (typeof message[".gogoproto.sizer_all"] !== "boolean") - return ".gogoproto.sizer_all: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - if (typeof message[".gogoproto.goproto_enum_stringer_all"] !== "boolean") - return ".gogoproto.goproto_enum_stringer_all: boolean expected"; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - if (typeof message[".gogoproto.enum_stringer_all"] !== "boolean") - return ".gogoproto.enum_stringer_all: boolean expected"; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - if (typeof message[".gogoproto.unsafe_marshaler_all"] !== "boolean") - return ".gogoproto.unsafe_marshaler_all: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - if (typeof message[".gogoproto.unsafe_unmarshaler_all"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler_all: boolean expected"; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - if (typeof message[".gogoproto.goproto_extensions_map_all"] !== "boolean") - return ".gogoproto.goproto_extensions_map_all: boolean expected"; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - if (typeof message[".gogoproto.goproto_unrecognized_all"] !== "boolean") - return ".gogoproto.goproto_unrecognized_all: boolean expected"; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - if (typeof message[".gogoproto.gogoproto_import"] !== "boolean") - return ".gogoproto.gogoproto_import: boolean expected"; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - if (typeof message[".gogoproto.protosizer_all"] !== "boolean") - return ".gogoproto.protosizer_all: boolean expected"; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - if (typeof message[".gogoproto.compare_all"] !== "boolean") - return ".gogoproto.compare_all: boolean expected"; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - if (typeof message[".gogoproto.typedecl_all"] !== "boolean") - return ".gogoproto.typedecl_all: boolean expected"; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - if (typeof message[".gogoproto.enumdecl_all"] !== "boolean") - return ".gogoproto.enumdecl_all: boolean expected"; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - if (typeof message[".gogoproto.goproto_registration"] !== "boolean") - return ".gogoproto.goproto_registration: boolean expected"; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - if (typeof message[".gogoproto.messagename_all"] !== "boolean") - return ".gogoproto.messagename_all: boolean expected"; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - if (typeof message[".gogoproto.goproto_sizecache_all"] !== "boolean") - return ".gogoproto.goproto_sizecache_all: boolean expected"; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - if (typeof message[".gogoproto.goproto_unkeyed_all"] !== "boolean") - return ".gogoproto.goproto_unkeyed_all: boolean expected"; - if (message[".cosmos_proto.declare_interface"] != null && message.hasOwnProperty(".cosmos_proto.declare_interface")) { - if (!Array.isArray(message[".cosmos_proto.declare_interface"])) - return ".cosmos_proto.declare_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_interface"].length; ++i) { - var error = $root.cosmos_proto.InterfaceDescriptor.verify(message[".cosmos_proto.declare_interface"][i]); - if (error) - return ".cosmos_proto.declare_interface." + error; - } - } - if (message[".cosmos_proto.declare_scalar"] != null && message.hasOwnProperty(".cosmos_proto.declare_scalar")) { - if (!Array.isArray(message[".cosmos_proto.declare_scalar"])) - return ".cosmos_proto.declare_scalar: array expected"; - for (var i = 0; i < message[".cosmos_proto.declare_scalar"].length; ++i) { - var error = $root.cosmos_proto.ScalarDescriptor.verify(message[".cosmos_proto.declare_scalar"][i]); - if (error) - return ".cosmos_proto.declare_scalar." + error; - } - } - 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.java_package != null) - message.java_package = String(object.java_package); - if (object.java_outer_classname != null) - message.java_outer_classname = String(object.java_outer_classname); - if (object.java_multiple_files != null) - message.java_multiple_files = Boolean(object.java_multiple_files); - if (object.java_generate_equals_and_hash != null) - message.java_generate_equals_and_hash = Boolean(object.java_generate_equals_and_hash); - if (object.java_string_check_utf8 != null) - message.java_string_check_utf8 = Boolean(object.java_string_check_utf8); - switch (object.optimize_for) { - case "SPEED": - case 1: - message.optimize_for = 1; - break; - case "CODE_SIZE": - case 2: - message.optimize_for = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimize_for = 3; - break; - } - if (object.go_package != null) - message.go_package = String(object.go_package); - if (object.cc_generic_services != null) - message.cc_generic_services = Boolean(object.cc_generic_services); - if (object.java_generic_services != null) - message.java_generic_services = Boolean(object.java_generic_services); - if (object.py_generic_services != null) - message.py_generic_services = Boolean(object.py_generic_services); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.cc_enable_arenas != null) - message.cc_enable_arenas = Boolean(object.cc_enable_arenas); - if (object.objc_class_prefix != null) - message.objc_class_prefix = String(object.objc_class_prefix); - if (object.csharp_namespace != null) - message.csharp_namespace = String(object.csharp_namespace); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters_all"] != null) - message[".gogoproto.goproto_getters_all"] = Boolean(object[".gogoproto.goproto_getters_all"]); - if (object[".gogoproto.goproto_enum_prefix_all"] != null) - message[".gogoproto.goproto_enum_prefix_all"] = Boolean(object[".gogoproto.goproto_enum_prefix_all"]); - if (object[".gogoproto.goproto_stringer_all"] != null) - message[".gogoproto.goproto_stringer_all"] = Boolean(object[".gogoproto.goproto_stringer_all"]); - if (object[".gogoproto.verbose_equal_all"] != null) - message[".gogoproto.verbose_equal_all"] = Boolean(object[".gogoproto.verbose_equal_all"]); - if (object[".gogoproto.face_all"] != null) - message[".gogoproto.face_all"] = Boolean(object[".gogoproto.face_all"]); - if (object[".gogoproto.gostring_all"] != null) - message[".gogoproto.gostring_all"] = Boolean(object[".gogoproto.gostring_all"]); - if (object[".gogoproto.populate_all"] != null) - message[".gogoproto.populate_all"] = Boolean(object[".gogoproto.populate_all"]); - if (object[".gogoproto.stringer_all"] != null) - message[".gogoproto.stringer_all"] = Boolean(object[".gogoproto.stringer_all"]); - if (object[".gogoproto.onlyone_all"] != null) - message[".gogoproto.onlyone_all"] = Boolean(object[".gogoproto.onlyone_all"]); - if (object[".gogoproto.equal_all"] != null) - message[".gogoproto.equal_all"] = Boolean(object[".gogoproto.equal_all"]); - if (object[".gogoproto.description_all"] != null) - message[".gogoproto.description_all"] = Boolean(object[".gogoproto.description_all"]); - if (object[".gogoproto.testgen_all"] != null) - message[".gogoproto.testgen_all"] = Boolean(object[".gogoproto.testgen_all"]); - if (object[".gogoproto.benchgen_all"] != null) - message[".gogoproto.benchgen_all"] = Boolean(object[".gogoproto.benchgen_all"]); - if (object[".gogoproto.marshaler_all"] != null) - message[".gogoproto.marshaler_all"] = Boolean(object[".gogoproto.marshaler_all"]); - if (object[".gogoproto.unmarshaler_all"] != null) - message[".gogoproto.unmarshaler_all"] = Boolean(object[".gogoproto.unmarshaler_all"]); - if (object[".gogoproto.stable_marshaler_all"] != null) - message[".gogoproto.stable_marshaler_all"] = Boolean(object[".gogoproto.stable_marshaler_all"]); - if (object[".gogoproto.sizer_all"] != null) - message[".gogoproto.sizer_all"] = Boolean(object[".gogoproto.sizer_all"]); - if (object[".gogoproto.goproto_enum_stringer_all"] != null) - message[".gogoproto.goproto_enum_stringer_all"] = Boolean(object[".gogoproto.goproto_enum_stringer_all"]); - if (object[".gogoproto.enum_stringer_all"] != null) - message[".gogoproto.enum_stringer_all"] = Boolean(object[".gogoproto.enum_stringer_all"]); - if (object[".gogoproto.unsafe_marshaler_all"] != null) - message[".gogoproto.unsafe_marshaler_all"] = Boolean(object[".gogoproto.unsafe_marshaler_all"]); - if (object[".gogoproto.unsafe_unmarshaler_all"] != null) - message[".gogoproto.unsafe_unmarshaler_all"] = Boolean(object[".gogoproto.unsafe_unmarshaler_all"]); - if (object[".gogoproto.goproto_extensions_map_all"] != null) - message[".gogoproto.goproto_extensions_map_all"] = Boolean(object[".gogoproto.goproto_extensions_map_all"]); - if (object[".gogoproto.goproto_unrecognized_all"] != null) - message[".gogoproto.goproto_unrecognized_all"] = Boolean(object[".gogoproto.goproto_unrecognized_all"]); - if (object[".gogoproto.gogoproto_import"] != null) - message[".gogoproto.gogoproto_import"] = Boolean(object[".gogoproto.gogoproto_import"]); - if (object[".gogoproto.protosizer_all"] != null) - message[".gogoproto.protosizer_all"] = Boolean(object[".gogoproto.protosizer_all"]); - if (object[".gogoproto.compare_all"] != null) - message[".gogoproto.compare_all"] = Boolean(object[".gogoproto.compare_all"]); - if (object[".gogoproto.typedecl_all"] != null) - message[".gogoproto.typedecl_all"] = Boolean(object[".gogoproto.typedecl_all"]); - if (object[".gogoproto.enumdecl_all"] != null) - message[".gogoproto.enumdecl_all"] = Boolean(object[".gogoproto.enumdecl_all"]); - if (object[".gogoproto.goproto_registration"] != null) - message[".gogoproto.goproto_registration"] = Boolean(object[".gogoproto.goproto_registration"]); - if (object[".gogoproto.messagename_all"] != null) - message[".gogoproto.messagename_all"] = Boolean(object[".gogoproto.messagename_all"]); - if (object[".gogoproto.goproto_sizecache_all"] != null) - message[".gogoproto.goproto_sizecache_all"] = Boolean(object[".gogoproto.goproto_sizecache_all"]); - if (object[".gogoproto.goproto_unkeyed_all"] != null) - message[".gogoproto.goproto_unkeyed_all"] = Boolean(object[".gogoproto.goproto_unkeyed_all"]); - if (object[".cosmos_proto.declare_interface"]) { - if (!Array.isArray(object[".cosmos_proto.declare_interface"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: array expected"); - message[".cosmos_proto.declare_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_interface"].length; ++i) { - if (typeof object[".cosmos_proto.declare_interface"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_interface: object expected"); - message[".cosmos_proto.declare_interface"][i] = $root.cosmos_proto.InterfaceDescriptor.fromObject(object[".cosmos_proto.declare_interface"][i]); - } - } - if (object[".cosmos_proto.declare_scalar"]) { - if (!Array.isArray(object[".cosmos_proto.declare_scalar"])) - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: array expected"); - message[".cosmos_proto.declare_scalar"] = []; - for (var i = 0; i < object[".cosmos_proto.declare_scalar"].length; ++i) { - if (typeof object[".cosmos_proto.declare_scalar"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..cosmos_proto.declare_scalar: object expected"); - message[".cosmos_proto.declare_scalar"][i] = $root.cosmos_proto.ScalarDescriptor.fromObject(object[".cosmos_proto.declare_scalar"][i]); - } - } - 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.uninterpreted_option = []; - object[".cosmos_proto.declare_interface"] = []; - object[".cosmos_proto.declare_scalar"] = []; - } - if (options.defaults) { - object.java_package = ""; - object.java_outer_classname = ""; - object.optimize_for = options.enums === String ? "SPEED" : 1; - object.java_multiple_files = false; - object.go_package = ""; - object.cc_generic_services = false; - object.java_generic_services = false; - object.py_generic_services = false; - object.java_generate_equals_and_hash = false; - object.deprecated = false; - object.java_string_check_utf8 = false; - object.cc_enable_arenas = false; - object.objc_class_prefix = ""; - object.csharp_namespace = ""; - object[".gogoproto.goproto_getters_all"] = false; - object[".gogoproto.goproto_enum_prefix_all"] = false; - object[".gogoproto.goproto_stringer_all"] = false; - object[".gogoproto.verbose_equal_all"] = false; - object[".gogoproto.face_all"] = false; - object[".gogoproto.gostring_all"] = false; - object[".gogoproto.populate_all"] = false; - object[".gogoproto.stringer_all"] = false; - object[".gogoproto.onlyone_all"] = false; - object[".gogoproto.equal_all"] = false; - object[".gogoproto.description_all"] = false; - object[".gogoproto.testgen_all"] = false; - object[".gogoproto.benchgen_all"] = false; - object[".gogoproto.marshaler_all"] = false; - object[".gogoproto.unmarshaler_all"] = false; - object[".gogoproto.stable_marshaler_all"] = false; - object[".gogoproto.sizer_all"] = false; - object[".gogoproto.goproto_enum_stringer_all"] = false; - object[".gogoproto.enum_stringer_all"] = false; - object[".gogoproto.unsafe_marshaler_all"] = false; - object[".gogoproto.unsafe_unmarshaler_all"] = false; - object[".gogoproto.goproto_extensions_map_all"] = false; - object[".gogoproto.goproto_unrecognized_all"] = false; - object[".gogoproto.gogoproto_import"] = false; - object[".gogoproto.protosizer_all"] = false; - object[".gogoproto.compare_all"] = false; - object[".gogoproto.typedecl_all"] = false; - object[".gogoproto.enumdecl_all"] = false; - object[".gogoproto.goproto_registration"] = false; - object[".gogoproto.messagename_all"] = false; - object[".gogoproto.goproto_sizecache_all"] = false; - object[".gogoproto.goproto_unkeyed_all"] = false; - } - if (message.java_package != null && message.hasOwnProperty("java_package")) - object.java_package = message.java_package; - if (message.java_outer_classname != null && message.hasOwnProperty("java_outer_classname")) - object.java_outer_classname = message.java_outer_classname; - if (message.optimize_for != null && message.hasOwnProperty("optimize_for")) - object.optimize_for = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimize_for] : message.optimize_for; - if (message.java_multiple_files != null && message.hasOwnProperty("java_multiple_files")) - object.java_multiple_files = message.java_multiple_files; - if (message.go_package != null && message.hasOwnProperty("go_package")) - object.go_package = message.go_package; - if (message.cc_generic_services != null && message.hasOwnProperty("cc_generic_services")) - object.cc_generic_services = message.cc_generic_services; - if (message.java_generic_services != null && message.hasOwnProperty("java_generic_services")) - object.java_generic_services = message.java_generic_services; - if (message.py_generic_services != null && message.hasOwnProperty("py_generic_services")) - object.py_generic_services = message.py_generic_services; - if (message.java_generate_equals_and_hash != null && message.hasOwnProperty("java_generate_equals_and_hash")) - object.java_generate_equals_and_hash = message.java_generate_equals_and_hash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.java_string_check_utf8 != null && message.hasOwnProperty("java_string_check_utf8")) - object.java_string_check_utf8 = message.java_string_check_utf8; - if (message.cc_enable_arenas != null && message.hasOwnProperty("cc_enable_arenas")) - object.cc_enable_arenas = message.cc_enable_arenas; - if (message.objc_class_prefix != null && message.hasOwnProperty("objc_class_prefix")) - object.objc_class_prefix = message.objc_class_prefix; - if (message.csharp_namespace != null && message.hasOwnProperty("csharp_namespace")) - object.csharp_namespace = message.csharp_namespace; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters_all"] != null && message.hasOwnProperty(".gogoproto.goproto_getters_all")) - object[".gogoproto.goproto_getters_all"] = message[".gogoproto.goproto_getters_all"]; - if (message[".gogoproto.goproto_enum_prefix_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix_all")) - object[".gogoproto.goproto_enum_prefix_all"] = message[".gogoproto.goproto_enum_prefix_all"]; - if (message[".gogoproto.goproto_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer_all")) - object[".gogoproto.goproto_stringer_all"] = message[".gogoproto.goproto_stringer_all"]; - if (message[".gogoproto.verbose_equal_all"] != null && message.hasOwnProperty(".gogoproto.verbose_equal_all")) - object[".gogoproto.verbose_equal_all"] = message[".gogoproto.verbose_equal_all"]; - if (message[".gogoproto.face_all"] != null && message.hasOwnProperty(".gogoproto.face_all")) - object[".gogoproto.face_all"] = message[".gogoproto.face_all"]; - if (message[".gogoproto.gostring_all"] != null && message.hasOwnProperty(".gogoproto.gostring_all")) - object[".gogoproto.gostring_all"] = message[".gogoproto.gostring_all"]; - if (message[".gogoproto.populate_all"] != null && message.hasOwnProperty(".gogoproto.populate_all")) - object[".gogoproto.populate_all"] = message[".gogoproto.populate_all"]; - if (message[".gogoproto.stringer_all"] != null && message.hasOwnProperty(".gogoproto.stringer_all")) - object[".gogoproto.stringer_all"] = message[".gogoproto.stringer_all"]; - if (message[".gogoproto.onlyone_all"] != null && message.hasOwnProperty(".gogoproto.onlyone_all")) - object[".gogoproto.onlyone_all"] = message[".gogoproto.onlyone_all"]; - if (message[".gogoproto.equal_all"] != null && message.hasOwnProperty(".gogoproto.equal_all")) - object[".gogoproto.equal_all"] = message[".gogoproto.equal_all"]; - if (message[".gogoproto.description_all"] != null && message.hasOwnProperty(".gogoproto.description_all")) - object[".gogoproto.description_all"] = message[".gogoproto.description_all"]; - if (message[".gogoproto.testgen_all"] != null && message.hasOwnProperty(".gogoproto.testgen_all")) - object[".gogoproto.testgen_all"] = message[".gogoproto.testgen_all"]; - if (message[".gogoproto.benchgen_all"] != null && message.hasOwnProperty(".gogoproto.benchgen_all")) - object[".gogoproto.benchgen_all"] = message[".gogoproto.benchgen_all"]; - if (message[".gogoproto.marshaler_all"] != null && message.hasOwnProperty(".gogoproto.marshaler_all")) - object[".gogoproto.marshaler_all"] = message[".gogoproto.marshaler_all"]; - if (message[".gogoproto.unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unmarshaler_all")) - object[".gogoproto.unmarshaler_all"] = message[".gogoproto.unmarshaler_all"]; - if (message[".gogoproto.stable_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler_all")) - object[".gogoproto.stable_marshaler_all"] = message[".gogoproto.stable_marshaler_all"]; - if (message[".gogoproto.sizer_all"] != null && message.hasOwnProperty(".gogoproto.sizer_all")) - object[".gogoproto.sizer_all"] = message[".gogoproto.sizer_all"]; - if (message[".gogoproto.goproto_enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer_all")) - object[".gogoproto.goproto_enum_stringer_all"] = message[".gogoproto.goproto_enum_stringer_all"]; - if (message[".gogoproto.enum_stringer_all"] != null && message.hasOwnProperty(".gogoproto.enum_stringer_all")) - object[".gogoproto.enum_stringer_all"] = message[".gogoproto.enum_stringer_all"]; - if (message[".gogoproto.unsafe_marshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler_all")) - object[".gogoproto.unsafe_marshaler_all"] = message[".gogoproto.unsafe_marshaler_all"]; - if (message[".gogoproto.unsafe_unmarshaler_all"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler_all")) - object[".gogoproto.unsafe_unmarshaler_all"] = message[".gogoproto.unsafe_unmarshaler_all"]; - if (message[".gogoproto.goproto_extensions_map_all"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map_all")) - object[".gogoproto.goproto_extensions_map_all"] = message[".gogoproto.goproto_extensions_map_all"]; - if (message[".gogoproto.goproto_unrecognized_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized_all")) - object[".gogoproto.goproto_unrecognized_all"] = message[".gogoproto.goproto_unrecognized_all"]; - if (message[".gogoproto.gogoproto_import"] != null && message.hasOwnProperty(".gogoproto.gogoproto_import")) - object[".gogoproto.gogoproto_import"] = message[".gogoproto.gogoproto_import"]; - if (message[".gogoproto.protosizer_all"] != null && message.hasOwnProperty(".gogoproto.protosizer_all")) - object[".gogoproto.protosizer_all"] = message[".gogoproto.protosizer_all"]; - if (message[".gogoproto.compare_all"] != null && message.hasOwnProperty(".gogoproto.compare_all")) - object[".gogoproto.compare_all"] = message[".gogoproto.compare_all"]; - if (message[".gogoproto.typedecl_all"] != null && message.hasOwnProperty(".gogoproto.typedecl_all")) - object[".gogoproto.typedecl_all"] = message[".gogoproto.typedecl_all"]; - if (message[".gogoproto.enumdecl_all"] != null && message.hasOwnProperty(".gogoproto.enumdecl_all")) - object[".gogoproto.enumdecl_all"] = message[".gogoproto.enumdecl_all"]; - if (message[".gogoproto.goproto_registration"] != null && message.hasOwnProperty(".gogoproto.goproto_registration")) - object[".gogoproto.goproto_registration"] = message[".gogoproto.goproto_registration"]; - if (message[".gogoproto.messagename_all"] != null && message.hasOwnProperty(".gogoproto.messagename_all")) - object[".gogoproto.messagename_all"] = message[".gogoproto.messagename_all"]; - if (message[".gogoproto.goproto_sizecache_all"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache_all")) - object[".gogoproto.goproto_sizecache_all"] = message[".gogoproto.goproto_sizecache_all"]; - if (message[".gogoproto.goproto_unkeyed_all"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed_all")) - object[".gogoproto.goproto_unkeyed_all"] = message[".gogoproto.goproto_unkeyed_all"]; - if (message[".cosmos_proto.declare_interface"] && message[".cosmos_proto.declare_interface"].length) { - object[".cosmos_proto.declare_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_interface"].length; ++j) - object[".cosmos_proto.declare_interface"][j] = $root.cosmos_proto.InterfaceDescriptor.toObject(message[".cosmos_proto.declare_interface"][j], options); - } - if (message[".cosmos_proto.declare_scalar"] && message[".cosmos_proto.declare_scalar"].length) { - object[".cosmos_proto.declare_scalar"] = []; - for (var j = 0; j < message[".cosmos_proto.declare_scalar"].length; ++j) - object[".cosmos_proto.declare_scalar"][j] = $root.cosmos_proto.ScalarDescriptor.toObject(message[".cosmos_proto.declare_scalar"][j], options); - } - 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} [message_set_wire_format] MessageOptions message_set_wire_format - * @property {boolean|null} [no_standard_descriptor_accessor] MessageOptions no_standard_descriptor_accessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [map_entry] MessageOptions map_entry - * @property {Array.|null} [uninterpreted_option] MessageOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_getters"] MessageOptions .gogoproto.goproto_getters - * @property {boolean|null} [".gogoproto.goproto_stringer"] MessageOptions .gogoproto.goproto_stringer - * @property {boolean|null} [".gogoproto.verbose_equal"] MessageOptions .gogoproto.verbose_equal - * @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.stable_marshaler"] MessageOptions .gogoproto.stable_marshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafe_marshaler"] MessageOptions .gogoproto.unsafe_marshaler - * @property {boolean|null} [".gogoproto.unsafe_unmarshaler"] MessageOptions .gogoproto.unsafe_unmarshaler - * @property {boolean|null} [".gogoproto.goproto_extensions_map"] MessageOptions .gogoproto.goproto_extensions_map - * @property {boolean|null} [".gogoproto.goproto_unrecognized"] MessageOptions .gogoproto.goproto_unrecognized - * @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.goproto_sizecache"] MessageOptions .gogoproto.goproto_sizecache - * @property {boolean|null} [".gogoproto.goproto_unkeyed"] MessageOptions .gogoproto.goproto_unkeyed - * @property {Array.|null} [".cosmos_proto.implements_interface"] MessageOptions .cosmos_proto.implements_interface - */ - - /** - * 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.uninterpreted_option = []; - this[".cosmos_proto.implements_interface"] = []; - if (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 message_set_wire_format. - * @member {boolean} message_set_wire_format - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.message_set_wire_format = false; - - /** - * MessageOptions no_standard_descriptor_accessor. - * @member {boolean} no_standard_descriptor_accessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.no_standard_descriptor_accessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions map_entry. - * @member {boolean} map_entry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.map_entry = false; - - /** - * MessageOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MessageOptions .gogoproto.goproto_getters. - * @member {boolean} .gogoproto.goproto_getters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_getters"] = false; - - /** - * MessageOptions .gogoproto.goproto_stringer. - * @member {boolean} .gogoproto.goproto_stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_stringer"] = false; - - /** - * MessageOptions .gogoproto.verbose_equal. - * @member {boolean} .gogoproto.verbose_equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verbose_equal"] = 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.stable_marshaler. - * @member {boolean} .gogoproto.stable_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stable_marshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafe_marshaler. - * @member {boolean} .gogoproto.unsafe_marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_marshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafe_unmarshaler. - * @member {boolean} .gogoproto.unsafe_unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafe_unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goproto_extensions_map. - * @member {boolean} .gogoproto.goproto_extensions_map - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_extensions_map"] = false; - - /** - * MessageOptions .gogoproto.goproto_unrecognized. - * @member {boolean} .gogoproto.goproto_unrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache. - * @member {boolean} .gogoproto.goproto_sizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_sizecache"] = false; - - /** - * MessageOptions .gogoproto.goproto_unkeyed. - * @member {boolean} .gogoproto.goproto_unkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goproto_unkeyed"] = false; - - /** - * MessageOptions .cosmos_proto.implements_interface. - * @member {Array.} .cosmos_proto.implements_interface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implements_interface"] = $util.emptyArray; - - /** - * 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.message_set_wire_format != null && Object.hasOwnProperty.call(message, "message_set_wire_format")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.message_set_wire_format); - if (message.no_standard_descriptor_accessor != null && Object.hasOwnProperty.call(message, "no_standard_descriptor_accessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.no_standard_descriptor_accessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.map_entry != null && Object.hasOwnProperty.call(message, "map_entry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.map_entry); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_getters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_getters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goproto_getters"]); - if (message[".gogoproto.goproto_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_stringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goproto_stringer"]); - if (message[".gogoproto.verbose_equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verbose_equal")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stable_marshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stable_marshaler"]); - 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.unsafe_marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_marshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafe_marshaler"]); - if (message[".gogoproto.unsafe_unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafe_unmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafe_unmarshaler"]); - if (message[".gogoproto.goproto_extensions_map"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_extensions_map")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goproto_extensions_map"]); - if (message[".gogoproto.goproto_unrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_sizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goproto_sizecache"]); - if (message[".gogoproto.goproto_unkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_unkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goproto_unkeyed"]); - 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.implements_interface"] != null && message[".cosmos_proto.implements_interface"].length) - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.implements_interface"][i]); - 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.message_set_wire_format = reader.bool(); - break; - case 2: - message.no_standard_descriptor_accessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.map_entry = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 64001: - message[".gogoproto.goproto_getters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goproto_stringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafe_marshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafe_unmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goproto_extensions_map"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goproto_unrecognized"] = 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.goproto_sizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goproto_unkeyed"] = reader.bool(); - break; - case 93001: - if (!(message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length)) - message[".cosmos_proto.implements_interface"] = []; - message[".cosmos_proto.implements_interface"].push(reader.string()); - 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.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - if (typeof message.message_set_wire_format !== "boolean") - return "message_set_wire_format: boolean expected"; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - if (typeof message.no_standard_descriptor_accessor !== "boolean") - return "no_standard_descriptor_accessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - if (typeof message.map_entry !== "boolean") - return "map_entry: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - if (typeof message[".gogoproto.goproto_getters"] !== "boolean") - return ".gogoproto.goproto_getters: boolean expected"; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - if (typeof message[".gogoproto.goproto_stringer"] !== "boolean") - return ".gogoproto.goproto_stringer: boolean expected"; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - if (typeof message[".gogoproto.verbose_equal"] !== "boolean") - return ".gogoproto.verbose_equal: 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - if (typeof message[".gogoproto.stable_marshaler"] !== "boolean") - return ".gogoproto.stable_marshaler: 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.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - if (typeof message[".gogoproto.unsafe_marshaler"] !== "boolean") - return ".gogoproto.unsafe_marshaler: boolean expected"; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - if (typeof message[".gogoproto.unsafe_unmarshaler"] !== "boolean") - return ".gogoproto.unsafe_unmarshaler: boolean expected"; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - if (typeof message[".gogoproto.goproto_extensions_map"] !== "boolean") - return ".gogoproto.goproto_extensions_map: boolean expected"; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - if (typeof message[".gogoproto.goproto_unrecognized"] !== "boolean") - return ".gogoproto.goproto_unrecognized: 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - if (typeof message[".gogoproto.goproto_sizecache"] !== "boolean") - return ".gogoproto.goproto_sizecache: boolean expected"; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - if (typeof message[".gogoproto.goproto_unkeyed"] !== "boolean") - return ".gogoproto.goproto_unkeyed: boolean expected"; - if (message[".cosmos_proto.implements_interface"] != null && message.hasOwnProperty(".cosmos_proto.implements_interface")) { - if (!Array.isArray(message[".cosmos_proto.implements_interface"])) - return ".cosmos_proto.implements_interface: array expected"; - for (var i = 0; i < message[".cosmos_proto.implements_interface"].length; ++i) - if (!$util.isString(message[".cosmos_proto.implements_interface"][i])) - return ".cosmos_proto.implements_interface: string[] 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.message_set_wire_format != null) - message.message_set_wire_format = Boolean(object.message_set_wire_format); - if (object.no_standard_descriptor_accessor != null) - message.no_standard_descriptor_accessor = Boolean(object.no_standard_descriptor_accessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.map_entry != null) - message.map_entry = Boolean(object.map_entry); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_getters"] != null) - message[".gogoproto.goproto_getters"] = Boolean(object[".gogoproto.goproto_getters"]); - if (object[".gogoproto.goproto_stringer"] != null) - message[".gogoproto.goproto_stringer"] = Boolean(object[".gogoproto.goproto_stringer"]); - if (object[".gogoproto.verbose_equal"] != null) - message[".gogoproto.verbose_equal"] = Boolean(object[".gogoproto.verbose_equal"]); - 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.stable_marshaler"] != null) - message[".gogoproto.stable_marshaler"] = Boolean(object[".gogoproto.stable_marshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafe_marshaler"] != null) - message[".gogoproto.unsafe_marshaler"] = Boolean(object[".gogoproto.unsafe_marshaler"]); - if (object[".gogoproto.unsafe_unmarshaler"] != null) - message[".gogoproto.unsafe_unmarshaler"] = Boolean(object[".gogoproto.unsafe_unmarshaler"]); - if (object[".gogoproto.goproto_extensions_map"] != null) - message[".gogoproto.goproto_extensions_map"] = Boolean(object[".gogoproto.goproto_extensions_map"]); - if (object[".gogoproto.goproto_unrecognized"] != null) - message[".gogoproto.goproto_unrecognized"] = Boolean(object[".gogoproto.goproto_unrecognized"]); - 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.goproto_sizecache"] != null) - message[".gogoproto.goproto_sizecache"] = Boolean(object[".gogoproto.goproto_sizecache"]); - if (object[".gogoproto.goproto_unkeyed"] != null) - message[".gogoproto.goproto_unkeyed"] = Boolean(object[".gogoproto.goproto_unkeyed"]); - if (object[".cosmos_proto.implements_interface"]) { - if (!Array.isArray(object[".cosmos_proto.implements_interface"])) - throw TypeError(".google.protobuf.MessageOptions..cosmos_proto.implements_interface: array expected"); - message[".cosmos_proto.implements_interface"] = []; - for (var i = 0; i < object[".cosmos_proto.implements_interface"].length; ++i) - message[".cosmos_proto.implements_interface"][i] = String(object[".cosmos_proto.implements_interface"][i]); - } - 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.uninterpreted_option = []; - object[".cosmos_proto.implements_interface"] = []; - } - if (options.defaults) { - object.message_set_wire_format = false; - object.no_standard_descriptor_accessor = false; - object.deprecated = false; - object.map_entry = false; - object[".gogoproto.goproto_getters"] = false; - object[".gogoproto.goproto_stringer"] = false; - object[".gogoproto.verbose_equal"] = 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.stable_marshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafe_marshaler"] = false; - object[".gogoproto.unsafe_unmarshaler"] = false; - object[".gogoproto.goproto_extensions_map"] = false; - object[".gogoproto.goproto_unrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goproto_sizecache"] = false; - object[".gogoproto.goproto_unkeyed"] = false; - object[".gogoproto.stringer"] = false; - } - if (message.message_set_wire_format != null && message.hasOwnProperty("message_set_wire_format")) - object.message_set_wire_format = message.message_set_wire_format; - if (message.no_standard_descriptor_accessor != null && message.hasOwnProperty("no_standard_descriptor_accessor")) - object.no_standard_descriptor_accessor = message.no_standard_descriptor_accessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.map_entry != null && message.hasOwnProperty("map_entry")) - object.map_entry = message.map_entry; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_getters"] != null && message.hasOwnProperty(".gogoproto.goproto_getters")) - object[".gogoproto.goproto_getters"] = message[".gogoproto.goproto_getters"]; - if (message[".gogoproto.goproto_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_stringer")) - object[".gogoproto.goproto_stringer"] = message[".gogoproto.goproto_stringer"]; - if (message[".gogoproto.verbose_equal"] != null && message.hasOwnProperty(".gogoproto.verbose_equal")) - object[".gogoproto.verbose_equal"] = message[".gogoproto.verbose_equal"]; - 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.stable_marshaler"] != null && message.hasOwnProperty(".gogoproto.stable_marshaler")) - object[".gogoproto.stable_marshaler"] = message[".gogoproto.stable_marshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafe_marshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_marshaler")) - object[".gogoproto.unsafe_marshaler"] = message[".gogoproto.unsafe_marshaler"]; - if (message[".gogoproto.unsafe_unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafe_unmarshaler")) - object[".gogoproto.unsafe_unmarshaler"] = message[".gogoproto.unsafe_unmarshaler"]; - if (message[".gogoproto.goproto_extensions_map"] != null && message.hasOwnProperty(".gogoproto.goproto_extensions_map")) - object[".gogoproto.goproto_extensions_map"] = message[".gogoproto.goproto_extensions_map"]; - if (message[".gogoproto.goproto_unrecognized"] != null && message.hasOwnProperty(".gogoproto.goproto_unrecognized")) - object[".gogoproto.goproto_unrecognized"] = message[".gogoproto.goproto_unrecognized"]; - 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.goproto_sizecache"] != null && message.hasOwnProperty(".gogoproto.goproto_sizecache")) - object[".gogoproto.goproto_sizecache"] = message[".gogoproto.goproto_sizecache"]; - if (message[".gogoproto.goproto_unkeyed"] != null && message.hasOwnProperty(".gogoproto.goproto_unkeyed")) - object[".gogoproto.goproto_unkeyed"] = message[".gogoproto.goproto_unkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.implements_interface"] && message[".cosmos_proto.implements_interface"].length) { - object[".cosmos_proto.implements_interface"] = []; - for (var j = 0; j < message[".cosmos_proto.implements_interface"].length; ++j) - object[".cosmos_proto.implements_interface"][j] = message[".cosmos_proto.implements_interface"][j]; - } - 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} [uninterpreted_option] FieldOptions uninterpreted_option - * @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 - * @property {string|null} [".cosmos_proto.accepts_interface"] FieldOptions .cosmos_proto.accepts_interface - * @property {string|null} [".cosmos_proto.scalar"] FieldOptions .cosmos_proto.scalar - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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"] = ""; - - /** - * FieldOptions .cosmos_proto.accepts_interface. - * @member {string} .cosmos_proto.accepts_interface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.accepts_interface"] = ""; - - /** - * FieldOptions .cosmos_proto.scalar. - * @member {string} .cosmos_proto.scalar - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.scalar"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.accepts_interface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.accepts_interface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.accepts_interface"]); - if (message[".cosmos_proto.scalar"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.scalar")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.scalar"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - 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; - case 93001: - message[".cosmos_proto.accepts_interface"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.scalar"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - 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"; - if (message[".cosmos_proto.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - if (!$util.isString(message[".cosmos_proto.accepts_interface"])) - return ".cosmos_proto.accepts_interface: string expected"; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - if (!$util.isString(message[".cosmos_proto.scalar"])) - return ".cosmos_proto.scalar: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - 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"]); - if (object[".cosmos_proto.accepts_interface"] != null) - message[".cosmos_proto.accepts_interface"] = String(object[".cosmos_proto.accepts_interface"]); - if (object[".cosmos_proto.scalar"] != null) - message[".cosmos_proto.scalar"] = String(object[".cosmos_proto.scalar"]); - 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.uninterpreted_option = []; - 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.accepts_interface"] = ""; - object[".cosmos_proto.scalar"] = ""; - } - 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.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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.accepts_interface"] != null && message.hasOwnProperty(".cosmos_proto.accepts_interface")) - object[".cosmos_proto.accepts_interface"] = message[".cosmos_proto.accepts_interface"]; - if (message[".cosmos_proto.scalar"] != null && message.hasOwnProperty(".cosmos_proto.scalar")) - object[".cosmos_proto.scalar"] = message[".cosmos_proto.scalar"]; - 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} [uninterpreted_option] OneofOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [allow_alias] EnumOptions allow_alias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpreted_option] EnumOptions uninterpreted_option - * @property {boolean|null} [".gogoproto.goproto_enum_prefix"] EnumOptions .gogoproto.goproto_enum_prefix - * @property {boolean|null} [".gogoproto.goproto_enum_stringer"] EnumOptions .gogoproto.goproto_enum_stringer - * @property {boolean|null} [".gogoproto.enum_stringer"] EnumOptions .gogoproto.enum_stringer - * @property {string|null} [".gogoproto.enum_customname"] EnumOptions .gogoproto.enum_customname - * @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.uninterpreted_option = []; - if (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 allow_alias. - * @member {boolean} allow_alias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allow_alias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goproto_enum_prefix. - * @member {boolean} .gogoproto.goproto_enum_prefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_prefix"] = false; - - /** - * EnumOptions .gogoproto.goproto_enum_stringer. - * @member {boolean} .gogoproto.goproto_enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goproto_enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_stringer. - * @member {boolean} .gogoproto.enum_stringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_stringer"] = false; - - /** - * EnumOptions .gogoproto.enum_customname. - * @member {string} .gogoproto.enum_customname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enum_customname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - - /** - * 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.allow_alias != null && Object.hasOwnProperty.call(message, "allow_alias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allow_alias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goproto_enum_prefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_prefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goproto_enum_prefix"]); - if (message[".gogoproto.goproto_enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goproto_enum_stringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goproto_enum_stringer"]); - if (message[".gogoproto.enum_stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_stringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enum_stringer"]); - if (message[".gogoproto.enum_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enum_customname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enum_customname"]); - 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.allow_alias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goproto_enum_prefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goproto_enum_stringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enum_stringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enum_customname"] = 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.allow_alias != null && message.hasOwnProperty("allow_alias")) - if (typeof message.allow_alias !== "boolean") - return "allow_alias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - if (typeof message[".gogoproto.goproto_enum_prefix"] !== "boolean") - return ".gogoproto.goproto_enum_prefix: boolean expected"; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - if (typeof message[".gogoproto.goproto_enum_stringer"] !== "boolean") - return ".gogoproto.goproto_enum_stringer: boolean expected"; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - if (typeof message[".gogoproto.enum_stringer"] !== "boolean") - return ".gogoproto.enum_stringer: boolean expected"; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - if (!$util.isString(message[".gogoproto.enum_customname"])) - return ".gogoproto.enum_customname: 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.allow_alias != null) - message.allow_alias = Boolean(object.allow_alias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.goproto_enum_prefix"] != null) - message[".gogoproto.goproto_enum_prefix"] = Boolean(object[".gogoproto.goproto_enum_prefix"]); - if (object[".gogoproto.goproto_enum_stringer"] != null) - message[".gogoproto.goproto_enum_stringer"] = Boolean(object[".gogoproto.goproto_enum_stringer"]); - if (object[".gogoproto.enum_stringer"] != null) - message[".gogoproto.enum_stringer"] = Boolean(object[".gogoproto.enum_stringer"]); - if (object[".gogoproto.enum_customname"] != null) - message[".gogoproto.enum_customname"] = String(object[".gogoproto.enum_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.allow_alias = false; - object.deprecated = false; - object[".gogoproto.goproto_enum_prefix"] = false; - object[".gogoproto.goproto_enum_stringer"] = false; - object[".gogoproto.enum_stringer"] = false; - object[".gogoproto.enum_customname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allow_alias != null && message.hasOwnProperty("allow_alias")) - object.allow_alias = message.allow_alias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.goproto_enum_prefix"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_prefix")) - object[".gogoproto.goproto_enum_prefix"] = message[".gogoproto.goproto_enum_prefix"]; - if (message[".gogoproto.goproto_enum_stringer"] != null && message.hasOwnProperty(".gogoproto.goproto_enum_stringer")) - object[".gogoproto.goproto_enum_stringer"] = message[".gogoproto.goproto_enum_stringer"]; - if (message[".gogoproto.enum_stringer"] != null && message.hasOwnProperty(".gogoproto.enum_stringer")) - object[".gogoproto.enum_stringer"] = message[".gogoproto.enum_stringer"]; - if (message[".gogoproto.enum_customname"] != null && message.hasOwnProperty(".gogoproto.enum_customname")) - object[".gogoproto.enum_customname"] = message[".gogoproto.enum_customname"]; - 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} [uninterpreted_option] EnumValueOptions uninterpreted_option - * @property {string|null} [".gogoproto.enumvalue_customname"] EnumValueOptions .gogoproto.enumvalue_customname - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalue_customname. - * @member {string} .gogoproto.enumvalue_customname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalue_customname"] = ""; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalue_customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalue_customname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalue_customname"] = 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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - if (!$util.isString(message[".gogoproto.enumvalue_customname"])) - return ".gogoproto.enumvalue_customname: 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".gogoproto.enumvalue_customname"] != null) - message[".gogoproto.enumvalue_customname"] = String(object[".gogoproto.enumvalue_customname"]); - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalue_customname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".gogoproto.enumvalue_customname"] != null && message.hasOwnProperty(".gogoproto.enumvalue_customname")) - object[".gogoproto.enumvalue_customname"] = message[".gogoproto.enumvalue_customname"]; - 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} [uninterpreted_option] ServiceOptions uninterpreted_option - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[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.uninterpreted_option = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[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} [uninterpreted_option] MethodOptions uninterpreted_option - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - */ - - /** - * 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.uninterpreted_option = []; - if (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 uninterpreted_option. - * @member {Array.} uninterpreted_option - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpreted_option = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * 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.uninterpreted_option != null && message.uninterpreted_option.length) - for (var i = 0; i < message.uninterpreted_option.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpreted_option[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).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.uninterpreted_option && message.uninterpreted_option.length)) - message.uninterpreted_option = []; - message.uninterpreted_option.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 72295728: - message[".google.api.http"] = $root.google.api.HttpRule.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.uninterpreted_option != null && message.hasOwnProperty("uninterpreted_option")) { - if (!Array.isArray(message.uninterpreted_option)) - return "uninterpreted_option: array expected"; - for (var i = 0; i < message.uninterpreted_option.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpreted_option[i]); - if (error) - return "uninterpreted_option." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + 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.uninterpreted_option) { - if (!Array.isArray(object.uninterpreted_option)) - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: array expected"); - message.uninterpreted_option = []; - for (var i = 0; i < object.uninterpreted_option.length; ++i) { - if (typeof object.uninterpreted_option[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpreted_option: object expected"); - message.uninterpreted_option[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpreted_option[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - 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.uninterpreted_option = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpreted_option && message.uninterpreted_option.length) { - object.uninterpreted_option = []; - for (var j = 0; j < message.uninterpreted_option.length; ++j) - object.uninterpreted_option[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpreted_option[j], options); - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], 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} [identifier_value] UninterpretedOption identifier_value - * @property {Long|null} [positive_int_value] UninterpretedOption positive_int_value - * @property {Long|null} [negative_int_value] UninterpretedOption negative_int_value - * @property {number|null} [double_value] UninterpretedOption double_value - * @property {Uint8Array|null} [string_value] UninterpretedOption string_value - * @property {string|null} [aggregate_value] UninterpretedOption aggregate_value - */ - - /** - * 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 identifier_value. - * @member {string} identifier_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifier_value = ""; - - /** - * UninterpretedOption positive_int_value. - * @member {Long} positive_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positive_int_value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negative_int_value. - * @member {Long} negative_int_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negative_int_value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption double_value. - * @member {number} double_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.double_value = 0; - - /** - * UninterpretedOption string_value. - * @member {Uint8Array} string_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.string_value = $util.newBuffer([]); - - /** - * UninterpretedOption aggregate_value. - * @member {string} aggregate_value - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregate_value = ""; - - /** - * 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.identifier_value != null && Object.hasOwnProperty.call(message, "identifier_value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifier_value); - if (message.positive_int_value != null && Object.hasOwnProperty.call(message, "positive_int_value")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positive_int_value); - if (message.negative_int_value != null && Object.hasOwnProperty.call(message, "negative_int_value")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negative_int_value); - if (message.double_value != null && Object.hasOwnProperty.call(message, "double_value")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.double_value); - if (message.string_value != null && Object.hasOwnProperty.call(message, "string_value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.string_value); - if (message.aggregate_value != null && Object.hasOwnProperty.call(message, "aggregate_value")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregate_value); - 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.identifier_value = reader.string(); - break; - case 4: - message.positive_int_value = reader.uint64(); - break; - case 5: - message.negative_int_value = reader.int64(); - break; - case 6: - message.double_value = reader.double(); - break; - case 7: - message.string_value = reader.bytes(); - break; - case 8: - message.aggregate_value = 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - if (!$util.isString(message.identifier_value)) - return "identifier_value: string expected"; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (!$util.isInteger(message.positive_int_value) && !(message.positive_int_value && $util.isInteger(message.positive_int_value.low) && $util.isInteger(message.positive_int_value.high))) - return "positive_int_value: integer|Long expected"; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (!$util.isInteger(message.negative_int_value) && !(message.negative_int_value && $util.isInteger(message.negative_int_value.low) && $util.isInteger(message.negative_int_value.high))) - return "negative_int_value: integer|Long expected"; - if (message.double_value != null && message.hasOwnProperty("double_value")) - if (typeof message.double_value !== "number") - return "double_value: number expected"; - if (message.string_value != null && message.hasOwnProperty("string_value")) - if (!(message.string_value && typeof message.string_value.length === "number" || $util.isString(message.string_value))) - return "string_value: buffer expected"; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - if (!$util.isString(message.aggregate_value)) - return "aggregate_value: 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.identifier_value != null) - message.identifier_value = String(object.identifier_value); - if (object.positive_int_value != null) - if ($util.Long) - (message.positive_int_value = $util.Long.fromValue(object.positive_int_value)).unsigned = true; - else if (typeof object.positive_int_value === "string") - message.positive_int_value = parseInt(object.positive_int_value, 10); - else if (typeof object.positive_int_value === "number") - message.positive_int_value = object.positive_int_value; - else if (typeof object.positive_int_value === "object") - message.positive_int_value = new $util.LongBits(object.positive_int_value.low >>> 0, object.positive_int_value.high >>> 0).toNumber(true); - if (object.negative_int_value != null) - if ($util.Long) - (message.negative_int_value = $util.Long.fromValue(object.negative_int_value)).unsigned = false; - else if (typeof object.negative_int_value === "string") - message.negative_int_value = parseInt(object.negative_int_value, 10); - else if (typeof object.negative_int_value === "number") - message.negative_int_value = object.negative_int_value; - else if (typeof object.negative_int_value === "object") - message.negative_int_value = new $util.LongBits(object.negative_int_value.low >>> 0, object.negative_int_value.high >>> 0).toNumber(); - if (object.double_value != null) - message.double_value = Number(object.double_value); - if (object.string_value != null) - if (typeof object.string_value === "string") - $util.base64.decode(object.string_value, message.string_value = $util.newBuffer($util.base64.length(object.string_value)), 0); - else if (object.string_value.length) - message.string_value = object.string_value; - if (object.aggregate_value != null) - message.aggregate_value = String(object.aggregate_value); - 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.identifier_value = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positive_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positive_int_value = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negative_int_value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negative_int_value = options.longs === String ? "0" : 0; - object.double_value = 0; - if (options.bytes === String) - object.string_value = ""; - else { - object.string_value = []; - if (options.bytes !== Array) - object.string_value = $util.newBuffer(object.string_value); - } - object.aggregate_value = ""; - } - 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.identifier_value != null && message.hasOwnProperty("identifier_value")) - object.identifier_value = message.identifier_value; - if (message.positive_int_value != null && message.hasOwnProperty("positive_int_value")) - if (typeof message.positive_int_value === "number") - object.positive_int_value = options.longs === String ? String(message.positive_int_value) : message.positive_int_value; - else - object.positive_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.positive_int_value) : options.longs === Number ? new $util.LongBits(message.positive_int_value.low >>> 0, message.positive_int_value.high >>> 0).toNumber(true) : message.positive_int_value; - if (message.negative_int_value != null && message.hasOwnProperty("negative_int_value")) - if (typeof message.negative_int_value === "number") - object.negative_int_value = options.longs === String ? String(message.negative_int_value) : message.negative_int_value; - else - object.negative_int_value = options.longs === String ? $util.Long.prototype.toString.call(message.negative_int_value) : options.longs === Number ? new $util.LongBits(message.negative_int_value.low >>> 0, message.negative_int_value.high >>> 0).toNumber() : message.negative_int_value; - if (message.double_value != null && message.hasOwnProperty("double_value")) - object.double_value = options.json && !isFinite(message.double_value) ? String(message.double_value) : message.double_value; - if (message.string_value != null && message.hasOwnProperty("string_value")) - object.string_value = options.bytes === String ? $util.base64.encode(message.string_value, 0, message.string_value.length) : options.bytes === Array ? Array.prototype.slice.call(message.string_value) : message.string_value; - if (message.aggregate_value != null && message.hasOwnProperty("aggregate_value")) - object.aggregate_value = message.aggregate_value; - 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} name_part NamePart name_part - * @property {boolean} is_extension NamePart is_extension - */ - - /** - * 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 name_part. - * @member {string} name_part - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.name_part = ""; - - /** - * NamePart is_extension. - * @member {boolean} is_extension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.is_extension = false; - - /** - * 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.name_part); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.is_extension); - 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.name_part = reader.string(); - break; - case 2: - message.is_extension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("name_part")) - throw $util.ProtocolError("missing required 'name_part'", { instance: message }); - if (!message.hasOwnProperty("is_extension")) - throw $util.ProtocolError("missing required 'is_extension'", { 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.name_part)) - return "name_part: string expected"; - if (typeof message.is_extension !== "boolean") - return "is_extension: 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.name_part != null) - message.name_part = String(object.name_part); - if (object.is_extension != null) - message.is_extension = Boolean(object.is_extension); - 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.name_part = ""; - object.is_extension = false; - } - if (message.name_part != null && message.hasOwnProperty("name_part")) - object.name_part = message.name_part; - if (message.is_extension != null && message.hasOwnProperty("is_extension")) - object.is_extension = message.is_extension; - 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; - - /** - * 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} [leading_comments] Location leading_comments - * @property {string|null} [trailing_comments] Location trailing_comments - * @property {Array.|null} [leading_detached_comments] Location leading_detached_comments - */ - - /** - * 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.leading_detached_comments = []; - if (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 leading_comments. - * @member {string} leading_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_comments = ""; - - /** - * Location trailing_comments. - * @member {string} trailing_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailing_comments = ""; - - /** - * Location leading_detached_comments. - * @member {Array.} leading_detached_comments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leading_detached_comments = $util.emptyArray; - - /** - * 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.leading_comments != null && Object.hasOwnProperty.call(message, "leading_comments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leading_comments); - if (message.trailing_comments != null && Object.hasOwnProperty.call(message, "trailing_comments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailing_comments); - if (message.leading_detached_comments != null && message.leading_detached_comments.length) - for (var i = 0; i < message.leading_detached_comments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leading_detached_comments[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.leading_comments = reader.string(); - break; - case 4: - message.trailing_comments = reader.string(); - break; - case 6: - if (!(message.leading_detached_comments && message.leading_detached_comments.length)) - message.leading_detached_comments = []; - message.leading_detached_comments.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.leading_comments != null && message.hasOwnProperty("leading_comments")) - if (!$util.isString(message.leading_comments)) - return "leading_comments: string expected"; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - if (!$util.isString(message.trailing_comments)) - return "trailing_comments: string expected"; - if (message.leading_detached_comments != null && message.hasOwnProperty("leading_detached_comments")) { - if (!Array.isArray(message.leading_detached_comments)) - return "leading_detached_comments: array expected"; - for (var i = 0; i < message.leading_detached_comments.length; ++i) - if (!$util.isString(message.leading_detached_comments[i])) - return "leading_detached_comments: 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.leading_comments != null) - message.leading_comments = String(object.leading_comments); - if (object.trailing_comments != null) - message.trailing_comments = String(object.trailing_comments); - if (object.leading_detached_comments) { - if (!Array.isArray(object.leading_detached_comments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leading_detached_comments: array expected"); - message.leading_detached_comments = []; - for (var i = 0; i < object.leading_detached_comments.length; ++i) - message.leading_detached_comments[i] = String(object.leading_detached_comments[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.leading_detached_comments = []; - } - if (options.defaults) { - object.leading_comments = ""; - object.trailing_comments = ""; - } - 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.leading_comments != null && message.hasOwnProperty("leading_comments")) - object.leading_comments = message.leading_comments; - if (message.trailing_comments != null && message.hasOwnProperty("trailing_comments")) - object.trailing_comments = message.trailing_comments; - if (message.leading_detached_comments && message.leading_detached_comments.length) { - object.leading_detached_comments = []; - for (var j = 0; j < message.leading_detached_comments.length; ++j) - object.leading_detached_comments[j] = message.leading_detached_comments[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; - - /** - * 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} [source_file] Annotation source_file - * @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 source_file. - * @member {string} source_file - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.source_file = ""; - - /** - * 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; - - /** - * 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.source_file != null && Object.hasOwnProperty.call(message, "source_file")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.source_file); - 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.source_file = 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.source_file != null && message.hasOwnProperty("source_file")) - if (!$util.isString(message.source_file)) - return "source_file: 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.source_file != null) - message.source_file = String(object.source_file); - 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.source_file = ""; - 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.source_file != null && message.hasOwnProperty("source_file")) - object.source_file = message.source_file; - 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.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([]); - - /** - * 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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {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 {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; - - /** - * 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 {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 {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; - - /** - * 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; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fully_decode_reserved_expansion] Http fully_decode_reserved_expansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fully_decode_reserved_expansion. - * @member {boolean} fully_decode_reserved_expansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fully_decode_reserved_expansion = false; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fully_decode_reserved_expansion != null && Object.hasOwnProperty.call(message, "fully_decode_reserved_expansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fully_decode_reserved_expansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = 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.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - case 2: - message.fully_decode_reserved_expansion = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - if (typeof message.fully_decode_reserved_expansion !== "boolean") - return "fully_decode_reserved_expansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fully_decode_reserved_expansion != null) - message.fully_decode_reserved_expansion = Boolean(object.fully_decode_reserved_expansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fully_decode_reserved_expansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fully_decode_reserved_expansion != null && message.hasOwnProperty("fully_decode_reserved_expansion")) - object.fully_decode_reserved_expansion = message.fully_decode_reserved_expansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [response_body] HttpRule response_body - * @property {Array.|null} [additional_bindings] HttpRule additional_bindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additional_bindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule response_body. - * @member {string} response_body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.response_body = ""; - - /** - * HttpRule additional_bindings. - * @member {Array.} additional_bindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additional_bindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additional_bindings != null && message.additional_bindings.length) - for (var i = 0; i < message.additional_bindings.length; ++i) - $root.google.api.HttpRule.encode(message.additional_bindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.response_body != null && Object.hasOwnProperty.call(message, "response_body")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.response_body); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = 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.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.selector = reader.string(); - break; - case 2: - message.get = reader.string(); - break; - case 3: - message.put = reader.string(); - break; - case 4: - message.post = reader.string(); - break; - case 5: - message["delete"] = reader.string(); - break; - case 6: - message.patch = reader.string(); - break; - case 8: - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - case 7: - message.body = reader.string(); - break; - case 12: - message.response_body = reader.string(); - break; - case 11: - if (!(message.additional_bindings && message.additional_bindings.length)) - message.additional_bindings = []; - message.additional_bindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.response_body != null && message.hasOwnProperty("response_body")) - if (!$util.isString(message.response_body)) - return "response_body: string expected"; - if (message.additional_bindings != null && message.hasOwnProperty("additional_bindings")) { - if (!Array.isArray(message.additional_bindings)) - return "additional_bindings: array expected"; - for (var i = 0; i < message.additional_bindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additional_bindings[i]); - if (error) - return "additional_bindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.response_body != null) - message.response_body = String(object.response_body); - if (object.additional_bindings) { - if (!Array.isArray(object.additional_bindings)) - throw TypeError(".google.api.HttpRule.additional_bindings: array expected"); - message.additional_bindings = []; - for (var i = 0; i < object.additional_bindings.length; ++i) { - if (typeof object.additional_bindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additional_bindings: object expected"); - message.additional_bindings[i] = $root.google.api.HttpRule.fromObject(object.additional_bindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additional_bindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.response_body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additional_bindings && message.additional_bindings.length) { - object.additional_bindings = []; - for (var j = 0; j < message.additional_bindings.length; ++j) - object.additional_bindings[j] = $root.google.api.HttpRule.toObject(message.additional_bindings[j], options); - } - if (message.response_body != null && message.hasOwnProperty("response_body")) - object.response_body = message.response_body; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = 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.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.kind = reader.string(); - break; - case 2: - message.path = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return CustomHttpPattern; - })(); - - return api; - })(); - - return google; - })(); - - $root.osmosis = (function() { - - /** - * Namespace osmosis. - * @exports osmosis - * @namespace - */ - var osmosis = {}; - - osmosis.tokenfactory = (function() { - - /** - * Namespace tokenfactory. - * @memberof osmosis - * @namespace - */ - var tokenfactory = {}; - - tokenfactory.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof osmosis.tokenfactory - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Msg = (function() { - - /** - * Constructs a new Msg service. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a Msg - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Msg(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Msg.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Msg; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#createDenom}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef CreateDenomCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse} [response] MsgCreateDenomResponse - */ - - /** - * Calls CreateDenom. - * @function createDenom - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenom} request MsgCreateDenom message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.CreateDenomCallback} callback Node-style callback called with the error, if any, and MsgCreateDenomResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.createDenom = function createDenom(request, callback) { - return this.rpcCall(createDenom, $root.osmosis.tokenfactory.v1beta1.MsgCreateDenom, $root.osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse, request, callback); - }, "name", { value: "CreateDenom" }); - - /** - * Calls CreateDenom. - * @function createDenom - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenom} request MsgCreateDenom message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#mint}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef MintCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgMintResponse} [response] MsgMintResponse - */ - - /** - * Calls Mint. - * @function mint - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgMint} request MsgMint message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.MintCallback} callback Node-style callback called with the error, if any, and MsgMintResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.mint = function mint(request, callback) { - return this.rpcCall(mint, $root.osmosis.tokenfactory.v1beta1.MsgMint, $root.osmosis.tokenfactory.v1beta1.MsgMintResponse, request, callback); - }, "name", { value: "Mint" }); - - /** - * Calls Mint. - * @function mint - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgMint} request MsgMint message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#burn}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef BurnCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgBurnResponse} [response] MsgBurnResponse - */ - - /** - * Calls Burn. - * @function burn - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgBurn} request MsgBurn message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.BurnCallback} callback Node-style callback called with the error, if any, and MsgBurnResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.burn = function burn(request, callback) { - return this.rpcCall(burn, $root.osmosis.tokenfactory.v1beta1.MsgBurn, $root.osmosis.tokenfactory.v1beta1.MsgBurnResponse, request, callback); - }, "name", { value: "Burn" }); - - /** - * Calls Burn. - * @function burn - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgBurn} request MsgBurn message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#changeAdmin}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef ChangeAdminCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse} [response] MsgChangeAdminResponse - */ - - /** - * Calls ChangeAdmin. - * @function changeAdmin - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdmin} request MsgChangeAdmin message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.ChangeAdminCallback} callback Node-style callback called with the error, if any, and MsgChangeAdminResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.changeAdmin = function changeAdmin(request, callback) { - return this.rpcCall(changeAdmin, $root.osmosis.tokenfactory.v1beta1.MsgChangeAdmin, $root.osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse, request, callback); - }, "name", { value: "ChangeAdmin" }); - - /** - * Calls ChangeAdmin. - * @function changeAdmin - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdmin} request MsgChangeAdmin message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#setDenomMetadata}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef SetDenomMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse} [response] MsgSetDenomMetadataResponse - */ - - /** - * Calls SetDenomMetadata. - * @function setDenomMetadata - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata} request MsgSetDenomMetadata message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.SetDenomMetadataCallback} callback Node-style callback called with the error, if any, and MsgSetDenomMetadataResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.setDenomMetadata = function setDenomMetadata(request, callback) { - return this.rpcCall(setDenomMetadata, $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata, $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse, request, callback); - }, "name", { value: "SetDenomMetadata" }); - - /** - * Calls SetDenomMetadata. - * @function setDenomMetadata - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata} request MsgSetDenomMetadata message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#setBeforeSendHook}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef SetBeforeSendHookCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse} [response] MsgSetBeforeSendHookResponse - */ - - /** - * Calls SetBeforeSendHook. - * @function setBeforeSendHook - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook} request MsgSetBeforeSendHook message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.SetBeforeSendHookCallback} callback Node-style callback called with the error, if any, and MsgSetBeforeSendHookResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.setBeforeSendHook = function setBeforeSendHook(request, callback) { - return this.rpcCall(setBeforeSendHook, $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook, $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse, request, callback); - }, "name", { value: "SetBeforeSendHook" }); - - /** - * Calls SetBeforeSendHook. - * @function setBeforeSendHook - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook} request MsgSetBeforeSendHook message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#forceTransfer}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef ForceTransferCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgForceTransferResponse} [response] MsgForceTransferResponse - */ - - /** - * Calls ForceTransfer. - * @function forceTransfer - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransfer} request MsgForceTransfer message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.ForceTransferCallback} callback Node-style callback called with the error, if any, and MsgForceTransferResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.forceTransfer = function forceTransfer(request, callback) { - return this.rpcCall(forceTransfer, $root.osmosis.tokenfactory.v1beta1.MsgForceTransfer, $root.osmosis.tokenfactory.v1beta1.MsgForceTransferResponse, request, callback); - }, "name", { value: "ForceTransfer" }); - - /** - * Calls ForceTransfer. - * @function forceTransfer - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransfer} request MsgForceTransfer message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#updateParams}. - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @typedef UpdateParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse} [response] MsgUpdateParamsResponse - */ - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @param {osmosis.tokenfactory.v1beta1.Msg.UpdateParamsCallback} callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Msg.prototype.updateParams = function updateParams(request, callback) { - return this.rpcCall(updateParams, $root.osmosis.tokenfactory.v1beta1.MsgUpdateParams, $root.osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse, request, callback); - }, "name", { value: "UpdateParams" }); - - /** - * Calls UpdateParams. - * @function updateParams - * @memberof osmosis.tokenfactory.v1beta1.Msg - * @instance - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParams} request MsgUpdateParams message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Msg; - })(); - - v1beta1.MsgCreateDenom = (function() { - - /** - * Properties of a MsgCreateDenom. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgCreateDenom - * @property {string|null} [sender] MsgCreateDenom sender - * @property {string|null} [subdenom] MsgCreateDenom subdenom - */ - - /** - * Constructs a new MsgCreateDenom. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgCreateDenom. - * @implements IMsgCreateDenom - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenom=} [properties] Properties to set - */ - function MsgCreateDenom(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgCreateDenom sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @instance - */ - MsgCreateDenom.prototype.sender = ""; - - /** - * MsgCreateDenom subdenom. - * @member {string} subdenom - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @instance - */ - MsgCreateDenom.prototype.subdenom = ""; - - /** - * Encodes the specified MsgCreateDenom message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenom.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenom} message MsgCreateDenom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateDenom.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).string(message.sender); - if (message.subdenom != null && Object.hasOwnProperty.call(message, "subdenom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subdenom); - return writer; - }; - - /** - * Encodes the specified MsgCreateDenom message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenom.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenom} message MsgCreateDenom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateDenom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgCreateDenom message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgCreateDenom} MsgCreateDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateDenom.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgCreateDenom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.subdenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgCreateDenom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgCreateDenom} MsgCreateDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateDenom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgCreateDenom message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgCreateDenom.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.subdenom != null && message.hasOwnProperty("subdenom")) - if (!$util.isString(message.subdenom)) - return "subdenom: string expected"; - return null; - }; - - /** - * Creates a MsgCreateDenom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgCreateDenom} MsgCreateDenom - */ - MsgCreateDenom.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgCreateDenom) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgCreateDenom(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.subdenom != null) - message.subdenom = String(object.subdenom); - return message; - }; - - /** - * Creates a plain object from a MsgCreateDenom message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgCreateDenom} message MsgCreateDenom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateDenom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.subdenom = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.subdenom != null && message.hasOwnProperty("subdenom")) - object.subdenom = message.subdenom; - return object; - }; - - /** - * Converts this MsgCreateDenom to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenom - * @instance - * @returns {Object.} JSON object - */ - MsgCreateDenom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgCreateDenom; - })(); - - v1beta1.MsgCreateDenomResponse = (function() { - - /** - * Properties of a MsgCreateDenomResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgCreateDenomResponse - * @property {string|null} [new_token_denom] MsgCreateDenomResponse new_token_denom - */ - - /** - * Constructs a new MsgCreateDenomResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgCreateDenomResponse. - * @implements IMsgCreateDenomResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenomResponse=} [properties] Properties to set - */ - function MsgCreateDenomResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgCreateDenomResponse new_token_denom. - * @member {string} new_token_denom - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @instance - */ - MsgCreateDenomResponse.prototype.new_token_denom = ""; - - /** - * Encodes the specified MsgCreateDenomResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenomResponse} message MsgCreateDenomResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateDenomResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.new_token_denom != null && Object.hasOwnProperty.call(message, "new_token_denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.new_token_denom); - return writer; - }; - - /** - * Encodes the specified MsgCreateDenomResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgCreateDenomResponse} message MsgCreateDenomResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateDenomResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgCreateDenomResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse} MsgCreateDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateDenomResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.new_token_denom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgCreateDenomResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse} MsgCreateDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateDenomResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgCreateDenomResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgCreateDenomResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.new_token_denom != null && message.hasOwnProperty("new_token_denom")) - if (!$util.isString(message.new_token_denom)) - return "new_token_denom: string expected"; - return null; - }; - - /** - * Creates a MsgCreateDenomResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse} MsgCreateDenomResponse - */ - MsgCreateDenomResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse(); - if (object.new_token_denom != null) - message.new_token_denom = String(object.new_token_denom); - return message; - }; - - /** - * Creates a plain object from a MsgCreateDenomResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse} message MsgCreateDenomResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateDenomResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.new_token_denom = ""; - if (message.new_token_denom != null && message.hasOwnProperty("new_token_denom")) - object.new_token_denom = message.new_token_denom; - return object; - }; - - /** - * Converts this MsgCreateDenomResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse - * @instance - * @returns {Object.} JSON object - */ - MsgCreateDenomResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgCreateDenomResponse; - })(); - - v1beta1.MsgMint = (function() { - - /** - * Properties of a MsgMint. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgMint - * @property {string|null} [sender] MsgMint sender - * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgMint amount - * @property {string|null} [mintToAddress] MsgMint mintToAddress - */ - - /** - * Constructs a new MsgMint. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgMint. - * @implements IMsgMint - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgMint=} [properties] Properties to set - */ - function MsgMint(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgMint sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @instance - */ - MsgMint.prototype.sender = ""; - - /** - * MsgMint amount. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @instance - */ - MsgMint.prototype.amount = null; - - /** - * MsgMint mintToAddress. - * @member {string} mintToAddress - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @instance - */ - MsgMint.prototype.mintToAddress = ""; - - /** - * Encodes the specified MsgMint message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMint.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgMint} message MsgMint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMint.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).string(message.sender); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.mintToAddress != null && Object.hasOwnProperty.call(message, "mintToAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.mintToAddress); - return writer; - }; - - /** - * Encodes the specified MsgMint message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMint.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgMint} message MsgMint message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMint.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgMint message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgMint} MsgMint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMint.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgMint(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 3: - message.mintToAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgMint message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgMint} MsgMint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMint.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgMint message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgMint.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - if (message.mintToAddress != null && message.hasOwnProperty("mintToAddress")) - if (!$util.isString(message.mintToAddress)) - return "mintToAddress: string expected"; - return null; - }; - - /** - * Creates a MsgMint message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgMint} MsgMint - */ - MsgMint.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgMint) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgMint(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.MsgMint.amount: object expected"); - message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); - } - if (object.mintToAddress != null) - message.mintToAddress = String(object.mintToAddress); - return message; - }; - - /** - * Creates a plain object from a MsgMint message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgMint} message MsgMint - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgMint.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.amount = null; - object.mintToAddress = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); - if (message.mintToAddress != null && message.hasOwnProperty("mintToAddress")) - object.mintToAddress = message.mintToAddress; - return object; - }; - - /** - * Converts this MsgMint to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgMint - * @instance - * @returns {Object.} JSON object - */ - MsgMint.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgMint; - })(); - - v1beta1.MsgMintResponse = (function() { - - /** - * Properties of a MsgMintResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgMintResponse - */ - - /** - * Constructs a new MsgMintResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgMintResponse. - * @implements IMsgMintResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgMintResponse=} [properties] Properties to set - */ - function MsgMintResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgMintResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMintResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgMintResponse} message MsgMintResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMintResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgMintResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMintResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgMintResponse} message MsgMintResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMintResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgMintResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgMintResponse} MsgMintResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMintResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgMintResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgMintResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgMintResponse} MsgMintResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMintResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgMintResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgMintResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgMintResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgMintResponse} MsgMintResponse - */ - MsgMintResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgMintResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgMintResponse(); - }; - - /** - * Creates a plain object from a MsgMintResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgMintResponse} message MsgMintResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgMintResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgMintResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgMintResponse - * @instance - * @returns {Object.} JSON object - */ - MsgMintResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgMintResponse; - })(); - - v1beta1.MsgBurn = (function() { - - /** - * Properties of a MsgBurn. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgBurn - * @property {string|null} [sender] MsgBurn sender - * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgBurn amount - * @property {string|null} [burnFromAddress] MsgBurn burnFromAddress - */ - - /** - * Constructs a new MsgBurn. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgBurn. - * @implements IMsgBurn - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgBurn=} [properties] Properties to set - */ - function MsgBurn(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgBurn sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @instance - */ - MsgBurn.prototype.sender = ""; - - /** - * MsgBurn amount. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @instance - */ - MsgBurn.prototype.amount = null; - - /** - * MsgBurn burnFromAddress. - * @member {string} burnFromAddress - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @instance - */ - MsgBurn.prototype.burnFromAddress = ""; - - /** - * Encodes the specified MsgBurn message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurn.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgBurn} message MsgBurn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgBurn.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).string(message.sender); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.burnFromAddress != null && Object.hasOwnProperty.call(message, "burnFromAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.burnFromAddress); - return writer; - }; - - /** - * Encodes the specified MsgBurn message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurn.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgBurn} message MsgBurn message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgBurn.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgBurn message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgBurn} MsgBurn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgBurn.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgBurn(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 3: - message.burnFromAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgBurn message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgBurn} MsgBurn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgBurn.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgBurn message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgBurn.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - if (message.burnFromAddress != null && message.hasOwnProperty("burnFromAddress")) - if (!$util.isString(message.burnFromAddress)) - return "burnFromAddress: string expected"; - return null; - }; - - /** - * Creates a MsgBurn message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgBurn} MsgBurn - */ - MsgBurn.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgBurn) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgBurn(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.MsgBurn.amount: object expected"); - message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); - } - if (object.burnFromAddress != null) - message.burnFromAddress = String(object.burnFromAddress); - return message; - }; - - /** - * Creates a plain object from a MsgBurn message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgBurn} message MsgBurn - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgBurn.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.amount = null; - object.burnFromAddress = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); - if (message.burnFromAddress != null && message.hasOwnProperty("burnFromAddress")) - object.burnFromAddress = message.burnFromAddress; - return object; - }; - - /** - * Converts this MsgBurn to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgBurn - * @instance - * @returns {Object.} JSON object - */ - MsgBurn.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgBurn; - })(); - - v1beta1.MsgBurnResponse = (function() { - - /** - * Properties of a MsgBurnResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgBurnResponse - */ - - /** - * Constructs a new MsgBurnResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgBurnResponse. - * @implements IMsgBurnResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgBurnResponse=} [properties] Properties to set - */ - function MsgBurnResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgBurnResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurnResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgBurnResponse} message MsgBurnResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgBurnResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgBurnResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurnResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgBurnResponse} message MsgBurnResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgBurnResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgBurnResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgBurnResponse} MsgBurnResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgBurnResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgBurnResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgBurnResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgBurnResponse} MsgBurnResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgBurnResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgBurnResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgBurnResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgBurnResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgBurnResponse} MsgBurnResponse - */ - MsgBurnResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgBurnResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgBurnResponse(); - }; - - /** - * Creates a plain object from a MsgBurnResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgBurnResponse} message MsgBurnResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgBurnResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgBurnResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgBurnResponse - * @instance - * @returns {Object.} JSON object - */ - MsgBurnResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgBurnResponse; - })(); - - v1beta1.MsgChangeAdmin = (function() { - - /** - * Properties of a MsgChangeAdmin. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgChangeAdmin - * @property {string|null} [sender] MsgChangeAdmin sender - * @property {string|null} [denom] MsgChangeAdmin denom - * @property {string|null} [new_admin] MsgChangeAdmin new_admin - */ - - /** - * Constructs a new MsgChangeAdmin. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgChangeAdmin. - * @implements IMsgChangeAdmin - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdmin=} [properties] Properties to set - */ - function MsgChangeAdmin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgChangeAdmin sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @instance - */ - MsgChangeAdmin.prototype.sender = ""; - - /** - * MsgChangeAdmin denom. - * @member {string} denom - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @instance - */ - MsgChangeAdmin.prototype.denom = ""; - - /** - * MsgChangeAdmin new_admin. - * @member {string} new_admin - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @instance - */ - MsgChangeAdmin.prototype.new_admin = ""; - - /** - * Encodes the specified MsgChangeAdmin message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdmin.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdmin} message MsgChangeAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChangeAdmin.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).string(message.sender); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.denom); - if (message.new_admin != null && Object.hasOwnProperty.call(message, "new_admin")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.new_admin); - return writer; - }; - - /** - * Encodes the specified MsgChangeAdmin message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdmin.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdmin} message MsgChangeAdmin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChangeAdmin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChangeAdmin message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgChangeAdmin} MsgChangeAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChangeAdmin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgChangeAdmin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.new_admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChangeAdmin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgChangeAdmin} MsgChangeAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChangeAdmin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChangeAdmin message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChangeAdmin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.new_admin != null && message.hasOwnProperty("new_admin")) - if (!$util.isString(message.new_admin)) - return "new_admin: string expected"; - return null; - }; - - /** - * Creates a MsgChangeAdmin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgChangeAdmin} MsgChangeAdmin - */ - MsgChangeAdmin.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgChangeAdmin) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgChangeAdmin(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.denom != null) - message.denom = String(object.denom); - if (object.new_admin != null) - message.new_admin = String(object.new_admin); - return message; - }; - - /** - * Creates a plain object from a MsgChangeAdmin message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgChangeAdmin} message MsgChangeAdmin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChangeAdmin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.denom = ""; - object.new_admin = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.new_admin != null && message.hasOwnProperty("new_admin")) - object.new_admin = message.new_admin; - return object; - }; - - /** - * Converts this MsgChangeAdmin to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdmin - * @instance - * @returns {Object.} JSON object - */ - MsgChangeAdmin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChangeAdmin; - })(); - - v1beta1.MsgChangeAdminResponse = (function() { - - /** - * Properties of a MsgChangeAdminResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgChangeAdminResponse - */ - - /** - * Constructs a new MsgChangeAdminResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgChangeAdminResponse. - * @implements IMsgChangeAdminResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdminResponse=} [properties] Properties to set - */ - function MsgChangeAdminResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgChangeAdminResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdminResponse} message MsgChangeAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChangeAdminResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgChangeAdminResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgChangeAdminResponse} message MsgChangeAdminResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChangeAdminResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgChangeAdminResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse} MsgChangeAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChangeAdminResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgChangeAdminResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse} MsgChangeAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChangeAdminResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChangeAdminResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChangeAdminResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgChangeAdminResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse} MsgChangeAdminResponse - */ - MsgChangeAdminResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse(); - }; - - /** - * Creates a plain object from a MsgChangeAdminResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse} message MsgChangeAdminResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChangeAdminResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgChangeAdminResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse - * @instance - * @returns {Object.} JSON object - */ - MsgChangeAdminResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgChangeAdminResponse; - })(); - - v1beta1.MsgSetBeforeSendHook = (function() { - - /** - * Properties of a MsgSetBeforeSendHook. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgSetBeforeSendHook - * @property {string|null} [sender] MsgSetBeforeSendHook sender - * @property {string|null} [denom] MsgSetBeforeSendHook denom - * @property {string|null} [contract_addr] MsgSetBeforeSendHook contract_addr - */ - - /** - * Constructs a new MsgSetBeforeSendHook. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgSetBeforeSendHook. - * @implements IMsgSetBeforeSendHook - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook=} [properties] Properties to set - */ - function MsgSetBeforeSendHook(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSetBeforeSendHook sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @instance - */ - MsgSetBeforeSendHook.prototype.sender = ""; - - /** - * MsgSetBeforeSendHook denom. - * @member {string} denom - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @instance - */ - MsgSetBeforeSendHook.prototype.denom = ""; - - /** - * MsgSetBeforeSendHook contract_addr. - * @member {string} contract_addr - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @instance - */ - MsgSetBeforeSendHook.prototype.contract_addr = ""; - - /** - * Encodes the specified MsgSetBeforeSendHook message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook} message MsgSetBeforeSendHook message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetBeforeSendHook.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).string(message.sender); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.denom); - if (message.contract_addr != null && Object.hasOwnProperty.call(message, "contract_addr")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.contract_addr); - return writer; - }; - - /** - * Encodes the specified MsgSetBeforeSendHook message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook} message MsgSetBeforeSendHook message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetBeforeSendHook.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSetBeforeSendHook message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook} MsgSetBeforeSendHook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetBeforeSendHook.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.denom = reader.string(); - break; - case 3: - message.contract_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSetBeforeSendHook message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook} MsgSetBeforeSendHook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetBeforeSendHook.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSetBeforeSendHook message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSetBeforeSendHook.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.contract_addr != null && message.hasOwnProperty("contract_addr")) - if (!$util.isString(message.contract_addr)) - return "contract_addr: string expected"; - return null; - }; - - /** - * Creates a MsgSetBeforeSendHook message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook} MsgSetBeforeSendHook - */ - MsgSetBeforeSendHook.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.denom != null) - message.denom = String(object.denom); - if (object.contract_addr != null) - message.contract_addr = String(object.contract_addr); - return message; - }; - - /** - * Creates a plain object from a MsgSetBeforeSendHook message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook} message MsgSetBeforeSendHook - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSetBeforeSendHook.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.denom = ""; - object.contract_addr = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.contract_addr != null && message.hasOwnProperty("contract_addr")) - object.contract_addr = message.contract_addr; - return object; - }; - - /** - * Converts this MsgSetBeforeSendHook to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook - * @instance - * @returns {Object.} JSON object - */ - MsgSetBeforeSendHook.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSetBeforeSendHook; - })(); - - v1beta1.MsgSetBeforeSendHookResponse = (function() { - - /** - * Properties of a MsgSetBeforeSendHookResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgSetBeforeSendHookResponse - */ - - /** - * Constructs a new MsgSetBeforeSendHookResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgSetBeforeSendHookResponse. - * @implements IMsgSetBeforeSendHookResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHookResponse=} [properties] Properties to set - */ - function MsgSetBeforeSendHookResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgSetBeforeSendHookResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHookResponse} message MsgSetBeforeSendHookResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetBeforeSendHookResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgSetBeforeSendHookResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHookResponse} message MsgSetBeforeSendHookResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetBeforeSendHookResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSetBeforeSendHookResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse} MsgSetBeforeSendHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetBeforeSendHookResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSetBeforeSendHookResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse} MsgSetBeforeSendHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetBeforeSendHookResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSetBeforeSendHookResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSetBeforeSendHookResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgSetBeforeSendHookResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse} MsgSetBeforeSendHookResponse - */ - MsgSetBeforeSendHookResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse(); - }; - - /** - * Creates a plain object from a MsgSetBeforeSendHookResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse} message MsgSetBeforeSendHookResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSetBeforeSendHookResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgSetBeforeSendHookResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSetBeforeSendHookResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSetBeforeSendHookResponse; - })(); - - v1beta1.MsgSetDenomMetadata = (function() { - - /** - * Properties of a MsgSetDenomMetadata. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgSetDenomMetadata - * @property {string|null} [sender] MsgSetDenomMetadata sender - * @property {cosmos.bank.v1beta1.IMetadata|null} [metadata] MsgSetDenomMetadata metadata - */ - - /** - * Constructs a new MsgSetDenomMetadata. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgSetDenomMetadata. - * @implements IMsgSetDenomMetadata - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata=} [properties] Properties to set - */ - function MsgSetDenomMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgSetDenomMetadata sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @instance - */ - MsgSetDenomMetadata.prototype.sender = ""; - - /** - * MsgSetDenomMetadata metadata. - * @member {cosmos.bank.v1beta1.IMetadata|null|undefined} metadata - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @instance - */ - MsgSetDenomMetadata.prototype.metadata = null; - - /** - * Encodes the specified MsgSetDenomMetadata message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata} message MsgSetDenomMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetDenomMetadata.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).string(message.sender); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.cosmos.bank.v1beta1.Metadata.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgSetDenomMetadata message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata} message MsgSetDenomMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetDenomMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSetDenomMetadata message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata} MsgSetDenomMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetDenomMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.metadata = $root.cosmos.bank.v1beta1.Metadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSetDenomMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata} MsgSetDenomMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetDenomMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSetDenomMetadata message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSetDenomMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.cosmos.bank.v1beta1.Metadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - return null; - }; - - /** - * Creates a MsgSetDenomMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata} MsgSetDenomMetadata - */ - MsgSetDenomMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata.metadata: object expected"); - message.metadata = $root.cosmos.bank.v1beta1.Metadata.fromObject(object.metadata); - } - return message; - }; - - /** - * Creates a plain object from a MsgSetDenomMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata} message MsgSetDenomMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSetDenomMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.metadata = null; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.cosmos.bank.v1beta1.Metadata.toObject(message.metadata, options); - return object; - }; - - /** - * Converts this MsgSetDenomMetadata to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata - * @instance - * @returns {Object.} JSON object - */ - MsgSetDenomMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSetDenomMetadata; - })(); - - v1beta1.MsgSetDenomMetadataResponse = (function() { - - /** - * Properties of a MsgSetDenomMetadataResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgSetDenomMetadataResponse - */ - - /** - * Constructs a new MsgSetDenomMetadataResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgSetDenomMetadataResponse. - * @implements IMsgSetDenomMetadataResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadataResponse=} [properties] Properties to set - */ - function MsgSetDenomMetadataResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgSetDenomMetadataResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadataResponse} message MsgSetDenomMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetDenomMetadataResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgSetDenomMetadataResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadataResponse} message MsgSetDenomMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetDenomMetadataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgSetDenomMetadataResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse} MsgSetDenomMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetDenomMetadataResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgSetDenomMetadataResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse} MsgSetDenomMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetDenomMetadataResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSetDenomMetadataResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSetDenomMetadataResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgSetDenomMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse} MsgSetDenomMetadataResponse - */ - MsgSetDenomMetadataResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse(); - }; - - /** - * Creates a plain object from a MsgSetDenomMetadataResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse} message MsgSetDenomMetadataResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSetDenomMetadataResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgSetDenomMetadataResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse - * @instance - * @returns {Object.} JSON object - */ - MsgSetDenomMetadataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgSetDenomMetadataResponse; - })(); - - v1beta1.MsgForceTransfer = (function() { - - /** - * Properties of a MsgForceTransfer. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgForceTransfer - * @property {string|null} [sender] MsgForceTransfer sender - * @property {cosmos.base.v1beta1.ICoin|null} [amount] MsgForceTransfer amount - * @property {string|null} [transferFromAddress] MsgForceTransfer transferFromAddress - * @property {string|null} [transferToAddress] MsgForceTransfer transferToAddress - */ - - /** - * Constructs a new MsgForceTransfer. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgForceTransfer. - * @implements IMsgForceTransfer - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransfer=} [properties] Properties to set - */ - function MsgForceTransfer(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgForceTransfer sender. - * @member {string} sender - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @instance - */ - MsgForceTransfer.prototype.sender = ""; - - /** - * MsgForceTransfer amount. - * @member {cosmos.base.v1beta1.ICoin|null|undefined} amount - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @instance - */ - MsgForceTransfer.prototype.amount = null; - - /** - * MsgForceTransfer transferFromAddress. - * @member {string} transferFromAddress - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @instance - */ - MsgForceTransfer.prototype.transferFromAddress = ""; - - /** - * MsgForceTransfer transferToAddress. - * @member {string} transferToAddress - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @instance - */ - MsgForceTransfer.prototype.transferToAddress = ""; - - /** - * Encodes the specified MsgForceTransfer message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransfer.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransfer} message MsgForceTransfer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgForceTransfer.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).string(message.sender); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos.base.v1beta1.Coin.encode(message.amount, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.transferFromAddress != null && Object.hasOwnProperty.call(message, "transferFromAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.transferFromAddress); - if (message.transferToAddress != null && Object.hasOwnProperty.call(message, "transferToAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.transferToAddress); - return writer; - }; - - /** - * Encodes the specified MsgForceTransfer message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransfer.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransfer} message MsgForceTransfer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgForceTransfer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgForceTransfer message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgForceTransfer} MsgForceTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgForceTransfer.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgForceTransfer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.sender = reader.string(); - break; - case 2: - message.amount = $root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32()); - break; - case 3: - message.transferFromAddress = reader.string(); - break; - case 4: - message.transferToAddress = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgForceTransfer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgForceTransfer} MsgForceTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgForceTransfer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgForceTransfer message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgForceTransfer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - if (message.transferFromAddress != null && message.hasOwnProperty("transferFromAddress")) - if (!$util.isString(message.transferFromAddress)) - return "transferFromAddress: string expected"; - if (message.transferToAddress != null && message.hasOwnProperty("transferToAddress")) - if (!$util.isString(message.transferToAddress)) - return "transferToAddress: string expected"; - return null; - }; - - /** - * Creates a MsgForceTransfer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgForceTransfer} MsgForceTransfer - */ - MsgForceTransfer.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgForceTransfer) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgForceTransfer(); - if (object.sender != null) - message.sender = String(object.sender); - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.MsgForceTransfer.amount: object expected"); - message.amount = $root.cosmos.base.v1beta1.Coin.fromObject(object.amount); - } - if (object.transferFromAddress != null) - message.transferFromAddress = String(object.transferFromAddress); - if (object.transferToAddress != null) - message.transferToAddress = String(object.transferToAddress); - return message; - }; - - /** - * Creates a plain object from a MsgForceTransfer message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgForceTransfer} message MsgForceTransfer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgForceTransfer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.sender = ""; - object.amount = null; - object.transferFromAddress = ""; - object.transferToAddress = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos.base.v1beta1.Coin.toObject(message.amount, options); - if (message.transferFromAddress != null && message.hasOwnProperty("transferFromAddress")) - object.transferFromAddress = message.transferFromAddress; - if (message.transferToAddress != null && message.hasOwnProperty("transferToAddress")) - object.transferToAddress = message.transferToAddress; - return object; - }; - - /** - * Converts this MsgForceTransfer to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransfer - * @instance - * @returns {Object.} JSON object - */ - MsgForceTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgForceTransfer; - })(); - - v1beta1.MsgForceTransferResponse = (function() { - - /** - * Properties of a MsgForceTransferResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgForceTransferResponse - */ - - /** - * Constructs a new MsgForceTransferResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgForceTransferResponse. - * @implements IMsgForceTransferResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransferResponse=} [properties] Properties to set - */ - function MsgForceTransferResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgForceTransferResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransferResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransferResponse} message MsgForceTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgForceTransferResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgForceTransferResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransferResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgForceTransferResponse} message MsgForceTransferResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgForceTransferResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgForceTransferResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgForceTransferResponse} MsgForceTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgForceTransferResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgForceTransferResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgForceTransferResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgForceTransferResponse} MsgForceTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgForceTransferResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgForceTransferResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgForceTransferResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgForceTransferResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgForceTransferResponse} MsgForceTransferResponse - */ - MsgForceTransferResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgForceTransferResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgForceTransferResponse(); - }; - - /** - * Creates a plain object from a MsgForceTransferResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgForceTransferResponse} message MsgForceTransferResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgForceTransferResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgForceTransferResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgForceTransferResponse - * @instance - * @returns {Object.} JSON object - */ - MsgForceTransferResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgForceTransferResponse; - })(); - - v1beta1.MsgUpdateParams = (function() { - - /** - * Properties of a MsgUpdateParams. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgUpdateParams - * @property {string|null} [authority] MsgUpdateParams authority - * @property {osmosis.tokenfactory.v1beta1.IParams|null} [params] MsgUpdateParams params - */ - - /** - * Constructs a new MsgUpdateParams. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgUpdateParams. - * @implements IMsgUpdateParams - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParams=} [properties] Properties to set - */ - function MsgUpdateParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MsgUpdateParams authority. - * @member {string} authority - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.authority = ""; - - /** - * MsgUpdateParams params. - * @member {osmosis.tokenfactory.v1beta1.IParams|null|undefined} params - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @instance - */ - MsgUpdateParams.prototype.params = null; - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParams.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.authority); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.osmosis.tokenfactory.v1beta1.Params.encode(message.params, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParams.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParams} message MsgUpdateParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgUpdateParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority = reader.string(); - break; - case 2: - message.params = $root.osmosis.tokenfactory.v1beta1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgUpdateParams} MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParams message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority != null && message.hasOwnProperty("authority")) - if (!$util.isString(message.authority)) - return "authority: string expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.osmosis.tokenfactory.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgUpdateParams} MsgUpdateParams - */ - MsgUpdateParams.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgUpdateParams) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.MsgUpdateParams(); - if (object.authority != null) - message.authority = String(object.authority); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.MsgUpdateParams.params: object expected"); - message.params = $root.osmosis.tokenfactory.v1beta1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgUpdateParams} message MsgUpdateParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.authority = ""; - object.params = null; - } - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = message.authority; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.osmosis.tokenfactory.v1beta1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this MsgUpdateParams to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParams - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParams; - })(); - - v1beta1.MsgUpdateParamsResponse = (function() { - - /** - * Properties of a MsgUpdateParamsResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IMsgUpdateParamsResponse - */ - - /** - * Constructs a new MsgUpdateParamsResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a MsgUpdateParamsResponse. - * @implements IMsgUpdateParamsResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParamsResponse=} [properties] Properties to set - */ - function MsgUpdateParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IMsgUpdateParamsResponse} message MsgUpdateParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUpdateParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUpdateParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUpdateParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse} MsgUpdateParamsResponse - */ - MsgUpdateParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse) - return object; - return new $root.osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse(); - }; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse} message MsgUpdateParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUpdateParamsResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse - * @instance - * @returns {Object.} JSON object - */ - MsgUpdateParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MsgUpdateParamsResponse; - })(); - - v1beta1.Params = (function() { - - /** - * Properties of a Params. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IParams - * @property {Array.|null} [denom_creation_fee] Params denom_creation_fee - * @property {Long|null} [denom_creation_gas_consume] Params denom_creation_gas_consume - * @property {string|null} [fee_collector_address] Params fee_collector_address - */ - - /** - * Constructs a new Params. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IParams=} [properties] Properties to set - */ - function Params(properties) { - this.denom_creation_fee = []; - if (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 denom_creation_fee. - * @member {Array.} denom_creation_fee - * @memberof osmosis.tokenfactory.v1beta1.Params - * @instance - */ - Params.prototype.denom_creation_fee = $util.emptyArray; - - /** - * Params denom_creation_gas_consume. - * @member {Long} denom_creation_gas_consume - * @memberof osmosis.tokenfactory.v1beta1.Params - * @instance - */ - Params.prototype.denom_creation_gas_consume = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params fee_collector_address. - * @member {string} fee_collector_address - * @memberof osmosis.tokenfactory.v1beta1.Params - * @instance - */ - Params.prototype.fee_collector_address = ""; - - /** - * Encodes the specified Params message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.Params.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.Params - * @static - * @param {osmosis.tokenfactory.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom_creation_fee != null && message.denom_creation_fee.length) - for (var i = 0; i < message.denom_creation_fee.length; ++i) - $root.cosmos.base.v1beta1.Coin.encode(message.denom_creation_fee[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.denom_creation_gas_consume != null && Object.hasOwnProperty.call(message, "denom_creation_gas_consume")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.denom_creation_gas_consume); - if (message.fee_collector_address != null && Object.hasOwnProperty.call(message, "fee_collector_address")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.fee_collector_address); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.Params - * @static - * @param {osmosis.tokenfactory.v1beta1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.denom_creation_fee && message.denom_creation_fee.length)) - message.denom_creation_fee = []; - message.denom_creation_fee.push($root.cosmos.base.v1beta1.Coin.decode(reader, reader.uint32())); - break; - case 2: - message.denom_creation_gas_consume = reader.uint64(); - break; - case 3: - message.fee_collector_address = 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 osmosis.tokenfactory.v1beta1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom_creation_fee != null && message.hasOwnProperty("denom_creation_fee")) { - if (!Array.isArray(message.denom_creation_fee)) - return "denom_creation_fee: array expected"; - for (var i = 0; i < message.denom_creation_fee.length; ++i) { - var error = $root.cosmos.base.v1beta1.Coin.verify(message.denom_creation_fee[i]); - if (error) - return "denom_creation_fee." + error; - } - } - if (message.denom_creation_gas_consume != null && message.hasOwnProperty("denom_creation_gas_consume")) - if (!$util.isInteger(message.denom_creation_gas_consume) && !(message.denom_creation_gas_consume && $util.isInteger(message.denom_creation_gas_consume.low) && $util.isInteger(message.denom_creation_gas_consume.high))) - return "denom_creation_gas_consume: integer|Long expected"; - if (message.fee_collector_address != null && message.hasOwnProperty("fee_collector_address")) - if (!$util.isString(message.fee_collector_address)) - return "fee_collector_address: string expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.Params - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.Params) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.Params(); - if (object.denom_creation_fee) { - if (!Array.isArray(object.denom_creation_fee)) - throw TypeError(".osmosis.tokenfactory.v1beta1.Params.denom_creation_fee: array expected"); - message.denom_creation_fee = []; - for (var i = 0; i < object.denom_creation_fee.length; ++i) { - if (typeof object.denom_creation_fee[i] !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.Params.denom_creation_fee: object expected"); - message.denom_creation_fee[i] = $root.cosmos.base.v1beta1.Coin.fromObject(object.denom_creation_fee[i]); - } - } - if (object.denom_creation_gas_consume != null) - if ($util.Long) - (message.denom_creation_gas_consume = $util.Long.fromValue(object.denom_creation_gas_consume)).unsigned = true; - else if (typeof object.denom_creation_gas_consume === "string") - message.denom_creation_gas_consume = parseInt(object.denom_creation_gas_consume, 10); - else if (typeof object.denom_creation_gas_consume === "number") - message.denom_creation_gas_consume = object.denom_creation_gas_consume; - else if (typeof object.denom_creation_gas_consume === "object") - message.denom_creation_gas_consume = new $util.LongBits(object.denom_creation_gas_consume.low >>> 0, object.denom_creation_gas_consume.high >>> 0).toNumber(true); - if (object.fee_collector_address != null) - message.fee_collector_address = String(object.fee_collector_address); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.Params - * @static - * @param {osmosis.tokenfactory.v1beta1.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.arrays || options.defaults) - object.denom_creation_fee = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.denom_creation_gas_consume = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.denom_creation_gas_consume = options.longs === String ? "0" : 0; - object.fee_collector_address = ""; - } - if (message.denom_creation_fee && message.denom_creation_fee.length) { - object.denom_creation_fee = []; - for (var j = 0; j < message.denom_creation_fee.length; ++j) - object.denom_creation_fee[j] = $root.cosmos.base.v1beta1.Coin.toObject(message.denom_creation_fee[j], options); - } - if (message.denom_creation_gas_consume != null && message.hasOwnProperty("denom_creation_gas_consume")) - if (typeof message.denom_creation_gas_consume === "number") - object.denom_creation_gas_consume = options.longs === String ? String(message.denom_creation_gas_consume) : message.denom_creation_gas_consume; - else - object.denom_creation_gas_consume = options.longs === String ? $util.Long.prototype.toString.call(message.denom_creation_gas_consume) : options.longs === Number ? new $util.LongBits(message.denom_creation_gas_consume.low >>> 0, message.denom_creation_gas_consume.high >>> 0).toNumber(true) : message.denom_creation_gas_consume; - if (message.fee_collector_address != null && message.hasOwnProperty("fee_collector_address")) - object.fee_collector_address = message.fee_collector_address; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Params; - })(); - - v1beta1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a Query - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Query(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#params}. - * @memberof osmosis.tokenfactory.v1beta1.Query - * @typedef ParamsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.QueryParamsResponse} [response] QueryParamsResponse - */ - - /** - * Calls Params. - * @function params - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @param {osmosis.tokenfactory.v1beta1.Query.ParamsCallback} callback Node-style callback called with the error, if any, and QueryParamsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.params = function params(request, callback) { - return this.rpcCall(params, $root.osmosis.tokenfactory.v1beta1.QueryParamsRequest, $root.osmosis.tokenfactory.v1beta1.QueryParamsResponse, request, callback); - }, "name", { value: "Params" }); - - /** - * Calls Params. - * @function params - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsRequest} request QueryParamsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#denomAuthorityMetadata}. - * @memberof osmosis.tokenfactory.v1beta1.Query - * @typedef DenomAuthorityMetadataCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse} [response] QueryDenomAuthorityMetadataResponse - */ - - /** - * Calls DenomAuthorityMetadata. - * @function denomAuthorityMetadata - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest} request QueryDenomAuthorityMetadataRequest message or plain object - * @param {osmosis.tokenfactory.v1beta1.Query.DenomAuthorityMetadataCallback} callback Node-style callback called with the error, if any, and QueryDenomAuthorityMetadataResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomAuthorityMetadata = function denomAuthorityMetadata(request, callback) { - return this.rpcCall(denomAuthorityMetadata, $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest, $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse, request, callback); - }, "name", { value: "DenomAuthorityMetadata" }); - - /** - * Calls DenomAuthorityMetadata. - * @function denomAuthorityMetadata - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest} request QueryDenomAuthorityMetadataRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#denomsFromCreator}. - * @memberof osmosis.tokenfactory.v1beta1.Query - * @typedef DenomsFromCreatorCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse} [response] QueryDenomsFromCreatorResponse - */ - - /** - * Calls DenomsFromCreator. - * @function denomsFromCreator - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest} request QueryDenomsFromCreatorRequest message or plain object - * @param {osmosis.tokenfactory.v1beta1.Query.DenomsFromCreatorCallback} callback Node-style callback called with the error, if any, and QueryDenomsFromCreatorResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.denomsFromCreator = function denomsFromCreator(request, callback) { - return this.rpcCall(denomsFromCreator, $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest, $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse, request, callback); - }, "name", { value: "DenomsFromCreator" }); - - /** - * Calls DenomsFromCreator. - * @function denomsFromCreator - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest} request QueryDenomsFromCreatorRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#beforeSendHookAddress}. - * @memberof osmosis.tokenfactory.v1beta1.Query - * @typedef BeforeSendHookAddressCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse} [response] QueryBeforeSendHookAddressResponse - */ - - /** - * Calls BeforeSendHookAddress. - * @function beforeSendHookAddress - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest} request QueryBeforeSendHookAddressRequest message or plain object - * @param {osmosis.tokenfactory.v1beta1.Query.BeforeSendHookAddressCallback} callback Node-style callback called with the error, if any, and QueryBeforeSendHookAddressResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.beforeSendHookAddress = function beforeSendHookAddress(request, callback) { - return this.rpcCall(beforeSendHookAddress, $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest, $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse, request, callback); - }, "name", { value: "BeforeSendHookAddress" }); - - /** - * Calls BeforeSendHookAddress. - * @function beforeSendHookAddress - * @memberof osmosis.tokenfactory.v1beta1.Query - * @instance - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest} request QueryBeforeSendHookAddressRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1beta1.QueryParamsRequest = (function() { - - /** - * Properties of a QueryParamsRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryParamsRequest - */ - - /** - * Constructs a new QueryParamsRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryParamsRequest. - * @implements IQueryParamsRequest - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsRequest=} [properties] Properties to set - */ - function QueryParamsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsRequest.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsRequest} message QueryParamsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryParamsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryParamsRequest} QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsRequest message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryParamsRequest} QueryParamsRequest - */ - QueryParamsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryParamsRequest) - return object; - return new $root.osmosis.tokenfactory.v1beta1.QueryParamsRequest(); - }; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryParamsRequest} message QueryParamsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryParamsRequest to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsRequest - * @instance - * @returns {Object.} JSON object - */ - QueryParamsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsRequest; - })(); - - v1beta1.QueryParamsResponse = (function() { - - /** - * Properties of a QueryParamsResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryParamsResponse - * @property {osmosis.tokenfactory.v1beta1.IParams|null} [params] QueryParamsResponse params - */ - - /** - * Constructs a new QueryParamsResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryParamsResponse. - * @implements IQueryParamsResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsResponse=} [properties] Properties to set - */ - function QueryParamsResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryParamsResponse params. - * @member {osmosis.tokenfactory.v1beta1.IParams|null|undefined} params - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @instance - */ - QueryParamsResponse.prototype.params = null; - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.osmosis.tokenfactory.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryParamsResponse} message QueryParamsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryParamsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryParamsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.osmosis.tokenfactory.v1beta1.Params.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryParamsResponse} QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryParamsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryParamsResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryParamsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.osmosis.tokenfactory.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - return null; - }; - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryParamsResponse} QueryParamsResponse - */ - QueryParamsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryParamsResponse) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryParamsResponse(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.QueryParamsResponse.params: object expected"); - message.params = $root.osmosis.tokenfactory.v1beta1.Params.fromObject(object.params); - } - return message; - }; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryParamsResponse} message QueryParamsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryParamsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.osmosis.tokenfactory.v1beta1.Params.toObject(message.params, options); - return object; - }; - - /** - * Converts this QueryParamsResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryParamsResponse - * @instance - * @returns {Object.} JSON object - */ - QueryParamsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryParamsResponse; - })(); - - v1beta1.QueryDenomAuthorityMetadataRequest = (function() { - - /** - * Properties of a QueryDenomAuthorityMetadataRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryDenomAuthorityMetadataRequest - * @property {string|null} [creator] QueryDenomAuthorityMetadataRequest creator - * @property {string|null} [subdenom] QueryDenomAuthorityMetadataRequest subdenom - */ - - /** - * Constructs a new QueryDenomAuthorityMetadataRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryDenomAuthorityMetadataRequest. - * @implements IQueryDenomAuthorityMetadataRequest - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest=} [properties] Properties to set - */ - function QueryDenomAuthorityMetadataRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomAuthorityMetadataRequest creator. - * @member {string} creator - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @instance - */ - QueryDenomAuthorityMetadataRequest.prototype.creator = ""; - - /** - * QueryDenomAuthorityMetadataRequest subdenom. - * @member {string} subdenom - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @instance - */ - QueryDenomAuthorityMetadataRequest.prototype.subdenom = ""; - - /** - * Encodes the specified QueryDenomAuthorityMetadataRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest} message QueryDenomAuthorityMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomAuthorityMetadataRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.subdenom != null && Object.hasOwnProperty.call(message, "subdenom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subdenom); - return writer; - }; - - /** - * Encodes the specified QueryDenomAuthorityMetadataRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest} message QueryDenomAuthorityMetadataRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomAuthorityMetadataRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomAuthorityMetadataRequest message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest} QueryDenomAuthorityMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomAuthorityMetadataRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.subdenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomAuthorityMetadataRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest} QueryDenomAuthorityMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomAuthorityMetadataRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomAuthorityMetadataRequest message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomAuthorityMetadataRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.subdenom != null && message.hasOwnProperty("subdenom")) - if (!$util.isString(message.subdenom)) - return "subdenom: string expected"; - return null; - }; - - /** - * Creates a QueryDenomAuthorityMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest} QueryDenomAuthorityMetadataRequest - */ - QueryDenomAuthorityMetadataRequest.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.subdenom != null) - message.subdenom = String(object.subdenom); - return message; - }; - - /** - * Creates a plain object from a QueryDenomAuthorityMetadataRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest} message QueryDenomAuthorityMetadataRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomAuthorityMetadataRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.creator = ""; - object.subdenom = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.subdenom != null && message.hasOwnProperty("subdenom")) - object.subdenom = message.subdenom; - return object; - }; - - /** - * Converts this QueryDenomAuthorityMetadataRequest to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomAuthorityMetadataRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomAuthorityMetadataRequest; - })(); - - v1beta1.QueryDenomAuthorityMetadataResponse = (function() { - - /** - * Properties of a QueryDenomAuthorityMetadataResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryDenomAuthorityMetadataResponse - * @property {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null} [authority_metadata] QueryDenomAuthorityMetadataResponse authority_metadata - */ - - /** - * Constructs a new QueryDenomAuthorityMetadataResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryDenomAuthorityMetadataResponse. - * @implements IQueryDenomAuthorityMetadataResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataResponse=} [properties] Properties to set - */ - function QueryDenomAuthorityMetadataResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomAuthorityMetadataResponse authority_metadata. - * @member {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null|undefined} authority_metadata - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @instance - */ - QueryDenomAuthorityMetadataResponse.prototype.authority_metadata = null; - - /** - * Encodes the specified QueryDenomAuthorityMetadataResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataResponse} message QueryDenomAuthorityMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomAuthorityMetadataResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.authority_metadata != null && Object.hasOwnProperty.call(message, "authority_metadata")) - $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.encode(message.authority_metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryDenomAuthorityMetadataResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataResponse} message QueryDenomAuthorityMetadataResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomAuthorityMetadataResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomAuthorityMetadataResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse} QueryDenomAuthorityMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomAuthorityMetadataResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.authority_metadata = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomAuthorityMetadataResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse} QueryDenomAuthorityMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomAuthorityMetadataResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomAuthorityMetadataResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomAuthorityMetadataResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.authority_metadata != null && message.hasOwnProperty("authority_metadata")) { - var error = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.verify(message.authority_metadata); - if (error) - return "authority_metadata." + error; - } - return null; - }; - - /** - * Creates a QueryDenomAuthorityMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse} QueryDenomAuthorityMetadataResponse - */ - QueryDenomAuthorityMetadataResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse(); - if (object.authority_metadata != null) { - if (typeof object.authority_metadata !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse.authority_metadata: object expected"); - message.authority_metadata = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.fromObject(object.authority_metadata); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomAuthorityMetadataResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse} message QueryDenomAuthorityMetadataResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomAuthorityMetadataResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.authority_metadata = null; - if (message.authority_metadata != null && message.hasOwnProperty("authority_metadata")) - object.authority_metadata = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.toObject(message.authority_metadata, options); - return object; - }; - - /** - * Converts this QueryDenomAuthorityMetadataResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomAuthorityMetadataResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomAuthorityMetadataResponse; - })(); - - v1beta1.QueryDenomsFromCreatorRequest = (function() { - - /** - * Properties of a QueryDenomsFromCreatorRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryDenomsFromCreatorRequest - * @property {string|null} [creator] QueryDenomsFromCreatorRequest creator - */ - - /** - * Constructs a new QueryDenomsFromCreatorRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryDenomsFromCreatorRequest. - * @implements IQueryDenomsFromCreatorRequest - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest=} [properties] Properties to set - */ - function QueryDenomsFromCreatorRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomsFromCreatorRequest creator. - * @member {string} creator - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @instance - */ - QueryDenomsFromCreatorRequest.prototype.creator = ""; - - /** - * Encodes the specified QueryDenomsFromCreatorRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest} message QueryDenomsFromCreatorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsFromCreatorRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - return writer; - }; - - /** - * Encodes the specified QueryDenomsFromCreatorRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest} message QueryDenomsFromCreatorRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsFromCreatorRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomsFromCreatorRequest message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest} QueryDenomsFromCreatorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsFromCreatorRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomsFromCreatorRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest} QueryDenomsFromCreatorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsFromCreatorRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomsFromCreatorRequest message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomsFromCreatorRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - return null; - }; - - /** - * Creates a QueryDenomsFromCreatorRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest} QueryDenomsFromCreatorRequest - */ - QueryDenomsFromCreatorRequest.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest(); - if (object.creator != null) - message.creator = String(object.creator); - return message; - }; - - /** - * Creates a plain object from a QueryDenomsFromCreatorRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest} message QueryDenomsFromCreatorRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomsFromCreatorRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.creator = ""; - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - return object; - }; - - /** - * Converts this QueryDenomsFromCreatorRequest to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest - * @instance - * @returns {Object.} JSON object - */ - QueryDenomsFromCreatorRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomsFromCreatorRequest; - })(); - - v1beta1.QueryDenomsFromCreatorResponse = (function() { - - /** - * Properties of a QueryDenomsFromCreatorResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryDenomsFromCreatorResponse - * @property {Array.|null} [denoms] QueryDenomsFromCreatorResponse denoms - */ - - /** - * Constructs a new QueryDenomsFromCreatorResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryDenomsFromCreatorResponse. - * @implements IQueryDenomsFromCreatorResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorResponse=} [properties] Properties to set - */ - function QueryDenomsFromCreatorResponse(properties) { - this.denoms = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryDenomsFromCreatorResponse denoms. - * @member {Array.} denoms - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @instance - */ - QueryDenomsFromCreatorResponse.prototype.denoms = $util.emptyArray; - - /** - * Encodes the specified QueryDenomsFromCreatorResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorResponse} message QueryDenomsFromCreatorResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsFromCreatorResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denoms != null && message.denoms.length) - for (var i = 0; i < message.denoms.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denoms[i]); - return writer; - }; - - /** - * Encodes the specified QueryDenomsFromCreatorResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorResponse} message QueryDenomsFromCreatorResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryDenomsFromCreatorResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryDenomsFromCreatorResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse} QueryDenomsFromCreatorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsFromCreatorResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.denoms && message.denoms.length)) - message.denoms = []; - message.denoms.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryDenomsFromCreatorResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse} QueryDenomsFromCreatorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryDenomsFromCreatorResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryDenomsFromCreatorResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryDenomsFromCreatorResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denoms != null && message.hasOwnProperty("denoms")) { - if (!Array.isArray(message.denoms)) - return "denoms: array expected"; - for (var i = 0; i < message.denoms.length; ++i) - if (!$util.isString(message.denoms[i])) - return "denoms: string[] expected"; - } - return null; - }; - - /** - * Creates a QueryDenomsFromCreatorResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse} QueryDenomsFromCreatorResponse - */ - QueryDenomsFromCreatorResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse(); - if (object.denoms) { - if (!Array.isArray(object.denoms)) - throw TypeError(".osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse.denoms: array expected"); - message.denoms = []; - for (var i = 0; i < object.denoms.length; ++i) - message.denoms[i] = String(object.denoms[i]); - } - return message; - }; - - /** - * Creates a plain object from a QueryDenomsFromCreatorResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse} message QueryDenomsFromCreatorResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryDenomsFromCreatorResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.denoms = []; - if (message.denoms && message.denoms.length) { - object.denoms = []; - for (var j = 0; j < message.denoms.length; ++j) - object.denoms[j] = message.denoms[j]; - } - return object; - }; - - /** - * Converts this QueryDenomsFromCreatorResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse - * @instance - * @returns {Object.} JSON object - */ - QueryDenomsFromCreatorResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryDenomsFromCreatorResponse; - })(); - - v1beta1.QueryBeforeSendHookAddressRequest = (function() { - - /** - * Properties of a QueryBeforeSendHookAddressRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryBeforeSendHookAddressRequest - * @property {string|null} [creator] QueryBeforeSendHookAddressRequest creator - * @property {string|null} [subdenom] QueryBeforeSendHookAddressRequest subdenom - */ - - /** - * Constructs a new QueryBeforeSendHookAddressRequest. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryBeforeSendHookAddressRequest. - * @implements IQueryBeforeSendHookAddressRequest - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest=} [properties] Properties to set - */ - function QueryBeforeSendHookAddressRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryBeforeSendHookAddressRequest creator. - * @member {string} creator - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @instance - */ - QueryBeforeSendHookAddressRequest.prototype.creator = ""; - - /** - * QueryBeforeSendHookAddressRequest subdenom. - * @member {string} subdenom - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @instance - */ - QueryBeforeSendHookAddressRequest.prototype.subdenom = ""; - - /** - * Encodes the specified QueryBeforeSendHookAddressRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest} message QueryBeforeSendHookAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBeforeSendHookAddressRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creator != null && Object.hasOwnProperty.call(message, "creator")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.creator); - if (message.subdenom != null && Object.hasOwnProperty.call(message, "subdenom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subdenom); - return writer; - }; - - /** - * Encodes the specified QueryBeforeSendHookAddressRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest} message QueryBeforeSendHookAddressRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBeforeSendHookAddressRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryBeforeSendHookAddressRequest message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest} QueryBeforeSendHookAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBeforeSendHookAddressRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.creator = reader.string(); - break; - case 2: - message.subdenom = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryBeforeSendHookAddressRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest} QueryBeforeSendHookAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBeforeSendHookAddressRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryBeforeSendHookAddressRequest message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryBeforeSendHookAddressRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creator != null && message.hasOwnProperty("creator")) - if (!$util.isString(message.creator)) - return "creator: string expected"; - if (message.subdenom != null && message.hasOwnProperty("subdenom")) - if (!$util.isString(message.subdenom)) - return "subdenom: string expected"; - return null; - }; - - /** - * Creates a QueryBeforeSendHookAddressRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest} QueryBeforeSendHookAddressRequest - */ - QueryBeforeSendHookAddressRequest.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest(); - if (object.creator != null) - message.creator = String(object.creator); - if (object.subdenom != null) - message.subdenom = String(object.subdenom); - return message; - }; - - /** - * Creates a plain object from a QueryBeforeSendHookAddressRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest} message QueryBeforeSendHookAddressRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryBeforeSendHookAddressRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.creator = ""; - object.subdenom = ""; - } - if (message.creator != null && message.hasOwnProperty("creator")) - object.creator = message.creator; - if (message.subdenom != null && message.hasOwnProperty("subdenom")) - object.subdenom = message.subdenom; - return object; - }; - - /** - * Converts this QueryBeforeSendHookAddressRequest to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest - * @instance - * @returns {Object.} JSON object - */ - QueryBeforeSendHookAddressRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryBeforeSendHookAddressRequest; - })(); - - v1beta1.QueryBeforeSendHookAddressResponse = (function() { - - /** - * Properties of a QueryBeforeSendHookAddressResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IQueryBeforeSendHookAddressResponse - * @property {string|null} [contract_addr] QueryBeforeSendHookAddressResponse contract_addr - */ - - /** - * Constructs a new QueryBeforeSendHookAddressResponse. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a QueryBeforeSendHookAddressResponse. - * @implements IQueryBeforeSendHookAddressResponse - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressResponse=} [properties] Properties to set - */ - function QueryBeforeSendHookAddressResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * QueryBeforeSendHookAddressResponse contract_addr. - * @member {string} contract_addr - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @instance - */ - QueryBeforeSendHookAddressResponse.prototype.contract_addr = ""; - - /** - * Encodes the specified QueryBeforeSendHookAddressResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressResponse} message QueryBeforeSendHookAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBeforeSendHookAddressResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.contract_addr != null && Object.hasOwnProperty.call(message, "contract_addr")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.contract_addr); - return writer; - }; - - /** - * Encodes the specified QueryBeforeSendHookAddressResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressResponse} message QueryBeforeSendHookAddressResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBeforeSendHookAddressResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QueryBeforeSendHookAddressResponse message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse} QueryBeforeSendHookAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBeforeSendHookAddressResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.contract_addr = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QueryBeforeSendHookAddressResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse} QueryBeforeSendHookAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBeforeSendHookAddressResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryBeforeSendHookAddressResponse message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryBeforeSendHookAddressResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.contract_addr != null && message.hasOwnProperty("contract_addr")) - if (!$util.isString(message.contract_addr)) - return "contract_addr: string expected"; - return null; - }; - - /** - * Creates a QueryBeforeSendHookAddressResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse} QueryBeforeSendHookAddressResponse - */ - QueryBeforeSendHookAddressResponse.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse(); - if (object.contract_addr != null) - message.contract_addr = String(object.contract_addr); - return message; - }; - - /** - * Creates a plain object from a QueryBeforeSendHookAddressResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @static - * @param {osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse} message QueryBeforeSendHookAddressResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryBeforeSendHookAddressResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.contract_addr = ""; - if (message.contract_addr != null && message.hasOwnProperty("contract_addr")) - object.contract_addr = message.contract_addr; - return object; - }; - - /** - * Converts this QueryBeforeSendHookAddressResponse to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse - * @instance - * @returns {Object.} JSON object - */ - QueryBeforeSendHookAddressResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return QueryBeforeSendHookAddressResponse; - })(); - - v1beta1.DenomAuthorityMetadata = (function() { - - /** - * Properties of a DenomAuthorityMetadata. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IDenomAuthorityMetadata - * @property {string|null} [Admin] DenomAuthorityMetadata Admin - */ - - /** - * Constructs a new DenomAuthorityMetadata. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a DenomAuthorityMetadata. - * @implements IDenomAuthorityMetadata - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata=} [properties] Properties to set - */ - function DenomAuthorityMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DenomAuthorityMetadata Admin. - * @member {string} Admin - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @instance - */ - DenomAuthorityMetadata.prototype.Admin = ""; - - /** - * Encodes the specified DenomAuthorityMetadata message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata} message DenomAuthorityMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomAuthorityMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.Admin != null && Object.hasOwnProperty.call(message, "Admin")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.Admin); - return writer; - }; - - /** - * Encodes the specified DenomAuthorityMetadata message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata} message DenomAuthorityMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DenomAuthorityMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DenomAuthorityMetadata message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata} DenomAuthorityMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomAuthorityMetadata.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.Admin = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DenomAuthorityMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata} DenomAuthorityMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DenomAuthorityMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DenomAuthorityMetadata message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DenomAuthorityMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.Admin != null && message.hasOwnProperty("Admin")) - if (!$util.isString(message.Admin)) - return "Admin: string expected"; - return null; - }; - - /** - * Creates a DenomAuthorityMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata} DenomAuthorityMetadata - */ - DenomAuthorityMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata(); - if (object.Admin != null) - message.Admin = String(object.Admin); - return message; - }; - - /** - * Creates a plain object from a DenomAuthorityMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @static - * @param {osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata} message DenomAuthorityMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DenomAuthorityMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.Admin = ""; - if (message.Admin != null && message.hasOwnProperty("Admin")) - object.Admin = message.Admin; - return object; - }; - - /** - * Converts this DenomAuthorityMetadata to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata - * @instance - * @returns {Object.} JSON object - */ - DenomAuthorityMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return DenomAuthorityMetadata; - })(); - - v1beta1.GenesisState = (function() { - - /** - * Properties of a GenesisState. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IGenesisState - * @property {osmosis.tokenfactory.v1beta1.IParams|null} [params] GenesisState params - * @property {Array.|null} [factory_denoms] GenesisState factory_denoms - */ - - /** - * Constructs a new GenesisState. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a GenesisState. - * @implements IGenesisState - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IGenesisState=} [properties] Properties to set - */ - function GenesisState(properties) { - this.factory_denoms = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisState params. - * @member {osmosis.tokenfactory.v1beta1.IParams|null|undefined} params - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.params = null; - - /** - * GenesisState factory_denoms. - * @member {Array.} factory_denoms - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @instance - */ - GenesisState.prototype.factory_denoms = $util.emptyArray; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisState.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {osmosis.tokenfactory.v1beta1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.params != null && Object.hasOwnProperty.call(message, "params")) - $root.osmosis.tokenfactory.v1beta1.Params.encode(message.params, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.factory_denoms != null && message.factory_denoms.length) - for (var i = 0; i < message.factory_denoms.length; ++i) - $root.osmosis.tokenfactory.v1beta1.GenesisDenom.encode(message.factory_denoms[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisState.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {osmosis.tokenfactory.v1beta1.IGenesisState} message GenesisState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisState.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.GenesisState(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.params = $root.osmosis.tokenfactory.v1beta1.Params.decode(reader, reader.uint32()); - break; - case 2: - if (!(message.factory_denoms && message.factory_denoms.length)) - message.factory_denoms = []; - message.factory_denoms.push($root.osmosis.tokenfactory.v1beta1.GenesisDenom.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.GenesisState} GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisState.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisState message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisState.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.params != null && message.hasOwnProperty("params")) { - var error = $root.osmosis.tokenfactory.v1beta1.Params.verify(message.params); - if (error) - return "params." + error; - } - if (message.factory_denoms != null && message.hasOwnProperty("factory_denoms")) { - if (!Array.isArray(message.factory_denoms)) - return "factory_denoms: array expected"; - for (var i = 0; i < message.factory_denoms.length; ++i) { - var error = $root.osmosis.tokenfactory.v1beta1.GenesisDenom.verify(message.factory_denoms[i]); - if (error) - return "factory_denoms." + error; - } - } - return null; - }; - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.GenesisState} GenesisState - */ - GenesisState.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.GenesisState) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.GenesisState(); - if (object.params != null) { - if (typeof object.params !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.GenesisState.params: object expected"); - message.params = $root.osmosis.tokenfactory.v1beta1.Params.fromObject(object.params); - } - if (object.factory_denoms) { - if (!Array.isArray(object.factory_denoms)) - throw TypeError(".osmosis.tokenfactory.v1beta1.GenesisState.factory_denoms: array expected"); - message.factory_denoms = []; - for (var i = 0; i < object.factory_denoms.length; ++i) { - if (typeof object.factory_denoms[i] !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.GenesisState.factory_denoms: object expected"); - message.factory_denoms[i] = $root.osmosis.tokenfactory.v1beta1.GenesisDenom.fromObject(object.factory_denoms[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @static - * @param {osmosis.tokenfactory.v1beta1.GenesisState} message GenesisState - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisState.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.factory_denoms = []; - if (options.defaults) - object.params = null; - if (message.params != null && message.hasOwnProperty("params")) - object.params = $root.osmosis.tokenfactory.v1beta1.Params.toObject(message.params, options); - if (message.factory_denoms && message.factory_denoms.length) { - object.factory_denoms = []; - for (var j = 0; j < message.factory_denoms.length; ++j) - object.factory_denoms[j] = $root.osmosis.tokenfactory.v1beta1.GenesisDenom.toObject(message.factory_denoms[j], options); - } - return object; - }; - - /** - * Converts this GenesisState to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.GenesisState - * @instance - * @returns {Object.} JSON object - */ - GenesisState.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisState; - })(); - - v1beta1.GenesisDenom = (function() { - - /** - * Properties of a GenesisDenom. - * @memberof osmosis.tokenfactory.v1beta1 - * @interface IGenesisDenom - * @property {string|null} [denom] GenesisDenom denom - * @property {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null} [authority_metadata] GenesisDenom authority_metadata - */ - - /** - * Constructs a new GenesisDenom. - * @memberof osmosis.tokenfactory.v1beta1 - * @classdesc Represents a GenesisDenom. - * @implements IGenesisDenom - * @constructor - * @param {osmosis.tokenfactory.v1beta1.IGenesisDenom=} [properties] Properties to set - */ - function GenesisDenom(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GenesisDenom denom. - * @member {string} denom - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @instance - */ - GenesisDenom.prototype.denom = ""; - - /** - * GenesisDenom authority_metadata. - * @member {osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null|undefined} authority_metadata - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @instance - */ - GenesisDenom.prototype.authority_metadata = null; - - /** - * Encodes the specified GenesisDenom message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisDenom.verify|verify} messages. - * @function encode - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {osmosis.tokenfactory.v1beta1.IGenesisDenom} message GenesisDenom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisDenom.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.authority_metadata != null && Object.hasOwnProperty.call(message, "authority_metadata")) - $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.encode(message.authority_metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GenesisDenom message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisDenom.verify|verify} messages. - * @function encodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {osmosis.tokenfactory.v1beta1.IGenesisDenom} message GenesisDenom message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GenesisDenom.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GenesisDenom message from the specified reader or buffer. - * @function decode - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {osmosis.tokenfactory.v1beta1.GenesisDenom} GenesisDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisDenom.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.osmosis.tokenfactory.v1beta1.GenesisDenom(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.denom = reader.string(); - break; - case 2: - message.authority_metadata = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GenesisDenom message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {osmosis.tokenfactory.v1beta1.GenesisDenom} GenesisDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GenesisDenom.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GenesisDenom message. - * @function verify - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GenesisDenom.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.authority_metadata != null && message.hasOwnProperty("authority_metadata")) { - var error = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.verify(message.authority_metadata); - if (error) - return "authority_metadata." + error; - } - return null; - }; - - /** - * Creates a GenesisDenom message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {Object.} object Plain object - * @returns {osmosis.tokenfactory.v1beta1.GenesisDenom} GenesisDenom - */ - GenesisDenom.fromObject = function fromObject(object) { - if (object instanceof $root.osmosis.tokenfactory.v1beta1.GenesisDenom) - return object; - var message = new $root.osmosis.tokenfactory.v1beta1.GenesisDenom(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.authority_metadata != null) { - if (typeof object.authority_metadata !== "object") - throw TypeError(".osmosis.tokenfactory.v1beta1.GenesisDenom.authority_metadata: object expected"); - message.authority_metadata = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.fromObject(object.authority_metadata); - } - return message; - }; - - /** - * Creates a plain object from a GenesisDenom message. Also converts values to other types if specified. - * @function toObject - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @static - * @param {osmosis.tokenfactory.v1beta1.GenesisDenom} message GenesisDenom - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GenesisDenom.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.denom = ""; - object.authority_metadata = null; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.authority_metadata != null && message.hasOwnProperty("authority_metadata")) - object.authority_metadata = $root.osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.toObject(message.authority_metadata, options); - return object; - }; - - /** - * Converts this GenesisDenom to JSON. - * @function toJSON - * @memberof osmosis.tokenfactory.v1beta1.GenesisDenom - * @instance - * @returns {Object.} JSON object - */ - GenesisDenom.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GenesisDenom; - })(); - - return v1beta1; - })(); - - return tokenfactory; - })(); - - return osmosis; - })(); - - return $root; -}); diff --git a/src/generated/proto.d.ts b/src/generated/proto.d.ts deleted file mode 100644 index 677b9b4b..00000000 --- a/src/generated/proto.d.ts +++ /dev/null @@ -1,26733 +0,0 @@ -import * as $protobuf from "protobufjs"; -/** Namespace neutron. */ -export namespace neutron { - - /** Namespace contractmanager. */ - namespace contractmanager { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: neutron.contractmanager.IMsgUpdateParams, callback: neutron.contractmanager.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: neutron.contractmanager.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.contractmanager.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: neutron.contractmanager.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (neutron.contractmanager.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (neutron.contractmanager.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.contractmanager.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.contractmanager.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.contractmanager.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.contractmanager.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IParams); - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.contractmanager.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: neutron.contractmanager.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.contractmanager.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: neutron.contractmanager.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): neutron.contractmanager.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)): neutron.contractmanager.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 }): neutron.contractmanager.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: neutron.contractmanager.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure address */ - address?: (string|null); - - /** Failure id */ - id?: (Long|null); - - /** Failure ack_type */ - ack_type?: (string|null); - - /** Failure packet */ - packet?: (ibc.core.channel.v1.IPacket|null); - - /** Failure ack */ - ack?: (ibc.core.channel.v1.IAcknowledgement|null); - } - - /** Represents a Failure. */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IFailure); - - /** Failure address. */ - public address: string; - - /** Failure id. */ - public id: Long; - - /** Failure ack_type. */ - public ack_type: string; - - /** Failure packet. */ - public packet?: (ibc.core.channel.v1.IPacket|null); - - /** Failure ack. */ - public ack?: (ibc.core.channel.v1.IAcknowledgement|null); - - /** - * Encodes the specified Failure message. Does not implicitly {@link neutron.contractmanager.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link neutron.contractmanager.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.Failure; - - /** - * Verifies a Failure message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: neutron.contractmanager.IQueryParamsRequest, callback: neutron.contractmanager.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: neutron.contractmanager.IQueryParamsRequest): Promise; - - /** - * Calls AddressFailures. - * @param request QueryFailuresRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryFailuresResponse - */ - public addressFailures(request: neutron.contractmanager.IQueryFailuresRequest, callback: neutron.contractmanager.Query.AddressFailuresCallback): void; - - /** - * Calls AddressFailures. - * @param request QueryFailuresRequest message or plain object - * @returns Promise - */ - public addressFailures(request: neutron.contractmanager.IQueryFailuresRequest): Promise; - - /** - * Calls Failures. - * @param request QueryFailuresRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryFailuresResponse - */ - public failures(request: neutron.contractmanager.IQueryFailuresRequest, callback: neutron.contractmanager.Query.FailuresCallback): void; - - /** - * Calls Failures. - * @param request QueryFailuresRequest message or plain object - * @returns Promise - */ - public failures(request: neutron.contractmanager.IQueryFailuresRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.contractmanager.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: neutron.contractmanager.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.contractmanager.Query#addressFailures}. - * @param error Error, if any - * @param [response] QueryFailuresResponse - */ - type AddressFailuresCallback = (error: (Error|null), response?: neutron.contractmanager.QueryFailuresResponse) => void; - - /** - * Callback as used by {@link neutron.contractmanager.Query#failures}. - * @param error Error, if any - * @param [response] QueryFailuresResponse - */ - type FailuresCallback = (error: (Error|null), response?: neutron.contractmanager.QueryFailuresResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.contractmanager.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (neutron.contractmanager.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (neutron.contractmanager.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.contractmanager.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryFailuresRequest. */ - interface IQueryFailuresRequest { - - /** QueryFailuresRequest address */ - address?: (string|null); - - /** QueryFailuresRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryFailuresRequest. */ - class QueryFailuresRequest implements IQueryFailuresRequest { - - /** - * Constructs a new QueryFailuresRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IQueryFailuresRequest); - - /** QueryFailuresRequest address. */ - public address: string; - - /** QueryFailuresRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryFailuresRequest message. Does not implicitly {@link neutron.contractmanager.QueryFailuresRequest.verify|verify} messages. - * @param message QueryFailuresRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IQueryFailuresRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFailuresRequest message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryFailuresRequest.verify|verify} messages. - * @param message QueryFailuresRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IQueryFailuresRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFailuresRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFailuresRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.QueryFailuresRequest; - - /** - * Decodes a QueryFailuresRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFailuresRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.QueryFailuresRequest; - - /** - * Verifies a QueryFailuresRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryFailuresRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFailuresRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.QueryFailuresRequest; - - /** - * Creates a plain object from a QueryFailuresRequest message. Also converts values to other types if specified. - * @param message QueryFailuresRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.QueryFailuresRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFailuresRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryFailuresResponse. */ - interface IQueryFailuresResponse { - - /** QueryFailuresResponse failures */ - failures?: (neutron.contractmanager.IFailure[]|null); - - /** QueryFailuresResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryFailuresResponse. */ - class QueryFailuresResponse implements IQueryFailuresResponse { - - /** - * Constructs a new QueryFailuresResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IQueryFailuresResponse); - - /** QueryFailuresResponse failures. */ - public failures: neutron.contractmanager.IFailure[]; - - /** QueryFailuresResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryFailuresResponse message. Does not implicitly {@link neutron.contractmanager.QueryFailuresResponse.verify|verify} messages. - * @param message QueryFailuresResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IQueryFailuresResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryFailuresResponse message, length delimited. Does not implicitly {@link neutron.contractmanager.QueryFailuresResponse.verify|verify} messages. - * @param message QueryFailuresResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IQueryFailuresResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryFailuresResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryFailuresResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.QueryFailuresResponse; - - /** - * Decodes a QueryFailuresResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryFailuresResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.QueryFailuresResponse; - - /** - * Verifies a QueryFailuresResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryFailuresResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryFailuresResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.QueryFailuresResponse; - - /** - * Creates a plain object from a QueryFailuresResponse message. Also converts values to other types if specified. - * @param message QueryFailuresResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.QueryFailuresResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryFailuresResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (neutron.contractmanager.IParams|null); - - /** GenesisState failures_list */ - failures_list?: (neutron.contractmanager.IFailure[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.IGenesisState); - - /** GenesisState params. */ - public params?: (neutron.contractmanager.IParams|null); - - /** GenesisState failures_list. */ - public failures_list: neutron.contractmanager.IFailure[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.contractmanager.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.contractmanager.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Failure. */ - interface IFailure { - - /** Failure channel_id */ - channel_id?: (string|null); - - /** Failure address */ - address?: (string|null); - - /** Failure id */ - id?: (Long|null); - - /** Failure ack_id */ - ack_id?: (Long|null); - - /** Failure ack_type */ - ack_type?: (string|null); - } - - /** Represents a Failure. */ - class Failure implements IFailure { - - /** - * Constructs a new Failure. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.contractmanager.v1.IFailure); - - /** Failure channel_id. */ - public channel_id: string; - - /** Failure address. */ - public address: string; - - /** Failure id. */ - public id: Long; - - /** Failure ack_id. */ - public ack_id: Long; - - /** Failure ack_type. */ - public ack_type: string; - - /** - * Encodes the specified Failure message. Does not implicitly {@link neutron.contractmanager.v1.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.contractmanager.v1.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Failure message, length delimited. Does not implicitly {@link neutron.contractmanager.v1.Failure.verify|verify} messages. - * @param message Failure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.contractmanager.v1.IFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Failure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.contractmanager.v1.Failure; - - /** - * Decodes a Failure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Failure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.contractmanager.v1.Failure; - - /** - * Verifies a Failure message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Failure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Failure - */ - public static fromObject(object: { [k: string]: any }): neutron.contractmanager.v1.Failure; - - /** - * Creates a plain object from a Failure message. Also converts values to other types if specified. - * @param message Failure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.contractmanager.v1.Failure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Failure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace cron. */ - namespace cron { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: neutron.cron.IMsgUpdateParams, callback: neutron.cron.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: neutron.cron.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.cron.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: neutron.cron.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (neutron.cron.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (neutron.cron.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.cron.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.cron.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.cron.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.cron.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params security_address */ - security_address?: (string|null); - - /** Params limit */ - limit?: (Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IParams); - - /** Params security_address. */ - public security_address: string; - - /** Params limit. */ - public limit: Long; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.cron.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: neutron.cron.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.cron.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: neutron.cron.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): neutron.cron.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)): neutron.cron.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 }): neutron.cron.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: neutron.cron.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Schedule. */ - interface ISchedule { - - /** Schedule name */ - name?: (string|null); - - /** Schedule period */ - period?: (Long|null); - - /** Schedule msgs */ - msgs?: (neutron.cron.IMsgExecuteContract[]|null); - - /** Schedule last_execute_height */ - last_execute_height?: (Long|null); - } - - /** Represents a Schedule. */ - class Schedule implements ISchedule { - - /** - * Constructs a new Schedule. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.ISchedule); - - /** Schedule name. */ - public name: string; - - /** Schedule period. */ - public period: Long; - - /** Schedule msgs. */ - public msgs: neutron.cron.IMsgExecuteContract[]; - - /** Schedule last_execute_height. */ - public last_execute_height: Long; - - /** - * Encodes the specified Schedule message. Does not implicitly {@link neutron.cron.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schedule message, length delimited. Does not implicitly {@link neutron.cron.Schedule.verify|verify} messages. - * @param message Schedule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schedule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.Schedule; - - /** - * Decodes a Schedule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schedule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.Schedule; - - /** - * Verifies a Schedule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Schedule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schedule - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.Schedule; - - /** - * Creates a plain object from a Schedule message. Also converts values to other types if specified. - * @param message Schedule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schedule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgExecuteContract. */ - interface IMsgExecuteContract { - - /** MsgExecuteContract contract */ - contract?: (string|null); - - /** MsgExecuteContract msg */ - msg?: (string|null); - } - - /** Represents a MsgExecuteContract. */ - class MsgExecuteContract implements IMsgExecuteContract { - - /** - * Constructs a new MsgExecuteContract. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IMsgExecuteContract); - - /** MsgExecuteContract contract. */ - public contract: string; - - /** MsgExecuteContract msg. */ - public msg: string; - - /** - * Encodes the specified MsgExecuteContract message. Does not implicitly {@link neutron.cron.MsgExecuteContract.verify|verify} messages. - * @param message MsgExecuteContract message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IMsgExecuteContract, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgExecuteContract message, length delimited. Does not implicitly {@link neutron.cron.MsgExecuteContract.verify|verify} messages. - * @param message MsgExecuteContract message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IMsgExecuteContract, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgExecuteContract message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgExecuteContract - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.MsgExecuteContract; - - /** - * Decodes a MsgExecuteContract message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgExecuteContract - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.MsgExecuteContract; - - /** - * Verifies a MsgExecuteContract message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgExecuteContract message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgExecuteContract - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.MsgExecuteContract; - - /** - * Creates a plain object from a MsgExecuteContract message. Also converts values to other types if specified. - * @param message MsgExecuteContract - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.MsgExecuteContract, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgExecuteContract to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ScheduleCount. */ - interface IScheduleCount { - - /** ScheduleCount count */ - count?: (number|null); - } - - /** Represents a ScheduleCount. */ - class ScheduleCount implements IScheduleCount { - - /** - * Constructs a new ScheduleCount. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IScheduleCount); - - /** ScheduleCount count. */ - public count: number; - - /** - * Encodes the specified ScheduleCount message. Does not implicitly {@link neutron.cron.ScheduleCount.verify|verify} messages. - * @param message ScheduleCount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IScheduleCount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduleCount message, length delimited. Does not implicitly {@link neutron.cron.ScheduleCount.verify|verify} messages. - * @param message ScheduleCount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IScheduleCount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduleCount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduleCount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.ScheduleCount; - - /** - * Decodes a ScheduleCount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduleCount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.ScheduleCount; - - /** - * Verifies a ScheduleCount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScheduleCount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduleCount - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.ScheduleCount; - - /** - * Creates a plain object from a ScheduleCount message. Also converts values to other types if specified. - * @param message ScheduleCount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.ScheduleCount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduleCount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: neutron.cron.IQueryParamsRequest, callback: neutron.cron.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: neutron.cron.IQueryParamsRequest): Promise; - - /** - * Calls Schedule. - * @param request QueryGetScheduleRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryGetScheduleResponse - */ - public schedule(request: neutron.cron.IQueryGetScheduleRequest, callback: neutron.cron.Query.ScheduleCallback): void; - - /** - * Calls Schedule. - * @param request QueryGetScheduleRequest message or plain object - * @returns Promise - */ - public schedule(request: neutron.cron.IQueryGetScheduleRequest): Promise; - - /** - * Calls Schedules. - * @param request QuerySchedulesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QuerySchedulesResponse - */ - public schedules(request: neutron.cron.IQuerySchedulesRequest, callback: neutron.cron.Query.SchedulesCallback): void; - - /** - * Calls Schedules. - * @param request QuerySchedulesRequest message or plain object - * @returns Promise - */ - public schedules(request: neutron.cron.IQuerySchedulesRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.cron.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: neutron.cron.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.cron.Query#schedule}. - * @param error Error, if any - * @param [response] QueryGetScheduleResponse - */ - type ScheduleCallback = (error: (Error|null), response?: neutron.cron.QueryGetScheduleResponse) => void; - - /** - * Callback as used by {@link neutron.cron.Query#schedules}. - * @param error Error, if any - * @param [response] QuerySchedulesResponse - */ - type SchedulesCallback = (error: (Error|null), response?: neutron.cron.QuerySchedulesResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.cron.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.cron.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (neutron.cron.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (neutron.cron.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.cron.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.cron.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryGetScheduleRequest. */ - interface IQueryGetScheduleRequest { - - /** QueryGetScheduleRequest name */ - name?: (string|null); - } - - /** Represents a QueryGetScheduleRequest. */ - class QueryGetScheduleRequest implements IQueryGetScheduleRequest { - - /** - * Constructs a new QueryGetScheduleRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IQueryGetScheduleRequest); - - /** QueryGetScheduleRequest name. */ - public name: string; - - /** - * Encodes the specified QueryGetScheduleRequest message. Does not implicitly {@link neutron.cron.QueryGetScheduleRequest.verify|verify} messages. - * @param message QueryGetScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IQueryGetScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryGetScheduleRequest message, length delimited. Does not implicitly {@link neutron.cron.QueryGetScheduleRequest.verify|verify} messages. - * @param message QueryGetScheduleRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IQueryGetScheduleRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryGetScheduleRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryGetScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.QueryGetScheduleRequest; - - /** - * Decodes a QueryGetScheduleRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryGetScheduleRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.QueryGetScheduleRequest; - - /** - * Verifies a QueryGetScheduleRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryGetScheduleRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryGetScheduleRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.QueryGetScheduleRequest; - - /** - * Creates a plain object from a QueryGetScheduleRequest message. Also converts values to other types if specified. - * @param message QueryGetScheduleRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.QueryGetScheduleRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryGetScheduleRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryGetScheduleResponse. */ - interface IQueryGetScheduleResponse { - - /** QueryGetScheduleResponse schedule */ - schedule?: (neutron.cron.ISchedule|null); - } - - /** Represents a QueryGetScheduleResponse. */ - class QueryGetScheduleResponse implements IQueryGetScheduleResponse { - - /** - * Constructs a new QueryGetScheduleResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IQueryGetScheduleResponse); - - /** QueryGetScheduleResponse schedule. */ - public schedule?: (neutron.cron.ISchedule|null); - - /** - * Encodes the specified QueryGetScheduleResponse message. Does not implicitly {@link neutron.cron.QueryGetScheduleResponse.verify|verify} messages. - * @param message QueryGetScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IQueryGetScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryGetScheduleResponse message, length delimited. Does not implicitly {@link neutron.cron.QueryGetScheduleResponse.verify|verify} messages. - * @param message QueryGetScheduleResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IQueryGetScheduleResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryGetScheduleResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryGetScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.QueryGetScheduleResponse; - - /** - * Decodes a QueryGetScheduleResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryGetScheduleResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.QueryGetScheduleResponse; - - /** - * Verifies a QueryGetScheduleResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryGetScheduleResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryGetScheduleResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.QueryGetScheduleResponse; - - /** - * Creates a plain object from a QueryGetScheduleResponse message. Also converts values to other types if specified. - * @param message QueryGetScheduleResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.QueryGetScheduleResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryGetScheduleResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QuerySchedulesRequest. */ - interface IQuerySchedulesRequest { - - /** QuerySchedulesRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QuerySchedulesRequest. */ - class QuerySchedulesRequest implements IQuerySchedulesRequest { - - /** - * Constructs a new QuerySchedulesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IQuerySchedulesRequest); - - /** QuerySchedulesRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QuerySchedulesRequest message. Does not implicitly {@link neutron.cron.QuerySchedulesRequest.verify|verify} messages. - * @param message QuerySchedulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IQuerySchedulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuerySchedulesRequest message, length delimited. Does not implicitly {@link neutron.cron.QuerySchedulesRequest.verify|verify} messages. - * @param message QuerySchedulesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IQuerySchedulesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuerySchedulesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuerySchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.QuerySchedulesRequest; - - /** - * Decodes a QuerySchedulesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySchedulesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.QuerySchedulesRequest; - - /** - * Verifies a QuerySchedulesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuerySchedulesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySchedulesRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.QuerySchedulesRequest; - - /** - * Creates a plain object from a QuerySchedulesRequest message. Also converts values to other types if specified. - * @param message QuerySchedulesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.QuerySchedulesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuerySchedulesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QuerySchedulesResponse. */ - interface IQuerySchedulesResponse { - - /** QuerySchedulesResponse schedules */ - schedules?: (neutron.cron.ISchedule[]|null); - - /** QuerySchedulesResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QuerySchedulesResponse. */ - class QuerySchedulesResponse implements IQuerySchedulesResponse { - - /** - * Constructs a new QuerySchedulesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IQuerySchedulesResponse); - - /** QuerySchedulesResponse schedules. */ - public schedules: neutron.cron.ISchedule[]; - - /** QuerySchedulesResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QuerySchedulesResponse message. Does not implicitly {@link neutron.cron.QuerySchedulesResponse.verify|verify} messages. - * @param message QuerySchedulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IQuerySchedulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuerySchedulesResponse message, length delimited. Does not implicitly {@link neutron.cron.QuerySchedulesResponse.verify|verify} messages. - * @param message QuerySchedulesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IQuerySchedulesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuerySchedulesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuerySchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.QuerySchedulesResponse; - - /** - * Decodes a QuerySchedulesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySchedulesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.QuerySchedulesResponse; - - /** - * Verifies a QuerySchedulesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuerySchedulesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySchedulesResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.QuerySchedulesResponse; - - /** - * Creates a plain object from a QuerySchedulesResponse message. Also converts values to other types if specified. - * @param message QuerySchedulesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.QuerySchedulesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuerySchedulesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState scheduleList */ - scheduleList?: (neutron.cron.ISchedule[]|null); - - /** GenesisState params */ - params?: (neutron.cron.IParams|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.cron.IGenesisState); - - /** GenesisState scheduleList. */ - public scheduleList: neutron.cron.ISchedule[]; - - /** GenesisState params. */ - public params?: (neutron.cron.IParams|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.cron.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.cron.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.cron.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.cron.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.cron.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.cron.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): neutron.cron.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.cron.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace feeburner. */ - namespace feeburner { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: neutron.feeburner.IMsgUpdateParams, callback: neutron.feeburner.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: neutron.feeburner.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.feeburner.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: neutron.feeburner.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (neutron.feeburner.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (neutron.feeburner.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.feeburner.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.feeburner.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.feeburner.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.feeburner.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params neutron_denom */ - neutron_denom?: (string|null); - - /** Params reserve_address */ - reserve_address?: (string|null); - - /** Params treasury_address */ - treasury_address?: (string|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IParams); - - /** Params neutron_denom. */ - public neutron_denom: string; - - /** Params reserve_address. */ - public reserve_address: string; - - /** Params treasury_address. */ - public treasury_address: string; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.feeburner.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: neutron.feeburner.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.feeburner.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: neutron.feeburner.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): neutron.feeburner.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)): neutron.feeburner.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 }): neutron.feeburner.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: neutron.feeburner.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: neutron.feeburner.IQueryParamsRequest, callback: neutron.feeburner.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: neutron.feeburner.IQueryParamsRequest): Promise; - - /** - * Calls TotalBurnedNeutronsAmount. - * @param request QueryTotalBurnedNeutronsAmountRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalBurnedNeutronsAmountResponse - */ - public totalBurnedNeutronsAmount(request: neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest, callback: neutron.feeburner.Query.TotalBurnedNeutronsAmountCallback): void; - - /** - * Calls TotalBurnedNeutronsAmount. - * @param request QueryTotalBurnedNeutronsAmountRequest message or plain object - * @returns Promise - */ - public totalBurnedNeutronsAmount(request: neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.feeburner.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: neutron.feeburner.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.feeburner.Query#totalBurnedNeutronsAmount}. - * @param error Error, if any - * @param [response] QueryTotalBurnedNeutronsAmountResponse - */ - type TotalBurnedNeutronsAmountCallback = (error: (Error|null), response?: neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.feeburner.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.feeburner.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (neutron.feeburner.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (neutron.feeburner.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.feeburner.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.feeburner.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalBurnedNeutronsAmountRequest. */ - interface IQueryTotalBurnedNeutronsAmountRequest { - } - - /** Represents a QueryTotalBurnedNeutronsAmountRequest. */ - class QueryTotalBurnedNeutronsAmountRequest implements IQueryTotalBurnedNeutronsAmountRequest { - - /** - * Constructs a new QueryTotalBurnedNeutronsAmountRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest); - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountRequest message. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest.verify|verify} messages. - * @param message QueryTotalBurnedNeutronsAmountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountRequest message, length delimited. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest.verify|verify} messages. - * @param message QueryTotalBurnedNeutronsAmountRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IQueryTotalBurnedNeutronsAmountRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalBurnedNeutronsAmountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalBurnedNeutronsAmountRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest; - - /** - * Verifies a QueryTotalBurnedNeutronsAmountRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalBurnedNeutronsAmountRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalBurnedNeutronsAmountRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest; - - /** - * Creates a plain object from a QueryTotalBurnedNeutronsAmountRequest message. Also converts values to other types if specified. - * @param message QueryTotalBurnedNeutronsAmountRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.QueryTotalBurnedNeutronsAmountRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalBurnedNeutronsAmountRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalBurnedNeutronsAmountResponse. */ - interface IQueryTotalBurnedNeutronsAmountResponse { - - /** QueryTotalBurnedNeutronsAmountResponse total_burned_neutrons_amount */ - total_burned_neutrons_amount?: (neutron.feeburner.ITotalBurnedNeutronsAmount|null); - } - - /** Represents a QueryTotalBurnedNeutronsAmountResponse. */ - class QueryTotalBurnedNeutronsAmountResponse implements IQueryTotalBurnedNeutronsAmountResponse { - - /** - * Constructs a new QueryTotalBurnedNeutronsAmountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IQueryTotalBurnedNeutronsAmountResponse); - - /** QueryTotalBurnedNeutronsAmountResponse total_burned_neutrons_amount. */ - public total_burned_neutrons_amount?: (neutron.feeburner.ITotalBurnedNeutronsAmount|null); - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountResponse message. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse.verify|verify} messages. - * @param message QueryTotalBurnedNeutronsAmountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IQueryTotalBurnedNeutronsAmountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalBurnedNeutronsAmountResponse message, length delimited. Does not implicitly {@link neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse.verify|verify} messages. - * @param message QueryTotalBurnedNeutronsAmountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IQueryTotalBurnedNeutronsAmountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalBurnedNeutronsAmountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse; - - /** - * Decodes a QueryTotalBurnedNeutronsAmountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalBurnedNeutronsAmountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse; - - /** - * Verifies a QueryTotalBurnedNeutronsAmountResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalBurnedNeutronsAmountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalBurnedNeutronsAmountResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse; - - /** - * Creates a plain object from a QueryTotalBurnedNeutronsAmountResponse message. Also converts values to other types if specified. - * @param message QueryTotalBurnedNeutronsAmountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.QueryTotalBurnedNeutronsAmountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalBurnedNeutronsAmountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TotalBurnedNeutronsAmount. */ - interface ITotalBurnedNeutronsAmount { - - /** TotalBurnedNeutronsAmount coin */ - coin?: (cosmos.base.v1beta1.ICoin|null); - } - - /** Represents a TotalBurnedNeutronsAmount. */ - class TotalBurnedNeutronsAmount implements ITotalBurnedNeutronsAmount { - - /** - * Constructs a new TotalBurnedNeutronsAmount. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.ITotalBurnedNeutronsAmount); - - /** TotalBurnedNeutronsAmount coin. */ - public coin?: (cosmos.base.v1beta1.ICoin|null); - - /** - * Encodes the specified TotalBurnedNeutronsAmount message. Does not implicitly {@link neutron.feeburner.TotalBurnedNeutronsAmount.verify|verify} messages. - * @param message TotalBurnedNeutronsAmount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.ITotalBurnedNeutronsAmount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TotalBurnedNeutronsAmount message, length delimited. Does not implicitly {@link neutron.feeburner.TotalBurnedNeutronsAmount.verify|verify} messages. - * @param message TotalBurnedNeutronsAmount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.ITotalBurnedNeutronsAmount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TotalBurnedNeutronsAmount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TotalBurnedNeutronsAmount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.TotalBurnedNeutronsAmount; - - /** - * Decodes a TotalBurnedNeutronsAmount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TotalBurnedNeutronsAmount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.TotalBurnedNeutronsAmount; - - /** - * Verifies a TotalBurnedNeutronsAmount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TotalBurnedNeutronsAmount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TotalBurnedNeutronsAmount - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.TotalBurnedNeutronsAmount; - - /** - * Creates a plain object from a TotalBurnedNeutronsAmount message. Also converts values to other types if specified. - * @param message TotalBurnedNeutronsAmount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.TotalBurnedNeutronsAmount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TotalBurnedNeutronsAmount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (neutron.feeburner.IParams|null); - - /** GenesisState total_burned_neutrons_amount */ - total_burned_neutrons_amount?: (neutron.feeburner.ITotalBurnedNeutronsAmount|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feeburner.IGenesisState); - - /** GenesisState params. */ - public params?: (neutron.feeburner.IParams|null); - - /** GenesisState total_burned_neutrons_amount. */ - public total_burned_neutrons_amount?: (neutron.feeburner.ITotalBurnedNeutronsAmount|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.feeburner.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feeburner.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.feeburner.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feeburner.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feeburner.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feeburner.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): neutron.feeburner.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feeburner.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace feerefunder. */ - namespace feerefunder { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: neutron.feerefunder.IMsgUpdateParams, callback: neutron.feerefunder.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: neutron.feerefunder.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.feerefunder.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: neutron.feerefunder.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (neutron.feerefunder.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (neutron.feerefunder.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.feerefunder.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.feerefunder.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.feerefunder.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.feerefunder.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params min_fee */ - min_fee?: (neutron.feerefunder.IFee|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IParams); - - /** Params min_fee. */ - public min_fee?: (neutron.feerefunder.IFee|null); - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.feerefunder.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: neutron.feerefunder.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.feerefunder.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: neutron.feerefunder.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): neutron.feerefunder.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)): neutron.feerefunder.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 }): neutron.feerefunder.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: neutron.feerefunder.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Fee. */ - interface IFee { - - /** Fee recv_fee */ - recv_fee?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Fee ack_fee */ - ack_fee?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Fee timeout_fee */ - timeout_fee?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a Fee. */ - class Fee implements IFee { - - /** - * Constructs a new Fee. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IFee); - - /** Fee recv_fee. */ - public recv_fee: cosmos.base.v1beta1.ICoin[]; - - /** Fee ack_fee. */ - public ack_fee: cosmos.base.v1beta1.ICoin[]; - - /** Fee timeout_fee. */ - public timeout_fee: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Fee message. Does not implicitly {@link neutron.feerefunder.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: neutron.feerefunder.IFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link neutron.feerefunder.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: neutron.feerefunder.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): neutron.feerefunder.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)): neutron.feerefunder.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 }): neutron.feerefunder.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: neutron.feerefunder.Fee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Fee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketID. */ - interface IPacketID { - - /** PacketID channel_id */ - channel_id?: (string|null); - - /** PacketID port_id */ - port_id?: (string|null); - - /** PacketID sequence */ - sequence?: (Long|null); - } - - /** Represents a PacketID. */ - class PacketID implements IPacketID { - - /** - * Constructs a new PacketID. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IPacketID); - - /** PacketID channel_id. */ - public channel_id: string; - - /** PacketID port_id. */ - public port_id: string; - - /** PacketID sequence. */ - public sequence: Long; - - /** - * Encodes the specified PacketID message. Does not implicitly {@link neutron.feerefunder.PacketID.verify|verify} messages. - * @param message PacketID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IPacketID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketID message, length delimited. Does not implicitly {@link neutron.feerefunder.PacketID.verify|verify} messages. - * @param message PacketID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IPacketID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketID message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.PacketID; - - /** - * Decodes a PacketID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.PacketID; - - /** - * Verifies a PacketID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketID - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.PacketID; - - /** - * Creates a plain object from a PacketID message. Also converts values to other types if specified. - * @param message PacketID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.PacketID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: neutron.feerefunder.IQueryParamsRequest, callback: neutron.feerefunder.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: neutron.feerefunder.IQueryParamsRequest): Promise; - - /** - * Calls FeeInfo. - * @param request FeeInfoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FeeInfoResponse - */ - public feeInfo(request: neutron.feerefunder.IFeeInfoRequest, callback: neutron.feerefunder.Query.FeeInfoCallback): void; - - /** - * Calls FeeInfo. - * @param request FeeInfoRequest message or plain object - * @returns Promise - */ - public feeInfo(request: neutron.feerefunder.IFeeInfoRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.feerefunder.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: neutron.feerefunder.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.feerefunder.Query#feeInfo}. - * @param error Error, if any - * @param [response] FeeInfoResponse - */ - type FeeInfoCallback = (error: (Error|null), response?: neutron.feerefunder.FeeInfoResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.feerefunder.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.feerefunder.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (neutron.feerefunder.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (neutron.feerefunder.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.feerefunder.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.feerefunder.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FeeInfoRequest. */ - interface IFeeInfoRequest { - - /** FeeInfoRequest channel_id */ - channel_id?: (string|null); - - /** FeeInfoRequest port_id */ - port_id?: (string|null); - - /** FeeInfoRequest sequence */ - sequence?: (Long|null); - } - - /** Represents a FeeInfoRequest. */ - class FeeInfoRequest implements IFeeInfoRequest { - - /** - * Constructs a new FeeInfoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IFeeInfoRequest); - - /** FeeInfoRequest channel_id. */ - public channel_id: string; - - /** FeeInfoRequest port_id. */ - public port_id: string; - - /** FeeInfoRequest sequence. */ - public sequence: Long; - - /** - * Encodes the specified FeeInfoRequest message. Does not implicitly {@link neutron.feerefunder.FeeInfoRequest.verify|verify} messages. - * @param message FeeInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IFeeInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeeInfoRequest message, length delimited. Does not implicitly {@link neutron.feerefunder.FeeInfoRequest.verify|verify} messages. - * @param message FeeInfoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IFeeInfoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeeInfoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.FeeInfoRequest; - - /** - * Decodes a FeeInfoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeeInfoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.FeeInfoRequest; - - /** - * Verifies a FeeInfoRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeeInfoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeeInfoRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.FeeInfoRequest; - - /** - * Creates a plain object from a FeeInfoRequest message. Also converts values to other types if specified. - * @param message FeeInfoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.FeeInfoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeeInfoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FeeInfoResponse. */ - interface IFeeInfoResponse { - - /** FeeInfoResponse fee_info */ - fee_info?: (neutron.feerefunder.IFeeInfo|null); - } - - /** Represents a FeeInfoResponse. */ - class FeeInfoResponse implements IFeeInfoResponse { - - /** - * Constructs a new FeeInfoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IFeeInfoResponse); - - /** FeeInfoResponse fee_info. */ - public fee_info?: (neutron.feerefunder.IFeeInfo|null); - - /** - * Encodes the specified FeeInfoResponse message. Does not implicitly {@link neutron.feerefunder.FeeInfoResponse.verify|verify} messages. - * @param message FeeInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IFeeInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeeInfoResponse message, length delimited. Does not implicitly {@link neutron.feerefunder.FeeInfoResponse.verify|verify} messages. - * @param message FeeInfoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IFeeInfoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeeInfoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeeInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.FeeInfoResponse; - - /** - * Decodes a FeeInfoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeeInfoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.FeeInfoResponse; - - /** - * Verifies a FeeInfoResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeeInfoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeeInfoResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.FeeInfoResponse; - - /** - * Creates a plain object from a FeeInfoResponse message. Also converts values to other types if specified. - * @param message FeeInfoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.FeeInfoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeeInfoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (neutron.feerefunder.IParams|null); - - /** GenesisState fee_infos */ - fee_infos?: (neutron.feerefunder.IFeeInfo[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IGenesisState); - - /** GenesisState params. */ - public params?: (neutron.feerefunder.IParams|null); - - /** GenesisState fee_infos. */ - public fee_infos: neutron.feerefunder.IFeeInfo[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.feerefunder.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.feerefunder.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FeeInfo. */ - interface IFeeInfo { - - /** FeeInfo payer */ - payer?: (string|null); - - /** FeeInfo packet_id */ - packet_id?: (neutron.feerefunder.IPacketID|null); - - /** FeeInfo fee */ - fee?: (neutron.feerefunder.IFee|null); - } - - /** Represents a FeeInfo. */ - class FeeInfo implements IFeeInfo { - - /** - * Constructs a new FeeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.feerefunder.IFeeInfo); - - /** FeeInfo payer. */ - public payer: string; - - /** FeeInfo packet_id. */ - public packet_id?: (neutron.feerefunder.IPacketID|null); - - /** FeeInfo fee. */ - public fee?: (neutron.feerefunder.IFee|null); - - /** - * Encodes the specified FeeInfo message. Does not implicitly {@link neutron.feerefunder.FeeInfo.verify|verify} messages. - * @param message FeeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.feerefunder.IFeeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeeInfo message, length delimited. Does not implicitly {@link neutron.feerefunder.FeeInfo.verify|verify} messages. - * @param message FeeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.feerefunder.IFeeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.feerefunder.FeeInfo; - - /** - * Decodes a FeeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.feerefunder.FeeInfo; - - /** - * Verifies a FeeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeeInfo - */ - public static fromObject(object: { [k: string]: any }): neutron.feerefunder.FeeInfo; - - /** - * Creates a plain object from a FeeInfo message. Also converts values to other types if specified. - * @param message FeeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.feerefunder.FeeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace interchainqueries. */ - namespace interchainqueries { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls RegisterInterchainQuery. - * @param request MsgRegisterInterchainQuery message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRegisterInterchainQueryResponse - */ - public registerInterchainQuery(request: neutron.interchainqueries.IMsgRegisterInterchainQuery, callback: neutron.interchainqueries.Msg.RegisterInterchainQueryCallback): void; - - /** - * Calls RegisterInterchainQuery. - * @param request MsgRegisterInterchainQuery message or plain object - * @returns Promise - */ - public registerInterchainQuery(request: neutron.interchainqueries.IMsgRegisterInterchainQuery): Promise; - - /** - * Calls SubmitQueryResult. - * @param request MsgSubmitQueryResult message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitQueryResultResponse - */ - public submitQueryResult(request: neutron.interchainqueries.IMsgSubmitQueryResult, callback: neutron.interchainqueries.Msg.SubmitQueryResultCallback): void; - - /** - * Calls SubmitQueryResult. - * @param request MsgSubmitQueryResult message or plain object - * @returns Promise - */ - public submitQueryResult(request: neutron.interchainqueries.IMsgSubmitQueryResult): Promise; - - /** - * Calls RemoveInterchainQuery. - * @param request MsgRemoveInterchainQueryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRemoveInterchainQueryResponse - */ - public removeInterchainQuery(request: neutron.interchainqueries.IMsgRemoveInterchainQueryRequest, callback: neutron.interchainqueries.Msg.RemoveInterchainQueryCallback): void; - - /** - * Calls RemoveInterchainQuery. - * @param request MsgRemoveInterchainQueryRequest message or plain object - * @returns Promise - */ - public removeInterchainQuery(request: neutron.interchainqueries.IMsgRemoveInterchainQueryRequest): Promise; - - /** - * Calls UpdateInterchainQuery. - * @param request MsgUpdateInterchainQueryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateInterchainQueryResponse - */ - public updateInterchainQuery(request: neutron.interchainqueries.IMsgUpdateInterchainQueryRequest, callback: neutron.interchainqueries.Msg.UpdateInterchainQueryCallback): void; - - /** - * Calls UpdateInterchainQuery. - * @param request MsgUpdateInterchainQueryRequest message or plain object - * @returns Promise - */ - public updateInterchainQuery(request: neutron.interchainqueries.IMsgUpdateInterchainQueryRequest): Promise; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: neutron.interchainqueries.IMsgUpdateParams, callback: neutron.interchainqueries.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: neutron.interchainqueries.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#registerInterchainQuery}. - * @param error Error, if any - * @param [response] MsgRegisterInterchainQueryResponse - */ - type RegisterInterchainQueryCallback = (error: (Error|null), response?: neutron.interchainqueries.MsgRegisterInterchainQueryResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#submitQueryResult}. - * @param error Error, if any - * @param [response] MsgSubmitQueryResultResponse - */ - type SubmitQueryResultCallback = (error: (Error|null), response?: neutron.interchainqueries.MsgSubmitQueryResultResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#removeInterchainQuery}. - * @param error Error, if any - * @param [response] MsgRemoveInterchainQueryResponse - */ - type RemoveInterchainQueryCallback = (error: (Error|null), response?: neutron.interchainqueries.MsgRemoveInterchainQueryResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#updateInterchainQuery}. - * @param error Error, if any - * @param [response] MsgUpdateInterchainQueryResponse - */ - type UpdateInterchainQueryCallback = (error: (Error|null), response?: neutron.interchainqueries.MsgUpdateInterchainQueryResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: neutron.interchainqueries.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgRegisterInterchainQuery. */ - interface IMsgRegisterInterchainQuery { - - /** MsgRegisterInterchainQuery query_type */ - query_type?: (string|null); - - /** MsgRegisterInterchainQuery keys */ - keys?: (neutron.interchainqueries.IKVKey[]|null); - - /** MsgRegisterInterchainQuery transactions_filter */ - transactions_filter?: (string|null); - - /** MsgRegisterInterchainQuery connection_id */ - connection_id?: (string|null); - - /** MsgRegisterInterchainQuery update_period */ - update_period?: (Long|null); - - /** MsgRegisterInterchainQuery sender */ - sender?: (string|null); - } - - /** Represents a MsgRegisterInterchainQuery. */ - class MsgRegisterInterchainQuery implements IMsgRegisterInterchainQuery { - - /** - * Constructs a new MsgRegisterInterchainQuery. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgRegisterInterchainQuery); - - /** MsgRegisterInterchainQuery query_type. */ - public query_type: string; - - /** MsgRegisterInterchainQuery keys. */ - public keys: neutron.interchainqueries.IKVKey[]; - - /** MsgRegisterInterchainQuery transactions_filter. */ - public transactions_filter: string; - - /** MsgRegisterInterchainQuery connection_id. */ - public connection_id: string; - - /** MsgRegisterInterchainQuery update_period. */ - public update_period: Long; - - /** MsgRegisterInterchainQuery sender. */ - public sender: string; - - /** - * Encodes the specified MsgRegisterInterchainQuery message. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQuery.verify|verify} messages. - * @param message MsgRegisterInterchainQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgRegisterInterchainQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterInterchainQuery message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQuery.verify|verify} messages. - * @param message MsgRegisterInterchainQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgRegisterInterchainQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterInterchainQuery message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterInterchainQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgRegisterInterchainQuery; - - /** - * Decodes a MsgRegisterInterchainQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterInterchainQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgRegisterInterchainQuery; - - /** - * Verifies a MsgRegisterInterchainQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterInterchainQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterInterchainQuery - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgRegisterInterchainQuery; - - /** - * Creates a plain object from a MsgRegisterInterchainQuery message. Also converts values to other types if specified. - * @param message MsgRegisterInterchainQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgRegisterInterchainQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterInterchainQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRegisterInterchainQueryResponse. */ - interface IMsgRegisterInterchainQueryResponse { - - /** MsgRegisterInterchainQueryResponse id */ - id?: (Long|null); - } - - /** Represents a MsgRegisterInterchainQueryResponse. */ - class MsgRegisterInterchainQueryResponse implements IMsgRegisterInterchainQueryResponse { - - /** - * Constructs a new MsgRegisterInterchainQueryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgRegisterInterchainQueryResponse); - - /** MsgRegisterInterchainQueryResponse id. */ - public id: Long; - - /** - * Encodes the specified MsgRegisterInterchainQueryResponse message. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQueryResponse.verify|verify} messages. - * @param message MsgRegisterInterchainQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgRegisterInterchainQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterInterchainQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRegisterInterchainQueryResponse.verify|verify} messages. - * @param message MsgRegisterInterchainQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgRegisterInterchainQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterInterchainQueryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgRegisterInterchainQueryResponse; - - /** - * Decodes a MsgRegisterInterchainQueryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgRegisterInterchainQueryResponse; - - /** - * Verifies a MsgRegisterInterchainQueryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterInterchainQueryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterInterchainQueryResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgRegisterInterchainQueryResponse; - - /** - * Creates a plain object from a MsgRegisterInterchainQueryResponse message. Also converts values to other types if specified. - * @param message MsgRegisterInterchainQueryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgRegisterInterchainQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterInterchainQueryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitQueryResult. */ - interface IMsgSubmitQueryResult { - - /** MsgSubmitQueryResult query_id */ - query_id?: (Long|null); - - /** MsgSubmitQueryResult sender */ - sender?: (string|null); - - /** MsgSubmitQueryResult client_id */ - client_id?: (string|null); - - /** MsgSubmitQueryResult result */ - result?: (neutron.interchainqueries.IQueryResult|null); - } - - /** Represents a MsgSubmitQueryResult. */ - class MsgSubmitQueryResult implements IMsgSubmitQueryResult { - - /** - * Constructs a new MsgSubmitQueryResult. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgSubmitQueryResult); - - /** MsgSubmitQueryResult query_id. */ - public query_id: Long; - - /** MsgSubmitQueryResult sender. */ - public sender: string; - - /** MsgSubmitQueryResult client_id. */ - public client_id: string; - - /** MsgSubmitQueryResult result. */ - public result?: (neutron.interchainqueries.IQueryResult|null); - - /** - * Encodes the specified MsgSubmitQueryResult message. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResult.verify|verify} messages. - * @param message MsgSubmitQueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgSubmitQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitQueryResult message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResult.verify|verify} messages. - * @param message MsgSubmitQueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgSubmitQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitQueryResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgSubmitQueryResult; - - /** - * Decodes a MsgSubmitQueryResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitQueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgSubmitQueryResult; - - /** - * Verifies a MsgSubmitQueryResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitQueryResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitQueryResult - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgSubmitQueryResult; - - /** - * Creates a plain object from a MsgSubmitQueryResult message. Also converts values to other types if specified. - * @param message MsgSubmitQueryResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgSubmitQueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitQueryResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryResult. */ - interface IQueryResult { - - /** QueryResult kv_results */ - kv_results?: (neutron.interchainqueries.IStorageValue[]|null); - - /** QueryResult block */ - block?: (neutron.interchainqueries.IBlock|null); - - /** QueryResult height */ - height?: (Long|null); - - /** QueryResult revision */ - revision?: (Long|null); - - /** QueryResult allow_kv_callbacks */ - allow_kv_callbacks?: (boolean|null); - } - - /** Represents a QueryResult. */ - class QueryResult implements IQueryResult { - - /** - * Constructs a new QueryResult. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryResult); - - /** QueryResult kv_results. */ - public kv_results: neutron.interchainqueries.IStorageValue[]; - - /** QueryResult block. */ - public block?: (neutron.interchainqueries.IBlock|null); - - /** QueryResult height. */ - public height: Long; - - /** QueryResult revision. */ - public revision: Long; - - /** QueryResult allow_kv_callbacks. */ - public allow_kv_callbacks: boolean; - - /** - * Encodes the specified QueryResult message. Does not implicitly {@link neutron.interchainqueries.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryResult message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryResult.verify|verify} messages. - * @param message QueryResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryResult; - - /** - * Decodes a QueryResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryResult; - - /** - * Verifies a QueryResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryResult - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryResult; - - /** - * Creates a plain object from a QueryResult message. Also converts values to other types if specified. - * @param message QueryResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a StorageValue. */ - interface IStorageValue { - - /** StorageValue storage_prefix */ - storage_prefix?: (string|null); - - /** StorageValue key */ - key?: (Uint8Array|null); - - /** StorageValue value */ - value?: (Uint8Array|null); - - /** StorageValue Proof */ - Proof?: (tendermint.crypto.IProofOps|null); - } - - /** Represents a StorageValue. */ - class StorageValue implements IStorageValue { - - /** - * Constructs a new StorageValue. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IStorageValue); - - /** StorageValue storage_prefix. */ - public storage_prefix: string; - - /** StorageValue key. */ - public key: Uint8Array; - - /** StorageValue value. */ - public value: Uint8Array; - - /** StorageValue Proof. */ - public Proof?: (tendermint.crypto.IProofOps|null); - - /** - * Encodes the specified StorageValue message. Does not implicitly {@link neutron.interchainqueries.StorageValue.verify|verify} messages. - * @param message StorageValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IStorageValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageValue message, length delimited. Does not implicitly {@link neutron.interchainqueries.StorageValue.verify|verify} messages. - * @param message StorageValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IStorageValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.StorageValue; - - /** - * Decodes a StorageValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.StorageValue; - - /** - * Verifies a StorageValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageValue - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.StorageValue; - - /** - * Creates a plain object from a StorageValue message. Also converts values to other types if specified. - * @param message StorageValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.StorageValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Block. */ - interface IBlock { - - /** Block next_block_header */ - next_block_header?: (google.protobuf.IAny|null); - - /** Block header */ - header?: (google.protobuf.IAny|null); - - /** Block tx */ - tx?: (neutron.interchainqueries.ITxValue|null); - } - - /** Represents a Block. */ - class Block implements IBlock { - - /** - * Constructs a new Block. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IBlock); - - /** Block next_block_header. */ - public next_block_header?: (google.protobuf.IAny|null); - - /** Block header. */ - public header?: (google.protobuf.IAny|null); - - /** Block tx. */ - public tx?: (neutron.interchainqueries.ITxValue|null); - - /** - * Encodes the specified Block message. Does not implicitly {@link neutron.interchainqueries.Block.verify|verify} messages. - * @param message Block message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Block message, length delimited. Does not implicitly {@link neutron.interchainqueries.Block.verify|verify} messages. - * @param message Block message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Block message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Block - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.Block; - - /** - * Decodes a Block message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Block - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.Block; - - /** - * Verifies a Block message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Block message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Block - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.Block; - - /** - * Creates a plain object from a Block message. Also converts values to other types if specified. - * @param message Block - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.Block, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Block to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TxValue. */ - interface ITxValue { - - /** TxValue response */ - response?: (tendermint.abci.IResponseDeliverTx|null); - - /** TxValue delivery_proof */ - delivery_proof?: (tendermint.crypto.IProof|null); - - /** TxValue inclusion_proof */ - inclusion_proof?: (tendermint.crypto.IProof|null); - - /** TxValue data */ - data?: (Uint8Array|null); - } - - /** Represents a TxValue. */ - class TxValue implements ITxValue { - - /** - * Constructs a new TxValue. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.ITxValue); - - /** TxValue response. */ - public response?: (tendermint.abci.IResponseDeliverTx|null); - - /** TxValue delivery_proof. */ - public delivery_proof?: (tendermint.crypto.IProof|null); - - /** TxValue inclusion_proof. */ - public inclusion_proof?: (tendermint.crypto.IProof|null); - - /** TxValue data. */ - public data: Uint8Array; - - /** - * Encodes the specified TxValue message. Does not implicitly {@link neutron.interchainqueries.TxValue.verify|verify} messages. - * @param message TxValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.ITxValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxValue message, length delimited. Does not implicitly {@link neutron.interchainqueries.TxValue.verify|verify} messages. - * @param message TxValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.ITxValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TxValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.TxValue; - - /** - * Decodes a TxValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TxValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.TxValue; - - /** - * Verifies a TxValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TxValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxValue - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.TxValue; - - /** - * Creates a plain object from a TxValue message. Also converts values to other types if specified. - * @param message TxValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.TxValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TxValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitQueryResultResponse. */ - interface IMsgSubmitQueryResultResponse { - } - - /** Represents a MsgSubmitQueryResultResponse. */ - class MsgSubmitQueryResultResponse implements IMsgSubmitQueryResultResponse { - - /** - * Constructs a new MsgSubmitQueryResultResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgSubmitQueryResultResponse); - - /** - * Encodes the specified MsgSubmitQueryResultResponse message. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResultResponse.verify|verify} messages. - * @param message MsgSubmitQueryResultResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgSubmitQueryResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitQueryResultResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgSubmitQueryResultResponse.verify|verify} messages. - * @param message MsgSubmitQueryResultResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgSubmitQueryResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitQueryResultResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgSubmitQueryResultResponse; - - /** - * Decodes a MsgSubmitQueryResultResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgSubmitQueryResultResponse; - - /** - * Verifies a MsgSubmitQueryResultResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitQueryResultResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitQueryResultResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgSubmitQueryResultResponse; - - /** - * Creates a plain object from a MsgSubmitQueryResultResponse message. Also converts values to other types if specified. - * @param message MsgSubmitQueryResultResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgSubmitQueryResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitQueryResultResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRemoveInterchainQueryRequest. */ - interface IMsgRemoveInterchainQueryRequest { - - /** MsgRemoveInterchainQueryRequest query_id */ - query_id?: (Long|null); - - /** MsgRemoveInterchainQueryRequest sender */ - sender?: (string|null); - } - - /** Represents a MsgRemoveInterchainQueryRequest. */ - class MsgRemoveInterchainQueryRequest implements IMsgRemoveInterchainQueryRequest { - - /** - * Constructs a new MsgRemoveInterchainQueryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgRemoveInterchainQueryRequest); - - /** MsgRemoveInterchainQueryRequest query_id. */ - public query_id: Long; - - /** MsgRemoveInterchainQueryRequest sender. */ - public sender: string; - - /** - * Encodes the specified MsgRemoveInterchainQueryRequest message. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryRequest.verify|verify} messages. - * @param message MsgRemoveInterchainQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgRemoveInterchainQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRemoveInterchainQueryRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryRequest.verify|verify} messages. - * @param message MsgRemoveInterchainQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgRemoveInterchainQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRemoveInterchainQueryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRemoveInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgRemoveInterchainQueryRequest; - - /** - * Decodes a MsgRemoveInterchainQueryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRemoveInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgRemoveInterchainQueryRequest; - - /** - * Verifies a MsgRemoveInterchainQueryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRemoveInterchainQueryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRemoveInterchainQueryRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgRemoveInterchainQueryRequest; - - /** - * Creates a plain object from a MsgRemoveInterchainQueryRequest message. Also converts values to other types if specified. - * @param message MsgRemoveInterchainQueryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgRemoveInterchainQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRemoveInterchainQueryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRemoveInterchainQueryResponse. */ - interface IMsgRemoveInterchainQueryResponse { - } - - /** Represents a MsgRemoveInterchainQueryResponse. */ - class MsgRemoveInterchainQueryResponse implements IMsgRemoveInterchainQueryResponse { - - /** - * Constructs a new MsgRemoveInterchainQueryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgRemoveInterchainQueryResponse); - - /** - * Encodes the specified MsgRemoveInterchainQueryResponse message. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryResponse.verify|verify} messages. - * @param message MsgRemoveInterchainQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgRemoveInterchainQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRemoveInterchainQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgRemoveInterchainQueryResponse.verify|verify} messages. - * @param message MsgRemoveInterchainQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgRemoveInterchainQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRemoveInterchainQueryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRemoveInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgRemoveInterchainQueryResponse; - - /** - * Decodes a MsgRemoveInterchainQueryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRemoveInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgRemoveInterchainQueryResponse; - - /** - * Verifies a MsgRemoveInterchainQueryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRemoveInterchainQueryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRemoveInterchainQueryResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgRemoveInterchainQueryResponse; - - /** - * Creates a plain object from a MsgRemoveInterchainQueryResponse message. Also converts values to other types if specified. - * @param message MsgRemoveInterchainQueryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgRemoveInterchainQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRemoveInterchainQueryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateInterchainQueryRequest. */ - interface IMsgUpdateInterchainQueryRequest { - - /** MsgUpdateInterchainQueryRequest query_id */ - query_id?: (Long|null); - - /** MsgUpdateInterchainQueryRequest new_keys */ - new_keys?: (neutron.interchainqueries.IKVKey[]|null); - - /** MsgUpdateInterchainQueryRequest new_update_period */ - new_update_period?: (Long|null); - - /** MsgUpdateInterchainQueryRequest new_transactions_filter */ - new_transactions_filter?: (string|null); - - /** MsgUpdateInterchainQueryRequest sender */ - sender?: (string|null); - } - - /** Represents a MsgUpdateInterchainQueryRequest. */ - class MsgUpdateInterchainQueryRequest implements IMsgUpdateInterchainQueryRequest { - - /** - * Constructs a new MsgUpdateInterchainQueryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgUpdateInterchainQueryRequest); - - /** MsgUpdateInterchainQueryRequest query_id. */ - public query_id: Long; - - /** MsgUpdateInterchainQueryRequest new_keys. */ - public new_keys: neutron.interchainqueries.IKVKey[]; - - /** MsgUpdateInterchainQueryRequest new_update_period. */ - public new_update_period: Long; - - /** MsgUpdateInterchainQueryRequest new_transactions_filter. */ - public new_transactions_filter: string; - - /** MsgUpdateInterchainQueryRequest sender. */ - public sender: string; - - /** - * Encodes the specified MsgUpdateInterchainQueryRequest message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryRequest.verify|verify} messages. - * @param message MsgUpdateInterchainQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgUpdateInterchainQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateInterchainQueryRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryRequest.verify|verify} messages. - * @param message MsgUpdateInterchainQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgUpdateInterchainQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateInterchainQueryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgUpdateInterchainQueryRequest; - - /** - * Decodes a MsgUpdateInterchainQueryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateInterchainQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgUpdateInterchainQueryRequest; - - /** - * Verifies a MsgUpdateInterchainQueryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateInterchainQueryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateInterchainQueryRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgUpdateInterchainQueryRequest; - - /** - * Creates a plain object from a MsgUpdateInterchainQueryRequest message. Also converts values to other types if specified. - * @param message MsgUpdateInterchainQueryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgUpdateInterchainQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateInterchainQueryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateInterchainQueryResponse. */ - interface IMsgUpdateInterchainQueryResponse { - } - - /** Represents a MsgUpdateInterchainQueryResponse. */ - class MsgUpdateInterchainQueryResponse implements IMsgUpdateInterchainQueryResponse { - - /** - * Constructs a new MsgUpdateInterchainQueryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgUpdateInterchainQueryResponse); - - /** - * Encodes the specified MsgUpdateInterchainQueryResponse message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryResponse.verify|verify} messages. - * @param message MsgUpdateInterchainQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgUpdateInterchainQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateInterchainQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateInterchainQueryResponse.verify|verify} messages. - * @param message MsgUpdateInterchainQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgUpdateInterchainQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateInterchainQueryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgUpdateInterchainQueryResponse; - - /** - * Decodes a MsgUpdateInterchainQueryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateInterchainQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgUpdateInterchainQueryResponse; - - /** - * Verifies a MsgUpdateInterchainQueryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateInterchainQueryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateInterchainQueryResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgUpdateInterchainQueryResponse; - - /** - * Creates a plain object from a MsgUpdateInterchainQueryResponse message. Also converts values to other types if specified. - * @param message MsgUpdateInterchainQueryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgUpdateInterchainQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateInterchainQueryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (neutron.interchainqueries.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (neutron.interchainqueries.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params query_submit_timeout */ - query_submit_timeout?: (Long|null); - - /** Params query_deposit */ - query_deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Params tx_query_removal_limit */ - tx_query_removal_limit?: (Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IParams); - - /** Params query_submit_timeout. */ - public query_submit_timeout: Long; - - /** Params query_deposit. */ - public query_deposit: cosmos.base.v1beta1.ICoin[]; - - /** Params tx_query_removal_limit. */ - public tx_query_removal_limit: Long; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.interchainqueries.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: neutron.interchainqueries.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.interchainqueries.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: neutron.interchainqueries.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): neutron.interchainqueries.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)): neutron.interchainqueries.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 }): neutron.interchainqueries.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: neutron.interchainqueries.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RegisteredQuery. */ - interface IRegisteredQuery { - - /** RegisteredQuery id */ - id?: (Long|null); - - /** RegisteredQuery owner */ - owner?: (string|null); - - /** RegisteredQuery query_type */ - query_type?: (string|null); - - /** RegisteredQuery keys */ - keys?: (neutron.interchainqueries.IKVKey[]|null); - - /** RegisteredQuery transactions_filter */ - transactions_filter?: (string|null); - - /** RegisteredQuery connection_id */ - connection_id?: (string|null); - - /** RegisteredQuery update_period */ - update_period?: (Long|null); - - /** RegisteredQuery last_submitted_result_local_height */ - last_submitted_result_local_height?: (Long|null); - - /** RegisteredQuery last_submitted_result_remote_height */ - last_submitted_result_remote_height?: (ibc.core.client.v1.IHeight|null); - - /** RegisteredQuery deposit */ - deposit?: (cosmos.base.v1beta1.ICoin[]|null); - - /** RegisteredQuery submit_timeout */ - submit_timeout?: (Long|null); - - /** RegisteredQuery registered_at_height */ - registered_at_height?: (Long|null); - } - - /** Represents a RegisteredQuery. */ - class RegisteredQuery implements IRegisteredQuery { - - /** - * Constructs a new RegisteredQuery. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IRegisteredQuery); - - /** RegisteredQuery id. */ - public id: Long; - - /** RegisteredQuery owner. */ - public owner: string; - - /** RegisteredQuery query_type. */ - public query_type: string; - - /** RegisteredQuery keys. */ - public keys: neutron.interchainqueries.IKVKey[]; - - /** RegisteredQuery transactions_filter. */ - public transactions_filter: string; - - /** RegisteredQuery connection_id. */ - public connection_id: string; - - /** RegisteredQuery update_period. */ - public update_period: Long; - - /** RegisteredQuery last_submitted_result_local_height. */ - public last_submitted_result_local_height: Long; - - /** RegisteredQuery last_submitted_result_remote_height. */ - public last_submitted_result_remote_height?: (ibc.core.client.v1.IHeight|null); - - /** RegisteredQuery deposit. */ - public deposit: cosmos.base.v1beta1.ICoin[]; - - /** RegisteredQuery submit_timeout. */ - public submit_timeout: Long; - - /** RegisteredQuery registered_at_height. */ - public registered_at_height: Long; - - /** - * Encodes the specified RegisteredQuery message. Does not implicitly {@link neutron.interchainqueries.RegisteredQuery.verify|verify} messages. - * @param message RegisteredQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IRegisteredQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RegisteredQuery message, length delimited. Does not implicitly {@link neutron.interchainqueries.RegisteredQuery.verify|verify} messages. - * @param message RegisteredQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IRegisteredQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RegisteredQuery message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RegisteredQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.RegisteredQuery; - - /** - * Decodes a RegisteredQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RegisteredQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.RegisteredQuery; - - /** - * Verifies a RegisteredQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RegisteredQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RegisteredQuery - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.RegisteredQuery; - - /** - * Creates a plain object from a RegisteredQuery message. Also converts values to other types if specified. - * @param message RegisteredQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.RegisteredQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RegisteredQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a KVKey. */ - interface IKVKey { - - /** KVKey path */ - path?: (string|null); - - /** KVKey key */ - key?: (Uint8Array|null); - } - - /** Represents a KVKey. */ - class KVKey implements IKVKey { - - /** - * Constructs a new KVKey. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IKVKey); - - /** KVKey path. */ - public path: string; - - /** KVKey key. */ - public key: Uint8Array; - - /** - * Encodes the specified KVKey message. Does not implicitly {@link neutron.interchainqueries.KVKey.verify|verify} messages. - * @param message KVKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IKVKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KVKey message, length delimited. Does not implicitly {@link neutron.interchainqueries.KVKey.verify|verify} messages. - * @param message KVKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IKVKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KVKey message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KVKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.KVKey; - - /** - * Decodes a KVKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KVKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.KVKey; - - /** - * Verifies a KVKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KVKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KVKey - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.KVKey; - - /** - * Creates a plain object from a KVKey message. Also converts values to other types if specified. - * @param message KVKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.KVKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KVKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (neutron.interchainqueries.IParams|null); - - /** GenesisState registered_queries */ - registered_queries?: (neutron.interchainqueries.IRegisteredQuery[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IGenesisState); - - /** GenesisState params. */ - public params?: (neutron.interchainqueries.IParams|null); - - /** GenesisState registered_queries. */ - public registered_queries: neutron.interchainqueries.IRegisteredQuery[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.interchainqueries.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.interchainqueries.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: neutron.interchainqueries.IQueryParamsRequest, callback: neutron.interchainqueries.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: neutron.interchainqueries.IQueryParamsRequest): Promise; - - /** - * Calls RegisteredQueries. - * @param request QueryRegisteredQueriesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryRegisteredQueriesResponse - */ - public registeredQueries(request: neutron.interchainqueries.IQueryRegisteredQueriesRequest, callback: neutron.interchainqueries.Query.RegisteredQueriesCallback): void; - - /** - * Calls RegisteredQueries. - * @param request QueryRegisteredQueriesRequest message or plain object - * @returns Promise - */ - public registeredQueries(request: neutron.interchainqueries.IQueryRegisteredQueriesRequest): Promise; - - /** - * Calls RegisteredQuery. - * @param request QueryRegisteredQueryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryRegisteredQueryResponse - */ - public registeredQuery(request: neutron.interchainqueries.IQueryRegisteredQueryRequest, callback: neutron.interchainqueries.Query.RegisteredQueryCallback): void; - - /** - * Calls RegisteredQuery. - * @param request QueryRegisteredQueryRequest message or plain object - * @returns Promise - */ - public registeredQuery(request: neutron.interchainqueries.IQueryRegisteredQueryRequest): Promise; - - /** - * Calls QueryResult. - * @param request QueryRegisteredQueryResultRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryRegisteredQueryResultResponse - */ - public queryResult(request: neutron.interchainqueries.IQueryRegisteredQueryResultRequest, callback: neutron.interchainqueries.Query.QueryResultCallback): void; - - /** - * Calls QueryResult. - * @param request QueryRegisteredQueryResultRequest message or plain object - * @returns Promise - */ - public queryResult(request: neutron.interchainqueries.IQueryRegisteredQueryResultRequest): Promise; - - /** - * Calls LastRemoteHeight. - * @param request QueryLastRemoteHeight message or plain object - * @param callback Node-style callback called with the error, if any, and QueryLastRemoteHeightResponse - */ - public lastRemoteHeight(request: neutron.interchainqueries.IQueryLastRemoteHeight, callback: neutron.interchainqueries.Query.LastRemoteHeightCallback): void; - - /** - * Calls LastRemoteHeight. - * @param request QueryLastRemoteHeight message or plain object - * @returns Promise - */ - public lastRemoteHeight(request: neutron.interchainqueries.IQueryLastRemoteHeight): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.interchainqueries.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: neutron.interchainqueries.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Query#registeredQueries}. - * @param error Error, if any - * @param [response] QueryRegisteredQueriesResponse - */ - type RegisteredQueriesCallback = (error: (Error|null), response?: neutron.interchainqueries.QueryRegisteredQueriesResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Query#registeredQuery}. - * @param error Error, if any - * @param [response] QueryRegisteredQueryResponse - */ - type RegisteredQueryCallback = (error: (Error|null), response?: neutron.interchainqueries.QueryRegisteredQueryResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Query#queryResult}. - * @param error Error, if any - * @param [response] QueryRegisteredQueryResultResponse - */ - type QueryResultCallback = (error: (Error|null), response?: neutron.interchainqueries.QueryRegisteredQueryResultResponse) => void; - - /** - * Callback as used by {@link neutron.interchainqueries.Query#lastRemoteHeight}. - * @param error Error, if any - * @param [response] QueryLastRemoteHeightResponse - */ - type LastRemoteHeightCallback = (error: (Error|null), response?: neutron.interchainqueries.QueryLastRemoteHeightResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.interchainqueries.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (neutron.interchainqueries.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (neutron.interchainqueries.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.interchainqueries.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryRegisteredQueriesRequest. */ - interface IQueryRegisteredQueriesRequest { - - /** QueryRegisteredQueriesRequest owners */ - owners?: (string[]|null); - - /** QueryRegisteredQueriesRequest connection_id */ - connection_id?: (string|null); - - /** QueryRegisteredQueriesRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryRegisteredQueriesRequest. */ - class QueryRegisteredQueriesRequest implements IQueryRegisteredQueriesRequest { - - /** - * Constructs a new QueryRegisteredQueriesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryRegisteredQueriesRequest); - - /** QueryRegisteredQueriesRequest owners. */ - public owners: string[]; - - /** QueryRegisteredQueriesRequest connection_id. */ - public connection_id: string; - - /** QueryRegisteredQueriesRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryRegisteredQueriesRequest message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesRequest.verify|verify} messages. - * @param message QueryRegisteredQueriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryRegisteredQueriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRegisteredQueriesRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesRequest.verify|verify} messages. - * @param message QueryRegisteredQueriesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryRegisteredQueriesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRegisteredQueriesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRegisteredQueriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryRegisteredQueriesRequest; - - /** - * Decodes a QueryRegisteredQueriesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRegisteredQueriesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryRegisteredQueriesRequest; - - /** - * Verifies a QueryRegisteredQueriesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryRegisteredQueriesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRegisteredQueriesRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryRegisteredQueriesRequest; - - /** - * Creates a plain object from a QueryRegisteredQueriesRequest message. Also converts values to other types if specified. - * @param message QueryRegisteredQueriesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryRegisteredQueriesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRegisteredQueriesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryRegisteredQueriesResponse. */ - interface IQueryRegisteredQueriesResponse { - - /** QueryRegisteredQueriesResponse registered_queries */ - registered_queries?: (neutron.interchainqueries.IRegisteredQuery[]|null); - - /** QueryRegisteredQueriesResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryRegisteredQueriesResponse. */ - class QueryRegisteredQueriesResponse implements IQueryRegisteredQueriesResponse { - - /** - * Constructs a new QueryRegisteredQueriesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryRegisteredQueriesResponse); - - /** QueryRegisteredQueriesResponse registered_queries. */ - public registered_queries: neutron.interchainqueries.IRegisteredQuery[]; - - /** QueryRegisteredQueriesResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryRegisteredQueriesResponse message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesResponse.verify|verify} messages. - * @param message QueryRegisteredQueriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryRegisteredQueriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRegisteredQueriesResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueriesResponse.verify|verify} messages. - * @param message QueryRegisteredQueriesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryRegisteredQueriesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRegisteredQueriesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRegisteredQueriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryRegisteredQueriesResponse; - - /** - * Decodes a QueryRegisteredQueriesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRegisteredQueriesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryRegisteredQueriesResponse; - - /** - * Verifies a QueryRegisteredQueriesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryRegisteredQueriesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRegisteredQueriesResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryRegisteredQueriesResponse; - - /** - * Creates a plain object from a QueryRegisteredQueriesResponse message. Also converts values to other types if specified. - * @param message QueryRegisteredQueriesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryRegisteredQueriesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRegisteredQueriesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryRegisteredQueryRequest. */ - interface IQueryRegisteredQueryRequest { - - /** QueryRegisteredQueryRequest query_id */ - query_id?: (Long|null); - } - - /** Represents a QueryRegisteredQueryRequest. */ - class QueryRegisteredQueryRequest implements IQueryRegisteredQueryRequest { - - /** - * Constructs a new QueryRegisteredQueryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryRegisteredQueryRequest); - - /** QueryRegisteredQueryRequest query_id. */ - public query_id: Long; - - /** - * Encodes the specified QueryRegisteredQueryRequest message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryRequest.verify|verify} messages. - * @param message QueryRegisteredQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryRegisteredQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRegisteredQueryRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryRequest.verify|verify} messages. - * @param message QueryRegisteredQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryRegisteredQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRegisteredQueryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRegisteredQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryRegisteredQueryRequest; - - /** - * Decodes a QueryRegisteredQueryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRegisteredQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryRegisteredQueryRequest; - - /** - * Verifies a QueryRegisteredQueryRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryRegisteredQueryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRegisteredQueryRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryRegisteredQueryRequest; - - /** - * Creates a plain object from a QueryRegisteredQueryRequest message. Also converts values to other types if specified. - * @param message QueryRegisteredQueryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryRegisteredQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRegisteredQueryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryRegisteredQueryResponse. */ - interface IQueryRegisteredQueryResponse { - - /** QueryRegisteredQueryResponse registered_query */ - registered_query?: (neutron.interchainqueries.IRegisteredQuery|null); - } - - /** Represents a QueryRegisteredQueryResponse. */ - class QueryRegisteredQueryResponse implements IQueryRegisteredQueryResponse { - - /** - * Constructs a new QueryRegisteredQueryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryRegisteredQueryResponse); - - /** QueryRegisteredQueryResponse registered_query. */ - public registered_query?: (neutron.interchainqueries.IRegisteredQuery|null); - - /** - * Encodes the specified QueryRegisteredQueryResponse message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResponse.verify|verify} messages. - * @param message QueryRegisteredQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryRegisteredQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRegisteredQueryResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResponse.verify|verify} messages. - * @param message QueryRegisteredQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryRegisteredQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRegisteredQueryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRegisteredQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryRegisteredQueryResponse; - - /** - * Decodes a QueryRegisteredQueryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRegisteredQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryRegisteredQueryResponse; - - /** - * Verifies a QueryRegisteredQueryResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryRegisteredQueryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRegisteredQueryResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryRegisteredQueryResponse; - - /** - * Creates a plain object from a QueryRegisteredQueryResponse message. Also converts values to other types if specified. - * @param message QueryRegisteredQueryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryRegisteredQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRegisteredQueryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryRegisteredQueryResultRequest. */ - interface IQueryRegisteredQueryResultRequest { - - /** QueryRegisteredQueryResultRequest query_id */ - query_id?: (Long|null); - } - - /** Represents a QueryRegisteredQueryResultRequest. */ - class QueryRegisteredQueryResultRequest implements IQueryRegisteredQueryResultRequest { - - /** - * Constructs a new QueryRegisteredQueryResultRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryRegisteredQueryResultRequest); - - /** QueryRegisteredQueryResultRequest query_id. */ - public query_id: Long; - - /** - * Encodes the specified QueryRegisteredQueryResultRequest message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultRequest.verify|verify} messages. - * @param message QueryRegisteredQueryResultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryRegisteredQueryResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRegisteredQueryResultRequest message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultRequest.verify|verify} messages. - * @param message QueryRegisteredQueryResultRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryRegisteredQueryResultRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRegisteredQueryResultRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRegisteredQueryResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryRegisteredQueryResultRequest; - - /** - * Decodes a QueryRegisteredQueryResultRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRegisteredQueryResultRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryRegisteredQueryResultRequest; - - /** - * Verifies a QueryRegisteredQueryResultRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryRegisteredQueryResultRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRegisteredQueryResultRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryRegisteredQueryResultRequest; - - /** - * Creates a plain object from a QueryRegisteredQueryResultRequest message. Also converts values to other types if specified. - * @param message QueryRegisteredQueryResultRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryRegisteredQueryResultRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRegisteredQueryResultRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryRegisteredQueryResultResponse. */ - interface IQueryRegisteredQueryResultResponse { - - /** QueryRegisteredQueryResultResponse result */ - result?: (neutron.interchainqueries.IQueryResult|null); - } - - /** Represents a QueryRegisteredQueryResultResponse. */ - class QueryRegisteredQueryResultResponse implements IQueryRegisteredQueryResultResponse { - - /** - * Constructs a new QueryRegisteredQueryResultResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryRegisteredQueryResultResponse); - - /** QueryRegisteredQueryResultResponse result. */ - public result?: (neutron.interchainqueries.IQueryResult|null); - - /** - * Encodes the specified QueryRegisteredQueryResultResponse message. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultResponse.verify|verify} messages. - * @param message QueryRegisteredQueryResultResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryRegisteredQueryResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryRegisteredQueryResultResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryRegisteredQueryResultResponse.verify|verify} messages. - * @param message QueryRegisteredQueryResultResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryRegisteredQueryResultResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryRegisteredQueryResultResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryRegisteredQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryRegisteredQueryResultResponse; - - /** - * Decodes a QueryRegisteredQueryResultResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryRegisteredQueryResultResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryRegisteredQueryResultResponse; - - /** - * Verifies a QueryRegisteredQueryResultResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryRegisteredQueryResultResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryRegisteredQueryResultResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryRegisteredQueryResultResponse; - - /** - * Creates a plain object from a QueryRegisteredQueryResultResponse message. Also converts values to other types if specified. - * @param message QueryRegisteredQueryResultResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryRegisteredQueryResultResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryRegisteredQueryResultResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Transaction. */ - interface ITransaction { - - /** Transaction id */ - id?: (Long|null); - - /** Transaction height */ - height?: (Long|null); - - /** Transaction data */ - data?: (Uint8Array|null); - } - - /** Represents a Transaction. */ - class Transaction implements ITransaction { - - /** - * Constructs a new Transaction. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.ITransaction); - - /** Transaction id. */ - public id: Long; - - /** Transaction height. */ - public height: Long; - - /** Transaction data. */ - public data: Uint8Array; - - /** - * Encodes the specified Transaction message. Does not implicitly {@link neutron.interchainqueries.Transaction.verify|verify} messages. - * @param message Transaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.ITransaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Transaction message, length delimited. Does not implicitly {@link neutron.interchainqueries.Transaction.verify|verify} messages. - * @param message Transaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.ITransaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Transaction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.Transaction; - - /** - * Decodes a Transaction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.Transaction; - - /** - * Verifies a Transaction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Transaction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Transaction - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.Transaction; - - /** - * Creates a plain object from a Transaction message. Also converts values to other types if specified. - * @param message Transaction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.Transaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Transaction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryLastRemoteHeight. */ - interface IQueryLastRemoteHeight { - - /** QueryLastRemoteHeight connection_id */ - connection_id?: (string|null); - } - - /** Represents a QueryLastRemoteHeight. */ - class QueryLastRemoteHeight implements IQueryLastRemoteHeight { - - /** - * Constructs a new QueryLastRemoteHeight. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryLastRemoteHeight); - - /** QueryLastRemoteHeight connection_id. */ - public connection_id: string; - - /** - * Encodes the specified QueryLastRemoteHeight message. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeight.verify|verify} messages. - * @param message QueryLastRemoteHeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryLastRemoteHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryLastRemoteHeight message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeight.verify|verify} messages. - * @param message QueryLastRemoteHeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryLastRemoteHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryLastRemoteHeight message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryLastRemoteHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryLastRemoteHeight; - - /** - * Decodes a QueryLastRemoteHeight message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryLastRemoteHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryLastRemoteHeight; - - /** - * Verifies a QueryLastRemoteHeight message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryLastRemoteHeight message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryLastRemoteHeight - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryLastRemoteHeight; - - /** - * Creates a plain object from a QueryLastRemoteHeight message. Also converts values to other types if specified. - * @param message QueryLastRemoteHeight - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryLastRemoteHeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryLastRemoteHeight to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryLastRemoteHeightResponse. */ - interface IQueryLastRemoteHeightResponse { - - /** QueryLastRemoteHeightResponse height */ - height?: (Long|null); - } - - /** Represents a QueryLastRemoteHeightResponse. */ - class QueryLastRemoteHeightResponse implements IQueryLastRemoteHeightResponse { - - /** - * Constructs a new QueryLastRemoteHeightResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchainqueries.IQueryLastRemoteHeightResponse); - - /** QueryLastRemoteHeightResponse height. */ - public height: Long; - - /** - * Encodes the specified QueryLastRemoteHeightResponse message. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeightResponse.verify|verify} messages. - * @param message QueryLastRemoteHeightResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchainqueries.IQueryLastRemoteHeightResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryLastRemoteHeightResponse message, length delimited. Does not implicitly {@link neutron.interchainqueries.QueryLastRemoteHeightResponse.verify|verify} messages. - * @param message QueryLastRemoteHeightResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchainqueries.IQueryLastRemoteHeightResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryLastRemoteHeightResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryLastRemoteHeightResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchainqueries.QueryLastRemoteHeightResponse; - - /** - * Decodes a QueryLastRemoteHeightResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryLastRemoteHeightResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchainqueries.QueryLastRemoteHeightResponse; - - /** - * Verifies a QueryLastRemoteHeightResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryLastRemoteHeightResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryLastRemoteHeightResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchainqueries.QueryLastRemoteHeightResponse; - - /** - * Creates a plain object from a QueryLastRemoteHeightResponse message. Also converts values to other types if specified. - * @param message QueryLastRemoteHeightResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchainqueries.QueryLastRemoteHeightResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryLastRemoteHeightResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace interchaintxs. */ - namespace interchaintxs { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls RegisterInterchainAccount. - * @param request MsgRegisterInterchainAccount message or plain object - * @param callback Node-style callback called with the error, if any, and MsgRegisterInterchainAccountResponse - */ - public registerInterchainAccount(request: neutron.interchaintxs.v1.IMsgRegisterInterchainAccount, callback: neutron.interchaintxs.v1.Msg.RegisterInterchainAccountCallback): void; - - /** - * Calls RegisterInterchainAccount. - * @param request MsgRegisterInterchainAccount message or plain object - * @returns Promise - */ - public registerInterchainAccount(request: neutron.interchaintxs.v1.IMsgRegisterInterchainAccount): Promise; - - /** - * Calls SubmitTx. - * @param request MsgSubmitTx message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSubmitTxResponse - */ - public submitTx(request: neutron.interchaintxs.v1.IMsgSubmitTx, callback: neutron.interchaintxs.v1.Msg.SubmitTxCallback): void; - - /** - * Calls SubmitTx. - * @param request MsgSubmitTx message or plain object - * @returns Promise - */ - public submitTx(request: neutron.interchaintxs.v1.IMsgSubmitTx): Promise; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: neutron.interchaintxs.v1.IMsgUpdateParams, callback: neutron.interchaintxs.v1.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: neutron.interchaintxs.v1.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.interchaintxs.v1.Msg#registerInterchainAccount}. - * @param error Error, if any - * @param [response] MsgRegisterInterchainAccountResponse - */ - type RegisterInterchainAccountCallback = (error: (Error|null), response?: neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse) => void; - - /** - * Callback as used by {@link neutron.interchaintxs.v1.Msg#submitTx}. - * @param error Error, if any - * @param [response] MsgSubmitTxResponse - */ - type SubmitTxCallback = (error: (Error|null), response?: neutron.interchaintxs.v1.MsgSubmitTxResponse) => void; - - /** - * Callback as used by {@link neutron.interchaintxs.v1.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: neutron.interchaintxs.v1.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgRegisterInterchainAccount. */ - interface IMsgRegisterInterchainAccount { - - /** MsgRegisterInterchainAccount from_address */ - from_address?: (string|null); - - /** MsgRegisterInterchainAccount connection_id */ - connection_id?: (string|null); - - /** MsgRegisterInterchainAccount interchain_account_id */ - interchain_account_id?: (string|null); - } - - /** Represents a MsgRegisterInterchainAccount. */ - class MsgRegisterInterchainAccount implements IMsgRegisterInterchainAccount { - - /** - * Constructs a new MsgRegisterInterchainAccount. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.v1.IMsgRegisterInterchainAccount); - - /** MsgRegisterInterchainAccount from_address. */ - public from_address: string; - - /** MsgRegisterInterchainAccount connection_id. */ - public connection_id: string; - - /** MsgRegisterInterchainAccount interchain_account_id. */ - public interchain_account_id: string; - - /** - * Encodes the specified MsgRegisterInterchainAccount message. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @param message MsgRegisterInterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.v1.IMsgRegisterInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterInterchainAccount message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccount.verify|verify} messages. - * @param message MsgRegisterInterchainAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.v1.IMsgRegisterInterchainAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.v1.MsgRegisterInterchainAccount; - - /** - * Decodes a MsgRegisterInterchainAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterInterchainAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.v1.MsgRegisterInterchainAccount; - - /** - * Verifies a MsgRegisterInterchainAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterInterchainAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterInterchainAccount - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.v1.MsgRegisterInterchainAccount; - - /** - * Creates a plain object from a MsgRegisterInterchainAccount message. Also converts values to other types if specified. - * @param message MsgRegisterInterchainAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.v1.MsgRegisterInterchainAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterInterchainAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgRegisterInterchainAccountResponse. */ - interface IMsgRegisterInterchainAccountResponse { - } - - /** Represents a MsgRegisterInterchainAccountResponse. */ - class MsgRegisterInterchainAccountResponse implements IMsgRegisterInterchainAccountResponse { - - /** - * Constructs a new MsgRegisterInterchainAccountResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.v1.IMsgRegisterInterchainAccountResponse); - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @param message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.v1.IMsgRegisterInterchainAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgRegisterInterchainAccountResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse.verify|verify} messages. - * @param message MsgRegisterInterchainAccountResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.v1.IMsgRegisterInterchainAccountResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse; - - /** - * Decodes a MsgRegisterInterchainAccountResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgRegisterInterchainAccountResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse; - - /** - * Verifies a MsgRegisterInterchainAccountResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgRegisterInterchainAccountResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgRegisterInterchainAccountResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse; - - /** - * Creates a plain object from a MsgRegisterInterchainAccountResponse message. Also converts values to other types if specified. - * @param message MsgRegisterInterchainAccountResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.v1.MsgRegisterInterchainAccountResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgRegisterInterchainAccountResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitTx. */ - interface IMsgSubmitTx { - - /** MsgSubmitTx from_address */ - from_address?: (string|null); - - /** MsgSubmitTx interchain_account_id */ - interchain_account_id?: (string|null); - - /** MsgSubmitTx connection_id */ - connection_id?: (string|null); - - /** MsgSubmitTx msgs */ - msgs?: (google.protobuf.IAny[]|null); - - /** MsgSubmitTx memo */ - memo?: (string|null); - - /** MsgSubmitTx timeout */ - timeout?: (Long|null); - - /** MsgSubmitTx fee */ - fee?: (neutron.feerefunder.IFee|null); - } - - /** Represents a MsgSubmitTx. */ - class MsgSubmitTx implements IMsgSubmitTx { - - /** - * Constructs a new MsgSubmitTx. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.v1.IMsgSubmitTx); - - /** MsgSubmitTx from_address. */ - public from_address: string; - - /** MsgSubmitTx interchain_account_id. */ - public interchain_account_id: string; - - /** MsgSubmitTx connection_id. */ - public connection_id: string; - - /** MsgSubmitTx msgs. */ - public msgs: google.protobuf.IAny[]; - - /** MsgSubmitTx memo. */ - public memo: string; - - /** MsgSubmitTx timeout. */ - public timeout: Long; - - /** MsgSubmitTx fee. */ - public fee?: (neutron.feerefunder.IFee|null); - - /** - * Encodes the specified MsgSubmitTx message. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTx.verify|verify} messages. - * @param message MsgSubmitTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.v1.IMsgSubmitTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitTx message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTx.verify|verify} messages. - * @param message MsgSubmitTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.v1.IMsgSubmitTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.v1.MsgSubmitTx; - - /** - * Decodes a MsgSubmitTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.v1.MsgSubmitTx; - - /** - * Verifies a MsgSubmitTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitTx - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.v1.MsgSubmitTx; - - /** - * Creates a plain object from a MsgSubmitTx message. Also converts values to other types if specified. - * @param message MsgSubmitTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.v1.MsgSubmitTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSubmitTxResponse. */ - interface IMsgSubmitTxResponse { - - /** MsgSubmitTxResponse sequence_id */ - sequence_id?: (Long|null); - - /** MsgSubmitTxResponse channel */ - channel?: (string|null); - } - - /** Represents a MsgSubmitTxResponse. */ - class MsgSubmitTxResponse implements IMsgSubmitTxResponse { - - /** - * Constructs a new MsgSubmitTxResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.v1.IMsgSubmitTxResponse); - - /** MsgSubmitTxResponse sequence_id. */ - public sequence_id: Long; - - /** MsgSubmitTxResponse channel. */ - public channel: string; - - /** - * Encodes the specified MsgSubmitTxResponse message. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTxResponse.verify|verify} messages. - * @param message MsgSubmitTxResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.v1.IMsgSubmitTxResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitTxResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgSubmitTxResponse.verify|verify} messages. - * @param message MsgSubmitTxResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.v1.IMsgSubmitTxResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitTxResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.v1.MsgSubmitTxResponse; - - /** - * Decodes a MsgSubmitTxResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitTxResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.v1.MsgSubmitTxResponse; - - /** - * Verifies a MsgSubmitTxResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitTxResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitTxResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.v1.MsgSubmitTxResponse; - - /** - * Creates a plain object from a MsgSubmitTxResponse message. Also converts values to other types if specified. - * @param message MsgSubmitTxResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.v1.MsgSubmitTxResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitTxResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (neutron.interchaintxs.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.v1.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (neutron.interchaintxs.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.v1.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.v1.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.v1.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.v1.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.v1.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.v1.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.v1.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.v1.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.v1.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.v1.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.v1.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.v1.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.v1.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.v1.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a Params. */ - interface IParams { - - /** Params msg_submit_tx_max_messages */ - msg_submit_tx_max_messages?: (Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.IParams); - - /** Params msg_submit_tx_max_messages. */ - public msg_submit_tx_max_messages: Long; - - /** - * Encodes the specified Params message. Does not implicitly {@link neutron.interchaintxs.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: neutron.interchaintxs.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link neutron.interchaintxs.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: neutron.interchaintxs.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): neutron.interchaintxs.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)): neutron.interchaintxs.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 }): neutron.interchaintxs.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: neutron.interchaintxs.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: neutron.interchaintxs.IQueryParamsRequest, callback: neutron.interchaintxs.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: neutron.interchaintxs.IQueryParamsRequest): Promise; - - /** - * Calls InterchainAccountAddress. - * @param request QueryInterchainAccountAddressRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryInterchainAccountAddressResponse - */ - public interchainAccountAddress(request: neutron.interchaintxs.IQueryInterchainAccountAddressRequest, callback: neutron.interchaintxs.Query.InterchainAccountAddressCallback): void; - - /** - * Calls InterchainAccountAddress. - * @param request QueryInterchainAccountAddressRequest message or plain object - * @returns Promise - */ - public interchainAccountAddress(request: neutron.interchaintxs.IQueryInterchainAccountAddressRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.interchaintxs.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: neutron.interchaintxs.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.interchaintxs.Query#interchainAccountAddress}. - * @param error Error, if any - * @param [response] QueryInterchainAccountAddressResponse - */ - type InterchainAccountAddressCallback = (error: (Error|null), response?: neutron.interchaintxs.QueryInterchainAccountAddressResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link neutron.interchaintxs.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (neutron.interchaintxs.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (neutron.interchaintxs.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link neutron.interchaintxs.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryInterchainAccountAddressRequest. */ - interface IQueryInterchainAccountAddressRequest { - - /** QueryInterchainAccountAddressRequest owner_address */ - owner_address?: (string|null); - - /** QueryInterchainAccountAddressRequest interchain_account_id */ - interchain_account_id?: (string|null); - - /** QueryInterchainAccountAddressRequest connection_id */ - connection_id?: (string|null); - } - - /** Represents a QueryInterchainAccountAddressRequest. */ - class QueryInterchainAccountAddressRequest implements IQueryInterchainAccountAddressRequest { - - /** - * Constructs a new QueryInterchainAccountAddressRequest. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.IQueryInterchainAccountAddressRequest); - - /** QueryInterchainAccountAddressRequest owner_address. */ - public owner_address: string; - - /** QueryInterchainAccountAddressRequest interchain_account_id. */ - public interchain_account_id: string; - - /** QueryInterchainAccountAddressRequest connection_id. */ - public connection_id: string; - - /** - * Encodes the specified QueryInterchainAccountAddressRequest message. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressRequest.verify|verify} messages. - * @param message QueryInterchainAccountAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.IQueryInterchainAccountAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryInterchainAccountAddressRequest message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressRequest.verify|verify} messages. - * @param message QueryInterchainAccountAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.IQueryInterchainAccountAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryInterchainAccountAddressRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryInterchainAccountAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.QueryInterchainAccountAddressRequest; - - /** - * Decodes a QueryInterchainAccountAddressRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryInterchainAccountAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.QueryInterchainAccountAddressRequest; - - /** - * Verifies a QueryInterchainAccountAddressRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryInterchainAccountAddressRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryInterchainAccountAddressRequest - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.QueryInterchainAccountAddressRequest; - - /** - * Creates a plain object from a QueryInterchainAccountAddressRequest message. Also converts values to other types if specified. - * @param message QueryInterchainAccountAddressRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.QueryInterchainAccountAddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryInterchainAccountAddressRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryInterchainAccountAddressResponse. */ - interface IQueryInterchainAccountAddressResponse { - - /** QueryInterchainAccountAddressResponse interchain_account_address */ - interchain_account_address?: (string|null); - } - - /** Represents a QueryInterchainAccountAddressResponse. */ - class QueryInterchainAccountAddressResponse implements IQueryInterchainAccountAddressResponse { - - /** - * Constructs a new QueryInterchainAccountAddressResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.IQueryInterchainAccountAddressResponse); - - /** QueryInterchainAccountAddressResponse interchain_account_address. */ - public interchain_account_address: string; - - /** - * Encodes the specified QueryInterchainAccountAddressResponse message. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressResponse.verify|verify} messages. - * @param message QueryInterchainAccountAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.IQueryInterchainAccountAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryInterchainAccountAddressResponse message, length delimited. Does not implicitly {@link neutron.interchaintxs.QueryInterchainAccountAddressResponse.verify|verify} messages. - * @param message QueryInterchainAccountAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.IQueryInterchainAccountAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryInterchainAccountAddressResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryInterchainAccountAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.QueryInterchainAccountAddressResponse; - - /** - * Decodes a QueryInterchainAccountAddressResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryInterchainAccountAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.QueryInterchainAccountAddressResponse; - - /** - * Verifies a QueryInterchainAccountAddressResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryInterchainAccountAddressResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryInterchainAccountAddressResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.QueryInterchainAccountAddressResponse; - - /** - * Creates a plain object from a QueryInterchainAccountAddressResponse message. Also converts values to other types if specified. - * @param message QueryInterchainAccountAddressResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.QueryInterchainAccountAddressResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryInterchainAccountAddressResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (neutron.interchaintxs.IParams|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.interchaintxs.IGenesisState); - - /** GenesisState params. */ - public params?: (neutron.interchaintxs.IParams|null); - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link neutron.interchaintxs.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.interchaintxs.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link neutron.interchaintxs.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.interchaintxs.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.interchaintxs.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.interchaintxs.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): neutron.interchaintxs.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.interchaintxs.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace transfer. */ - namespace transfer { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls Transfer. - * @param request MsgTransfer message or plain object - * @param callback Node-style callback called with the error, if any, and MsgTransferResponse - */ - public transfer(request: neutron.transfer.IMsgTransfer, callback: neutron.transfer.Msg.TransferCallback): void; - - /** - * Calls Transfer. - * @param request MsgTransfer message or plain object - * @returns Promise - */ - public transfer(request: neutron.transfer.IMsgTransfer): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link neutron.transfer.Msg#transfer}. - * @param error Error, if any - * @param [response] MsgTransferResponse - */ - type TransferCallback = (error: (Error|null), response?: neutron.transfer.MsgTransferResponse) => void; - } - - /** Properties of a MsgTransfer. */ - interface IMsgTransfer { - - /** MsgTransfer source_port */ - source_port?: (string|null); - - /** MsgTransfer source_channel */ - source_channel?: (string|null); - - /** MsgTransfer token */ - token?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgTransfer sender */ - sender?: (string|null); - - /** MsgTransfer receiver */ - receiver?: (string|null); - - /** MsgTransfer timeout_height */ - timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTransfer timeout_timestamp */ - timeout_timestamp?: (Long|null); - - /** MsgTransfer memo */ - memo?: (string|null); - - /** MsgTransfer fee */ - fee?: (neutron.feerefunder.IFee|null); - } - - /** Represents a MsgTransfer. */ - class MsgTransfer implements IMsgTransfer { - - /** - * Constructs a new MsgTransfer. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.transfer.IMsgTransfer); - - /** MsgTransfer source_port. */ - public source_port: string; - - /** MsgTransfer source_channel. */ - public source_channel: string; - - /** MsgTransfer token. */ - public token?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgTransfer sender. */ - public sender: string; - - /** MsgTransfer receiver. */ - public receiver: string; - - /** MsgTransfer timeout_height. */ - public timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** MsgTransfer timeout_timestamp. */ - public timeout_timestamp: Long; - - /** MsgTransfer memo. */ - public memo: string; - - /** MsgTransfer fee. */ - public fee?: (neutron.feerefunder.IFee|null); - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link neutron.transfer.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: neutron.transfer.IMsgTransfer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link neutron.transfer.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: neutron.transfer.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): neutron.transfer.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)): neutron.transfer.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 }): neutron.transfer.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: neutron.transfer.MsgTransfer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTransfer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgTransferResponse. */ - interface IMsgTransferResponse { - - /** MsgTransferResponse sequence_id */ - sequence_id?: (Long|null); - - /** MsgTransferResponse channel */ - channel?: (string|null); - } - - /** Represents a MsgTransferResponse. */ - class MsgTransferResponse implements IMsgTransferResponse { - - /** - * Constructs a new MsgTransferResponse. - * @param [properties] Properties to set - */ - constructor(properties?: neutron.transfer.IMsgTransferResponse); - - /** MsgTransferResponse sequence_id. */ - public sequence_id: Long; - - /** MsgTransferResponse channel. */ - public channel: string; - - /** - * Encodes the specified MsgTransferResponse message. Does not implicitly {@link neutron.transfer.MsgTransferResponse.verify|verify} messages. - * @param message MsgTransferResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: neutron.transfer.IMsgTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTransferResponse message, length delimited. Does not implicitly {@link neutron.transfer.MsgTransferResponse.verify|verify} messages. - * @param message MsgTransferResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: neutron.transfer.IMsgTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): neutron.transfer.MsgTransferResponse; - - /** - * Decodes a MsgTransferResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): neutron.transfer.MsgTransferResponse; - - /** - * Verifies a MsgTransferResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTransferResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTransferResponse - */ - public static fromObject(object: { [k: string]: any }): neutron.transfer.MsgTransferResponse; - - /** - * Creates a plain object from a MsgTransferResponse message. Also converts values to other types if specified. - * @param message MsgTransferResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: neutron.transfer.MsgTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTransferResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls DenomTrace. - * @param request QueryDenomTraceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - */ - public denomTrace(request: ibc.applications.transfer.v1.IQueryDenomTraceRequest, callback: neutron.transfer.Query.DenomTraceCallback): void; - - /** - * Calls DenomTrace. - * @param request QueryDenomTraceRequest message or plain object - * @returns Promise - */ - public denomTrace(request: ibc.applications.transfer.v1.IQueryDenomTraceRequest): Promise; - - /** - * Calls DenomTraces. - * @param request QueryDenomTracesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - */ - public denomTraces(request: ibc.applications.transfer.v1.IQueryDenomTracesRequest, callback: neutron.transfer.Query.DenomTracesCallback): void; - - /** - * Calls DenomTraces. - * @param request QueryDenomTracesRequest message or plain object - * @returns Promise - */ - public denomTraces(request: ibc.applications.transfer.v1.IQueryDenomTracesRequest): Promise; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: ibc.applications.transfer.v1.IQueryParamsRequest, callback: neutron.transfer.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: ibc.applications.transfer.v1.IQueryParamsRequest): Promise; - - /** - * Calls DenomHash. - * @param request QueryDenomHashRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomHashResponse - */ - public denomHash(request: ibc.applications.transfer.v1.IQueryDenomHashRequest, callback: neutron.transfer.Query.DenomHashCallback): void; - - /** - * Calls DenomHash. - * @param request QueryDenomHashRequest message or plain object - * @returns Promise - */ - public denomHash(request: ibc.applications.transfer.v1.IQueryDenomHashRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link neutron.transfer.Query#denomTrace}. - * @param error Error, if any - * @param [response] QueryDenomTraceResponse - */ - type DenomTraceCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomTraceResponse) => void; - - /** - * Callback as used by {@link neutron.transfer.Query#denomTraces}. - * @param error Error, if any - * @param [response] QueryDenomTracesResponse - */ - type DenomTracesCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomTracesResponse) => void; - - /** - * Callback as used by {@link neutron.transfer.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryParamsResponse) => void; - - /** - * Callback as used by {@link neutron.transfer.Query#denomHash}. - * @param error Error, if any - * @param [response] QueryDenomHashResponse - */ - type DenomHashCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomHashResponse) => void; - } - } -} - -/** Namespace ibc. */ -export namespace ibc { - - /** Namespace core. */ - namespace core { - - /** Namespace channel. */ - namespace channel { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Channel. */ - interface IChannel { - - /** Channel state */ - state?: (ibc.core.channel.v1.State|null); - - /** Channel ordering */ - ordering?: (ibc.core.channel.v1.Order|null); - - /** Channel counterparty */ - counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** Channel connection_hops */ - connection_hops?: (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?: ibc.core.channel.v1.IChannel); - - /** Channel state. */ - public state: ibc.core.channel.v1.State; - - /** Channel ordering. */ - public ordering: ibc.core.channel.v1.Order; - - /** Channel counterparty. */ - public counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** Channel connection_hops. */ - public connection_hops: string[]; - - /** Channel version. */ - public version: string; - - /** - * Encodes the specified Channel message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Channel message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.channel.v1.Channel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Channel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IdentifiedChannel. */ - interface IIdentifiedChannel { - - /** IdentifiedChannel state */ - state?: (ibc.core.channel.v1.State|null); - - /** IdentifiedChannel ordering */ - ordering?: (ibc.core.channel.v1.Order|null); - - /** IdentifiedChannel counterparty */ - counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** IdentifiedChannel connection_hops */ - connection_hops?: (string[]|null); - - /** IdentifiedChannel version */ - version?: (string|null); - - /** IdentifiedChannel port_id */ - port_id?: (string|null); - - /** IdentifiedChannel channel_id */ - channel_id?: (string|null); - } - - /** Represents an IdentifiedChannel. */ - class IdentifiedChannel implements IIdentifiedChannel { - - /** - * Constructs a new IdentifiedChannel. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IIdentifiedChannel); - - /** IdentifiedChannel state. */ - public state: ibc.core.channel.v1.State; - - /** IdentifiedChannel ordering. */ - public ordering: ibc.core.channel.v1.Order; - - /** IdentifiedChannel counterparty. */ - public counterparty?: (ibc.core.channel.v1.ICounterparty|null); - - /** IdentifiedChannel connection_hops. */ - public connection_hops: string[]; - - /** IdentifiedChannel version. */ - public version: string; - - /** IdentifiedChannel port_id. */ - public port_id: string; - - /** IdentifiedChannel channel_id. */ - public channel_id: string; - - /** - * Encodes the specified IdentifiedChannel message. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @param message IdentifiedChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IIdentifiedChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedChannel message, length delimited. Does not implicitly {@link ibc.core.channel.v1.IdentifiedChannel.verify|verify} messages. - * @param message IdentifiedChannel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IIdentifiedChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.IdentifiedChannel; - - /** - * Decodes an IdentifiedChannel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedChannel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.IdentifiedChannel; - - /** - * Verifies an IdentifiedChannel message. - * @param message Plain 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 IdentifiedChannel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedChannel - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.IdentifiedChannel; - - /** - * Creates a plain object from an IdentifiedChannel message. Also converts values to other types if specified. - * @param message IdentifiedChannel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.IdentifiedChannel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedChannel 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 port_id */ - port_id?: (string|null); - - /** Counterparty channel_id */ - channel_id?: (string|null); - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - - /** - * Constructs a new Counterparty. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.ICounterparty); - - /** Counterparty port_id. */ - public port_id: string; - - /** Counterparty channel_id. */ - public channel_id: string; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.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?: (Long|null); - - /** Packet source_port */ - source_port?: (string|null); - - /** Packet source_channel */ - source_channel?: (string|null); - - /** Packet destination_port */ - destination_port?: (string|null); - - /** Packet destination_channel */ - destination_channel?: (string|null); - - /** Packet data */ - data?: (Uint8Array|null); - - /** Packet timeout_height */ - timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** Packet timeout_timestamp */ - timeout_timestamp?: (Long|null); - } - - /** Represents a Packet. */ - class Packet implements IPacket { - - /** - * Constructs a new Packet. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacket); - - /** Packet sequence. */ - public sequence: Long; - - /** Packet source_port. */ - public source_port: string; - - /** Packet source_channel. */ - public source_channel: string; - - /** Packet destination_port. */ - public destination_port: string; - - /** Packet destination_channel. */ - public destination_channel: string; - - /** Packet data. */ - public data: Uint8Array; - - /** Packet timeout_height. */ - public timeout_height?: (ibc.core.client.v1.IHeight|null); - - /** Packet timeout_timestamp. */ - public timeout_timestamp: Long; - - /** - * Encodes the specified Packet message. Does not implicitly {@link ibc.core.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: ibc.core.channel.v1.IPacket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link ibc.core.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: ibc.core.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): ibc.core.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)): ibc.core.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 }): ibc.core.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: ibc.core.channel.v1.Packet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Packet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketState. */ - interface IPacketState { - - /** PacketState port_id */ - port_id?: (string|null); - - /** PacketState channel_id */ - channel_id?: (string|null); - - /** PacketState sequence */ - sequence?: (Long|null); - - /** PacketState data */ - data?: (Uint8Array|null); - } - - /** Represents a PacketState. */ - class PacketState implements IPacketState { - - /** - * Constructs a new PacketState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacketState); - - /** PacketState port_id. */ - public port_id: string; - - /** PacketState channel_id. */ - public channel_id: string; - - /** PacketState sequence. */ - public sequence: Long; - - /** PacketState data. */ - public data: Uint8Array; - - /** - * Encodes the specified PacketState message. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @param message PacketState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IPacketState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketState message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketState.verify|verify} messages. - * @param message PacketState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IPacketState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.PacketState; - - /** - * Decodes a PacketState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.PacketState; - - /** - * Verifies a PacketState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.PacketState; - - /** - * Creates a plain object from a PacketState message. Also converts values to other types if specified. - * @param message PacketState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.PacketState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PacketId. */ - interface IPacketId { - - /** PacketId port_id */ - port_id?: (string|null); - - /** PacketId channel_id */ - channel_id?: (string|null); - - /** PacketId sequence */ - sequence?: (Long|null); - } - - /** Represents a PacketId. */ - class PacketId implements IPacketId { - - /** - * Constructs a new PacketId. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IPacketId); - - /** PacketId port_id. */ - public port_id: string; - - /** PacketId channel_id. */ - public channel_id: string; - - /** PacketId sequence. */ - public sequence: Long; - - /** - * Encodes the specified PacketId message. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @param message PacketId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IPacketId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PacketId message, length delimited. Does not implicitly {@link ibc.core.channel.v1.PacketId.verify|verify} messages. - * @param message PacketId message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IPacketId, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PacketId message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.PacketId; - - /** - * Decodes a PacketId message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PacketId - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.PacketId; - - /** - * Verifies a PacketId message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PacketId message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PacketId - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.PacketId; - - /** - * Creates a plain object from a PacketId message. Also converts values to other types if specified. - * @param message PacketId - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.PacketId, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PacketId to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Acknowledgement. */ - interface IAcknowledgement { - - /** Acknowledgement result */ - result?: (Uint8Array|null); - - /** Acknowledgement error */ - error?: (string|null); - } - - /** Represents an Acknowledgement. */ - class Acknowledgement implements IAcknowledgement { - - /** - * Constructs a new Acknowledgement. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.channel.v1.IAcknowledgement); - - /** Acknowledgement result. */ - public result?: (Uint8Array|null); - - /** Acknowledgement error. */ - public error?: (string|null); - - /** Acknowledgement response. */ - public response?: ("result"|"error"); - - /** - * Encodes the specified Acknowledgement message. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @param message Acknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.channel.v1.IAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Acknowledgement message, length delimited. Does not implicitly {@link ibc.core.channel.v1.Acknowledgement.verify|verify} messages. - * @param message Acknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.channel.v1.IAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.channel.v1.Acknowledgement; - - /** - * Decodes an Acknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Acknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.channel.v1.Acknowledgement; - - /** - * Verifies an Acknowledgement message. - * @param message Plain 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 Acknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Acknowledgement - */ - public static fromObject(object: { [k: string]: any }): ibc.core.channel.v1.Acknowledgement; - - /** - * Creates a plain object from an Acknowledgement message. Also converts values to other types if specified. - * @param message Acknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.channel.v1.Acknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Acknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace client. */ - namespace client { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of an IdentifiedClientState. */ - interface IIdentifiedClientState { - - /** IdentifiedClientState client_id */ - client_id?: (string|null); - - /** IdentifiedClientState client_state */ - client_state?: (google.protobuf.IAny|null); - } - - /** Represents an IdentifiedClientState. */ - class IdentifiedClientState implements IIdentifiedClientState { - - /** - * Constructs a new IdentifiedClientState. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IIdentifiedClientState); - - /** IdentifiedClientState client_id. */ - public client_id: string; - - /** IdentifiedClientState client_state. */ - public client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified IdentifiedClientState message. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @param message IdentifiedClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IIdentifiedClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifiedClientState message, length delimited. Does not implicitly {@link ibc.core.client.v1.IdentifiedClientState.verify|verify} messages. - * @param message IdentifiedClientState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IIdentifiedClientState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.IdentifiedClientState; - - /** - * Decodes an IdentifiedClientState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifiedClientState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.IdentifiedClientState; - - /** - * Verifies an IdentifiedClientState message. - * @param message Plain 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 IdentifiedClientState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifiedClientState - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.IdentifiedClientState; - - /** - * Creates a plain object from an IdentifiedClientState message. Also converts values to other types if specified. - * @param message IdentifiedClientState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.IdentifiedClientState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifiedClientState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusStateWithHeight. */ - interface IConsensusStateWithHeight { - - /** ConsensusStateWithHeight height */ - height?: (ibc.core.client.v1.IHeight|null); - - /** ConsensusStateWithHeight consensus_state */ - consensus_state?: (google.protobuf.IAny|null); - } - - /** Represents a ConsensusStateWithHeight. */ - class ConsensusStateWithHeight implements IConsensusStateWithHeight { - - /** - * Constructs a new ConsensusStateWithHeight. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IConsensusStateWithHeight); - - /** ConsensusStateWithHeight height. */ - public height?: (ibc.core.client.v1.IHeight|null); - - /** ConsensusStateWithHeight consensus_state. */ - public consensus_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified ConsensusStateWithHeight message. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @param message ConsensusStateWithHeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IConsensusStateWithHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusStateWithHeight message, length delimited. Does not implicitly {@link ibc.core.client.v1.ConsensusStateWithHeight.verify|verify} messages. - * @param message ConsensusStateWithHeight message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IConsensusStateWithHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.ConsensusStateWithHeight; - - /** - * Decodes a ConsensusStateWithHeight message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConsensusStateWithHeight - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.ConsensusStateWithHeight; - - /** - * Verifies a ConsensusStateWithHeight message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusStateWithHeight message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusStateWithHeight - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.ConsensusStateWithHeight; - - /** - * Creates a plain object from a ConsensusStateWithHeight message. Also converts values to other types if specified. - * @param message ConsensusStateWithHeight - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.ConsensusStateWithHeight, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusStateWithHeight to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientConsensusStates. */ - interface IClientConsensusStates { - - /** ClientConsensusStates client_id */ - client_id?: (string|null); - - /** ClientConsensusStates consensus_states */ - consensus_states?: (ibc.core.client.v1.IConsensusStateWithHeight[]|null); - } - - /** Represents a ClientConsensusStates. */ - class ClientConsensusStates implements IClientConsensusStates { - - /** - * Constructs a new ClientConsensusStates. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IClientConsensusStates); - - /** ClientConsensusStates client_id. */ - public client_id: string; - - /** ClientConsensusStates consensus_states. */ - public consensus_states: ibc.core.client.v1.IConsensusStateWithHeight[]; - - /** - * Encodes the specified ClientConsensusStates message. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @param message ClientConsensusStates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IClientConsensusStates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientConsensusStates message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientConsensusStates.verify|verify} messages. - * @param message ClientConsensusStates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IClientConsensusStates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.ClientConsensusStates; - - /** - * Decodes a ClientConsensusStates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientConsensusStates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.ClientConsensusStates; - - /** - * Verifies a ClientConsensusStates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientConsensusStates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientConsensusStates - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.ClientConsensusStates; - - /** - * Creates a plain object from a ClientConsensusStates message. Also converts values to other types if specified. - * @param message ClientConsensusStates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.ClientConsensusStates, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientConsensusStates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientUpdateProposal. */ - interface IClientUpdateProposal { - - /** ClientUpdateProposal title */ - title?: (string|null); - - /** ClientUpdateProposal description */ - description?: (string|null); - - /** ClientUpdateProposal subject_client_id */ - subject_client_id?: (string|null); - - /** ClientUpdateProposal substitute_client_id */ - substitute_client_id?: (string|null); - } - - /** Represents a ClientUpdateProposal. */ - class ClientUpdateProposal implements IClientUpdateProposal { - - /** - * Constructs a new ClientUpdateProposal. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IClientUpdateProposal); - - /** ClientUpdateProposal title. */ - public title: string; - - /** ClientUpdateProposal description. */ - public description: string; - - /** ClientUpdateProposal subject_client_id. */ - public subject_client_id: string; - - /** ClientUpdateProposal substitute_client_id. */ - public substitute_client_id: string; - - /** - * Encodes the specified ClientUpdateProposal message. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @param message ClientUpdateProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IClientUpdateProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientUpdateProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.ClientUpdateProposal.verify|verify} messages. - * @param message ClientUpdateProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IClientUpdateProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.ClientUpdateProposal; - - /** - * Decodes a ClientUpdateProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientUpdateProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.ClientUpdateProposal; - - /** - * Verifies a ClientUpdateProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientUpdateProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientUpdateProposal - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.ClientUpdateProposal; - - /** - * Creates a plain object from a ClientUpdateProposal message. Also converts values to other types if specified. - * @param message ClientUpdateProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.ClientUpdateProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientUpdateProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UpgradeProposal. */ - interface IUpgradeProposal { - - /** UpgradeProposal title */ - title?: (string|null); - - /** UpgradeProposal description */ - description?: (string|null); - - /** UpgradeProposal plan */ - plan?: (cosmos.upgrade.v1beta1.IPlan|null); - - /** UpgradeProposal upgraded_client_state */ - upgraded_client_state?: (google.protobuf.IAny|null); - } - - /** Represents an UpgradeProposal. */ - class UpgradeProposal implements IUpgradeProposal { - - /** - * Constructs a new UpgradeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IUpgradeProposal); - - /** UpgradeProposal title. */ - public title: string; - - /** UpgradeProposal description. */ - public description: string; - - /** UpgradeProposal plan. */ - public plan?: (cosmos.upgrade.v1beta1.IPlan|null); - - /** UpgradeProposal upgraded_client_state. */ - public upgraded_client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified UpgradeProposal message. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @param message UpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpgradeProposal message, length delimited. Does not implicitly {@link ibc.core.client.v1.UpgradeProposal.verify|verify} messages. - * @param message UpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.UpgradeProposal; - - /** - * Decodes an UpgradeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.UpgradeProposal; - - /** - * Verifies an UpgradeProposal message. - * @param message Plain 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 UpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpgradeProposal - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.UpgradeProposal; - - /** - * Creates a plain object from an UpgradeProposal message. Also converts values to other types if specified. - * @param message UpgradeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.UpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Height. */ - interface IHeight { - - /** Height revision_number */ - revision_number?: (Long|null); - - /** Height revision_height */ - revision_height?: (Long|null); - } - - /** Represents an Height. */ - class Height implements IHeight { - - /** - * Constructs a new Height. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IHeight); - - /** Height revision_number. */ - public revision_number: Long; - - /** Height revision_height. */ - public revision_height: Long; - - /** - * Encodes the specified Height message. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @param message Height message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.core.client.v1.IHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Height message, length delimited. Does not implicitly {@link ibc.core.client.v1.Height.verify|verify} messages. - * @param message Height message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.core.client.v1.IHeight, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Height message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.core.client.v1.Height; - - /** - * Decodes an Height message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Height - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.core.client.v1.Height; - - /** - * Verifies an Height message. - * @param message Plain 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 Height message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Height - */ - public static fromObject(object: { [k: string]: any }): ibc.core.client.v1.Height; - - /** - * Creates a plain object from an Height message. Also converts values to other types if specified. - * @param message Height - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.core.client.v1.Height, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Height to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params allowed_clients */ - allowed_clients?: (string[]|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.core.client.v1.IParams); - - /** Params allowed_clients. */ - public allowed_clients: string[]; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.core.client.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: ibc.core.client.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.core.client.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: ibc.core.client.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): ibc.core.client.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)): ibc.core.client.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 }): ibc.core.client.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: ibc.core.client.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace applications. */ - namespace applications { - - /** Namespace transfer. */ - namespace transfer { - - /** 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); - - /** - * Calls DenomTrace. - * @param request QueryDenomTraceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomTraceResponse - */ - public denomTrace(request: ibc.applications.transfer.v1.IQueryDenomTraceRequest, callback: ibc.applications.transfer.v1.Query.DenomTraceCallback): void; - - /** - * Calls DenomTrace. - * @param request QueryDenomTraceRequest message or plain object - * @returns Promise - */ - public denomTrace(request: ibc.applications.transfer.v1.IQueryDenomTraceRequest): Promise; - - /** - * Calls DenomTraces. - * @param request QueryDenomTracesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomTracesResponse - */ - public denomTraces(request: ibc.applications.transfer.v1.IQueryDenomTracesRequest, callback: ibc.applications.transfer.v1.Query.DenomTracesCallback): void; - - /** - * Calls DenomTraces. - * @param request QueryDenomTracesRequest message or plain object - * @returns Promise - */ - public denomTraces(request: ibc.applications.transfer.v1.IQueryDenomTracesRequest): Promise; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: ibc.applications.transfer.v1.IQueryParamsRequest, callback: ibc.applications.transfer.v1.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: ibc.applications.transfer.v1.IQueryParamsRequest): Promise; - - /** - * Calls DenomHash. - * @param request QueryDenomHashRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomHashResponse - */ - public denomHash(request: ibc.applications.transfer.v1.IQueryDenomHashRequest, callback: ibc.applications.transfer.v1.Query.DenomHashCallback): void; - - /** - * Calls DenomHash. - * @param request QueryDenomHashRequest message or plain object - * @returns Promise - */ - public denomHash(request: ibc.applications.transfer.v1.IQueryDenomHashRequest): Promise; - - /** - * Calls EscrowAddress. - * @param request QueryEscrowAddressRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryEscrowAddressResponse - */ - public escrowAddress(request: ibc.applications.transfer.v1.IQueryEscrowAddressRequest, callback: ibc.applications.transfer.v1.Query.EscrowAddressCallback): void; - - /** - * Calls EscrowAddress. - * @param request QueryEscrowAddressRequest message or plain object - * @returns Promise - */ - public escrowAddress(request: ibc.applications.transfer.v1.IQueryEscrowAddressRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTrace}. - * @param error Error, if any - * @param [response] QueryDenomTraceResponse - */ - type DenomTraceCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomTraceResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomTraces}. - * @param error Error, if any - * @param [response] QueryDenomTracesResponse - */ - type DenomTracesCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomTracesResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryParamsResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#denomHash}. - * @param error Error, if any - * @param [response] QueryDenomHashResponse - */ - type DenomHashCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryDenomHashResponse) => void; - - /** - * Callback as used by {@link ibc.applications.transfer.v1.Query#escrowAddress}. - * @param error Error, if any - * @param [response] QueryEscrowAddressResponse - */ - type EscrowAddressCallback = (error: (Error|null), response?: ibc.applications.transfer.v1.QueryEscrowAddressResponse) => void; - } - - /** Properties of a QueryDenomTraceRequest. */ - interface IQueryDenomTraceRequest { - - /** QueryDenomTraceRequest hash */ - hash?: (string|null); - } - - /** Represents a QueryDenomTraceRequest. */ - class QueryDenomTraceRequest implements IQueryDenomTraceRequest { - - /** - * Constructs a new QueryDenomTraceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTraceRequest); - - /** QueryDenomTraceRequest hash. */ - public hash: string; - - /** - * Encodes the specified QueryDenomTraceRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @param message QueryDenomTraceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTraceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTraceRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceRequest.verify|verify} messages. - * @param message QueryDenomTraceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTraceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTraceRequest; - - /** - * Decodes a QueryDenomTraceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTraceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTraceRequest; - - /** - * Verifies a QueryDenomTraceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTraceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTraceRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTraceRequest; - - /** - * Creates a plain object from a QueryDenomTraceRequest message. Also converts values to other types if specified. - * @param message QueryDenomTraceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTraceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTraceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomTraceResponse. */ - interface IQueryDenomTraceResponse { - - /** QueryDenomTraceResponse denom_trace */ - denom_trace?: (ibc.applications.transfer.v1.IDenomTrace|null); - } - - /** Represents a QueryDenomTraceResponse. */ - class QueryDenomTraceResponse implements IQueryDenomTraceResponse { - - /** - * Constructs a new QueryDenomTraceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTraceResponse); - - /** QueryDenomTraceResponse denom_trace. */ - public denom_trace?: (ibc.applications.transfer.v1.IDenomTrace|null); - - /** - * Encodes the specified QueryDenomTraceResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @param message QueryDenomTraceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTraceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTraceResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTraceResponse.verify|verify} messages. - * @param message QueryDenomTraceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTraceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTraceResponse; - - /** - * Decodes a QueryDenomTraceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTraceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTraceResponse; - - /** - * Verifies a QueryDenomTraceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTraceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTraceResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTraceResponse; - - /** - * Creates a plain object from a QueryDenomTraceResponse message. Also converts values to other types if specified. - * @param message QueryDenomTraceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTraceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTraceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomTracesRequest. */ - interface IQueryDenomTracesRequest { - - /** QueryDenomTracesRequest pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - } - - /** Represents a QueryDenomTracesRequest. */ - class QueryDenomTracesRequest implements IQueryDenomTracesRequest { - - /** - * Constructs a new QueryDenomTracesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTracesRequest); - - /** QueryDenomTracesRequest pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageRequest|null); - - /** - * Encodes the specified QueryDenomTracesRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @param message QueryDenomTracesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTracesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTracesRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesRequest.verify|verify} messages. - * @param message QueryDenomTracesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTracesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTracesRequest; - - /** - * Decodes a QueryDenomTracesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTracesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTracesRequest; - - /** - * Verifies a QueryDenomTracesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTracesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTracesRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTracesRequest; - - /** - * Creates a plain object from a QueryDenomTracesRequest message. Also converts values to other types if specified. - * @param message QueryDenomTracesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTracesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTracesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomTracesResponse. */ - interface IQueryDenomTracesResponse { - - /** QueryDenomTracesResponse denom_traces */ - denom_traces?: (ibc.applications.transfer.v1.IDenomTrace[]|null); - - /** QueryDenomTracesResponse pagination */ - pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - } - - /** Represents a QueryDenomTracesResponse. */ - class QueryDenomTracesResponse implements IQueryDenomTracesResponse { - - /** - * Constructs a new QueryDenomTracesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomTracesResponse); - - /** QueryDenomTracesResponse denom_traces. */ - public denom_traces: ibc.applications.transfer.v1.IDenomTrace[]; - - /** QueryDenomTracesResponse pagination. */ - public pagination?: (cosmos.base.query.v1beta1.IPageResponse|null); - - /** - * Encodes the specified QueryDenomTracesResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @param message QueryDenomTracesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomTracesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomTracesResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomTracesResponse.verify|verify} messages. - * @param message QueryDenomTracesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomTracesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomTracesResponse; - - /** - * Decodes a QueryDenomTracesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomTracesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomTracesResponse; - - /** - * Verifies a QueryDenomTracesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomTracesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomTracesResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomTracesResponse; - - /** - * Creates a plain object from a QueryDenomTracesResponse message. Also converts values to other types if specified. - * @param message QueryDenomTracesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomTracesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomTracesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (ibc.applications.transfer.v1.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (ibc.applications.transfer.v1.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomHashRequest. */ - interface IQueryDenomHashRequest { - - /** QueryDenomHashRequest trace */ - trace?: (string|null); - } - - /** Represents a QueryDenomHashRequest. */ - class QueryDenomHashRequest implements IQueryDenomHashRequest { - - /** - * Constructs a new QueryDenomHashRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomHashRequest); - - /** QueryDenomHashRequest trace. */ - public trace: string; - - /** - * Encodes the specified QueryDenomHashRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @param message QueryDenomHashRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomHashRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomHashRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashRequest.verify|verify} messages. - * @param message QueryDenomHashRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomHashRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomHashRequest; - - /** - * Decodes a QueryDenomHashRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomHashRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomHashRequest; - - /** - * Verifies a QueryDenomHashRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomHashRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomHashRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomHashRequest; - - /** - * Creates a plain object from a QueryDenomHashRequest message. Also converts values to other types if specified. - * @param message QueryDenomHashRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomHashRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomHashRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomHashResponse. */ - interface IQueryDenomHashResponse { - - /** QueryDenomHashResponse hash */ - hash?: (string|null); - } - - /** Represents a QueryDenomHashResponse. */ - class QueryDenomHashResponse implements IQueryDenomHashResponse { - - /** - * Constructs a new QueryDenomHashResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryDenomHashResponse); - - /** QueryDenomHashResponse hash. */ - public hash: string; - - /** - * Encodes the specified QueryDenomHashResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @param message QueryDenomHashResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryDenomHashResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomHashResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryDenomHashResponse.verify|verify} messages. - * @param message QueryDenomHashResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryDenomHashResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryDenomHashResponse; - - /** - * Decodes a QueryDenomHashResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomHashResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryDenomHashResponse; - - /** - * Verifies a QueryDenomHashResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomHashResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomHashResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryDenomHashResponse; - - /** - * Creates a plain object from a QueryDenomHashResponse message. Also converts values to other types if specified. - * @param message QueryDenomHashResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryDenomHashResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomHashResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryEscrowAddressRequest. */ - interface IQueryEscrowAddressRequest { - - /** QueryEscrowAddressRequest port_id */ - port_id?: (string|null); - - /** QueryEscrowAddressRequest channel_id */ - channel_id?: (string|null); - } - - /** Represents a QueryEscrowAddressRequest. */ - class QueryEscrowAddressRequest implements IQueryEscrowAddressRequest { - - /** - * Constructs a new QueryEscrowAddressRequest. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryEscrowAddressRequest); - - /** QueryEscrowAddressRequest port_id. */ - public port_id: string; - - /** QueryEscrowAddressRequest channel_id. */ - public channel_id: string; - - /** - * Encodes the specified QueryEscrowAddressRequest message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @param message QueryEscrowAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryEscrowAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryEscrowAddressRequest message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressRequest.verify|verify} messages. - * @param message QueryEscrowAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryEscrowAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryEscrowAddressRequest; - - /** - * Decodes a QueryEscrowAddressRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryEscrowAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryEscrowAddressRequest; - - /** - * Verifies a QueryEscrowAddressRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryEscrowAddressRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryEscrowAddressRequest - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryEscrowAddressRequest; - - /** - * Creates a plain object from a QueryEscrowAddressRequest message. Also converts values to other types if specified. - * @param message QueryEscrowAddressRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryEscrowAddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryEscrowAddressRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryEscrowAddressResponse. */ - interface IQueryEscrowAddressResponse { - - /** QueryEscrowAddressResponse escrow_address */ - escrow_address?: (string|null); - } - - /** Represents a QueryEscrowAddressResponse. */ - class QueryEscrowAddressResponse implements IQueryEscrowAddressResponse { - - /** - * Constructs a new QueryEscrowAddressResponse. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IQueryEscrowAddressResponse); - - /** QueryEscrowAddressResponse escrow_address. */ - public escrow_address: string; - - /** - * Encodes the specified QueryEscrowAddressResponse message. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @param message QueryEscrowAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IQueryEscrowAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryEscrowAddressResponse message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.QueryEscrowAddressResponse.verify|verify} messages. - * @param message QueryEscrowAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IQueryEscrowAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.QueryEscrowAddressResponse; - - /** - * Decodes a QueryEscrowAddressResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryEscrowAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.QueryEscrowAddressResponse; - - /** - * Verifies a QueryEscrowAddressResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryEscrowAddressResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryEscrowAddressResponse - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.QueryEscrowAddressResponse; - - /** - * Creates a plain object from a QueryEscrowAddressResponse message. Also converts values to other types if specified. - * @param message QueryEscrowAddressResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.QueryEscrowAddressResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryEscrowAddressResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DenomTrace. */ - interface IDenomTrace { - - /** DenomTrace path */ - path?: (string|null); - - /** DenomTrace base_denom */ - base_denom?: (string|null); - } - - /** Represents a DenomTrace. */ - class DenomTrace implements IDenomTrace { - - /** - * Constructs a new DenomTrace. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IDenomTrace); - - /** DenomTrace path. */ - public path: string; - - /** DenomTrace base_denom. */ - public base_denom: string; - - /** - * Encodes the specified DenomTrace message. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @param message DenomTrace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: ibc.applications.transfer.v1.IDenomTrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DenomTrace message, length delimited. Does not implicitly {@link ibc.applications.transfer.v1.DenomTrace.verify|verify} messages. - * @param message DenomTrace message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: ibc.applications.transfer.v1.IDenomTrace, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DenomTrace message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ibc.applications.transfer.v1.DenomTrace; - - /** - * Decodes a DenomTrace message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DenomTrace - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ibc.applications.transfer.v1.DenomTrace; - - /** - * Verifies a DenomTrace message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DenomTrace message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DenomTrace - */ - public static fromObject(object: { [k: string]: any }): ibc.applications.transfer.v1.DenomTrace; - - /** - * Creates a plain object from a DenomTrace message. Also converts values to other types if specified. - * @param message DenomTrace - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: ibc.applications.transfer.v1.DenomTrace, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DenomTrace to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params send_enabled */ - send_enabled?: (boolean|null); - - /** Params receive_enabled */ - receive_enabled?: (boolean|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: ibc.applications.transfer.v1.IParams); - - /** Params send_enabled. */ - public send_enabled: boolean; - - /** Params receive_enabled. */ - public receive_enabled: boolean; - - /** - * Encodes the specified Params message. Does not implicitly {@link ibc.applications.transfer.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: ibc.applications.transfer.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link ibc.applications.transfer.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: ibc.applications.transfer.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): ibc.applications.transfer.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)): ibc.applications.transfer.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 }): ibc.applications.transfer.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: ibc.applications.transfer.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } -} - -/** Namespace cosmos. */ -export namespace cosmos { - - /** Namespace upgrade. */ - namespace upgrade { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a Plan. */ - interface IPlan { - - /** Plan name */ - name?: (string|null); - - /** Plan time */ - time?: (google.protobuf.ITimestamp|null); - - /** Plan height */ - height?: (Long|null); - - /** Plan info */ - info?: (string|null); - - /** Plan upgraded_client_state */ - upgraded_client_state?: (google.protobuf.IAny|null); - } - - /** Represents a Plan. */ - class Plan implements IPlan { - - /** - * Constructs a new Plan. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.upgrade.v1beta1.IPlan); - - /** Plan name. */ - public name: string; - - /** Plan time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Plan height. */ - public height: Long; - - /** Plan info. */ - public info: string; - - /** Plan upgraded_client_state. */ - public upgraded_client_state?: (google.protobuf.IAny|null); - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.IPlan|null); - } - - /** Represents a SoftwareUpgradeProposal. */ - class SoftwareUpgradeProposal implements ISoftwareUpgradeProposal { - - /** - * Constructs a new SoftwareUpgradeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.upgrade.v1beta1.ISoftwareUpgradeProposal); - - /** SoftwareUpgradeProposal title. */ - public title: string; - - /** SoftwareUpgradeProposal description. */ - public description: string; - - /** SoftwareUpgradeProposal plan. */ - public plan?: (cosmos.upgrade.v1beta1.IPlan|null); - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.ISoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.ICancelSoftwareUpgradeProposal); - - /** CancelSoftwareUpgradeProposal title. */ - public title: string; - - /** CancelSoftwareUpgradeProposal description. */ - public description: string; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.ICancelSoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.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.upgrade.v1beta1.CancelSoftwareUpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelSoftwareUpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ModuleVersion. */ - interface IModuleVersion { - - /** ModuleVersion name */ - name?: (string|null); - - /** ModuleVersion version */ - version?: (Long|null); - } - - /** Represents a ModuleVersion. */ - class ModuleVersion implements IModuleVersion { - - /** - * Constructs a new ModuleVersion. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.upgrade.v1beta1.IModuleVersion); - - /** ModuleVersion name. */ - public name: string; - - /** ModuleVersion version. */ - public version: Long; - - /** - * Encodes the specified ModuleVersion message. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @param message ModuleVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.upgrade.v1beta1.IModuleVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModuleVersion message, length delimited. Does not implicitly {@link cosmos.upgrade.v1beta1.ModuleVersion.verify|verify} messages. - * @param message ModuleVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.upgrade.v1beta1.IModuleVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.upgrade.v1beta1.ModuleVersion; - - /** - * Decodes a ModuleVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModuleVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.upgrade.v1beta1.ModuleVersion; - - /** - * Verifies a ModuleVersion message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModuleVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModuleVersion - */ - public static fromObject(object: { [k: string]: any }): cosmos.upgrade.v1beta1.ModuleVersion; - - /** - * Creates a plain object from a ModuleVersion message. Also converts values to other types if specified. - * @param message ModuleVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.upgrade.v1beta1.ModuleVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModuleVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace base. */ - namespace base { - - /** Namespace query. */ - namespace query { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a PageRequest. */ - interface IPageRequest { - - /** PageRequest key */ - key?: (Uint8Array|null); - - /** PageRequest offset */ - offset?: (Long|null); - - /** PageRequest limit */ - limit?: (Long|null); - - /** PageRequest count_total */ - count_total?: (boolean|null); - - /** PageRequest reverse */ - reverse?: (boolean|null); - } - - /** Represents a PageRequest. */ - class PageRequest implements IPageRequest { - - /** - * Constructs a new PageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.base.query.v1beta1.IPageRequest); - - /** PageRequest key. */ - public key: Uint8Array; - - /** PageRequest offset. */ - public offset: Long; - - /** PageRequest limit. */ - public limit: Long; - - /** PageRequest count_total. */ - public count_total: boolean; - - /** PageRequest reverse. */ - public reverse: boolean; - - /** - * Encodes the specified PageRequest message. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @param message PageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.base.query.v1beta1.IPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PageRequest message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageRequest.verify|verify} messages. - * @param message PageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.base.query.v1beta1.IPageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.base.query.v1beta1.PageRequest; - - /** - * Decodes a PageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.base.query.v1beta1.PageRequest; - - /** - * Verifies a PageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PageRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos.base.query.v1beta1.PageRequest; - - /** - * Creates a plain object from a PageRequest message. Also converts values to other types if specified. - * @param message PageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.base.query.v1beta1.PageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PageResponse. */ - interface IPageResponse { - - /** PageResponse next_key */ - next_key?: (Uint8Array|null); - - /** PageResponse total */ - total?: (Long|null); - } - - /** Represents a PageResponse. */ - class PageResponse implements IPageResponse { - - /** - * Constructs a new PageResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.base.query.v1beta1.IPageResponse); - - /** PageResponse next_key. */ - public next_key: Uint8Array; - - /** PageResponse total. */ - public total: Long; - - /** - * Encodes the specified PageResponse message. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @param message PageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.base.query.v1beta1.IPageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PageResponse message, length delimited. Does not implicitly {@link cosmos.base.query.v1beta1.PageResponse.verify|verify} messages. - * @param message PageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.base.query.v1beta1.IPageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PageResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.base.query.v1beta1.PageResponse; - - /** - * Decodes a PageResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.base.query.v1beta1.PageResponse; - - /** - * Verifies a PageResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PageResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PageResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos.base.query.v1beta1.PageResponse; - - /** - * Creates a plain object from a PageResponse message. Also converts values to other types if specified. - * @param message PageResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.base.query.v1beta1.PageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PageResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** 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.base.v1beta1.ICoin); - - /** Coin denom. */ - public denom: string; - - /** Coin amount. */ - public amount: string; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecCoin); - - /** DecCoin denom. */ - public denom: string; - - /** DecCoin amount. */ - public amount: string; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IIntProto); - - /** IntProto int. */ - public int: string; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.IDecProto); - - /** DecProto dec. */ - public dec: string; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.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.base.v1beta1.DecProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DecProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace bank. */ - namespace bank { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Properties of a Params. */ - interface IParams { - - /** Params send_enabled */ - send_enabled?: (cosmos.bank.v1beta1.ISendEnabled[]|null); - - /** Params default_send_enabled */ - default_send_enabled?: (boolean|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.IParams); - - /** Params send_enabled. */ - public send_enabled: cosmos.bank.v1beta1.ISendEnabled[]; - - /** Params default_send_enabled. */ - public default_send_enabled: boolean; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SendEnabled. */ - interface ISendEnabled { - - /** SendEnabled denom */ - denom?: (string|null); - - /** SendEnabled enabled */ - enabled?: (boolean|null); - } - - /** Represents a SendEnabled. */ - class SendEnabled implements ISendEnabled { - - /** - * Constructs a new SendEnabled. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.ISendEnabled); - - /** SendEnabled denom. */ - public denom: string; - - /** SendEnabled enabled. */ - public enabled: boolean; - - /** - * Encodes the specified SendEnabled message. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. - * @param message SendEnabled message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.bank.v1beta1.ISendEnabled, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SendEnabled message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.SendEnabled.verify|verify} messages. - * @param message SendEnabled message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.bank.v1beta1.ISendEnabled, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SendEnabled message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SendEnabled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.bank.v1beta1.SendEnabled; - - /** - * Decodes a SendEnabled message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SendEnabled - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.bank.v1beta1.SendEnabled; - - /** - * Verifies a SendEnabled message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SendEnabled message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SendEnabled - */ - public static fromObject(object: { [k: string]: any }): cosmos.bank.v1beta1.SendEnabled; - - /** - * Creates a plain object from a SendEnabled message. Also converts values to other types if specified. - * @param message SendEnabled - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.bank.v1beta1.SendEnabled, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SendEnabled to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Input. */ - interface IInput { - - /** Input address */ - address?: (string|null); - - /** Input coins */ - coins?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents an Input. */ - class Input implements IInput { - - /** - * Constructs a new Input. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.IInput); - - /** Input address. */ - public address: string; - - /** Input coins. */ - public coins: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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?: (string|null); - - /** Output coins */ - coins?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents an Output. */ - class Output implements IOutput { - - /** - * Constructs a new Output. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.IOutput); - - /** Output address. */ - public address: string; - - /** Output coins. */ - public coins: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.Output, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Output to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Supply. */ - interface ISupply { - - /** Supply total */ - total?: (cosmos.base.v1beta1.ICoin[]|null); - } - - /** Represents a Supply. */ - class Supply implements ISupply { - - /** - * Constructs a new Supply. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.ISupply); - - /** Supply total. */ - public total: cosmos.base.v1beta1.ICoin[]; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.ISupply, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.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.bank.v1beta1.Supply, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Supply to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DenomUnit. */ - interface IDenomUnit { - - /** DenomUnit denom */ - denom?: (string|null); - - /** DenomUnit exponent */ - exponent?: (number|null); - - /** DenomUnit aliases */ - aliases?: (string[]|null); - } - - /** Represents a DenomUnit. */ - class DenomUnit implements IDenomUnit { - - /** - * Constructs a new DenomUnit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.IDenomUnit); - - /** DenomUnit denom. */ - public denom: string; - - /** DenomUnit exponent. */ - public exponent: number; - - /** DenomUnit aliases. */ - public aliases: string[]; - - /** - * Encodes the specified DenomUnit message. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. - * @param message DenomUnit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.bank.v1beta1.IDenomUnit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DenomUnit message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.DenomUnit.verify|verify} messages. - * @param message DenomUnit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.bank.v1beta1.IDenomUnit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DenomUnit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DenomUnit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.bank.v1beta1.DenomUnit; - - /** - * Decodes a DenomUnit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DenomUnit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.bank.v1beta1.DenomUnit; - - /** - * Verifies a DenomUnit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DenomUnit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DenomUnit - */ - public static fromObject(object: { [k: string]: any }): cosmos.bank.v1beta1.DenomUnit; - - /** - * Creates a plain object from a DenomUnit message. Also converts values to other types if specified. - * @param message DenomUnit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.bank.v1beta1.DenomUnit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DenomUnit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Metadata. */ - interface IMetadata { - - /** Metadata description */ - description?: (string|null); - - /** Metadata denom_units */ - denom_units?: (cosmos.bank.v1beta1.IDenomUnit[]|null); - - /** Metadata base */ - base?: (string|null); - - /** Metadata display */ - display?: (string|null); - - /** Metadata name */ - name?: (string|null); - - /** Metadata symbol */ - symbol?: (string|null); - } - - /** Represents a Metadata. */ - class Metadata implements IMetadata { - - /** - * Constructs a new Metadata. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos.bank.v1beta1.IMetadata); - - /** Metadata description. */ - public description: string; - - /** Metadata denom_units. */ - public denom_units: cosmos.bank.v1beta1.IDenomUnit[]; - - /** Metadata base. */ - public base: string; - - /** Metadata display. */ - public display: string; - - /** Metadata name. */ - public name: string; - - /** Metadata symbol. */ - public symbol: string; - - /** - * Encodes the specified Metadata message. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos.bank.v1beta1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metadata message, length delimited. Does not implicitly {@link cosmos.bank.v1beta1.Metadata.verify|verify} messages. - * @param message Metadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos.bank.v1beta1.IMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos.bank.v1beta1.Metadata; - - /** - * Decodes a Metadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos.bank.v1beta1.Metadata; - - /** - * Verifies a Metadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Metadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metadata - */ - public static fromObject(object: { [k: string]: any }): cosmos.bank.v1beta1.Metadata; - - /** - * Creates a plain object from a Metadata message. Also converts values to other types if specified. - * @param message Metadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos.bank.v1beta1.Metadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } -} - -/** Namespace cosmos_proto. */ -export namespace cosmos_proto { - - /** Properties of an InterfaceDescriptor. */ - interface IInterfaceDescriptor { - - /** InterfaceDescriptor name */ - name?: (string|null); - - /** InterfaceDescriptor description */ - description?: (string|null); - } - - /** Represents an InterfaceDescriptor. */ - class InterfaceDescriptor implements IInterfaceDescriptor { - - /** - * Constructs a new InterfaceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IInterfaceDescriptor); - - /** InterfaceDescriptor name. */ - public name: string; - - /** InterfaceDescriptor description. */ - public description: string; - - /** - * Encodes the specified InterfaceDescriptor message. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified InterfaceDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.InterfaceDescriptor.verify|verify} messages. - * @param message InterfaceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IInterfaceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.InterfaceDescriptor; - - /** - * Decodes an InterfaceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns InterfaceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.InterfaceDescriptor; - - /** - * Verifies an InterfaceDescriptor message. - * @param message Plain 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 InterfaceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns InterfaceDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.InterfaceDescriptor; - - /** - * Creates a plain object from an InterfaceDescriptor message. Also converts values to other types if specified. - * @param message InterfaceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.InterfaceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this InterfaceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ScalarDescriptor. */ - interface IScalarDescriptor { - - /** ScalarDescriptor name */ - name?: (string|null); - - /** ScalarDescriptor description */ - description?: (string|null); - - /** ScalarDescriptor field_type */ - field_type?: (cosmos_proto.ScalarType[]|null); - - /** ScalarDescriptor legacy_amino_encoding */ - legacy_amino_encoding?: (string|null); - } - - /** Represents a ScalarDescriptor. */ - class ScalarDescriptor implements IScalarDescriptor { - - /** - * Constructs a new ScalarDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_proto.IScalarDescriptor); - - /** ScalarDescriptor name. */ - public name: string; - - /** ScalarDescriptor description. */ - public description: string; - - /** ScalarDescriptor field_type. */ - public field_type: cosmos_proto.ScalarType[]; - - /** ScalarDescriptor legacy_amino_encoding. */ - public legacy_amino_encoding: string; - - /** - * Encodes the specified ScalarDescriptor message. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScalarDescriptor message, length delimited. Does not implicitly {@link cosmos_proto.ScalarDescriptor.verify|verify} messages. - * @param message ScalarDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_proto.IScalarDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_proto.ScalarDescriptor; - - /** - * Decodes a ScalarDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScalarDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_proto.ScalarDescriptor; - - /** - * Verifies a ScalarDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScalarDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScalarDescriptor - */ - public static fromObject(object: { [k: string]: any }): cosmos_proto.ScalarDescriptor; - - /** - * Creates a plain object from a ScalarDescriptor message. Also converts values to other types if specified. - * @param message ScalarDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_proto.ScalarDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScalarDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** ScalarType enum. */ - enum ScalarType { - SCALAR_TYPE_UNSPECIFIED = 0, - SCALAR_TYPE_STRING = 1, - SCALAR_TYPE_BYTES = 2 - } -} - -/** Namespace tendermint. */ -export namespace tendermint { - - /** Namespace crypto. */ - namespace crypto { - - /** Properties of a Proof. */ - interface IProof { - - /** Proof total */ - total?: (Long|null); - - /** Proof index */ - index?: (Long|null); - - /** Proof leaf_hash */ - leaf_hash?: (Uint8Array|null); - - /** Proof aunts */ - aunts?: (Uint8Array[]|null); - } - - /** Represents a Proof. */ - class Proof implements IProof { - - /** - * Constructs a new Proof. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IProof); - - /** Proof total. */ - public total: Long; - - /** Proof index. */ - public index: Long; - - /** Proof leaf_hash. */ - public leaf_hash: Uint8Array; - - /** Proof aunts. */ - public aunts: Uint8Array[]; - - /** - * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.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.IProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.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.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.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.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.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.Proof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Proof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValueOp. */ - interface IValueOp { - - /** ValueOp key */ - key?: (Uint8Array|null); - - /** ValueOp proof */ - proof?: (tendermint.crypto.IProof|null); - } - - /** Represents a ValueOp. */ - class ValueOp implements IValueOp { - - /** - * Constructs a new ValueOp. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IValueOp); - - /** ValueOp key. */ - public key: Uint8Array; - - /** ValueOp proof. */ - public proof?: (tendermint.crypto.IProof|null); - - /** - * Encodes the specified ValueOp message. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @param message ValueOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.crypto.IValueOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValueOp message, length delimited. Does not implicitly {@link tendermint.crypto.ValueOp.verify|verify} messages. - * @param message ValueOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.IValueOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValueOp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValueOp - * @throws {Error} If the payload is 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.ValueOp; - - /** - * Decodes a ValueOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValueOp - * @throws {Error} If the 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.ValueOp; - - /** - * Verifies a ValueOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValueOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValueOp - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.ValueOp; - - /** - * Creates a plain object from a ValueOp message. Also converts values to other types if specified. - * @param message ValueOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.ValueOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValueOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DominoOp. */ - interface IDominoOp { - - /** DominoOp key */ - key?: (string|null); - - /** DominoOp input */ - input?: (string|null); - - /** DominoOp output */ - output?: (string|null); - } - - /** Represents a DominoOp. */ - class DominoOp implements IDominoOp { - - /** - * Constructs a new DominoOp. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IDominoOp); - - /** DominoOp key. */ - public key: string; - - /** DominoOp input. */ - public input: string; - - /** DominoOp output. */ - public output: string; - - /** - * Encodes the specified DominoOp message. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @param message DominoOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.crypto.IDominoOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DominoOp message, length delimited. Does not implicitly {@link tendermint.crypto.DominoOp.verify|verify} messages. - * @param message DominoOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.IDominoOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DominoOp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DominoOp - * @throws {Error} If the payload is 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.DominoOp; - - /** - * Decodes a DominoOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DominoOp - * @throws {Error} If the 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.DominoOp; - - /** - * Verifies a DominoOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DominoOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DominoOp - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.DominoOp; - - /** - * Creates a plain object from a DominoOp message. Also converts values to other types if specified. - * @param message DominoOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.DominoOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DominoOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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.IProofOp); - - /** ProofOp type. */ - public type: string; - - /** ProofOp key. */ - public key: Uint8Array; - - /** ProofOp data. */ - public data: Uint8Array; - - /** - * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.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.IProofOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.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.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.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.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.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.ProofOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProofOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ProofOps. */ - interface IProofOps { - - /** ProofOps ops */ - ops?: (tendermint.crypto.IProofOp[]|null); - } - - /** Represents a ProofOps. */ - class ProofOps implements IProofOps { - - /** - * Constructs a new ProofOps. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IProofOps); - - /** ProofOps ops. */ - public ops: tendermint.crypto.IProofOp[]; - - /** - * Encodes the specified ProofOps message. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @param message ProofOps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.crypto.IProofOps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProofOps message, length delimited. Does not implicitly {@link tendermint.crypto.ProofOps.verify|verify} messages. - * @param message ProofOps message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.IProofOps, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ProofOps message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ProofOps - * @throws {Error} If the payload is 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.ProofOps; - - /** - * Decodes a ProofOps message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ProofOps - * @throws {Error} If the 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.ProofOps; - - /** - * Verifies a ProofOps message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProofOps message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProofOps - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.ProofOps; - - /** - * Creates a plain object from a ProofOps message. Also converts values to other types if specified. - * @param message ProofOps - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.ProofOps, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProofOps to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PublicKey. */ - interface IPublicKey { - - /** PublicKey ed25519 */ - ed25519?: (Uint8Array|null); - - /** PublicKey secp256k1 */ - secp256k1?: (Uint8Array|null); - } - - /** Represents a PublicKey. */ - class PublicKey implements IPublicKey { - - /** - * Constructs a new PublicKey. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.crypto.IPublicKey); - - /** PublicKey ed25519. */ - public ed25519?: (Uint8Array|null); - - /** PublicKey secp256k1. */ - public secp256k1?: (Uint8Array|null); - - /** PublicKey sum. */ - public sum?: ("ed25519"|"secp256k1"); - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link tendermint.crypto.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: tendermint.crypto.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link tendermint.crypto.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: tendermint.crypto.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): tendermint.crypto.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)): tendermint.crypto.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 }): tendermint.crypto.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: tendermint.crypto.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublicKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace abci. */ - namespace abci { - - /** Properties of a Request. */ - interface IRequest { - - /** Request echo */ - echo?: (tendermint.abci.IRequestEcho|null); - - /** Request flush */ - flush?: (tendermint.abci.IRequestFlush|null); - - /** Request info */ - info?: (tendermint.abci.IRequestInfo|null); - - /** Request set_option */ - set_option?: (tendermint.abci.IRequestSetOption|null); - - /** Request init_chain */ - init_chain?: (tendermint.abci.IRequestInitChain|null); - - /** Request query */ - query?: (tendermint.abci.IRequestQuery|null); - - /** Request begin_block */ - begin_block?: (tendermint.abci.IRequestBeginBlock|null); - - /** Request check_tx */ - check_tx?: (tendermint.abci.IRequestCheckTx|null); - - /** Request deliver_tx */ - deliver_tx?: (tendermint.abci.IRequestDeliverTx|null); - - /** Request end_block */ - end_block?: (tendermint.abci.IRequestEndBlock|null); - - /** Request commit */ - commit?: (tendermint.abci.IRequestCommit|null); - - /** Request list_snapshots */ - list_snapshots?: (tendermint.abci.IRequestListSnapshots|null); - - /** Request offer_snapshot */ - offer_snapshot?: (tendermint.abci.IRequestOfferSnapshot|null); - - /** Request load_snapshot_chunk */ - load_snapshot_chunk?: (tendermint.abci.IRequestLoadSnapshotChunk|null); - - /** Request apply_snapshot_chunk */ - apply_snapshot_chunk?: (tendermint.abci.IRequestApplySnapshotChunk|null); - } - - /** Represents a Request. */ - class Request implements IRequest { - - /** - * Constructs a new Request. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequest); - - /** Request echo. */ - public echo?: (tendermint.abci.IRequestEcho|null); - - /** Request flush. */ - public flush?: (tendermint.abci.IRequestFlush|null); - - /** Request info. */ - public info?: (tendermint.abci.IRequestInfo|null); - - /** Request set_option. */ - public set_option?: (tendermint.abci.IRequestSetOption|null); - - /** Request init_chain. */ - public init_chain?: (tendermint.abci.IRequestInitChain|null); - - /** Request query. */ - public query?: (tendermint.abci.IRequestQuery|null); - - /** Request begin_block. */ - public begin_block?: (tendermint.abci.IRequestBeginBlock|null); - - /** Request check_tx. */ - public check_tx?: (tendermint.abci.IRequestCheckTx|null); - - /** Request deliver_tx. */ - public deliver_tx?: (tendermint.abci.IRequestDeliverTx|null); - - /** Request end_block. */ - public end_block?: (tendermint.abci.IRequestEndBlock|null); - - /** Request commit. */ - public commit?: (tendermint.abci.IRequestCommit|null); - - /** Request list_snapshots. */ - public list_snapshots?: (tendermint.abci.IRequestListSnapshots|null); - - /** Request offer_snapshot. */ - public offer_snapshot?: (tendermint.abci.IRequestOfferSnapshot|null); - - /** Request load_snapshot_chunk. */ - public load_snapshot_chunk?: (tendermint.abci.IRequestLoadSnapshotChunk|null); - - /** Request apply_snapshot_chunk. */ - public apply_snapshot_chunk?: (tendermint.abci.IRequestApplySnapshotChunk|null); - - /** Request value. */ - public value?: ("echo"|"flush"|"info"|"set_option"|"init_chain"|"query"|"begin_block"|"check_tx"|"deliver_tx"|"end_block"|"commit"|"list_snapshots"|"offer_snapshot"|"load_snapshot_chunk"|"apply_snapshot_chunk"); - - /** - * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.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.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IRequestEcho); - - /** RequestEcho message. */ - public message: string; - - /** - * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.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.IRequestEcho, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IRequestFlush); - - /** - * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.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.IRequestFlush, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 block_version */ - block_version?: (Long|null); - - /** RequestInfo p2p_version */ - p2p_version?: (Long|null); - } - - /** Represents a RequestInfo. */ - class RequestInfo implements IRequestInfo { - - /** - * Constructs a new RequestInfo. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestInfo); - - /** RequestInfo version. */ - public version: string; - - /** RequestInfo block_version. */ - public block_version: Long; - - /** RequestInfo p2p_version. */ - public p2p_version: Long; - - /** - * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.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.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IRequestSetOption); - - /** RequestSetOption key. */ - public key: string; - - /** RequestSetOption value. */ - public value: string; - - /** - * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.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.IRequestSetOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 chain_id */ - chain_id?: (string|null); - - /** RequestInitChain consensus_params */ - consensus_params?: (tendermint.abci.IConsensusParams|null); - - /** RequestInitChain validators */ - validators?: (tendermint.abci.IValidatorUpdate[]|null); - - /** RequestInitChain app_state_bytes */ - app_state_bytes?: (Uint8Array|null); - - /** RequestInitChain initial_height */ - initial_height?: (Long|null); - } - - /** Represents a RequestInitChain. */ - class RequestInitChain implements IRequestInitChain { - - /** - * Constructs a new RequestInitChain. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestInitChain); - - /** RequestInitChain time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** RequestInitChain chain_id. */ - public chain_id: string; - - /** RequestInitChain consensus_params. */ - public consensus_params?: (tendermint.abci.IConsensusParams|null); - - /** RequestInitChain validators. */ - public validators: tendermint.abci.IValidatorUpdate[]; - - /** RequestInitChain app_state_bytes. */ - public app_state_bytes: Uint8Array; - - /** RequestInitChain initial_height. */ - public initial_height: Long; - - /** - * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.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.IRequestInitChain, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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?: (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.IRequestQuery); - - /** RequestQuery data. */ - public data: Uint8Array; - - /** RequestQuery path. */ - public path: string; - - /** RequestQuery height. */ - public height: Long; - - /** RequestQuery prove. */ - public prove: boolean; - - /** - * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.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.IRequestQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.types.IHeader|null); - - /** RequestBeginBlock last_commit_info */ - last_commit_info?: (tendermint.abci.ILastCommitInfo|null); - - /** RequestBeginBlock byzantine_validators */ - byzantine_validators?: (tendermint.abci.IEvidence[]|null); - } - - /** Represents a RequestBeginBlock. */ - class RequestBeginBlock implements IRequestBeginBlock { - - /** - * Constructs a new RequestBeginBlock. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestBeginBlock); - - /** RequestBeginBlock hash. */ - public hash: Uint8Array; - - /** RequestBeginBlock header. */ - public header?: (tendermint.types.IHeader|null); - - /** RequestBeginBlock last_commit_info. */ - public last_commit_info?: (tendermint.abci.ILastCommitInfo|null); - - /** RequestBeginBlock byzantine_validators. */ - public byzantine_validators: tendermint.abci.IEvidence[]; - - /** - * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.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.IRequestBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.CheckTxType|null); - } - - /** Represents a RequestCheckTx. */ - class RequestCheckTx implements IRequestCheckTx { - - /** - * Constructs a new RequestCheckTx. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestCheckTx); - - /** RequestCheckTx tx. */ - public tx: Uint8Array; - - /** RequestCheckTx type. */ - public type: tendermint.abci.CheckTxType; - - /** - * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.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.IRequestCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IRequestDeliverTx); - - /** RequestDeliverTx tx. */ - public tx: Uint8Array; - - /** - * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.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.IRequestDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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?: (Long|null); - } - - /** Represents a RequestEndBlock. */ - class RequestEndBlock implements IRequestEndBlock { - - /** - * Constructs a new RequestEndBlock. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestEndBlock); - - /** RequestEndBlock height. */ - public height: Long; - - /** - * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.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.IRequestEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IRequestCommit); - - /** - * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.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.IRequestCommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.RequestCommit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCommit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RequestListSnapshots. */ - interface IRequestListSnapshots { - } - - /** Represents a RequestListSnapshots. */ - class RequestListSnapshots implements IRequestListSnapshots { - - /** - * Constructs a new RequestListSnapshots. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestListSnapshots); - - /** - * Encodes the specified RequestListSnapshots message. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. - * @param message RequestListSnapshots message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IRequestListSnapshots, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.RequestListSnapshots.verify|verify} messages. - * @param message RequestListSnapshots message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IRequestListSnapshots, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestListSnapshots message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestListSnapshots - * @throws {Error} If the payload is 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.RequestListSnapshots; - - /** - * Decodes a RequestListSnapshots message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestListSnapshots - * @throws {Error} If the 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.RequestListSnapshots; - - /** - * Verifies a RequestListSnapshots message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestListSnapshots message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestListSnapshots - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.RequestListSnapshots; - - /** - * Creates a plain object from a RequestListSnapshots message. Also converts values to other types if specified. - * @param message RequestListSnapshots - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.RequestListSnapshots, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestListSnapshots to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RequestOfferSnapshot. */ - interface IRequestOfferSnapshot { - - /** RequestOfferSnapshot snapshot */ - snapshot?: (tendermint.abci.ISnapshot|null); - - /** RequestOfferSnapshot app_hash */ - app_hash?: (Uint8Array|null); - } - - /** Represents a RequestOfferSnapshot. */ - class RequestOfferSnapshot implements IRequestOfferSnapshot { - - /** - * Constructs a new RequestOfferSnapshot. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestOfferSnapshot); - - /** RequestOfferSnapshot snapshot. */ - public snapshot?: (tendermint.abci.ISnapshot|null); - - /** RequestOfferSnapshot app_hash. */ - public app_hash: Uint8Array; - - /** - * Encodes the specified RequestOfferSnapshot message. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. - * @param message RequestOfferSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IRequestOfferSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.RequestOfferSnapshot.verify|verify} messages. - * @param message RequestOfferSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IRequestOfferSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestOfferSnapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestOfferSnapshot - * @throws {Error} If the payload is 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.RequestOfferSnapshot; - - /** - * Decodes a RequestOfferSnapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestOfferSnapshot - * @throws {Error} If the 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.RequestOfferSnapshot; - - /** - * Verifies a RequestOfferSnapshot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestOfferSnapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestOfferSnapshot - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.RequestOfferSnapshot; - - /** - * Creates a plain object from a RequestOfferSnapshot message. Also converts values to other types if specified. - * @param message RequestOfferSnapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.RequestOfferSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestOfferSnapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RequestLoadSnapshotChunk. */ - interface IRequestLoadSnapshotChunk { - - /** RequestLoadSnapshotChunk height */ - height?: (Long|null); - - /** RequestLoadSnapshotChunk format */ - format?: (number|null); - - /** RequestLoadSnapshotChunk chunk */ - chunk?: (number|null); - } - - /** Represents a RequestLoadSnapshotChunk. */ - class RequestLoadSnapshotChunk implements IRequestLoadSnapshotChunk { - - /** - * Constructs a new RequestLoadSnapshotChunk. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestLoadSnapshotChunk); - - /** RequestLoadSnapshotChunk height. */ - public height: Long; - - /** RequestLoadSnapshotChunk format. */ - public format: number; - - /** RequestLoadSnapshotChunk chunk. */ - public chunk: number; - - /** - * Encodes the specified RequestLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. - * @param message RequestLoadSnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IRequestLoadSnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestLoadSnapshotChunk.verify|verify} messages. - * @param message RequestLoadSnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IRequestLoadSnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestLoadSnapshotChunk - * @throws {Error} If the payload is 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.RequestLoadSnapshotChunk; - - /** - * Decodes a RequestLoadSnapshotChunk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestLoadSnapshotChunk - * @throws {Error} If the 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.RequestLoadSnapshotChunk; - - /** - * Verifies a RequestLoadSnapshotChunk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestLoadSnapshotChunk - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.RequestLoadSnapshotChunk; - - /** - * Creates a plain object from a RequestLoadSnapshotChunk message. Also converts values to other types if specified. - * @param message RequestLoadSnapshotChunk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.RequestLoadSnapshotChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestLoadSnapshotChunk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RequestApplySnapshotChunk. */ - interface IRequestApplySnapshotChunk { - - /** RequestApplySnapshotChunk index */ - index?: (number|null); - - /** RequestApplySnapshotChunk chunk */ - chunk?: (Uint8Array|null); - - /** RequestApplySnapshotChunk sender */ - sender?: (string|null); - } - - /** Represents a RequestApplySnapshotChunk. */ - class RequestApplySnapshotChunk implements IRequestApplySnapshotChunk { - - /** - * Constructs a new RequestApplySnapshotChunk. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IRequestApplySnapshotChunk); - - /** RequestApplySnapshotChunk index. */ - public index: number; - - /** RequestApplySnapshotChunk chunk. */ - public chunk: Uint8Array; - - /** RequestApplySnapshotChunk sender. */ - public sender: string; - - /** - * Encodes the specified RequestApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. - * @param message RequestApplySnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IRequestApplySnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.RequestApplySnapshotChunk.verify|verify} messages. - * @param message RequestApplySnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IRequestApplySnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestApplySnapshotChunk - * @throws {Error} If the payload is 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.RequestApplySnapshotChunk; - - /** - * Decodes a RequestApplySnapshotChunk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestApplySnapshotChunk - * @throws {Error} If the 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.RequestApplySnapshotChunk; - - /** - * Verifies a RequestApplySnapshotChunk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestApplySnapshotChunk - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.RequestApplySnapshotChunk; - - /** - * Creates a plain object from a RequestApplySnapshotChunk message. Also converts values to other types if specified. - * @param message RequestApplySnapshotChunk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.RequestApplySnapshotChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestApplySnapshotChunk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Response. */ - interface IResponse { - - /** Response exception */ - exception?: (tendermint.abci.IResponseException|null); - - /** Response echo */ - echo?: (tendermint.abci.IResponseEcho|null); - - /** Response flush */ - flush?: (tendermint.abci.IResponseFlush|null); - - /** Response info */ - info?: (tendermint.abci.IResponseInfo|null); - - /** Response set_option */ - set_option?: (tendermint.abci.IResponseSetOption|null); - - /** Response init_chain */ - init_chain?: (tendermint.abci.IResponseInitChain|null); - - /** Response query */ - query?: (tendermint.abci.IResponseQuery|null); - - /** Response begin_block */ - begin_block?: (tendermint.abci.IResponseBeginBlock|null); - - /** Response check_tx */ - check_tx?: (tendermint.abci.IResponseCheckTx|null); - - /** Response deliver_tx */ - deliver_tx?: (tendermint.abci.IResponseDeliverTx|null); - - /** Response end_block */ - end_block?: (tendermint.abci.IResponseEndBlock|null); - - /** Response commit */ - commit?: (tendermint.abci.IResponseCommit|null); - - /** Response list_snapshots */ - list_snapshots?: (tendermint.abci.IResponseListSnapshots|null); - - /** Response offer_snapshot */ - offer_snapshot?: (tendermint.abci.IResponseOfferSnapshot|null); - - /** Response load_snapshot_chunk */ - load_snapshot_chunk?: (tendermint.abci.IResponseLoadSnapshotChunk|null); - - /** Response apply_snapshot_chunk */ - apply_snapshot_chunk?: (tendermint.abci.IResponseApplySnapshotChunk|null); - } - - /** Represents a Response. */ - class Response implements IResponse { - - /** - * Constructs a new Response. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponse); - - /** Response exception. */ - public exception?: (tendermint.abci.IResponseException|null); - - /** Response echo. */ - public echo?: (tendermint.abci.IResponseEcho|null); - - /** Response flush. */ - public flush?: (tendermint.abci.IResponseFlush|null); - - /** Response info. */ - public info?: (tendermint.abci.IResponseInfo|null); - - /** Response set_option. */ - public set_option?: (tendermint.abci.IResponseSetOption|null); - - /** Response init_chain. */ - public init_chain?: (tendermint.abci.IResponseInitChain|null); - - /** Response query. */ - public query?: (tendermint.abci.IResponseQuery|null); - - /** Response begin_block. */ - public begin_block?: (tendermint.abci.IResponseBeginBlock|null); - - /** Response check_tx. */ - public check_tx?: (tendermint.abci.IResponseCheckTx|null); - - /** Response deliver_tx. */ - public deliver_tx?: (tendermint.abci.IResponseDeliverTx|null); - - /** Response end_block. */ - public end_block?: (tendermint.abci.IResponseEndBlock|null); - - /** Response commit. */ - public commit?: (tendermint.abci.IResponseCommit|null); - - /** Response list_snapshots. */ - public list_snapshots?: (tendermint.abci.IResponseListSnapshots|null); - - /** Response offer_snapshot. */ - public offer_snapshot?: (tendermint.abci.IResponseOfferSnapshot|null); - - /** Response load_snapshot_chunk. */ - public load_snapshot_chunk?: (tendermint.abci.IResponseLoadSnapshotChunk|null); - - /** Response apply_snapshot_chunk. */ - public apply_snapshot_chunk?: (tendermint.abci.IResponseApplySnapshotChunk|null); - - /** Response value. */ - public value?: ("exception"|"echo"|"flush"|"info"|"set_option"|"init_chain"|"query"|"begin_block"|"check_tx"|"deliver_tx"|"end_block"|"commit"|"list_snapshots"|"offer_snapshot"|"load_snapshot_chunk"|"apply_snapshot_chunk"); - - /** - * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.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.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IResponseException); - - /** ResponseException error. */ - public error: string; - - /** - * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.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.IResponseException, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IResponseEcho); - - /** ResponseEcho message. */ - public message: string; - - /** - * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.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.IResponseEcho, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IResponseFlush); - - /** - * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.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.IResponseFlush, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 app_version */ - app_version?: (Long|null); - - /** ResponseInfo last_block_height */ - last_block_height?: (Long|null); - - /** ResponseInfo last_block_app_hash */ - last_block_app_hash?: (Uint8Array|null); - } - - /** Represents a ResponseInfo. */ - class ResponseInfo implements IResponseInfo { - - /** - * Constructs a new ResponseInfo. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseInfo); - - /** ResponseInfo data. */ - public data: string; - - /** ResponseInfo version. */ - public version: string; - - /** ResponseInfo app_version. */ - public app_version: Long; - - /** ResponseInfo last_block_height. */ - public last_block_height: Long; - - /** ResponseInfo last_block_app_hash. */ - public last_block_app_hash: Uint8Array; - - /** - * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.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.IResponseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IResponseSetOption); - - /** ResponseSetOption code. */ - public code: number; - - /** ResponseSetOption log. */ - public log: string; - - /** ResponseSetOption info. */ - public info: string; - - /** - * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.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.IResponseSetOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 consensus_params */ - consensus_params?: (tendermint.abci.IConsensusParams|null); - - /** ResponseInitChain validators */ - validators?: (tendermint.abci.IValidatorUpdate[]|null); - - /** ResponseInitChain app_hash */ - app_hash?: (Uint8Array|null); - } - - /** Represents a ResponseInitChain. */ - class ResponseInitChain implements IResponseInitChain { - - /** - * Constructs a new ResponseInitChain. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseInitChain); - - /** ResponseInitChain consensus_params. */ - public consensus_params?: (tendermint.abci.IConsensusParams|null); - - /** ResponseInitChain validators. */ - public validators: tendermint.abci.IValidatorUpdate[]; - - /** ResponseInitChain app_hash. */ - public app_hash: Uint8Array; - - /** - * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.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.IResponseInitChain, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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?: (Long|null); - - /** ResponseQuery key */ - key?: (Uint8Array|null); - - /** ResponseQuery value */ - value?: (Uint8Array|null); - - /** ResponseQuery proof_ops */ - proof_ops?: (tendermint.crypto.IProofOps|null); - - /** ResponseQuery height */ - height?: (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.IResponseQuery); - - /** ResponseQuery code. */ - public code: number; - - /** ResponseQuery log. */ - public log: string; - - /** ResponseQuery info. */ - public info: string; - - /** ResponseQuery index. */ - public index: Long; - - /** ResponseQuery key. */ - public key: Uint8Array; - - /** ResponseQuery value. */ - public value: Uint8Array; - - /** ResponseQuery proof_ops. */ - public proof_ops?: (tendermint.crypto.IProofOps|null); - - /** ResponseQuery height. */ - public height: Long; - - /** ResponseQuery codespace. */ - public codespace: string; - - /** - * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.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.IResponseQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IEvent[]|null); - } - - /** Represents a ResponseBeginBlock. */ - class ResponseBeginBlock implements IResponseBeginBlock { - - /** - * Constructs a new ResponseBeginBlock. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseBeginBlock); - - /** ResponseBeginBlock events. */ - public events: tendermint.abci.IEvent[]; - - /** - * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.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.IResponseBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 gas_wanted */ - gas_wanted?: (Long|null); - - /** ResponseCheckTx gas_used */ - gas_used?: (Long|null); - - /** ResponseCheckTx events */ - events?: (tendermint.abci.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.IResponseCheckTx); - - /** ResponseCheckTx code. */ - public code: number; - - /** ResponseCheckTx data. */ - public data: Uint8Array; - - /** ResponseCheckTx log. */ - public log: string; - - /** ResponseCheckTx info. */ - public info: string; - - /** ResponseCheckTx gas_wanted. */ - public gas_wanted: Long; - - /** ResponseCheckTx gas_used. */ - public gas_used: Long; - - /** ResponseCheckTx events. */ - public events: tendermint.abci.IEvent[]; - - /** ResponseCheckTx codespace. */ - public codespace: string; - - /** - * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.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.IResponseCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 gas_wanted */ - gas_wanted?: (Long|null); - - /** ResponseDeliverTx gas_used */ - gas_used?: (Long|null); - - /** ResponseDeliverTx events */ - events?: (tendermint.abci.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.IResponseDeliverTx); - - /** ResponseDeliverTx code. */ - public code: number; - - /** ResponseDeliverTx data. */ - public data: Uint8Array; - - /** ResponseDeliverTx log. */ - public log: string; - - /** ResponseDeliverTx info. */ - public info: string; - - /** ResponseDeliverTx gas_wanted. */ - public gas_wanted: Long; - - /** ResponseDeliverTx gas_used. */ - public gas_used: Long; - - /** ResponseDeliverTx events. */ - public events: tendermint.abci.IEvent[]; - - /** ResponseDeliverTx codespace. */ - public codespace: string; - - /** - * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.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.IResponseDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 validator_updates */ - validator_updates?: (tendermint.abci.IValidatorUpdate[]|null); - - /** ResponseEndBlock consensus_param_updates */ - consensus_param_updates?: (tendermint.abci.IConsensusParams|null); - - /** ResponseEndBlock events */ - events?: (tendermint.abci.IEvent[]|null); - } - - /** Represents a ResponseEndBlock. */ - class ResponseEndBlock implements IResponseEndBlock { - - /** - * Constructs a new ResponseEndBlock. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseEndBlock); - - /** ResponseEndBlock validator_updates. */ - public validator_updates: tendermint.abci.IValidatorUpdate[]; - - /** ResponseEndBlock consensus_param_updates. */ - public consensus_param_updates?: (tendermint.abci.IConsensusParams|null); - - /** ResponseEndBlock events. */ - public events: tendermint.abci.IEvent[]; - - /** - * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.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.IResponseEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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); - - /** ResponseCommit retain_height */ - retain_height?: (Long|null); - } - - /** Represents a ResponseCommit. */ - class ResponseCommit implements IResponseCommit { - - /** - * Constructs a new ResponseCommit. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseCommit); - - /** ResponseCommit data. */ - public data: Uint8Array; - - /** ResponseCommit retain_height. */ - public retain_height: Long; - - /** - * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.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.IResponseCommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.ResponseCommit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseCommit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ResponseListSnapshots. */ - interface IResponseListSnapshots { - - /** ResponseListSnapshots snapshots */ - snapshots?: (tendermint.abci.ISnapshot[]|null); - } - - /** Represents a ResponseListSnapshots. */ - class ResponseListSnapshots implements IResponseListSnapshots { - - /** - * Constructs a new ResponseListSnapshots. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseListSnapshots); - - /** ResponseListSnapshots snapshots. */ - public snapshots: tendermint.abci.ISnapshot[]; - - /** - * Encodes the specified ResponseListSnapshots message. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. - * @param message ResponseListSnapshots message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IResponseListSnapshots, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseListSnapshots message, length delimited. Does not implicitly {@link tendermint.abci.ResponseListSnapshots.verify|verify} messages. - * @param message ResponseListSnapshots message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IResponseListSnapshots, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResponseListSnapshots message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseListSnapshots - * @throws {Error} If the payload is 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.ResponseListSnapshots; - - /** - * Decodes a ResponseListSnapshots message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseListSnapshots - * @throws {Error} If the 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.ResponseListSnapshots; - - /** - * Verifies a ResponseListSnapshots message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseListSnapshots message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseListSnapshots - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.ResponseListSnapshots; - - /** - * Creates a plain object from a ResponseListSnapshots message. Also converts values to other types if specified. - * @param message ResponseListSnapshots - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.ResponseListSnapshots, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseListSnapshots to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ResponseOfferSnapshot. */ - interface IResponseOfferSnapshot { - - /** ResponseOfferSnapshot result */ - result?: (tendermint.abci.ResponseOfferSnapshot.Result|null); - } - - /** Represents a ResponseOfferSnapshot. */ - class ResponseOfferSnapshot implements IResponseOfferSnapshot { - - /** - * Constructs a new ResponseOfferSnapshot. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseOfferSnapshot); - - /** ResponseOfferSnapshot result. */ - public result: tendermint.abci.ResponseOfferSnapshot.Result; - - /** - * Encodes the specified ResponseOfferSnapshot message. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. - * @param message ResponseOfferSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IResponseOfferSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseOfferSnapshot message, length delimited. Does not implicitly {@link tendermint.abci.ResponseOfferSnapshot.verify|verify} messages. - * @param message ResponseOfferSnapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IResponseOfferSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResponseOfferSnapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseOfferSnapshot - * @throws {Error} If the payload is 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.ResponseOfferSnapshot; - - /** - * Decodes a ResponseOfferSnapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseOfferSnapshot - * @throws {Error} If the 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.ResponseOfferSnapshot; - - /** - * Verifies a ResponseOfferSnapshot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseOfferSnapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseOfferSnapshot - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.ResponseOfferSnapshot; - - /** - * Creates a plain object from a ResponseOfferSnapshot message. Also converts values to other types if specified. - * @param message ResponseOfferSnapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.ResponseOfferSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseOfferSnapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResponseOfferSnapshot { - - /** Result enum. */ - enum Result { - UNKNOWN = 0, - ACCEPT = 1, - ABORT = 2, - REJECT = 3, - REJECT_FORMAT = 4, - REJECT_SENDER = 5 - } - } - - /** Properties of a ResponseLoadSnapshotChunk. */ - interface IResponseLoadSnapshotChunk { - - /** ResponseLoadSnapshotChunk chunk */ - chunk?: (Uint8Array|null); - } - - /** Represents a ResponseLoadSnapshotChunk. */ - class ResponseLoadSnapshotChunk implements IResponseLoadSnapshotChunk { - - /** - * Constructs a new ResponseLoadSnapshotChunk. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseLoadSnapshotChunk); - - /** ResponseLoadSnapshotChunk chunk. */ - public chunk: Uint8Array; - - /** - * Encodes the specified ResponseLoadSnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. - * @param message ResponseLoadSnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IResponseLoadSnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseLoadSnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseLoadSnapshotChunk.verify|verify} messages. - * @param message ResponseLoadSnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IResponseLoadSnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseLoadSnapshotChunk - * @throws {Error} If the payload is 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.ResponseLoadSnapshotChunk; - - /** - * Decodes a ResponseLoadSnapshotChunk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseLoadSnapshotChunk - * @throws {Error} If the 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.ResponseLoadSnapshotChunk; - - /** - * Verifies a ResponseLoadSnapshotChunk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseLoadSnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseLoadSnapshotChunk - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.ResponseLoadSnapshotChunk; - - /** - * Creates a plain object from a ResponseLoadSnapshotChunk message. Also converts values to other types if specified. - * @param message ResponseLoadSnapshotChunk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.ResponseLoadSnapshotChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseLoadSnapshotChunk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ResponseApplySnapshotChunk. */ - interface IResponseApplySnapshotChunk { - - /** ResponseApplySnapshotChunk result */ - result?: (tendermint.abci.ResponseApplySnapshotChunk.Result|null); - - /** ResponseApplySnapshotChunk refetch_chunks */ - refetch_chunks?: (number[]|null); - - /** ResponseApplySnapshotChunk reject_senders */ - reject_senders?: (string[]|null); - } - - /** Represents a ResponseApplySnapshotChunk. */ - class ResponseApplySnapshotChunk implements IResponseApplySnapshotChunk { - - /** - * Constructs a new ResponseApplySnapshotChunk. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IResponseApplySnapshotChunk); - - /** ResponseApplySnapshotChunk result. */ - public result: tendermint.abci.ResponseApplySnapshotChunk.Result; - - /** ResponseApplySnapshotChunk refetch_chunks. */ - public refetch_chunks: number[]; - - /** ResponseApplySnapshotChunk reject_senders. */ - public reject_senders: string[]; - - /** - * Encodes the specified ResponseApplySnapshotChunk message. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. - * @param message ResponseApplySnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IResponseApplySnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseApplySnapshotChunk message, length delimited. Does not implicitly {@link tendermint.abci.ResponseApplySnapshotChunk.verify|verify} messages. - * @param message ResponseApplySnapshotChunk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IResponseApplySnapshotChunk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResponseApplySnapshotChunk - * @throws {Error} If the payload is 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.ResponseApplySnapshotChunk; - - /** - * Decodes a ResponseApplySnapshotChunk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResponseApplySnapshotChunk - * @throws {Error} If the 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.ResponseApplySnapshotChunk; - - /** - * Verifies a ResponseApplySnapshotChunk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseApplySnapshotChunk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseApplySnapshotChunk - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.ResponseApplySnapshotChunk; - - /** - * Creates a plain object from a ResponseApplySnapshotChunk message. Also converts values to other types if specified. - * @param message ResponseApplySnapshotChunk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.ResponseApplySnapshotChunk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseApplySnapshotChunk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ResponseApplySnapshotChunk { - - /** Result enum. */ - enum Result { - UNKNOWN = 0, - ACCEPT = 1, - ABORT = 2, - RETRY = 3, - RETRY_SNAPSHOT = 4, - REJECT_SNAPSHOT = 5 - } - } - - /** Properties of a ConsensusParams. */ - interface IConsensusParams { - - /** ConsensusParams block */ - block?: (tendermint.abci.IBlockParams|null); - - /** ConsensusParams evidence */ - evidence?: (tendermint.types.IEvidenceParams|null); - - /** ConsensusParams validator */ - validator?: (tendermint.types.IValidatorParams|null); - - /** ConsensusParams version */ - version?: (tendermint.types.IVersionParams|null); - } - - /** Represents a ConsensusParams. */ - class ConsensusParams implements IConsensusParams { - - /** - * Constructs a new ConsensusParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IConsensusParams); - - /** ConsensusParams block. */ - public block?: (tendermint.abci.IBlockParams|null); - - /** ConsensusParams evidence. */ - public evidence?: (tendermint.types.IEvidenceParams|null); - - /** ConsensusParams validator. */ - public validator?: (tendermint.types.IValidatorParams|null); - - /** ConsensusParams version. */ - public version?: (tendermint.types.IVersionParams|null); - - /** - * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.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.IConsensusParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 max_bytes */ - max_bytes?: (Long|null); - - /** BlockParams max_gas */ - max_gas?: (Long|null); - } - - /** Represents a BlockParams. */ - class BlockParams implements IBlockParams { - - /** - * Constructs a new BlockParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IBlockParams); - - /** BlockParams max_bytes. */ - public max_bytes: Long; - - /** BlockParams max_gas. */ - public max_gas: Long; - - /** - * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.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.IBlockParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.BlockParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockParams 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.IVoteInfo[]|null); - } - - /** Represents a LastCommitInfo. */ - class LastCommitInfo implements ILastCommitInfo { - - /** - * Constructs a new LastCommitInfo. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.ILastCommitInfo); - - /** LastCommitInfo round. */ - public round: number; - - /** LastCommitInfo votes. */ - public votes: tendermint.abci.IVoteInfo[]; - - /** - * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.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.ILastCommitInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.abci.IEventAttribute[]|null); - } - - /** Represents an Event. */ - class Event implements IEvent { - - /** - * Constructs a new Event. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IEvent); - - /** Event type. */ - public type: string; - - /** Event attributes. */ - public attributes: tendermint.abci.IEventAttribute[]; - - /** - * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.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.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.Event, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Event to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EventAttribute. */ - interface IEventAttribute { - - /** EventAttribute key */ - key?: (Uint8Array|null); - - /** EventAttribute value */ - value?: (Uint8Array|null); - - /** EventAttribute index */ - index?: (boolean|null); - } - - /** Represents an EventAttribute. */ - class EventAttribute implements IEventAttribute { - - /** - * Constructs a new EventAttribute. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IEventAttribute); - - /** EventAttribute key. */ - public key: Uint8Array; - - /** EventAttribute value. */ - public value: Uint8Array; - - /** EventAttribute index. */ - public index: boolean; - - /** - * Encodes the specified EventAttribute message. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. - * @param message EventAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.IEventAttribute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EventAttribute message, length delimited. Does not implicitly {@link tendermint.abci.EventAttribute.verify|verify} messages. - * @param message EventAttribute message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.IEventAttribute, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EventAttribute message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EventAttribute - * @throws {Error} If the payload is 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.EventAttribute; - - /** - * Decodes an EventAttribute message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EventAttribute - * @throws {Error} If the 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.EventAttribute; - - /** - * Verifies an EventAttribute message. - * @param message Plain 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 EventAttribute message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EventAttribute - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.EventAttribute; - - /** - * Creates a plain object from an EventAttribute message. Also converts values to other types if specified. - * @param message EventAttribute - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.EventAttribute, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EventAttribute to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TxResult. */ - interface ITxResult { - - /** TxResult height */ - height?: (Long|null); - - /** TxResult index */ - index?: (number|null); - - /** TxResult tx */ - tx?: (Uint8Array|null); - - /** TxResult result */ - result?: (tendermint.abci.IResponseDeliverTx|null); - } - - /** Represents a TxResult. */ - class TxResult implements ITxResult { - - /** - * Constructs a new TxResult. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.ITxResult); - - /** TxResult height. */ - public height: Long; - - /** TxResult index. */ - public index: number; - - /** TxResult tx. */ - public tx: Uint8Array; - - /** TxResult result. */ - public result?: (tendermint.abci.IResponseDeliverTx|null); - - /** - * Encodes the specified TxResult message. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. - * @param message TxResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.ITxResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxResult message, length delimited. Does not implicitly {@link tendermint.abci.TxResult.verify|verify} messages. - * @param message TxResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.ITxResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TxResult - * @throws {Error} If the payload is 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.TxResult; - - /** - * Decodes a TxResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TxResult - * @throws {Error} If the 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.TxResult; - - /** - * Verifies a TxResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TxResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxResult - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.TxResult; - - /** - * Creates a plain object from a TxResult message. Also converts values to other types if specified. - * @param message TxResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.TxResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TxResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Validator. */ - interface IValidator { - - /** Validator address */ - address?: (Uint8Array|null); - - /** Validator power */ - power?: (Long|null); - } - - /** Represents a Validator. */ - class Validator implements IValidator { - - /** - * Constructs a new Validator. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IValidator); - - /** Validator address. */ - public address: Uint8Array; - - /** Validator power. */ - public power: Long; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.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.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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 pub_key */ - pub_key?: (tendermint.crypto.IPublicKey|null); - - /** ValidatorUpdate power */ - power?: (Long|null); - } - - /** Represents a ValidatorUpdate. */ - class ValidatorUpdate implements IValidatorUpdate { - - /** - * Constructs a new ValidatorUpdate. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IValidatorUpdate); - - /** ValidatorUpdate pub_key. */ - public pub_key?: (tendermint.crypto.IPublicKey|null); - - /** ValidatorUpdate power. */ - public power: Long; - - /** - * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.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.IValidatorUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.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.IValidator|null); - - /** VoteInfo signed_last_block */ - signed_last_block?: (boolean|null); - } - - /** Represents a VoteInfo. */ - class VoteInfo implements IVoteInfo { - - /** - * Constructs a new VoteInfo. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IVoteInfo); - - /** VoteInfo validator. */ - public validator?: (tendermint.abci.IValidator|null); - - /** VoteInfo signed_last_block. */ - public signed_last_block: boolean; - - /** - * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.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.IVoteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.VoteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VoteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** EvidenceType enum. */ - enum EvidenceType { - UNKNOWN = 0, - DUPLICATE_VOTE = 1, - LIGHT_CLIENT_ATTACK = 2 - } - - /** Properties of an Evidence. */ - interface IEvidence { - - /** Evidence type */ - type?: (tendermint.abci.EvidenceType|null); - - /** Evidence validator */ - validator?: (tendermint.abci.IValidator|null); - - /** Evidence height */ - height?: (Long|null); - - /** Evidence time */ - time?: (google.protobuf.ITimestamp|null); - - /** Evidence total_voting_power */ - total_voting_power?: (Long|null); - } - - /** Represents an Evidence. */ - class Evidence implements IEvidence { - - /** - * Constructs a new Evidence. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.IEvidence); - - /** Evidence type. */ - public type: tendermint.abci.EvidenceType; - - /** Evidence validator. */ - public validator?: (tendermint.abci.IValidator|null); - - /** Evidence height. */ - public height: Long; - - /** Evidence time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Evidence total_voting_power. */ - public total_voting_power: Long; - - /** - * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.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.IEvidence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.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.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.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.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.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.Evidence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Evidence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Snapshot. */ - interface ISnapshot { - - /** Snapshot height */ - height?: (Long|null); - - /** Snapshot format */ - format?: (number|null); - - /** Snapshot chunks */ - chunks?: (number|null); - - /** Snapshot hash */ - hash?: (Uint8Array|null); - - /** Snapshot metadata */ - metadata?: (Uint8Array|null); - } - - /** Represents a Snapshot. */ - class Snapshot implements ISnapshot { - - /** - * Constructs a new Snapshot. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.abci.ISnapshot); - - /** Snapshot height. */ - public height: Long; - - /** Snapshot format. */ - public format: number; - - /** Snapshot chunks. */ - public chunks: number; - - /** Snapshot hash. */ - public hash: Uint8Array; - - /** Snapshot metadata. */ - public metadata: Uint8Array; - - /** - * Encodes the specified Snapshot message. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.abci.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link tendermint.abci.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Snapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Snapshot - * @throws {Error} If the payload is 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.Snapshot; - - /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Snapshot - * @throws {Error} If the 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.Snapshot; - - /** - * Verifies a Snapshot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Snapshot - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.Snapshot; - - /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @param message Snapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Snapshot 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); - - /** - * 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.IRequestEcho, callback: tendermint.abci.ABCIApplication.EchoCallback): void; - - /** - * Calls Echo. - * @param request RequestEcho message or plain object - * @returns Promise - */ - public echo(request: tendermint.abci.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.IRequestFlush, callback: tendermint.abci.ABCIApplication.FlushCallback): void; - - /** - * Calls Flush. - * @param request RequestFlush message or plain object - * @returns Promise - */ - public flush(request: tendermint.abci.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.IRequestInfo, callback: tendermint.abci.ABCIApplication.InfoCallback): void; - - /** - * Calls Info. - * @param request RequestInfo message or plain object - * @returns Promise - */ - public info(request: tendermint.abci.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.IRequestSetOption, callback: tendermint.abci.ABCIApplication.SetOptionCallback): void; - - /** - * Calls SetOption. - * @param request RequestSetOption message or plain object - * @returns Promise - */ - public setOption(request: tendermint.abci.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.IRequestDeliverTx, callback: tendermint.abci.ABCIApplication.DeliverTxCallback): void; - - /** - * Calls DeliverTx. - * @param request RequestDeliverTx message or plain object - * @returns Promise - */ - public deliverTx(request: tendermint.abci.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.IRequestCheckTx, callback: tendermint.abci.ABCIApplication.CheckTxCallback): void; - - /** - * Calls CheckTx. - * @param request RequestCheckTx message or plain object - * @returns Promise - */ - public checkTx(request: tendermint.abci.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.IRequestQuery, callback: tendermint.abci.ABCIApplication.QueryCallback): void; - - /** - * Calls Query. - * @param request RequestQuery message or plain object - * @returns Promise - */ - public query(request: tendermint.abci.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.IRequestCommit, callback: tendermint.abci.ABCIApplication.CommitCallback): void; - - /** - * Calls Commit. - * @param request RequestCommit message or plain object - * @returns Promise - */ - public commit(request: tendermint.abci.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.IRequestInitChain, callback: tendermint.abci.ABCIApplication.InitChainCallback): void; - - /** - * Calls InitChain. - * @param request RequestInitChain message or plain object - * @returns Promise - */ - public initChain(request: tendermint.abci.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.IRequestBeginBlock, callback: tendermint.abci.ABCIApplication.BeginBlockCallback): void; - - /** - * Calls BeginBlock. - * @param request RequestBeginBlock message or plain object - * @returns Promise - */ - public beginBlock(request: tendermint.abci.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.IRequestEndBlock, callback: tendermint.abci.ABCIApplication.EndBlockCallback): void; - - /** - * Calls EndBlock. - * @param request RequestEndBlock message or plain object - * @returns Promise - */ - public endBlock(request: tendermint.abci.IRequestEndBlock): Promise; - - /** - * Calls ListSnapshots. - * @param request RequestListSnapshots message or plain object - * @param callback Node-style callback called with the error, if any, and ResponseListSnapshots - */ - public listSnapshots(request: tendermint.abci.IRequestListSnapshots, callback: tendermint.abci.ABCIApplication.ListSnapshotsCallback): void; - - /** - * Calls ListSnapshots. - * @param request RequestListSnapshots message or plain object - * @returns Promise - */ - public listSnapshots(request: tendermint.abci.IRequestListSnapshots): Promise; - - /** - * Calls OfferSnapshot. - * @param request RequestOfferSnapshot message or plain object - * @param callback Node-style callback called with the error, if any, and ResponseOfferSnapshot - */ - public offerSnapshot(request: tendermint.abci.IRequestOfferSnapshot, callback: tendermint.abci.ABCIApplication.OfferSnapshotCallback): void; - - /** - * Calls OfferSnapshot. - * @param request RequestOfferSnapshot message or plain object - * @returns Promise - */ - public offerSnapshot(request: tendermint.abci.IRequestOfferSnapshot): Promise; - - /** - * Calls LoadSnapshotChunk. - * @param request RequestLoadSnapshotChunk message or plain object - * @param callback Node-style callback called with the error, if any, and ResponseLoadSnapshotChunk - */ - public loadSnapshotChunk(request: tendermint.abci.IRequestLoadSnapshotChunk, callback: tendermint.abci.ABCIApplication.LoadSnapshotChunkCallback): void; - - /** - * Calls LoadSnapshotChunk. - * @param request RequestLoadSnapshotChunk message or plain object - * @returns Promise - */ - public loadSnapshotChunk(request: tendermint.abci.IRequestLoadSnapshotChunk): Promise; - - /** - * Calls ApplySnapshotChunk. - * @param request RequestApplySnapshotChunk message or plain object - * @param callback Node-style callback called with the error, if any, and ResponseApplySnapshotChunk - */ - public applySnapshotChunk(request: tendermint.abci.IRequestApplySnapshotChunk, callback: tendermint.abci.ABCIApplication.ApplySnapshotChunkCallback): void; - - /** - * Calls ApplySnapshotChunk. - * @param request RequestApplySnapshotChunk message or plain object - * @returns Promise - */ - public applySnapshotChunk(request: tendermint.abci.IRequestApplySnapshotChunk): Promise; - } - - namespace ABCIApplication { - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#echo}. - * @param error Error, if any - * @param [response] ResponseEcho - */ - type EchoCallback = (error: (Error|null), response?: tendermint.abci.ResponseEcho) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#flush}. - * @param error Error, if any - * @param [response] ResponseFlush - */ - type FlushCallback = (error: (Error|null), response?: tendermint.abci.ResponseFlush) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#info}. - * @param error Error, if any - * @param [response] ResponseInfo - */ - type InfoCallback = (error: (Error|null), response?: tendermint.abci.ResponseInfo) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#setOption}. - * @param error Error, if any - * @param [response] ResponseSetOption - */ - type SetOptionCallback = (error: (Error|null), response?: tendermint.abci.ResponseSetOption) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#deliverTx}. - * @param error Error, if any - * @param [response] ResponseDeliverTx - */ - type DeliverTxCallback = (error: (Error|null), response?: tendermint.abci.ResponseDeliverTx) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#checkTx}. - * @param error Error, if any - * @param [response] ResponseCheckTx - */ - type CheckTxCallback = (error: (Error|null), response?: tendermint.abci.ResponseCheckTx) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#query}. - * @param error Error, if any - * @param [response] ResponseQuery - */ - type QueryCallback = (error: (Error|null), response?: tendermint.abci.ResponseQuery) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#commit}. - * @param error Error, if any - * @param [response] ResponseCommit - */ - type CommitCallback = (error: (Error|null), response?: tendermint.abci.ResponseCommit) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#initChain}. - * @param error Error, if any - * @param [response] ResponseInitChain - */ - type InitChainCallback = (error: (Error|null), response?: tendermint.abci.ResponseInitChain) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#beginBlock}. - * @param error Error, if any - * @param [response] ResponseBeginBlock - */ - type BeginBlockCallback = (error: (Error|null), response?: tendermint.abci.ResponseBeginBlock) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#endBlock}. - * @param error Error, if any - * @param [response] ResponseEndBlock - */ - type EndBlockCallback = (error: (Error|null), response?: tendermint.abci.ResponseEndBlock) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#listSnapshots}. - * @param error Error, if any - * @param [response] ResponseListSnapshots - */ - type ListSnapshotsCallback = (error: (Error|null), response?: tendermint.abci.ResponseListSnapshots) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#offerSnapshot}. - * @param error Error, if any - * @param [response] ResponseOfferSnapshot - */ - type OfferSnapshotCallback = (error: (Error|null), response?: tendermint.abci.ResponseOfferSnapshot) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#loadSnapshotChunk}. - * @param error Error, if any - * @param [response] ResponseLoadSnapshotChunk - */ - type LoadSnapshotChunkCallback = (error: (Error|null), response?: tendermint.abci.ResponseLoadSnapshotChunk) => void; - - /** - * Callback as used by {@link tendermint.abci.ABCIApplication#applySnapshotChunk}. - * @param error Error, if any - * @param [response] ResponseApplySnapshotChunk - */ - type ApplySnapshotChunkCallback = (error: (Error|null), response?: tendermint.abci.ResponseApplySnapshotChunk) => void; - } - } - - /** Namespace types. */ - namespace types { - - /** BlockIDFlag enum. */ - enum BlockIDFlag { - BLOCK_ID_FLAG_UNKNOWN = 0, - BLOCK_ID_FLAG_ABSENT = 1, - BLOCK_ID_FLAG_COMMIT = 2, - BLOCK_ID_FLAG_NIL = 3 - } - - /** SignedMsgType enum. */ - enum SignedMsgType { - SIGNED_MSG_TYPE_UNKNOWN = 0, - SIGNED_MSG_TYPE_PREVOTE = 1, - SIGNED_MSG_TYPE_PRECOMMIT = 2, - SIGNED_MSG_TYPE_PROPOSAL = 32 - } - - /** 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.types.IPartSetHeader); - - /** PartSetHeader total. */ - public total: number; - - /** PartSetHeader hash. */ - public hash: Uint8Array; - - /** - * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.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.types.IPartSetHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.PartSetHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartSetHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Part. */ - interface IPart { - - /** Part index */ - index?: (number|null); - - /** Part bytes */ - bytes?: (Uint8Array|null); - - /** Part proof */ - proof?: (tendermint.crypto.IProof|null); - } - - /** Represents a Part. */ - class Part implements IPart { - - /** - * Constructs a new Part. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IPart); - - /** Part index. */ - public index: number; - - /** Part bytes. */ - public bytes: Uint8Array; - - /** Part proof. */ - public proof?: (tendermint.crypto.IProof|null); - - /** - * Encodes the specified Part message. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @param message Part message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IPart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Part message, length delimited. Does not implicitly {@link tendermint.types.Part.verify|verify} messages. - * @param message Part message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IPart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Part message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Part - * @throws {Error} If the payload is 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.types.Part; - - /** - * Decodes a Part message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Part - * @throws {Error} If the 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.types.Part; - - /** - * Verifies a Part message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Part message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Part - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.Part; - - /** - * Creates a plain object from a Part message. Also converts values to other types if specified. - * @param message Part - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.Part, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Part to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BlockID. */ - interface IBlockID { - - /** BlockID hash */ - hash?: (Uint8Array|null); - - /** BlockID part_set_header */ - part_set_header?: (tendermint.types.IPartSetHeader|null); - } - - /** Represents a BlockID. */ - class BlockID implements IBlockID { - - /** - * Constructs a new BlockID. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IBlockID); - - /** BlockID hash. */ - public hash: Uint8Array; - - /** BlockID part_set_header. */ - public part_set_header?: (tendermint.types.IPartSetHeader|null); - - /** - * Encodes the specified BlockID message. Does not implicitly {@link tendermint.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.types.IBlockID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.BlockID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Header. */ - interface IHeader { - - /** Header version */ - version?: (tendermint.version.IConsensus|null); - - /** Header chain_id */ - chain_id?: (string|null); - - /** Header height */ - height?: (Long|null); - - /** Header time */ - time?: (google.protobuf.ITimestamp|null); - - /** Header last_block_id */ - last_block_id?: (tendermint.types.IBlockID|null); - - /** Header last_commit_hash */ - last_commit_hash?: (Uint8Array|null); - - /** Header data_hash */ - data_hash?: (Uint8Array|null); - - /** Header validators_hash */ - validators_hash?: (Uint8Array|null); - - /** Header next_validators_hash */ - next_validators_hash?: (Uint8Array|null); - - /** Header consensus_hash */ - consensus_hash?: (Uint8Array|null); - - /** Header app_hash */ - app_hash?: (Uint8Array|null); - - /** Header last_results_hash */ - last_results_hash?: (Uint8Array|null); - - /** Header evidence_hash */ - evidence_hash?: (Uint8Array|null); - - /** Header proposer_address */ - proposer_address?: (Uint8Array|null); - } - - /** Represents a Header. */ - class Header implements IHeader { - - /** - * Constructs a new Header. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IHeader); - - /** Header version. */ - public version?: (tendermint.version.IConsensus|null); - - /** Header chain_id. */ - public chain_id: string; - - /** Header height. */ - public height: Long; - - /** Header time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Header last_block_id. */ - public last_block_id?: (tendermint.types.IBlockID|null); - - /** Header last_commit_hash. */ - public last_commit_hash: Uint8Array; - - /** Header data_hash. */ - public data_hash: Uint8Array; - - /** Header validators_hash. */ - public validators_hash: Uint8Array; - - /** Header next_validators_hash. */ - public next_validators_hash: Uint8Array; - - /** Header consensus_hash. */ - public consensus_hash: Uint8Array; - - /** Header app_hash. */ - public app_hash: Uint8Array; - - /** Header last_results_hash. */ - public last_results_hash: Uint8Array; - - /** Header evidence_hash. */ - public evidence_hash: Uint8Array; - - /** Header proposer_address. */ - public proposer_address: Uint8Array; - - /** - * Encodes the specified Header message. Does not implicitly {@link tendermint.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.types.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Data. */ - interface IData { - - /** Data txs */ - txs?: (Uint8Array[]|null); - } - - /** Represents a Data. */ - class Data implements IData { - - /** - * Constructs a new Data. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IData); - - /** Data txs. */ - public txs: Uint8Array[]; - - /** - * Encodes the specified Data message. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @param message Data message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Data message, length delimited. Does not implicitly {@link tendermint.types.Data.verify|verify} messages. - * @param message Data message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Data message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Data - * @throws {Error} If the payload is 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.types.Data; - - /** - * Decodes a Data message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Data - * @throws {Error} If the 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.types.Data; - - /** - * Verifies a Data message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Data message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Data - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.Data; - - /** - * Creates a plain object from a Data message. Also converts values to other types if specified. - * @param message Data - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.Data, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Data to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Vote. */ - interface IVote { - - /** Vote type */ - type?: (tendermint.types.SignedMsgType|null); - - /** Vote height */ - height?: (Long|null); - - /** Vote round */ - round?: (number|null); - - /** Vote block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** Vote timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Vote validator_address */ - validator_address?: (Uint8Array|null); - - /** Vote validator_index */ - validator_index?: (number|null); - - /** Vote signature */ - signature?: (Uint8Array|null); - } - - /** Represents a Vote. */ - class Vote implements IVote { - - /** - * Constructs a new Vote. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IVote); - - /** Vote type. */ - public type: tendermint.types.SignedMsgType; - - /** Vote height. */ - public height: Long; - - /** Vote round. */ - public round: number; - - /** Vote block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** Vote timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Vote validator_address. */ - public validator_address: Uint8Array; - - /** Vote validator_index. */ - public validator_index: number; - - /** Vote signature. */ - public signature: Uint8Array; - - /** - * Encodes the specified Vote message. Does not implicitly {@link tendermint.types.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: tendermint.types.IVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link tendermint.types.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: tendermint.types.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): tendermint.types.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)): tendermint.types.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 }): tendermint.types.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: tendermint.types.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Commit. */ - interface ICommit { - - /** Commit height */ - height?: (Long|null); - - /** Commit round */ - round?: (number|null); - - /** Commit block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** Commit signatures */ - signatures?: (tendermint.types.ICommitSig[]|null); - } - - /** Represents a Commit. */ - class Commit implements ICommit { - - /** - * Constructs a new Commit. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ICommit); - - /** Commit height. */ - public height: Long; - - /** Commit round. */ - public round: number; - - /** Commit block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** Commit signatures. */ - public signatures: tendermint.types.ICommitSig[]; - - /** - * Encodes the specified Commit message. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @param message Commit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ICommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Commit message, length delimited. Does not implicitly {@link tendermint.types.Commit.verify|verify} messages. - * @param message Commit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ICommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Commit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Commit - * @throws {Error} If the payload is 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.types.Commit; - - /** - * Decodes a Commit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Commit - * @throws {Error} If the 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.types.Commit; - - /** - * Verifies a Commit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Commit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Commit - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.Commit; - - /** - * Creates a plain object from a Commit message. Also converts values to other types if specified. - * @param message Commit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.Commit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Commit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommitSig. */ - interface ICommitSig { - - /** CommitSig block_id_flag */ - block_id_flag?: (tendermint.types.BlockIDFlag|null); - - /** CommitSig validator_address */ - validator_address?: (Uint8Array|null); - - /** CommitSig timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** CommitSig signature */ - signature?: (Uint8Array|null); - } - - /** Represents a CommitSig. */ - class CommitSig implements ICommitSig { - - /** - * Constructs a new CommitSig. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ICommitSig); - - /** CommitSig block_id_flag. */ - public block_id_flag: tendermint.types.BlockIDFlag; - - /** CommitSig validator_address. */ - public validator_address: Uint8Array; - - /** CommitSig timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** CommitSig signature. */ - public signature: Uint8Array; - - /** - * Encodes the specified CommitSig message. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @param message CommitSig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ICommitSig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitSig message, length delimited. Does not implicitly {@link tendermint.types.CommitSig.verify|verify} messages. - * @param message CommitSig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ICommitSig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitSig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitSig - * @throws {Error} If the payload is 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.types.CommitSig; - - /** - * Decodes a CommitSig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitSig - * @throws {Error} If the 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.types.CommitSig; - - /** - * Verifies a CommitSig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitSig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitSig - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.CommitSig; - - /** - * Creates a plain object from a CommitSig message. Also converts values to other types if specified. - * @param message CommitSig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.CommitSig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitSig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Proposal. */ - interface IProposal { - - /** Proposal type */ - type?: (tendermint.types.SignedMsgType|null); - - /** Proposal height */ - height?: (Long|null); - - /** Proposal round */ - round?: (number|null); - - /** Proposal pol_round */ - pol_round?: (number|null); - - /** Proposal block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** Proposal timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Proposal signature */ - signature?: (Uint8Array|null); - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - - /** - * Constructs a new Proposal. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IProposal); - - /** Proposal type. */ - public type: tendermint.types.SignedMsgType; - - /** Proposal height. */ - public height: Long; - - /** Proposal round. */ - public round: number; - - /** Proposal pol_round. */ - public pol_round: number; - - /** Proposal block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** Proposal timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Proposal signature. */ - public signature: Uint8Array; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link tendermint.types.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: tendermint.types.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link tendermint.types.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: tendermint.types.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): tendermint.types.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)): tendermint.types.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 }): tendermint.types.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: tendermint.types.Proposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Proposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SignedHeader. */ - interface ISignedHeader { - - /** SignedHeader header */ - header?: (tendermint.types.IHeader|null); - - /** SignedHeader commit */ - commit?: (tendermint.types.ICommit|null); - } - - /** Represents a SignedHeader. */ - class SignedHeader implements ISignedHeader { - - /** - * Constructs a new SignedHeader. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ISignedHeader); - - /** SignedHeader header. */ - public header?: (tendermint.types.IHeader|null); - - /** SignedHeader commit. */ - public commit?: (tendermint.types.ICommit|null); - - /** - * Encodes the specified SignedHeader message. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @param message SignedHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ISignedHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignedHeader message, length delimited. Does not implicitly {@link tendermint.types.SignedHeader.verify|verify} messages. - * @param message SignedHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ISignedHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SignedHeader message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SignedHeader - * @throws {Error} If the payload is 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.types.SignedHeader; - - /** - * Decodes a SignedHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SignedHeader - * @throws {Error} If the 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.types.SignedHeader; - - /** - * Verifies a SignedHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignedHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignedHeader - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.SignedHeader; - - /** - * Creates a plain object from a SignedHeader message. Also converts values to other types if specified. - * @param message SignedHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.SignedHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignedHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a LightBlock. */ - interface ILightBlock { - - /** LightBlock signed_header */ - signed_header?: (tendermint.types.ISignedHeader|null); - - /** LightBlock validator_set */ - validator_set?: (tendermint.types.IValidatorSet|null); - } - - /** Represents a LightBlock. */ - class LightBlock implements ILightBlock { - - /** - * Constructs a new LightBlock. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ILightBlock); - - /** LightBlock signed_header. */ - public signed_header?: (tendermint.types.ISignedHeader|null); - - /** LightBlock validator_set. */ - public validator_set?: (tendermint.types.IValidatorSet|null); - - /** - * Encodes the specified LightBlock message. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @param message LightBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ILightBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LightBlock message, length delimited. Does not implicitly {@link tendermint.types.LightBlock.verify|verify} messages. - * @param message LightBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ILightBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LightBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LightBlock - * @throws {Error} If the payload is 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.types.LightBlock; - - /** - * Decodes a LightBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LightBlock - * @throws {Error} If the 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.types.LightBlock; - - /** - * Verifies a LightBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LightBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LightBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.LightBlock; - - /** - * Creates a plain object from a LightBlock message. Also converts values to other types if specified. - * @param message LightBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.LightBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LightBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a BlockMeta. */ - interface IBlockMeta { - - /** BlockMeta block_id */ - block_id?: (tendermint.types.IBlockID|null); - - /** BlockMeta block_size */ - block_size?: (Long|null); - - /** BlockMeta header */ - header?: (tendermint.types.IHeader|null); - - /** BlockMeta num_txs */ - num_txs?: (Long|null); - } - - /** Represents a BlockMeta. */ - class BlockMeta implements IBlockMeta { - - /** - * Constructs a new BlockMeta. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IBlockMeta); - - /** BlockMeta block_id. */ - public block_id?: (tendermint.types.IBlockID|null); - - /** BlockMeta block_size. */ - public block_size: Long; - - /** BlockMeta header. */ - public header?: (tendermint.types.IHeader|null); - - /** BlockMeta num_txs. */ - public num_txs: Long; - - /** - * Encodes the specified BlockMeta message. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @param message BlockMeta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IBlockMeta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockMeta message, length delimited. Does not implicitly {@link tendermint.types.BlockMeta.verify|verify} messages. - * @param message BlockMeta message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IBlockMeta, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BlockMeta message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BlockMeta - * @throws {Error} If the payload is 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.types.BlockMeta; - - /** - * Decodes a BlockMeta message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BlockMeta - * @throws {Error} If the 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.types.BlockMeta; - - /** - * Verifies a BlockMeta message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlockMeta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockMeta - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.BlockMeta; - - /** - * Creates a plain object from a BlockMeta message. Also converts values to other types if specified. - * @param message BlockMeta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.BlockMeta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockMeta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a TxProof. */ - interface ITxProof { - - /** TxProof root_hash */ - root_hash?: (Uint8Array|null); - - /** TxProof data */ - data?: (Uint8Array|null); - - /** TxProof proof */ - proof?: (tendermint.crypto.IProof|null); - } - - /** Represents a TxProof. */ - class TxProof implements ITxProof { - - /** - * Constructs a new TxProof. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ITxProof); - - /** TxProof root_hash. */ - public root_hash: Uint8Array; - - /** TxProof data. */ - public data: Uint8Array; - - /** TxProof proof. */ - public proof?: (tendermint.crypto.IProof|null); - - /** - * Encodes the specified TxProof message. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @param message TxProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ITxProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxProof message, length delimited. Does not implicitly {@link tendermint.types.TxProof.verify|verify} messages. - * @param message TxProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ITxProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TxProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TxProof - * @throws {Error} If the payload is 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.types.TxProof; - - /** - * Decodes a TxProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TxProof - * @throws {Error} If the 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.types.TxProof; - - /** - * Verifies a TxProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TxProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxProof - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.TxProof; - - /** - * Creates a plain object from a TxProof message. Also converts values to other types if specified. - * @param message TxProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.TxProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TxProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorSet. */ - interface IValidatorSet { - - /** ValidatorSet validators */ - validators?: (tendermint.types.IValidator[]|null); - - /** ValidatorSet proposer */ - proposer?: (tendermint.types.IValidator|null); - - /** ValidatorSet total_voting_power */ - total_voting_power?: (Long|null); - } - - /** Represents a ValidatorSet. */ - class ValidatorSet implements IValidatorSet { - - /** - * Constructs a new ValidatorSet. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IValidatorSet); - - /** ValidatorSet validators. */ - public validators: tendermint.types.IValidator[]; - - /** ValidatorSet proposer. */ - public proposer?: (tendermint.types.IValidator|null); - - /** ValidatorSet total_voting_power. */ - public total_voting_power: Long; - - /** - * Encodes the specified ValidatorSet message. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @param message ValidatorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IValidatorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSet message, length delimited. Does not implicitly {@link tendermint.types.ValidatorSet.verify|verify} messages. - * @param message ValidatorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IValidatorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorSet - * @throws {Error} If the payload is 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.types.ValidatorSet; - - /** - * Decodes a ValidatorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSet - * @throws {Error} If the 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.types.ValidatorSet; - - /** - * Verifies a ValidatorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSet - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.ValidatorSet; - - /** - * Creates a plain object from a ValidatorSet message. Also converts values to other types if specified. - * @param message ValidatorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.ValidatorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Validator. */ - interface IValidator { - - /** Validator address */ - address?: (Uint8Array|null); - - /** Validator pub_key */ - pub_key?: (tendermint.crypto.IPublicKey|null); - - /** Validator voting_power */ - voting_power?: (Long|null); - - /** Validator proposer_priority */ - proposer_priority?: (Long|null); - } - - /** Represents a Validator. */ - class Validator implements IValidator { - - /** - * Constructs a new Validator. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IValidator); - - /** Validator address. */ - public address: Uint8Array; - - /** Validator pub_key. */ - public pub_key?: (tendermint.crypto.IPublicKey|null); - - /** Validator voting_power. */ - public voting_power: Long; - - /** Validator proposer_priority. */ - public proposer_priority: Long; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.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.types.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.Validator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SimpleValidator. */ - interface ISimpleValidator { - - /** SimpleValidator pub_key */ - pub_key?: (tendermint.crypto.IPublicKey|null); - - /** SimpleValidator voting_power */ - voting_power?: (Long|null); - } - - /** Represents a SimpleValidator. */ - class SimpleValidator implements ISimpleValidator { - - /** - * Constructs a new SimpleValidator. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.ISimpleValidator); - - /** SimpleValidator pub_key. */ - public pub_key?: (tendermint.crypto.IPublicKey|null); - - /** SimpleValidator voting_power. */ - public voting_power: Long; - - /** - * Encodes the specified SimpleValidator message. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @param message SimpleValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.ISimpleValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimpleValidator message, length delimited. Does not implicitly {@link tendermint.types.SimpleValidator.verify|verify} messages. - * @param message SimpleValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.ISimpleValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SimpleValidator - * @throws {Error} If the payload is 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.types.SimpleValidator; - - /** - * Decodes a SimpleValidator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SimpleValidator - * @throws {Error} If the 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.types.SimpleValidator; - - /** - * Verifies a SimpleValidator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimpleValidator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimpleValidator - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.SimpleValidator; - - /** - * Creates a plain object from a SimpleValidator message. Also converts values to other types if specified. - * @param message SimpleValidator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.SimpleValidator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimpleValidator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConsensusParams. */ - interface IConsensusParams { - - /** ConsensusParams block */ - block?: (tendermint.types.IBlockParams|null); - - /** ConsensusParams evidence */ - evidence?: (tendermint.types.IEvidenceParams|null); - - /** ConsensusParams validator */ - validator?: (tendermint.types.IValidatorParams|null); - - /** ConsensusParams version */ - version?: (tendermint.types.IVersionParams|null); - } - - /** Represents a ConsensusParams. */ - class ConsensusParams implements IConsensusParams { - - /** - * Constructs a new ConsensusParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IConsensusParams); - - /** ConsensusParams block. */ - public block?: (tendermint.types.IBlockParams|null); - - /** ConsensusParams evidence. */ - public evidence?: (tendermint.types.IEvidenceParams|null); - - /** ConsensusParams validator. */ - public validator?: (tendermint.types.IValidatorParams|null); - - /** ConsensusParams version. */ - public version?: (tendermint.types.IVersionParams|null); - - /** - * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.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.types.IConsensusParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.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 max_bytes */ - max_bytes?: (Long|null); - - /** BlockParams max_gas */ - max_gas?: (Long|null); - - /** BlockParams time_iota_ms */ - time_iota_ms?: (Long|null); - } - - /** Represents a BlockParams. */ - class BlockParams implements IBlockParams { - - /** - * Constructs a new BlockParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IBlockParams); - - /** BlockParams max_bytes. */ - public max_bytes: Long; - - /** BlockParams max_gas. */ - public max_gas: Long; - - /** BlockParams time_iota_ms. */ - public time_iota_ms: Long; - - /** - * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.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.types.IBlockParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.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 max_age_num_blocks */ - max_age_num_blocks?: (Long|null); - - /** EvidenceParams max_age_duration */ - max_age_duration?: (google.protobuf.IDuration|null); - - /** EvidenceParams max_bytes */ - max_bytes?: (Long|null); - } - - /** Represents an EvidenceParams. */ - class EvidenceParams implements IEvidenceParams { - - /** - * Constructs a new EvidenceParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IEvidenceParams); - - /** EvidenceParams max_age_num_blocks. */ - public max_age_num_blocks: Long; - - /** EvidenceParams max_age_duration. */ - public max_age_duration?: (google.protobuf.IDuration|null); - - /** EvidenceParams max_bytes. */ - public max_bytes: Long; - - /** - * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.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.types.IEvidenceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.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 pub_key_types */ - pub_key_types?: (string[]|null); - } - - /** Represents a ValidatorParams. */ - class ValidatorParams implements IValidatorParams { - - /** - * Constructs a new ValidatorParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IValidatorParams); - - /** ValidatorParams pub_key_types. */ - public pub_key_types: string[]; - - /** - * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.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.types.IValidatorParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.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.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.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.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.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.types.ValidatorParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a VersionParams. */ - interface IVersionParams { - - /** VersionParams app_version */ - app_version?: (Long|null); - } - - /** Represents a VersionParams. */ - class VersionParams implements IVersionParams { - - /** - * Constructs a new VersionParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IVersionParams); - - /** VersionParams app_version. */ - public app_version: Long; - - /** - * Encodes the specified VersionParams message. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. - * @param message VersionParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IVersionParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VersionParams message, length delimited. Does not implicitly {@link tendermint.types.VersionParams.verify|verify} messages. - * @param message VersionParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IVersionParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VersionParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VersionParams - * @throws {Error} If the payload is 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.types.VersionParams; - - /** - * Decodes a VersionParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VersionParams - * @throws {Error} If the 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.types.VersionParams; - - /** - * Verifies a VersionParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VersionParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VersionParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.VersionParams; - - /** - * Creates a plain object from a VersionParams message. Also converts values to other types if specified. - * @param message VersionParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.VersionParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VersionParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HashedParams. */ - interface IHashedParams { - - /** HashedParams block_max_bytes */ - block_max_bytes?: (Long|null); - - /** HashedParams block_max_gas */ - block_max_gas?: (Long|null); - } - - /** Represents a HashedParams. */ - class HashedParams implements IHashedParams { - - /** - * Constructs a new HashedParams. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.types.IHashedParams); - - /** HashedParams block_max_bytes. */ - public block_max_bytes: Long; - - /** HashedParams block_max_gas. */ - public block_max_gas: Long; - - /** - * Encodes the specified HashedParams message. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. - * @param message HashedParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.types.IHashedParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HashedParams message, length delimited. Does not implicitly {@link tendermint.types.HashedParams.verify|verify} messages. - * @param message HashedParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.types.IHashedParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HashedParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HashedParams - * @throws {Error} If the payload is 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.types.HashedParams; - - /** - * Decodes a HashedParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HashedParams - * @throws {Error} If the 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.types.HashedParams; - - /** - * Verifies a HashedParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HashedParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HashedParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.types.HashedParams; - - /** - * Creates a plain object from a HashedParams message. Also converts values to other types if specified. - * @param message HashedParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.types.HashedParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HashedParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace version. */ - namespace version { - - /** Properties of an App. */ - interface IApp { - - /** App protocol */ - protocol?: (Long|null); - - /** App software */ - software?: (string|null); - } - - /** Represents an App. */ - class App implements IApp { - - /** - * Constructs a new App. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.version.IApp); - - /** App protocol. */ - public protocol: Long; - - /** App software. */ - public software: string; - - /** - * Encodes the specified App message. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @param message App message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.version.IApp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified App message, length delimited. Does not implicitly {@link tendermint.version.App.verify|verify} messages. - * @param message App message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.version.IApp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an App message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns App - * @throws {Error} If the payload is 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.version.App; - - /** - * Decodes an App message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns App - * @throws {Error} If the 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.version.App; - - /** - * Verifies an App message. - * @param message Plain 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 App message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns App - */ - public static fromObject(object: { [k: string]: any }): tendermint.version.App; - - /** - * Creates a plain object from an App message. Also converts values to other types if specified. - * @param message App - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.version.App, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this App to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Consensus. */ - interface IConsensus { - - /** Consensus block */ - block?: (Long|null); - - /** Consensus app */ - app?: (Long|null); - } - - /** Represents a Consensus. */ - class Consensus implements IConsensus { - - /** - * Constructs a new Consensus. - * @param [properties] Properties to set - */ - constructor(properties?: tendermint.version.IConsensus); - - /** Consensus block. */ - public block: Long; - - /** Consensus app. */ - public app: Long; - - /** - * Encodes the specified Consensus message. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @param message Consensus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: tendermint.version.IConsensus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Consensus message, length delimited. Does not implicitly {@link tendermint.version.Consensus.verify|verify} messages. - * @param message Consensus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.version.IConsensus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Consensus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Consensus - * @throws {Error} If the payload is 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.version.Consensus; - - /** - * Decodes a Consensus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Consensus - * @throws {Error} If the 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.version.Consensus; - - /** - * Verifies a Consensus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Consensus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Consensus - */ - public static fromObject(object: { [k: string]: any }): tendermint.version.Consensus; - - /** - * Creates a plain object from a Consensus message. Also converts values to other types if specified. - * @param message Consensus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.version.Consensus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Consensus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} - -/** Namespace google. */ -export namespace google { - - /** Namespace protobuf. */ - namespace protobuf { - - /** 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[]; - - /** - * 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 public_dependency */ - public_dependency?: (number[]|null); - - /** FileDescriptorProto weak_dependency */ - weak_dependency?: (number[]|null); - - /** FileDescriptorProto message_type */ - message_type?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enum_type */ - enum_type?: (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 source_code_info */ - source_code_info?: (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 public_dependency. */ - public public_dependency: number[]; - - /** FileDescriptorProto weak_dependency. */ - public weak_dependency: number[]; - - /** FileDescriptorProto message_type. */ - public message_type: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enum_type. */ - public enum_type: 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 source_code_info. */ - public source_code_info?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * 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 nested_type */ - nested_type?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enum_type */ - enum_type?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extension_range */ - extension_range?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneof_decl */ - oneof_decl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range */ - reserved_range?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reserved_name */ - reserved_name?: (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 nested_type. */ - public nested_type: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enum_type. */ - public enum_type: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extension_range. */ - public extension_range: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneof_decl. */ - public oneof_decl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reserved_range. */ - public reserved_range: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reserved_name. */ - public reserved_name: string[]; - - /** - * 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; - - /** - * 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; - - /** - * 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 type_name */ - type_name?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto default_value */ - default_value?: (string|null); - - /** FieldDescriptorProto oneof_index */ - oneof_index?: (number|null); - - /** FieldDescriptorProto json_name */ - json_name?: (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 type_name. */ - public type_name: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto default_value. */ - public default_value: string; - - /** FieldDescriptorProto oneof_index. */ - public oneof_index: number; - - /** FieldDescriptorProto json_name. */ - public json_name: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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); - - /** - * 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 input_type */ - input_type?: (string|null); - - /** MethodDescriptorProto output_type */ - output_type?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming */ - client_streaming?: (boolean|null); - - /** MethodDescriptorProto server_streaming */ - server_streaming?: (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 input_type. */ - public input_type: string; - - /** MethodDescriptorProto output_type. */ - public output_type: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto client_streaming. */ - public client_streaming: boolean; - - /** MethodDescriptorProto server_streaming. */ - public server_streaming: boolean; - - /** - * 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 java_package */ - java_package?: (string|null); - - /** FileOptions java_outer_classname */ - java_outer_classname?: (string|null); - - /** FileOptions java_multiple_files */ - java_multiple_files?: (boolean|null); - - /** FileOptions java_generate_equals_and_hash */ - java_generate_equals_and_hash?: (boolean|null); - - /** FileOptions java_string_check_utf8 */ - java_string_check_utf8?: (boolean|null); - - /** FileOptions optimize_for */ - optimize_for?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions go_package */ - go_package?: (string|null); - - /** FileOptions cc_generic_services */ - cc_generic_services?: (boolean|null); - - /** FileOptions java_generic_services */ - java_generic_services?: (boolean|null); - - /** FileOptions py_generic_services */ - py_generic_services?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions cc_enable_arenas */ - cc_enable_arenas?: (boolean|null); - - /** FileOptions objc_class_prefix */ - objc_class_prefix?: (string|null); - - /** FileOptions csharp_namespace */ - csharp_namespace?: (string|null); - - /** FileOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .gogoproto.goproto_getters_all */ - ".gogoproto.goproto_getters_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_prefix_all */ - ".gogoproto.goproto_enum_prefix_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_stringer_all */ - ".gogoproto.goproto_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.verbose_equal_all */ - ".gogoproto.verbose_equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.face_all */ - ".gogoproto.face_all"?: (boolean|null); - - /** FileOptions .gogoproto.gostring_all */ - ".gogoproto.gostring_all"?: (boolean|null); - - /** FileOptions .gogoproto.populate_all */ - ".gogoproto.populate_all"?: (boolean|null); - - /** FileOptions .gogoproto.stringer_all */ - ".gogoproto.stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.onlyone_all */ - ".gogoproto.onlyone_all"?: (boolean|null); - - /** FileOptions .gogoproto.equal_all */ - ".gogoproto.equal_all"?: (boolean|null); - - /** FileOptions .gogoproto.description_all */ - ".gogoproto.description_all"?: (boolean|null); - - /** FileOptions .gogoproto.testgen_all */ - ".gogoproto.testgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.benchgen_all */ - ".gogoproto.benchgen_all"?: (boolean|null); - - /** FileOptions .gogoproto.marshaler_all */ - ".gogoproto.marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unmarshaler_all */ - ".gogoproto.unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.stable_marshaler_all */ - ".gogoproto.stable_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.sizer_all */ - ".gogoproto.sizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_enum_stringer_all */ - ".gogoproto.goproto_enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.enum_stringer_all */ - ".gogoproto.enum_stringer_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_marshaler_all */ - ".gogoproto.unsafe_marshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.unsafe_unmarshaler_all */ - ".gogoproto.unsafe_unmarshaler_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_extensions_map_all */ - ".gogoproto.goproto_extensions_map_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unrecognized_all */ - ".gogoproto.goproto_unrecognized_all"?: (boolean|null); - - /** FileOptions .gogoproto.gogoproto_import */ - ".gogoproto.gogoproto_import"?: (boolean|null); - - /** FileOptions .gogoproto.protosizer_all */ - ".gogoproto.protosizer_all"?: (boolean|null); - - /** FileOptions .gogoproto.compare_all */ - ".gogoproto.compare_all"?: (boolean|null); - - /** FileOptions .gogoproto.typedecl_all */ - ".gogoproto.typedecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.enumdecl_all */ - ".gogoproto.enumdecl_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_registration */ - ".gogoproto.goproto_registration"?: (boolean|null); - - /** FileOptions .gogoproto.messagename_all */ - ".gogoproto.messagename_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_sizecache_all */ - ".gogoproto.goproto_sizecache_all"?: (boolean|null); - - /** FileOptions .gogoproto.goproto_unkeyed_all */ - ".gogoproto.goproto_unkeyed_all"?: (boolean|null); - - /** FileOptions .cosmos_proto.declare_interface */ - ".cosmos_proto.declare_interface"?: (cosmos_proto.IInterfaceDescriptor[]|null); - - /** FileOptions .cosmos_proto.declare_scalar */ - ".cosmos_proto.declare_scalar"?: (cosmos_proto.IScalarDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions java_package. */ - public java_package: string; - - /** FileOptions java_outer_classname. */ - public java_outer_classname: string; - - /** FileOptions java_multiple_files. */ - public java_multiple_files: boolean; - - /** FileOptions java_generate_equals_and_hash. */ - public java_generate_equals_and_hash: boolean; - - /** FileOptions java_string_check_utf8. */ - public java_string_check_utf8: boolean; - - /** FileOptions optimize_for. */ - public optimize_for: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions go_package. */ - public go_package: string; - - /** FileOptions cc_generic_services. */ - public cc_generic_services: boolean; - - /** FileOptions java_generic_services. */ - public java_generic_services: boolean; - - /** FileOptions py_generic_services. */ - public py_generic_services: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions cc_enable_arenas. */ - public cc_enable_arenas: boolean; - - /** FileOptions objc_class_prefix. */ - public objc_class_prefix: string; - - /** FileOptions csharp_namespace. */ - public csharp_namespace: string; - - /** FileOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 message_set_wire_format */ - message_set_wire_format?: (boolean|null); - - /** MessageOptions no_standard_descriptor_accessor */ - no_standard_descriptor_accessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions map_entry */ - map_entry?: (boolean|null); - - /** MessageOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .gogoproto.goproto_getters */ - ".gogoproto.goproto_getters"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_stringer */ - ".gogoproto.goproto_stringer"?: (boolean|null); - - /** MessageOptions .gogoproto.verbose_equal */ - ".gogoproto.verbose_equal"?: (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.stable_marshaler */ - ".gogoproto.stable_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.sizer */ - ".gogoproto.sizer"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_marshaler */ - ".gogoproto.unsafe_marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafe_unmarshaler */ - ".gogoproto.unsafe_unmarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_extensions_map */ - ".gogoproto.goproto_extensions_map"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unrecognized */ - ".gogoproto.goproto_unrecognized"?: (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.goproto_sizecache */ - ".gogoproto.goproto_sizecache"?: (boolean|null); - - /** MessageOptions .gogoproto.goproto_unkeyed */ - ".gogoproto.goproto_unkeyed"?: (boolean|null); - - /** MessageOptions .cosmos_proto.implements_interface */ - ".cosmos_proto.implements_interface"?: (string[]|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions message_set_wire_format. */ - public message_set_wire_format: boolean; - - /** MessageOptions no_standard_descriptor_accessor. */ - public no_standard_descriptor_accessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions map_entry. */ - public map_entry: boolean; - - /** MessageOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|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); - - /** FieldOptions .cosmos_proto.accepts_interface */ - ".cosmos_proto.accepts_interface"?: (string|null); - - /** FieldOptions .cosmos_proto.scalar */ - ".cosmos_proto.scalar"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 allow_alias */ - allow_alias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumOptions .gogoproto.goproto_enum_prefix */ - ".gogoproto.goproto_enum_prefix"?: (boolean|null); - - /** EnumOptions .gogoproto.goproto_enum_stringer */ - ".gogoproto.goproto_enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_stringer */ - ".gogoproto.enum_stringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enum_customname */ - ".gogoproto.enum_customname"?: (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 allow_alias. */ - public allow_alias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumValueOptions .gogoproto.enumvalue_customname */ - ".gogoproto.enumvalue_customname"?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 uninterpreted_option */ - uninterpreted_option?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|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 uninterpreted_option. */ - public uninterpreted_option: google.protobuf.IUninterpretedOption[]; - - /** - * 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 identifier_value */ - identifier_value?: (string|null); - - /** UninterpretedOption positive_int_value */ - positive_int_value?: (Long|null); - - /** UninterpretedOption negative_int_value */ - negative_int_value?: (Long|null); - - /** UninterpretedOption double_value */ - double_value?: (number|null); - - /** UninterpretedOption string_value */ - string_value?: (Uint8Array|null); - - /** UninterpretedOption aggregate_value */ - aggregate_value?: (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 identifier_value. */ - public identifier_value: string; - - /** UninterpretedOption positive_int_value. */ - public positive_int_value: Long; - - /** UninterpretedOption negative_int_value. */ - public negative_int_value: Long; - - /** UninterpretedOption double_value. */ - public double_value: number; - - /** UninterpretedOption string_value. */ - public string_value: Uint8Array; - - /** UninterpretedOption aggregate_value. */ - public aggregate_value: string; - - /** - * 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 name_part */ - name_part: string; - - /** NamePart is_extension */ - is_extension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart name_part. */ - public name_part: string; - - /** NamePart is_extension. */ - public is_extension: boolean; - - /** - * 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[]; - - /** - * 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 leading_comments */ - leading_comments?: (string|null); - - /** Location trailing_comments */ - trailing_comments?: (string|null); - - /** Location leading_detached_comments */ - leading_detached_comments?: (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 leading_comments. */ - public leading_comments: string; - - /** Location trailing_comments. */ - public trailing_comments: string; - - /** Location leading_detached_comments. */ - public leading_detached_comments: string[]; - - /** - * 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[]; - - /** - * 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 source_file */ - source_file?: (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 source_file. */ - public source_file: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * 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 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; - - /** - * 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 Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (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: Long; - - /** Timestamp nanos. */ - public nanos: number; - - /** - * 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?: (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: Long; - - /** Duration nanos. */ - public nanos: number; - - /** - * 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 }; - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fully_decode_reserved_expansion */ - fully_decode_reserved_expansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fully_decode_reserved_expansion. */ - public fully_decode_reserved_expansion: boolean; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is 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.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the 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.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule response_body */ - response_body?: (string|null); - - /** HttpRule additional_bindings */ - additional_bindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule response_body. */ - public response_body: string; - - /** HttpRule additional_bindings. */ - public additional_bindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is 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.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the 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.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is 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.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the 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.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } -} - -/** Namespace osmosis. */ -export namespace osmosis { - - /** Namespace tokenfactory. */ - namespace tokenfactory { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Represents a Msg */ - class Msg extends $protobuf.rpc.Service { - - /** - * Constructs a new Msg 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); - - /** - * Calls CreateDenom. - * @param request MsgCreateDenom message or plain object - * @param callback Node-style callback called with the error, if any, and MsgCreateDenomResponse - */ - public createDenom(request: osmosis.tokenfactory.v1beta1.IMsgCreateDenom, callback: osmosis.tokenfactory.v1beta1.Msg.CreateDenomCallback): void; - - /** - * Calls CreateDenom. - * @param request MsgCreateDenom message or plain object - * @returns Promise - */ - public createDenom(request: osmosis.tokenfactory.v1beta1.IMsgCreateDenom): Promise; - - /** - * Calls Mint. - * @param request MsgMint message or plain object - * @param callback Node-style callback called with the error, if any, and MsgMintResponse - */ - public mint(request: osmosis.tokenfactory.v1beta1.IMsgMint, callback: osmosis.tokenfactory.v1beta1.Msg.MintCallback): void; - - /** - * Calls Mint. - * @param request MsgMint message or plain object - * @returns Promise - */ - public mint(request: osmosis.tokenfactory.v1beta1.IMsgMint): Promise; - - /** - * Calls Burn. - * @param request MsgBurn message or plain object - * @param callback Node-style callback called with the error, if any, and MsgBurnResponse - */ - public burn(request: osmosis.tokenfactory.v1beta1.IMsgBurn, callback: osmosis.tokenfactory.v1beta1.Msg.BurnCallback): void; - - /** - * Calls Burn. - * @param request MsgBurn message or plain object - * @returns Promise - */ - public burn(request: osmosis.tokenfactory.v1beta1.IMsgBurn): Promise; - - /** - * Calls ChangeAdmin. - * @param request MsgChangeAdmin message or plain object - * @param callback Node-style callback called with the error, if any, and MsgChangeAdminResponse - */ - public changeAdmin(request: osmosis.tokenfactory.v1beta1.IMsgChangeAdmin, callback: osmosis.tokenfactory.v1beta1.Msg.ChangeAdminCallback): void; - - /** - * Calls ChangeAdmin. - * @param request MsgChangeAdmin message or plain object - * @returns Promise - */ - public changeAdmin(request: osmosis.tokenfactory.v1beta1.IMsgChangeAdmin): Promise; - - /** - * Calls SetDenomMetadata. - * @param request MsgSetDenomMetadata message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSetDenomMetadataResponse - */ - public setDenomMetadata(request: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata, callback: osmosis.tokenfactory.v1beta1.Msg.SetDenomMetadataCallback): void; - - /** - * Calls SetDenomMetadata. - * @param request MsgSetDenomMetadata message or plain object - * @returns Promise - */ - public setDenomMetadata(request: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata): Promise; - - /** - * Calls SetBeforeSendHook. - * @param request MsgSetBeforeSendHook message or plain object - * @param callback Node-style callback called with the error, if any, and MsgSetBeforeSendHookResponse - */ - public setBeforeSendHook(request: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook, callback: osmosis.tokenfactory.v1beta1.Msg.SetBeforeSendHookCallback): void; - - /** - * Calls SetBeforeSendHook. - * @param request MsgSetBeforeSendHook message or plain object - * @returns Promise - */ - public setBeforeSendHook(request: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook): Promise; - - /** - * Calls ForceTransfer. - * @param request MsgForceTransfer message or plain object - * @param callback Node-style callback called with the error, if any, and MsgForceTransferResponse - */ - public forceTransfer(request: osmosis.tokenfactory.v1beta1.IMsgForceTransfer, callback: osmosis.tokenfactory.v1beta1.Msg.ForceTransferCallback): void; - - /** - * Calls ForceTransfer. - * @param request MsgForceTransfer message or plain object - * @returns Promise - */ - public forceTransfer(request: osmosis.tokenfactory.v1beta1.IMsgForceTransfer): Promise; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @param callback Node-style callback called with the error, if any, and MsgUpdateParamsResponse - */ - public updateParams(request: osmosis.tokenfactory.v1beta1.IMsgUpdateParams, callback: osmosis.tokenfactory.v1beta1.Msg.UpdateParamsCallback): void; - - /** - * Calls UpdateParams. - * @param request MsgUpdateParams message or plain object - * @returns Promise - */ - public updateParams(request: osmosis.tokenfactory.v1beta1.IMsgUpdateParams): Promise; - } - - namespace Msg { - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#createDenom}. - * @param error Error, if any - * @param [response] MsgCreateDenomResponse - */ - type CreateDenomCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#mint}. - * @param error Error, if any - * @param [response] MsgMintResponse - */ - type MintCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgMintResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#burn}. - * @param error Error, if any - * @param [response] MsgBurnResponse - */ - type BurnCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgBurnResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#changeAdmin}. - * @param error Error, if any - * @param [response] MsgChangeAdminResponse - */ - type ChangeAdminCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#setDenomMetadata}. - * @param error Error, if any - * @param [response] MsgSetDenomMetadataResponse - */ - type SetDenomMetadataCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#setBeforeSendHook}. - * @param error Error, if any - * @param [response] MsgSetBeforeSendHookResponse - */ - type SetBeforeSendHookCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#forceTransfer}. - * @param error Error, if any - * @param [response] MsgForceTransferResponse - */ - type ForceTransferCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgForceTransferResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Msg#updateParams}. - * @param error Error, if any - * @param [response] MsgUpdateParamsResponse - */ - type UpdateParamsCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse) => void; - } - - /** Properties of a MsgCreateDenom. */ - interface IMsgCreateDenom { - - /** MsgCreateDenom sender */ - sender?: (string|null); - - /** MsgCreateDenom subdenom */ - subdenom?: (string|null); - } - - /** Represents a MsgCreateDenom. */ - class MsgCreateDenom implements IMsgCreateDenom { - - /** - * Constructs a new MsgCreateDenom. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgCreateDenom); - - /** MsgCreateDenom sender. */ - public sender: string; - - /** MsgCreateDenom subdenom. */ - public subdenom: string; - - /** - * Encodes the specified MsgCreateDenom message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenom.verify|verify} messages. - * @param message MsgCreateDenom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgCreateDenom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateDenom message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenom.verify|verify} messages. - * @param message MsgCreateDenom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgCreateDenom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgCreateDenom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgCreateDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgCreateDenom; - - /** - * Decodes a MsgCreateDenom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgCreateDenom; - - /** - * Verifies a MsgCreateDenom message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgCreateDenom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateDenom - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgCreateDenom; - - /** - * Creates a plain object from a MsgCreateDenom message. Also converts values to other types if specified. - * @param message MsgCreateDenom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgCreateDenom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgCreateDenom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgCreateDenomResponse. */ - interface IMsgCreateDenomResponse { - - /** MsgCreateDenomResponse new_token_denom */ - new_token_denom?: (string|null); - } - - /** Represents a MsgCreateDenomResponse. */ - class MsgCreateDenomResponse implements IMsgCreateDenomResponse { - - /** - * Constructs a new MsgCreateDenomResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgCreateDenomResponse); - - /** MsgCreateDenomResponse new_token_denom. */ - public new_token_denom: string; - - /** - * Encodes the specified MsgCreateDenomResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse.verify|verify} messages. - * @param message MsgCreateDenomResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgCreateDenomResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateDenomResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse.verify|verify} messages. - * @param message MsgCreateDenomResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgCreateDenomResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgCreateDenomResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgCreateDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse; - - /** - * Decodes a MsgCreateDenomResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateDenomResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse; - - /** - * Verifies a MsgCreateDenomResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgCreateDenomResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateDenomResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse; - - /** - * Creates a plain object from a MsgCreateDenomResponse message. Also converts values to other types if specified. - * @param message MsgCreateDenomResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgCreateDenomResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgMint. */ - interface IMsgMint { - - /** MsgMint sender */ - sender?: (string|null); - - /** MsgMint amount */ - amount?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgMint mintToAddress */ - mintToAddress?: (string|null); - } - - /** Represents a MsgMint. */ - class MsgMint implements IMsgMint { - - /** - * Constructs a new MsgMint. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgMint); - - /** MsgMint sender. */ - public sender: string; - - /** MsgMint amount. */ - public amount?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgMint mintToAddress. */ - public mintToAddress: string; - - /** - * Encodes the specified MsgMint message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMint.verify|verify} messages. - * @param message MsgMint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgMint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgMint message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMint.verify|verify} messages. - * @param message MsgMint message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgMint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgMint message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgMint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgMint; - - /** - * Decodes a MsgMint message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgMint - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgMint; - - /** - * Verifies a MsgMint message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgMint message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgMint - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgMint; - - /** - * Creates a plain object from a MsgMint message. Also converts values to other types if specified. - * @param message MsgMint - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgMint, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgMint to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgMintResponse. */ - interface IMsgMintResponse { - } - - /** Represents a MsgMintResponse. */ - class MsgMintResponse implements IMsgMintResponse { - - /** - * Constructs a new MsgMintResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgMintResponse); - - /** - * Encodes the specified MsgMintResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMintResponse.verify|verify} messages. - * @param message MsgMintResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgMintResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgMintResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgMintResponse.verify|verify} messages. - * @param message MsgMintResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgMintResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgMintResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgMintResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgMintResponse; - - /** - * Decodes a MsgMintResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgMintResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgMintResponse; - - /** - * Verifies a MsgMintResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgMintResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgMintResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgMintResponse; - - /** - * Creates a plain object from a MsgMintResponse message. Also converts values to other types if specified. - * @param message MsgMintResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgMintResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgMintResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgBurn. */ - interface IMsgBurn { - - /** MsgBurn sender */ - sender?: (string|null); - - /** MsgBurn amount */ - amount?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgBurn burnFromAddress */ - burnFromAddress?: (string|null); - } - - /** Represents a MsgBurn. */ - class MsgBurn implements IMsgBurn { - - /** - * Constructs a new MsgBurn. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgBurn); - - /** MsgBurn sender. */ - public sender: string; - - /** MsgBurn amount. */ - public amount?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgBurn burnFromAddress. */ - public burnFromAddress: string; - - /** - * Encodes the specified MsgBurn message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurn.verify|verify} messages. - * @param message MsgBurn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgBurn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgBurn message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurn.verify|verify} messages. - * @param message MsgBurn message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgBurn, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgBurn message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgBurn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgBurn; - - /** - * Decodes a MsgBurn message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgBurn - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgBurn; - - /** - * Verifies a MsgBurn message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgBurn message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgBurn - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgBurn; - - /** - * Creates a plain object from a MsgBurn message. Also converts values to other types if specified. - * @param message MsgBurn - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgBurn, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgBurn to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgBurnResponse. */ - interface IMsgBurnResponse { - } - - /** Represents a MsgBurnResponse. */ - class MsgBurnResponse implements IMsgBurnResponse { - - /** - * Constructs a new MsgBurnResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgBurnResponse); - - /** - * Encodes the specified MsgBurnResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurnResponse.verify|verify} messages. - * @param message MsgBurnResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgBurnResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgBurnResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgBurnResponse.verify|verify} messages. - * @param message MsgBurnResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgBurnResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgBurnResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgBurnResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgBurnResponse; - - /** - * Decodes a MsgBurnResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgBurnResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgBurnResponse; - - /** - * Verifies a MsgBurnResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgBurnResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgBurnResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgBurnResponse; - - /** - * Creates a plain object from a MsgBurnResponse message. Also converts values to other types if specified. - * @param message MsgBurnResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgBurnResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgBurnResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChangeAdmin. */ - interface IMsgChangeAdmin { - - /** MsgChangeAdmin sender */ - sender?: (string|null); - - /** MsgChangeAdmin denom */ - denom?: (string|null); - - /** MsgChangeAdmin new_admin */ - new_admin?: (string|null); - } - - /** Represents a MsgChangeAdmin. */ - class MsgChangeAdmin implements IMsgChangeAdmin { - - /** - * Constructs a new MsgChangeAdmin. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgChangeAdmin); - - /** MsgChangeAdmin sender. */ - public sender: string; - - /** MsgChangeAdmin denom. */ - public denom: string; - - /** MsgChangeAdmin new_admin. */ - public new_admin: string; - - /** - * Encodes the specified MsgChangeAdmin message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdmin.verify|verify} messages. - * @param message MsgChangeAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgChangeAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChangeAdmin message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdmin.verify|verify} messages. - * @param message MsgChangeAdmin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgChangeAdmin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChangeAdmin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChangeAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgChangeAdmin; - - /** - * Decodes a MsgChangeAdmin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChangeAdmin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgChangeAdmin; - - /** - * Verifies a MsgChangeAdmin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChangeAdmin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChangeAdmin - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgChangeAdmin; - - /** - * Creates a plain object from a MsgChangeAdmin message. Also converts values to other types if specified. - * @param message MsgChangeAdmin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgChangeAdmin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChangeAdmin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChangeAdminResponse. */ - interface IMsgChangeAdminResponse { - } - - /** Represents a MsgChangeAdminResponse. */ - class MsgChangeAdminResponse implements IMsgChangeAdminResponse { - - /** - * Constructs a new MsgChangeAdminResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgChangeAdminResponse); - - /** - * Encodes the specified MsgChangeAdminResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse.verify|verify} messages. - * @param message MsgChangeAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgChangeAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChangeAdminResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse.verify|verify} messages. - * @param message MsgChangeAdminResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgChangeAdminResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChangeAdminResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChangeAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse; - - /** - * Decodes a MsgChangeAdminResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChangeAdminResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse; - - /** - * Verifies a MsgChangeAdminResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChangeAdminResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChangeAdminResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse; - - /** - * Creates a plain object from a MsgChangeAdminResponse message. Also converts values to other types if specified. - * @param message MsgChangeAdminResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChangeAdminResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSetBeforeSendHook. */ - interface IMsgSetBeforeSendHook { - - /** MsgSetBeforeSendHook sender */ - sender?: (string|null); - - /** MsgSetBeforeSendHook denom */ - denom?: (string|null); - - /** MsgSetBeforeSendHook contract_addr */ - contract_addr?: (string|null); - } - - /** Represents a MsgSetBeforeSendHook. */ - class MsgSetBeforeSendHook implements IMsgSetBeforeSendHook { - - /** - * Constructs a new MsgSetBeforeSendHook. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook); - - /** MsgSetBeforeSendHook sender. */ - public sender: string; - - /** MsgSetBeforeSendHook denom. */ - public denom: string; - - /** MsgSetBeforeSendHook contract_addr. */ - public contract_addr: string; - - /** - * Encodes the specified MsgSetBeforeSendHook message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook.verify|verify} messages. - * @param message MsgSetBeforeSendHook message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSetBeforeSendHook message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook.verify|verify} messages. - * @param message MsgSetBeforeSendHook message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHook, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSetBeforeSendHook message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSetBeforeSendHook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook; - - /** - * Decodes a MsgSetBeforeSendHook message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSetBeforeSendHook - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook; - - /** - * Verifies a MsgSetBeforeSendHook message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSetBeforeSendHook message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSetBeforeSendHook - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook; - - /** - * Creates a plain object from a MsgSetBeforeSendHook message. Also converts values to other types if specified. - * @param message MsgSetBeforeSendHook - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSetBeforeSendHook to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSetBeforeSendHookResponse. */ - interface IMsgSetBeforeSendHookResponse { - } - - /** Represents a MsgSetBeforeSendHookResponse. */ - class MsgSetBeforeSendHookResponse implements IMsgSetBeforeSendHookResponse { - - /** - * Constructs a new MsgSetBeforeSendHookResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHookResponse); - - /** - * Encodes the specified MsgSetBeforeSendHookResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse.verify|verify} messages. - * @param message MsgSetBeforeSendHookResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSetBeforeSendHookResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse.verify|verify} messages. - * @param message MsgSetBeforeSendHookResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgSetBeforeSendHookResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSetBeforeSendHookResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSetBeforeSendHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse; - - /** - * Decodes a MsgSetBeforeSendHookResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSetBeforeSendHookResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse; - - /** - * Verifies a MsgSetBeforeSendHookResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSetBeforeSendHookResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSetBeforeSendHookResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse; - - /** - * Creates a plain object from a MsgSetBeforeSendHookResponse message. Also converts values to other types if specified. - * @param message MsgSetBeforeSendHookResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHookResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSetBeforeSendHookResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSetDenomMetadata. */ - interface IMsgSetDenomMetadata { - - /** MsgSetDenomMetadata sender */ - sender?: (string|null); - - /** MsgSetDenomMetadata metadata */ - metadata?: (cosmos.bank.v1beta1.IMetadata|null); - } - - /** Represents a MsgSetDenomMetadata. */ - class MsgSetDenomMetadata implements IMsgSetDenomMetadata { - - /** - * Constructs a new MsgSetDenomMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata); - - /** MsgSetDenomMetadata sender. */ - public sender: string; - - /** MsgSetDenomMetadata metadata. */ - public metadata?: (cosmos.bank.v1beta1.IMetadata|null); - - /** - * Encodes the specified MsgSetDenomMetadata message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata.verify|verify} messages. - * @param message MsgSetDenomMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSetDenomMetadata message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata.verify|verify} messages. - * @param message MsgSetDenomMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSetDenomMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSetDenomMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata; - - /** - * Decodes a MsgSetDenomMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSetDenomMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata; - - /** - * Verifies a MsgSetDenomMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSetDenomMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSetDenomMetadata - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata; - - /** - * Creates a plain object from a MsgSetDenomMetadata message. Also converts values to other types if specified. - * @param message MsgSetDenomMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSetDenomMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgSetDenomMetadataResponse. */ - interface IMsgSetDenomMetadataResponse { - } - - /** Represents a MsgSetDenomMetadataResponse. */ - class MsgSetDenomMetadataResponse implements IMsgSetDenomMetadataResponse { - - /** - * Constructs a new MsgSetDenomMetadataResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadataResponse); - - /** - * Encodes the specified MsgSetDenomMetadataResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse.verify|verify} messages. - * @param message MsgSetDenomMetadataResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSetDenomMetadataResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse.verify|verify} messages. - * @param message MsgSetDenomMetadataResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgSetDenomMetadataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSetDenomMetadataResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSetDenomMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse; - - /** - * Decodes a MsgSetDenomMetadataResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSetDenomMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse; - - /** - * Verifies a MsgSetDenomMetadataResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSetDenomMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSetDenomMetadataResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse; - - /** - * Creates a plain object from a MsgSetDenomMetadataResponse message. Also converts values to other types if specified. - * @param message MsgSetDenomMetadataResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSetDenomMetadataResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgForceTransfer. */ - interface IMsgForceTransfer { - - /** MsgForceTransfer sender */ - sender?: (string|null); - - /** MsgForceTransfer amount */ - amount?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgForceTransfer transferFromAddress */ - transferFromAddress?: (string|null); - - /** MsgForceTransfer transferToAddress */ - transferToAddress?: (string|null); - } - - /** Represents a MsgForceTransfer. */ - class MsgForceTransfer implements IMsgForceTransfer { - - /** - * Constructs a new MsgForceTransfer. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgForceTransfer); - - /** MsgForceTransfer sender. */ - public sender: string; - - /** MsgForceTransfer amount. */ - public amount?: (cosmos.base.v1beta1.ICoin|null); - - /** MsgForceTransfer transferFromAddress. */ - public transferFromAddress: string; - - /** MsgForceTransfer transferToAddress. */ - public transferToAddress: string; - - /** - * Encodes the specified MsgForceTransfer message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransfer.verify|verify} messages. - * @param message MsgForceTransfer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgForceTransfer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgForceTransfer message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransfer.verify|verify} messages. - * @param message MsgForceTransfer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgForceTransfer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgForceTransfer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgForceTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgForceTransfer; - - /** - * Decodes a MsgForceTransfer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgForceTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgForceTransfer; - - /** - * Verifies a MsgForceTransfer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgForceTransfer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgForceTransfer - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgForceTransfer; - - /** - * Creates a plain object from a MsgForceTransfer message. Also converts values to other types if specified. - * @param message MsgForceTransfer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgForceTransfer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgForceTransfer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgForceTransferResponse. */ - interface IMsgForceTransferResponse { - } - - /** Represents a MsgForceTransferResponse. */ - class MsgForceTransferResponse implements IMsgForceTransferResponse { - - /** - * Constructs a new MsgForceTransferResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgForceTransferResponse); - - /** - * Encodes the specified MsgForceTransferResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransferResponse.verify|verify} messages. - * @param message MsgForceTransferResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgForceTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgForceTransferResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgForceTransferResponse.verify|verify} messages. - * @param message MsgForceTransferResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgForceTransferResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgForceTransferResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgForceTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgForceTransferResponse; - - /** - * Decodes a MsgForceTransferResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgForceTransferResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgForceTransferResponse; - - /** - * Verifies a MsgForceTransferResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgForceTransferResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgForceTransferResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgForceTransferResponse; - - /** - * Creates a plain object from a MsgForceTransferResponse message. Also converts values to other types if specified. - * @param message MsgForceTransferResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgForceTransferResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgForceTransferResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParams. */ - interface IMsgUpdateParams { - - /** MsgUpdateParams authority */ - authority?: (string|null); - - /** MsgUpdateParams params */ - params?: (osmosis.tokenfactory.v1beta1.IParams|null); - } - - /** Represents a MsgUpdateParams. */ - class MsgUpdateParams implements IMsgUpdateParams { - - /** - * Constructs a new MsgUpdateParams. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgUpdateParams); - - /** MsgUpdateParams authority. */ - public authority: string; - - /** MsgUpdateParams params. */ - public params?: (osmosis.tokenfactory.v1beta1.IParams|null); - - /** - * Encodes the specified MsgUpdateParams message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParams message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParams.verify|verify} messages. - * @param message MsgUpdateParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgUpdateParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgUpdateParams; - - /** - * Decodes a MsgUpdateParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgUpdateParams; - - /** - * Verifies a MsgUpdateParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParams - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgUpdateParams; - - /** - * Creates a plain object from a MsgUpdateParams message. Also converts values to other types if specified. - * @param message MsgUpdateParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgUpdateParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUpdateParamsResponse. */ - interface IMsgUpdateParamsResponse { - } - - /** Represents a MsgUpdateParamsResponse. */ - class MsgUpdateParamsResponse implements IMsgUpdateParamsResponse { - - /** - * Constructs a new MsgUpdateParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IMsgUpdateParamsResponse); - - /** - * Encodes the specified MsgUpdateParamsResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUpdateParamsResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse.verify|verify} messages. - * @param message MsgUpdateParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IMsgUpdateParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse; - - /** - * Decodes a MsgUpdateParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUpdateParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse; - - /** - * Verifies a MsgUpdateParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUpdateParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUpdateParamsResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse; - - /** - * Creates a plain object from a MsgUpdateParamsResponse message. Also converts values to other types if specified. - * @param message MsgUpdateParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUpdateParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params denom_creation_fee */ - denom_creation_fee?: (cosmos.base.v1beta1.ICoin[]|null); - - /** Params denom_creation_gas_consume */ - denom_creation_gas_consume?: (Long|null); - - /** Params fee_collector_address */ - fee_collector_address?: (string|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IParams); - - /** Params denom_creation_fee. */ - public denom_creation_fee: cosmos.base.v1beta1.ICoin[]; - - /** Params denom_creation_gas_consume. */ - public denom_creation_gas_consume: Long; - - /** Params fee_collector_address. */ - public fee_collector_address: string; - - /** - * Encodes the specified Params message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.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: osmosis.tokenfactory.v1beta1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.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: osmosis.tokenfactory.v1beta1.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): osmosis.tokenfactory.v1beta1.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)): osmosis.tokenfactory.v1beta1.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 }): osmosis.tokenfactory.v1beta1.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: osmosis.tokenfactory.v1beta1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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); - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryParamsResponse - */ - public params(request: osmosis.tokenfactory.v1beta1.IQueryParamsRequest, callback: osmosis.tokenfactory.v1beta1.Query.ParamsCallback): void; - - /** - * Calls Params. - * @param request QueryParamsRequest message or plain object - * @returns Promise - */ - public params(request: osmosis.tokenfactory.v1beta1.IQueryParamsRequest): Promise; - - /** - * Calls DenomAuthorityMetadata. - * @param request QueryDenomAuthorityMetadataRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomAuthorityMetadataResponse - */ - public denomAuthorityMetadata(request: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest, callback: osmosis.tokenfactory.v1beta1.Query.DenomAuthorityMetadataCallback): void; - - /** - * Calls DenomAuthorityMetadata. - * @param request QueryDenomAuthorityMetadataRequest message or plain object - * @returns Promise - */ - public denomAuthorityMetadata(request: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest): Promise; - - /** - * Calls DenomsFromCreator. - * @param request QueryDenomsFromCreatorRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryDenomsFromCreatorResponse - */ - public denomsFromCreator(request: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest, callback: osmosis.tokenfactory.v1beta1.Query.DenomsFromCreatorCallback): void; - - /** - * Calls DenomsFromCreator. - * @param request QueryDenomsFromCreatorRequest message or plain object - * @returns Promise - */ - public denomsFromCreator(request: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest): Promise; - - /** - * Calls BeforeSendHookAddress. - * @param request QueryBeforeSendHookAddressRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryBeforeSendHookAddressResponse - */ - public beforeSendHookAddress(request: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest, callback: osmosis.tokenfactory.v1beta1.Query.BeforeSendHookAddressCallback): void; - - /** - * Calls BeforeSendHookAddress. - * @param request QueryBeforeSendHookAddressRequest message or plain object - * @returns Promise - */ - public beforeSendHookAddress(request: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#params}. - * @param error Error, if any - * @param [response] QueryParamsResponse - */ - type ParamsCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.QueryParamsResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#denomAuthorityMetadata}. - * @param error Error, if any - * @param [response] QueryDenomAuthorityMetadataResponse - */ - type DenomAuthorityMetadataCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#denomsFromCreator}. - * @param error Error, if any - * @param [response] QueryDenomsFromCreatorResponse - */ - type DenomsFromCreatorCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse) => void; - - /** - * Callback as used by {@link osmosis.tokenfactory.v1beta1.Query#beforeSendHookAddress}. - * @param error Error, if any - * @param [response] QueryBeforeSendHookAddressResponse - */ - type BeforeSendHookAddressCallback = (error: (Error|null), response?: osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse) => void; - } - - /** Properties of a QueryParamsRequest. */ - interface IQueryParamsRequest { - } - - /** Represents a QueryParamsRequest. */ - class QueryParamsRequest implements IQueryParamsRequest { - - /** - * Constructs a new QueryParamsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryParamsRequest); - - /** - * Encodes the specified QueryParamsRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsRequest.verify|verify} messages. - * @param message QueryParamsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryParamsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryParamsRequest; - - /** - * Decodes a QueryParamsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryParamsRequest; - - /** - * Verifies a QueryParamsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsRequest - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryParamsRequest; - - /** - * Creates a plain object from a QueryParamsRequest message. Also converts values to other types if specified. - * @param message QueryParamsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryParamsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryParamsResponse. */ - interface IQueryParamsResponse { - - /** QueryParamsResponse params */ - params?: (osmosis.tokenfactory.v1beta1.IParams|null); - } - - /** Represents a QueryParamsResponse. */ - class QueryParamsResponse implements IQueryParamsResponse { - - /** - * Constructs a new QueryParamsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryParamsResponse); - - /** QueryParamsResponse params. */ - public params?: (osmosis.tokenfactory.v1beta1.IParams|null); - - /** - * Encodes the specified QueryParamsResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryParamsResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryParamsResponse.verify|verify} messages. - * @param message QueryParamsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryParamsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryParamsResponse; - - /** - * Decodes a QueryParamsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryParamsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryParamsResponse; - - /** - * Verifies a QueryParamsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryParamsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryParamsResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryParamsResponse; - - /** - * Creates a plain object from a QueryParamsResponse message. Also converts values to other types if specified. - * @param message QueryParamsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryParamsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryParamsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomAuthorityMetadataRequest. */ - interface IQueryDenomAuthorityMetadataRequest { - - /** QueryDenomAuthorityMetadataRequest creator */ - creator?: (string|null); - - /** QueryDenomAuthorityMetadataRequest subdenom */ - subdenom?: (string|null); - } - - /** Represents a QueryDenomAuthorityMetadataRequest. */ - class QueryDenomAuthorityMetadataRequest implements IQueryDenomAuthorityMetadataRequest { - - /** - * Constructs a new QueryDenomAuthorityMetadataRequest. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest); - - /** QueryDenomAuthorityMetadataRequest creator. */ - public creator: string; - - /** QueryDenomAuthorityMetadataRequest subdenom. */ - public subdenom: string; - - /** - * Encodes the specified QueryDenomAuthorityMetadataRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest.verify|verify} messages. - * @param message QueryDenomAuthorityMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomAuthorityMetadataRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest.verify|verify} messages. - * @param message QueryDenomAuthorityMetadataRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomAuthorityMetadataRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomAuthorityMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest; - - /** - * Decodes a QueryDenomAuthorityMetadataRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomAuthorityMetadataRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest; - - /** - * Verifies a QueryDenomAuthorityMetadataRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomAuthorityMetadataRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomAuthorityMetadataRequest - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest; - - /** - * Creates a plain object from a QueryDenomAuthorityMetadataRequest message. Also converts values to other types if specified. - * @param message QueryDenomAuthorityMetadataRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomAuthorityMetadataRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomAuthorityMetadataResponse. */ - interface IQueryDenomAuthorityMetadataResponse { - - /** QueryDenomAuthorityMetadataResponse authority_metadata */ - authority_metadata?: (osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null); - } - - /** Represents a QueryDenomAuthorityMetadataResponse. */ - class QueryDenomAuthorityMetadataResponse implements IQueryDenomAuthorityMetadataResponse { - - /** - * Constructs a new QueryDenomAuthorityMetadataResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataResponse); - - /** QueryDenomAuthorityMetadataResponse authority_metadata. */ - public authority_metadata?: (osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null); - - /** - * Encodes the specified QueryDenomAuthorityMetadataResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse.verify|verify} messages. - * @param message QueryDenomAuthorityMetadataResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomAuthorityMetadataResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse.verify|verify} messages. - * @param message QueryDenomAuthorityMetadataResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryDenomAuthorityMetadataResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomAuthorityMetadataResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomAuthorityMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse; - - /** - * Decodes a QueryDenomAuthorityMetadataResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomAuthorityMetadataResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse; - - /** - * Verifies a QueryDenomAuthorityMetadataResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomAuthorityMetadataResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomAuthorityMetadataResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse; - - /** - * Creates a plain object from a QueryDenomAuthorityMetadataResponse message. Also converts values to other types if specified. - * @param message QueryDenomAuthorityMetadataResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomAuthorityMetadataResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomsFromCreatorRequest. */ - interface IQueryDenomsFromCreatorRequest { - - /** QueryDenomsFromCreatorRequest creator */ - creator?: (string|null); - } - - /** Represents a QueryDenomsFromCreatorRequest. */ - class QueryDenomsFromCreatorRequest implements IQueryDenomsFromCreatorRequest { - - /** - * Constructs a new QueryDenomsFromCreatorRequest. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest); - - /** QueryDenomsFromCreatorRequest creator. */ - public creator: string; - - /** - * Encodes the specified QueryDenomsFromCreatorRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest.verify|verify} messages. - * @param message QueryDenomsFromCreatorRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomsFromCreatorRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest.verify|verify} messages. - * @param message QueryDenomsFromCreatorRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomsFromCreatorRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomsFromCreatorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest; - - /** - * Decodes a QueryDenomsFromCreatorRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomsFromCreatorRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest; - - /** - * Verifies a QueryDenomsFromCreatorRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomsFromCreatorRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomsFromCreatorRequest - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest; - - /** - * Creates a plain object from a QueryDenomsFromCreatorRequest message. Also converts values to other types if specified. - * @param message QueryDenomsFromCreatorRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomsFromCreatorRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryDenomsFromCreatorResponse. */ - interface IQueryDenomsFromCreatorResponse { - - /** QueryDenomsFromCreatorResponse denoms */ - denoms?: (string[]|null); - } - - /** Represents a QueryDenomsFromCreatorResponse. */ - class QueryDenomsFromCreatorResponse implements IQueryDenomsFromCreatorResponse { - - /** - * Constructs a new QueryDenomsFromCreatorResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorResponse); - - /** QueryDenomsFromCreatorResponse denoms. */ - public denoms: string[]; - - /** - * Encodes the specified QueryDenomsFromCreatorResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse.verify|verify} messages. - * @param message QueryDenomsFromCreatorResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryDenomsFromCreatorResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse.verify|verify} messages. - * @param message QueryDenomsFromCreatorResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryDenomsFromCreatorResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryDenomsFromCreatorResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryDenomsFromCreatorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse; - - /** - * Decodes a QueryDenomsFromCreatorResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryDenomsFromCreatorResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse; - - /** - * Verifies a QueryDenomsFromCreatorResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryDenomsFromCreatorResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryDenomsFromCreatorResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse; - - /** - * Creates a plain object from a QueryDenomsFromCreatorResponse message. Also converts values to other types if specified. - * @param message QueryDenomsFromCreatorResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryDenomsFromCreatorResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryBeforeSendHookAddressRequest. */ - interface IQueryBeforeSendHookAddressRequest { - - /** QueryBeforeSendHookAddressRequest creator */ - creator?: (string|null); - - /** QueryBeforeSendHookAddressRequest subdenom */ - subdenom?: (string|null); - } - - /** Represents a QueryBeforeSendHookAddressRequest. */ - class QueryBeforeSendHookAddressRequest implements IQueryBeforeSendHookAddressRequest { - - /** - * Constructs a new QueryBeforeSendHookAddressRequest. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest); - - /** QueryBeforeSendHookAddressRequest creator. */ - public creator: string; - - /** QueryBeforeSendHookAddressRequest subdenom. */ - public subdenom: string; - - /** - * Encodes the specified QueryBeforeSendHookAddressRequest message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest.verify|verify} messages. - * @param message QueryBeforeSendHookAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryBeforeSendHookAddressRequest message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest.verify|verify} messages. - * @param message QueryBeforeSendHookAddressRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryBeforeSendHookAddressRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryBeforeSendHookAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest; - - /** - * Decodes a QueryBeforeSendHookAddressRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryBeforeSendHookAddressRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest; - - /** - * Verifies a QueryBeforeSendHookAddressRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryBeforeSendHookAddressRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryBeforeSendHookAddressRequest - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest; - - /** - * Creates a plain object from a QueryBeforeSendHookAddressRequest message. Also converts values to other types if specified. - * @param message QueryBeforeSendHookAddressRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryBeforeSendHookAddressRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryBeforeSendHookAddressResponse. */ - interface IQueryBeforeSendHookAddressResponse { - - /** QueryBeforeSendHookAddressResponse contract_addr */ - contract_addr?: (string|null); - } - - /** Represents a QueryBeforeSendHookAddressResponse. */ - class QueryBeforeSendHookAddressResponse implements IQueryBeforeSendHookAddressResponse { - - /** - * Constructs a new QueryBeforeSendHookAddressResponse. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressResponse); - - /** QueryBeforeSendHookAddressResponse contract_addr. */ - public contract_addr: string; - - /** - * Encodes the specified QueryBeforeSendHookAddressResponse message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse.verify|verify} messages. - * @param message QueryBeforeSendHookAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryBeforeSendHookAddressResponse message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse.verify|verify} messages. - * @param message QueryBeforeSendHookAddressResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IQueryBeforeSendHookAddressResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryBeforeSendHookAddressResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryBeforeSendHookAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse; - - /** - * Decodes a QueryBeforeSendHookAddressResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryBeforeSendHookAddressResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse; - - /** - * Verifies a QueryBeforeSendHookAddressResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryBeforeSendHookAddressResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryBeforeSendHookAddressResponse - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse; - - /** - * Creates a plain object from a QueryBeforeSendHookAddressResponse message. Also converts values to other types if specified. - * @param message QueryBeforeSendHookAddressResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.QueryBeforeSendHookAddressResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryBeforeSendHookAddressResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DenomAuthorityMetadata. */ - interface IDenomAuthorityMetadata { - - /** DenomAuthorityMetadata Admin */ - Admin?: (string|null); - } - - /** Represents a DenomAuthorityMetadata. */ - class DenomAuthorityMetadata implements IDenomAuthorityMetadata { - - /** - * Constructs a new DenomAuthorityMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata); - - /** DenomAuthorityMetadata Admin. */ - public Admin: string; - - /** - * Encodes the specified DenomAuthorityMetadata message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.verify|verify} messages. - * @param message DenomAuthorityMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DenomAuthorityMetadata message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata.verify|verify} messages. - * @param message DenomAuthorityMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DenomAuthorityMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DenomAuthorityMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata; - - /** - * Decodes a DenomAuthorityMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DenomAuthorityMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata; - - /** - * Verifies a DenomAuthorityMetadata message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DenomAuthorityMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DenomAuthorityMetadata - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata; - - /** - * Creates a plain object from a DenomAuthorityMetadata message. Also converts values to other types if specified. - * @param message DenomAuthorityMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DenomAuthorityMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisState. */ - interface IGenesisState { - - /** GenesisState params */ - params?: (osmosis.tokenfactory.v1beta1.IParams|null); - - /** GenesisState factory_denoms */ - factory_denoms?: (osmosis.tokenfactory.v1beta1.IGenesisDenom[]|null); - } - - /** Represents a GenesisState. */ - class GenesisState implements IGenesisState { - - /** - * Constructs a new GenesisState. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IGenesisState); - - /** GenesisState params. */ - public params?: (osmosis.tokenfactory.v1beta1.IParams|null); - - /** GenesisState factory_denoms. */ - public factory_denoms: osmosis.tokenfactory.v1beta1.IGenesisDenom[]; - - /** - * Encodes the specified GenesisState message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisState message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisState.verify|verify} messages. - * @param message GenesisState message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IGenesisState, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisState message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.GenesisState; - - /** - * Decodes a GenesisState message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisState - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.GenesisState; - - /** - * Verifies a GenesisState message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisState message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisState - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.GenesisState; - - /** - * Creates a plain object from a GenesisState message. Also converts values to other types if specified. - * @param message GenesisState - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.GenesisState, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisState to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a GenesisDenom. */ - interface IGenesisDenom { - - /** GenesisDenom denom */ - denom?: (string|null); - - /** GenesisDenom authority_metadata */ - authority_metadata?: (osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null); - } - - /** Represents a GenesisDenom. */ - class GenesisDenom implements IGenesisDenom { - - /** - * Constructs a new GenesisDenom. - * @param [properties] Properties to set - */ - constructor(properties?: osmosis.tokenfactory.v1beta1.IGenesisDenom); - - /** GenesisDenom denom. */ - public denom: string; - - /** GenesisDenom authority_metadata. */ - public authority_metadata?: (osmosis.tokenfactory.v1beta1.IDenomAuthorityMetadata|null); - - /** - * Encodes the specified GenesisDenom message. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisDenom.verify|verify} messages. - * @param message GenesisDenom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: osmosis.tokenfactory.v1beta1.IGenesisDenom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GenesisDenom message, length delimited. Does not implicitly {@link osmosis.tokenfactory.v1beta1.GenesisDenom.verify|verify} messages. - * @param message GenesisDenom message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: osmosis.tokenfactory.v1beta1.IGenesisDenom, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GenesisDenom message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GenesisDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): osmosis.tokenfactory.v1beta1.GenesisDenom; - - /** - * Decodes a GenesisDenom message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GenesisDenom - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): osmosis.tokenfactory.v1beta1.GenesisDenom; - - /** - * Verifies a GenesisDenom message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GenesisDenom message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GenesisDenom - */ - public static fromObject(object: { [k: string]: any }): osmosis.tokenfactory.v1beta1.GenesisDenom; - - /** - * Creates a plain object from a GenesisDenom message. Also converts values to other types if specified. - * @param message GenesisDenom - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: osmosis.tokenfactory.v1beta1.GenesisDenom, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GenesisDenom to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } -} diff --git a/src/helpers/cosmos.ts b/src/helpers/cosmos.ts deleted file mode 100644 index 1ca4737a..00000000 --- a/src/helpers/cosmos.ts +++ /dev/null @@ -1,1172 +0,0 @@ -import cosmosclient from '@cosmos-client/core'; -import { AccAddress, ValAddress } from '@cosmos-client/core/cjs/types'; -import cosmwasmclient from '@cosmos-client/cosmwasm'; -import { cosmos as AdminProto, ibc as ibcProto } from '../generated/ibc/proto'; -import { sdk } from '../generated/pob/proto'; -import { neutron } from '../generated/proto'; -import axios from 'axios'; -import { CodeId, Wallet } from '../types'; -import Long from 'long'; -import { BlockWaiter, getHeight, getWithAttempts } from './wait'; -import { - BroadcastTx200ResponseTxResponse, - CosmosTxV1beta1GetTxResponse, -} from '@cosmos-client/core/cjs/openapi/api'; -import { cosmos, google } from '@cosmos-client/core/cjs/proto'; -import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; -import { ibc } from '@cosmos-client/ibc/cjs/proto'; -import crypto from 'crypto'; -import ICoin = cosmos.base.v1beta1.ICoin; -import IHeight = ibc.core.client.v1.IHeight; -import { - AckFailuresResponse, - ScheduleResponse, - ChannelsList, - PageRequest, - PauseInfoResponse, - CurrentPlanResponse, - PinnedCodesResponse, - IcaHostParamsResponse, - GlobalfeeParamsResponse, - InterchaintxsParamsResponse, -} from './types'; -import { DEBUG_SUBMIT_TX, getContractBinary } from './env'; -import { - ParamsContractmanagerInfo, - ParamsCronInfo, - ParamsFeeburnerInfo, - ParamsFeerefunderInfo, - ParamsInterchainqueriesInfo, - ParamsTokenfactoryInfo, -} from './proposal'; -const adminmodule = AdminProto.adminmodule.adminmodule; - -export const NEUTRON_DENOM = process.env.NEUTRON_DENOM || 'untrn'; -export const IBC_ATOM_DENOM = process.env.IBC_ATOM_DENOM || 'uibcatom'; -export const IBC_USDC_DENOM = process.env.IBC_USDC_DENOM || 'uibcusdc'; -export const COSMOS_DENOM = process.env.COSMOS_DENOM || 'uatom'; -export const IBC_RELAYER_NEUTRON_ADDRESS = - 'neutron1mjk79fjjgpplak5wq838w0yd982gzkyf8fxu8u'; -export const ADMIN_MODULE_ADDRESS = - 'neutron1hxskfdxpp5hqgtjj6am6nkjefhfzj359x0ar3z'; - -// BalancesResponse is the response model for the bank balances query. -type BalancesResponse = { - balances: ICoin[]; - pagination: { - next_key: string; - total: string; - }; -}; - -// DenomTraceResponse is the response model for the ibc transfer denom trace query. -type DenomTraceResponse = { - path?: string; - base_denom?: string; -}; - -export type TotalSupplyByDenomResponse = { - amount: ICoin; -}; - -// TotalBurnedNeutronsAmountResponse is the response model for the feeburner's total-burned-neutrons. -export type TotalBurnedNeutronsAmountResponse = { - total_burned_neutrons_amount: { - coin: ICoin; - }; -}; - -export type ParamsContractmanagerResponse = { - params: ParamsContractmanagerInfo; -}; - -export type ParamsCronResponse = { - params: ParamsCronInfo; -}; - -export type ParamsFeerefunderResponse = { - params: ParamsFeerefunderInfo; -}; - -export type ParamsFeeburnerResponse = { - params: ParamsFeeburnerInfo; -}; - -export type ParamsTokenfactoryResponse = { - params: ParamsTokenfactoryInfo; -}; -export type ParamsInterchainqueriesResponse = { - params: ParamsInterchainqueriesInfo; -}; -cosmosclient.codec.register( - '/neutron.interchainqueries.MsgRemoveInterchainQueryRequest', - neutron.interchainqueries.MsgRemoveInterchainQueryRequest, -); -cosmosclient.codec.register( - '/cosmos.params.v1beta1.ParameterChangeProposal', - cosmosclient.proto.cosmos.params.v1beta1.ParameterChangeProposal, -); -cosmosclient.codec.register( - '/neutron.interchainqueries.MsgRemoveInterchainQueryRequest', - neutron.interchainqueries.MsgRemoveInterchainQueryRequest, -); -cosmosclient.codec.register( - '/cosmos.params.v1beta1.ParameterChangeProposal', - cosmosclient.proto.cosmos.params.v1beta1.ParameterChangeProposal, -); -cosmosclient.codec.register( - '/ibc.applications.transfer.v1.MsgTransfer', - ibcProto.applications.transfer.v1.MsgTransfer, -); -cosmosclient.codec.register( - '/cosmos.adminmodule.adminmodule.MsgSubmitProposal', - adminmodule.MsgSubmitProposal, -); -cosmosclient.codec.register( - '/cosmos.adminmodule.adminmodule.MsgSubmitProposalLegacy', - adminmodule.MsgSubmitProposalLegacy, -); -cosmosclient.codec.register( - '/ibc.lightclients.tendermint.v1.ClientState', - ibcProto.lightclients.tendermint.v1.ClientState, -); -cosmosclient.codec.register( - '/sdk.auction.v1.MsgAuctionBid', - sdk.auction.v1.MsgAuctionBid, -); -cosmosclient.codec.register( - '/neutron.interchaintxs.v1.MsgUpdateParams', - neutron.interchaintxs.v1.MsgUpdateParams, -); - -export class CosmosWrapper { - readonly sdk: cosmosclient.CosmosSDK; - readonly blockWaiter: BlockWaiter; - readonly denom: string; - - constructor( - sdk: cosmosclient.CosmosSDK, - blockWaiter: BlockWaiter, - denom: string, - ) { - this.denom = denom; - this.sdk = sdk; - this.blockWaiter = blockWaiter; - } - - async queryContractWithWait( - contract: string, - query: Record, - numAttempts = 20, - ): Promise { - while (numAttempts > 0) { - const res: T = await this.queryContract(contract, query).catch( - () => null, - ); - - if (res !== null) { - return res; - } - - numAttempts--; - await this.blockWaiter.waitBlocks(1); - } - - throw new Error('failed to query contract'); - } - - async queryContract( - contract: string, - query: Record, - ): Promise { - const url = `${ - this.sdk.url - }/cosmwasm/wasm/v1/contract/${contract}/smart/${Buffer.from( - JSON.stringify(query), - ).toString('base64')}?encoding=base64`; - const resp = await axios.get(url).catch((error) => { - if (error.response) { - throw new Error( - `Status: ${JSON.stringify(error.response.status)} \n` + - `Response: ${JSON.stringify(error.response.data)} \n` + - `Headers: ${JSON.stringify(error.response.headers)}`, - ); - } else if (error.request) { - throw new Error(error.request); - } - throw new Error('Error: ' + error.message); - }); - return resp.data.data as T; - } - - async getContractInfo(contract: string): Promise { - const url = `${this.sdk.url}/cosmwasm/wasm/v1/contract/${contract}`; - try { - const resp = await axios.get(url); - return resp.data; - } catch (e) { - throw new Error(e.response?.data?.message); - } - } - - async getSeq(address: cosmosclient.AccAddress): Promise { - const account = await cosmosclient.rest.auth - .account(this.sdk, address) - .then((res) => - cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), - ), - ) - .catch((e) => { - console.log(e); - throw e; - }); - - if ( - !(account instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) - ) { - throw new Error("can't get account"); - } - - return account.sequence; - } - - async queryInterchainqueriesParams(): Promise { - const req = await axios.get( - `${this.sdk.url}/neutron/interchainqueries/params`, - ); - - return req.data; - } - - async queryFeeburnerParams(): Promise { - const req = await axios.get(`${this.sdk.url}/neutron/feeburner/params`); - - return req.data; - } - - async queryFeerefunderParams(): Promise { - const req = await axios.get( - `${this.sdk.url}/neutron-org/neutron/feerefunder/params`, - ); - - return req.data; - } - - async queryContractmanagerParams(): Promise { - const req = await axios.get( - `${this.sdk.url}/neutron/contractmanager/params`, - ); - - return req.data; - } - - async queryCronParams(): Promise { - const req = await axios.get(`${this.sdk.url}/neutron/cron/params`); - - return req.data; - } - - async queryTokenfactoryParams(): Promise { - const req = await axios.get( - `${this.sdk.url}/osmosis/tokenfactory/v1beta1/params`, - ); - - return req.data; - } - - async queryDelegations(delegatorAddr: cosmosclient.AccAddress): Promise { - const balances = await cosmosclient.rest.staking.delegatorDelegations( - this.sdk, - delegatorAddr, - ); - return balances.data; - } - - async queryBalances(addr: string): Promise { - const balances = await cosmosclient.rest.bank.allBalances( - this.sdk, - addr as unknown as AccAddress, - ); - return balances.data as BalancesResponse; - } - - async queryDenomBalance( - addr: string | AccAddress | ValAddress, - denom: string, - ): Promise { - const { data } = await cosmosclient.rest.bank.allBalances( - this.sdk, - addr.toString() as unknown as AccAddress, - ); - const balance = data.balances.find((b) => b.denom === denom); - return parseInt(balance?.amount ?? '0', 10); - } - - async queryDenomTrace(ibcDenom: string): Promise { - const data = axios.get<{ denom_trace: DenomTraceResponse }>( - `${this.sdk.url}/ibc/apps/transfer/v1/denom_traces/${ibcDenom}`, - ); - return data.then((res) => res.data.denom_trace); - } - - async queryAckFailures( - addr: string, - pagination?: PageRequest, - ): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/neutron/contractmanager/failures/${addr}`, - { params: pagination }, - ); - return req.data; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async listIBCChannels(): Promise { - const res = await axios.get( - `${this.sdk.url}/ibc/core/channel/v1/channels`, - ); - return res.data; - } - - async queryTotalBurnedNeutronsAmount(): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/neutron/feeburner/total_burned_neutrons_amount`, - ); - return req.data; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async queryTotalSupplyByDenom( - denom: string, - ): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/cosmos/bank/v1beta1/supply/by_denom?denom=${denom}`, - ); - return req.data; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async getChainAdmins() { - const url = `${this.sdk.url}/cosmos/adminmodule/adminmodule/admins`; - const resp = await axios.get<{ - admins: [string]; - }>(url); - return resp.data.admins; - } - - async queryPausedInfo(addr: string): Promise { - return await this.queryContract(addr, { - pause_info: {}, - }); - } - - async getWithAttempts( - getFunc: () => Promise, - readyFunc: (t: T) => Promise, - numAttempts = 20, - ): Promise { - return await getWithAttempts( - this.blockWaiter, - getFunc, - readyFunc, - numAttempts, - ); - } - - async getCodeDataHash(codeId: number): Promise { - try { - const res = await axios.get( - `${this.sdk.url}/cosmwasm/wasm/v1/code/${codeId}`, - ); - return res.data.code_info.data_hash; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async querySchedules(pagination?: PageRequest): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/neutron/cron/schedule`, - { params: pagination }, - ); - return req.data; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async queryCurrentUpgradePlan(): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/cosmos/upgrade/v1beta1/current_plan`, - {}, - ); - return req.data; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async queryPinnedCodes(): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/cosmwasm/wasm/v1/codes/pinned`, - {}, - ); - return req.data; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async queryHostEnabled(): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/ibc/apps/interchain_accounts/host/v1/params`, - {}, - ); - return req.data.params.host_enabled; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async queryMaxTxsAllowed(): Promise { - try { - const req = await axios.get( - `${this.sdk.url}/neutron/interchaintxs/params`, - {}, - ); - return req.data.params.msg_submit_tx_max_messages; - } catch (e) { - if (e.response?.data?.message !== undefined) { - throw new Error(e.response?.data?.message); - } - throw e; - } - } - - async queryGlobalfeeParams(): Promise { - const req = await axios.get( - `${this.sdk.url}/gaia/globalfee/v1beta1/params`, - ); - - return req.data.params; - } - - async queryContractAdmin(address: string): Promise { - const resp = await this.getContractInfo(address); - return resp.contract_info.admin; - } -} - -export class WalletWrapper { - readonly chain: CosmosWrapper; - readonly wallet: Wallet; - - constructor(cw: CosmosWrapper, wallet: Wallet) { - this.chain = cw; - this.wallet = wallet; - } - - async queryBalances(): Promise { - return await this.chain.queryBalances(this.wallet.address.toString()); - } - - async queryDenomBalance(denom: string): Promise { - return await this.chain.queryDenomBalance( - this.wallet.address.toString(), - denom, - ); - } - - buildTx( - fee: cosmosclient.proto.cosmos.tx.v1beta1.IFee, - msgs: T[], - sequence: number = this.wallet.account.sequence, - txTimeoutHeight?: number, - ): cosmosclient.TxBuilder { - const protoMsgs: Array = []; - msgs.forEach((msg) => { - protoMsgs.push(cosmosclient.codec.instanceToProtoAny(msg)); - }); - const txBody = new cosmosclient.proto.cosmos.tx.v1beta1.TxBody({ - messages: protoMsgs, - }); - if (txTimeoutHeight != undefined) { - txBody.timeout_height = txTimeoutHeight; - } - const authInfo = new cosmosclient.proto.cosmos.tx.v1beta1.AuthInfo({ - signer_infos: [ - { - public_key: cosmosclient.codec.instanceToProtoAny(this.wallet.pubKey), - mode_info: { - single: { - mode: cosmosclient.proto.cosmos.tx.signing.v1beta1.SignMode - .SIGN_MODE_DIRECT, - }, - }, - sequence, - }, - ], - fee, - }); - const txBuilder = new cosmosclient.TxBuilder( - this.chain.sdk as CosmosSDK, - txBody, - authInfo, - ); - const signDocBytes = txBuilder.signDocBytes( - this.wallet.account.account_number, - ); - txBuilder.addSignature(this.wallet.privKey.sign(signDocBytes)); - return txBuilder; - } - - async broadcastTx( - txBuilder: cosmosclient.TxBuilder, - mode: cosmosclient.rest.tx.BroadcastTxMode = cosmosclient.rest.tx - .BroadcastTxMode.Sync, - ): Promise { - if (DEBUG_SUBMIT_TX) { - console.log('\n\n\nStart broadcasting tx: ----------------------'); - try { - console.log(JSON.stringify(txBuilder.toProtoJSON())); - } catch (error) { - console.log('failed to serrialize tx'); - } - } - const res = await cosmosclient.rest.tx.broadcastTx( - this.chain.sdk as CosmosSDK, - { - tx_bytes: txBuilder.txBytes(), - mode, - }, - ); - const code = res.data?.tx_response.code; - if (DEBUG_SUBMIT_TX) { - console.log('async response code: ', code); - } - if (code !== 0) { - if (DEBUG_SUBMIT_TX) { - console.log(`broadcast error: ${res.data?.tx_response.raw_log}`); - } - throw new Error(`broadcast error: ${res.data?.tx_response.raw_log}`); - } - const txhash = res.data?.tx_response.txhash; - this.wallet.account.sequence++; - return txhash; - } - - /** - * execTx broadcasts messages and returns the transaction result. - */ - async execTx( - fee: cosmosclient.proto.cosmos.tx.v1beta1.IFee, - msgs: T[], - numAttempts = 10, - mode: cosmosclient.rest.tx.BroadcastTxMode = cosmosclient.rest.tx - .BroadcastTxMode.Sync, - sequence: number = this.wallet.account.sequence, - txTimeoutHeight?: number, - ): Promise { - const txBuilder = this.buildTx(fee, msgs, sequence, txTimeoutHeight); - const txhash = await this.broadcastTx(txBuilder, mode); - if (DEBUG_SUBMIT_TX) { - console.log('tx hash: ', txhash); - } - let error = null; - while (numAttempts > 0) { - await this.chain.blockWaiter.waitBlocks(1); - numAttempts--; - const data = await cosmosclient.rest.tx - .getTx(this.chain.sdk as CosmosSDK, txhash) - .catch((reason) => { - error = reason; - return null; - }); - if (data != null) { - if (DEBUG_SUBMIT_TX) { - const code = +data.data?.tx_response.code; - console.log('response code: ', code); - if (code > 0) { - console.log('\x1b[31m error log: ', data.data?.tx_response.raw_log); - } - console.log('response: ', JSON.stringify(data.data)); - } - return data.data; - } - } - error = error ?? new Error('failed to submit tx'); - throw error; - } - - // storeWasm stores the wasm code by the passed path on the blockchain. - async storeWasm(fileName: string): Promise { - const msg = new cosmwasmclient.proto.cosmwasm.wasm.v1.MsgStoreCode({ - sender: this.wallet.address.toString(), - wasm_byte_code: await getContractBinary(fileName), - instantiate_permission: null, - }); - const data = await this.execTx( - { - amount: [{ denom: NEUTRON_DENOM, amount: '250000' }], - gas_limit: Long.fromString('60000000'), - }, - [msg], - ); - - if (data.tx_response.code !== 0) { - throw new Error(`upload error: ${data.tx_response.raw_log}`); - } - - const attributes = getEventAttributesFromTx(data, 'store_code', [ - 'code_id', - ]); - - return parseInt(attributes[0].code_id); - } - - async instantiateContract( - codeId: number, - msg: string, - label: string, - admin: string = this.wallet.address.toString(), - ): Promise>> { - const msgInit = - new cosmwasmclient.proto.cosmwasm.wasm.v1.MsgInstantiateContract({ - code_id: codeId + '', - sender: this.wallet.address.toString(), - admin: admin, - label, - msg: Buffer.from(msg), - }); - - const data = await this.execTx( - { - amount: [{ denom: NEUTRON_DENOM, amount: '2000000' }], - gas_limit: Long.fromString('600000000'), - }, - [msgInit], - 10, - cosmosclient.rest.tx.BroadcastTxMode.Sync, - ); - - if (data.tx_response.code !== 0) { - throw new Error(`instantiate error: ${data.tx_response.raw_log}`); - } - - return getEventAttributesFromTx(data, 'instantiate', [ - '_contract_address', - 'code_id', - ]); - } - - async migrateContract( - contract: string, - codeId: number, - msg: string | Record, - ): Promise { - const sender = this.wallet.address.toString(); - const msgMigrate = - new cosmwasmclient.proto.cosmwasm.wasm.v1.MsgMigrateContract({ - sender, - contract, - code_id: codeId + '', - msg: Buffer.from(typeof msg === 'string' ? msg : JSON.stringify(msg)), - }); - const res = await this.execTx( - { - gas_limit: Long.fromString('5000000'), - amount: [{ denom: this.chain.denom, amount: '20000' }], - }, - [msgMigrate], - ); - if (res.tx_response.code !== 0) { - throw new Error( - `${res.tx_response.raw_log}\nFailed tx hash: ${res.tx_response.txhash}`, - ); - } - return res?.tx_response; - } - - async executeContract( - contract: string, - msg: string, - funds: cosmosclient.proto.cosmos.base.v1beta1.ICoin[] = [], - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.chain.denom, amount: '10000' }], - }, - ): Promise { - const sender = this.wallet.address.toString(); - const msgExecute = - new cosmwasmclient.proto.cosmwasm.wasm.v1.MsgExecuteContract({ - sender, - contract, - msg: Buffer.from(msg), - funds, - }); - - const res = await this.execTx(fee, [msgExecute]); - if (res.tx_response.code !== 0) { - throw new Error( - `${res.tx_response.raw_log}\nFailed tx hash: ${res.tx_response.txhash}`, - ); - } - return res?.tx_response; - } - - /** - * msgSend processes a transfer, waits two blocks and returns the tx hash. - */ - async msgSend( - to: string, - coin: - | { - amount: string; - denom?: string; - } - | string, - fee = { - gas_limit: Long.fromString('300000'), - amount: [{ denom: this.chain.denom, amount: '1500' }], - }, - sequence: number = this.wallet.account.sequence, - mode: cosmosclient.rest.tx.BroadcastTxMode = cosmosclient.rest.tx - .BroadcastTxMode.Sync, - ): Promise { - const { amount, denom = this.chain.denom } = - typeof coin === 'string' ? { amount: coin } : coin; - const msgSend = new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ - from_address: this.wallet.address.toString(), - to_address: to, - amount: [{ denom, amount }], - }); - const res = await this.execTx(fee, [msgSend], 10, mode, sequence); - return res?.tx_response; - } - - async msgSendDirectProposal( - subspace: string, - key: string, - value: string, - fee = { - gas_limit: Long.fromString('200000'), - amount: [{ denom: this.chain.denom, amount: '1000' }], - }, - sequence: number = this.wallet.account.sequence, - mode: cosmosclient.rest.tx.BroadcastTxMode = cosmosclient.rest.tx - .BroadcastTxMode.Sync, - ): Promise { - const msg = new adminmodule.MsgSubmitProposalLegacy({ - content: cosmosclient.codec.instanceToProtoAny( - new cosmosclient.proto.cosmos.params.v1beta1.ParameterChangeProposal({ - title: 'mock', - description: 'mock', - changes: [ - new cosmosclient.proto.cosmos.params.v1beta1.ParamChange({ - key: key, - subspace: subspace, - value: value, - }), - ], - }), - ), - proposer: this.wallet.account.address, - }); - const res = await this.execTx(fee, [msg], 10, mode, sequence); - return res?.tx_response; - } - - async msgSendAuction( - bidder: string, - bid: ICoin, - transactions: Uint8Array[], - fee = { - gas_limit: Long.fromString('200000'), - amount: [{ denom: this.chain.denom, amount: '1000' }], - }, - sequence: number = this.wallet.account.sequence, - mode: cosmosclient.rest.tx.BroadcastTxMode = cosmosclient.rest.tx - .BroadcastTxMode.Sync, - ): Promise { - const msg = new sdk.auction.v1.MsgAuctionBid({ - bidder: bidder, - bid: bid, - transactions: transactions, - }); - const currentHeight = await getHeight(this.chain.sdk); - const res = await this.execTx( - fee, - [msg], - 10, - mode, - sequence, - currentHeight + 1, - ); - return res?.tx_response; - } - - /** - * Tests a pausable contract execution control. - * @param testingContract is the contract the method tests; - * @param execAction is an executable action to be called during a pause and after unpausing - * as the main part of the test. Should return the execution response code; - * @param actionCheck is called after unpausing to make sure the executable action worked. - */ - async testExecControl( - testingContract: string, - execAction: () => Promise, - actionCheck: () => Promise, - ) { - // check contract's pause info before pausing - let pauseInfo = await this.chain.queryPausedInfo(testingContract); - expect(pauseInfo).toEqual({ unpaused: {} }); - expect(pauseInfo.paused).toEqual(undefined); - - // pause contract - let res = await this.executeContract( - testingContract, - JSON.stringify({ - pause: { - duration: 50, - }, - }), - ); - expect(res.code).toEqual(0); - - // check contract's pause info after pausing - pauseInfo = await this.chain.queryPausedInfo(testingContract); - expect(pauseInfo.unpaused).toEqual(undefined); - expect(pauseInfo.paused.until_height).toBeGreaterThan(0); - - // execute msgs on paused contract - await expect(execAction()).rejects.toThrow(/Contract execution is paused/); - - // unpause contract - res = await this.executeContract( - testingContract, - JSON.stringify({ - unpause: {}, - }), - ); - expect(res.code).toEqual(0); - - // check contract's pause info after unpausing - pauseInfo = await this.chain.queryPausedInfo(testingContract); - expect(pauseInfo).toEqual({ unpaused: {} }); - expect(pauseInfo.paused).toEqual(undefined); - - // execute msgs on unpaused contract - const code = await execAction(); - expect(code).toEqual(0); - await actionCheck(); - - // pause contract again for a short period - const shortPauseDuration = 5; - res = await this.executeContract( - testingContract, - JSON.stringify({ - pause: { - duration: shortPauseDuration, - }, - }), - ); - expect(res.code).toEqual(0); - - // check contract's pause info after pausing - pauseInfo = await this.chain.queryPausedInfo(testingContract); - expect(pauseInfo.unpaused).toEqual(undefined); - expect(pauseInfo.paused.until_height).toBeGreaterThan(0); - - // wait and check contract's pause info after unpausing - await this.chain.blockWaiter.waitBlocks(shortPauseDuration); - pauseInfo = await this.chain.queryPausedInfo(testingContract); - expect(pauseInfo).toEqual({ unpaused: {} }); - expect(pauseInfo.paused).toEqual(undefined); - } - - /* simulateFeeBurning simulates fee burning via send tx. - */ - async simulateFeeBurning( - amount: number, - ): Promise { - const msgSend = new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ - from_address: this.wallet.address.toString(), - to_address: this.wallet.address.toString(), - amount: [{ denom: this.chain.denom, amount: '1' }], - }); - const res = await this.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [ - { - denom: this.chain.denom, - amount: `${Math.ceil((1000 * amount) / 750)}`, - }, - ], - }, - [msgSend], - ); - return res?.tx_response; - } - - /** - * msgRemoveInterchainQuery sends transaction to remove interchain query, waits two blocks and returns the tx hash. - */ - async msgRemoveInterchainQuery( - queryId: number, - sender: string, - ): Promise { - const msgRemove = - new neutron.interchainqueries.MsgRemoveInterchainQueryRequest({ - query_id: queryId, - sender, - }); - - const res = await this.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: this.chain.denom, amount: '1000' }], - }, - [msgRemove], - ); - return res?.tx_response; - } - - /** - * msgSend processes an IBC transfer, waits two blocks and returns the tx hash. - */ - async msgIBCTransfer( - sourcePort: string, - sourceChannel: string, - token: ICoin, - receiver: string, - timeoutHeight: IHeight, - memo?: string, - ): Promise { - const msgSend = new ibcProto.applications.transfer.v1.MsgTransfer({ - source_port: sourcePort, - source_channel: sourceChannel, - token: token, - sender: this.wallet.address.toString(), - receiver: receiver, - timeout_height: timeoutHeight, - memo: memo, - }); - msgSend.memo = memo; - const res = await this.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: this.chain.denom, amount: '1000' }], - }, - [msgSend], - ); - return res?.tx_response; - } - - async msgDelegate( - delegatorAddress: string, - validatorAddress: string, - amount: string, - ): Promise { - const msgDelegate = - new cosmosclient.proto.cosmos.staking.v1beta1.MsgDelegate({ - delegator_address: delegatorAddress, - validator_address: validatorAddress, - amount: { denom: this.chain.denom, amount: amount }, - }); - const res = await this.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: this.chain.denom, amount: '1000' }], - }, - [msgDelegate], - ); - return res?.tx_response; - } -} - -type TxResponseType = Awaited>; - -export const getEventAttributesFromTx = ( - data: TxResponseType['data'], - event: string, - attributes: string[], -): Array | Record> => { - const events = - ( - JSON.parse(data?.tx_response.raw_log) as [ - { - events: [ - { type: string; attributes: [{ key: string; value: string }] }, - ]; - }, - ] - )[0].events || []; - const resp = []; - for (const e of events) { - if (event === e.type) { - let out = {}; - for (const a of e.attributes) { - if (attributes.includes(a.key)) { - out[a.key] = a.value; - } - if (Object.keys(out).length == attributes.length) { - resp.push(out); - out = {}; - } - } - } - } - return resp; -}; - -export const mnemonicToWallet = async ( - walletType: { - fromPublicKey: ( - k: cosmosclient.PubKey, - ) => cosmosclient.AccAddress | cosmosclient.ValAddress; - }, - sdk: cosmosclient.CosmosSDK, - mnemonic: string, - addrPrefix: string, - validate = true, -): Promise => { - const privKey = new cosmosclient.proto.cosmos.crypto.secp256k1.PrivKey({ - key: await cosmosclient.generatePrivKeyFromMnemonic(mnemonic), - }); - - const pubKey = privKey.pubKey(); - let account = null; - cosmosclient.config.setBech32Prefix({ - accAddr: addrPrefix, - accPub: `${addrPrefix}pub`, - valAddr: `${addrPrefix}valoper`, - valPub: `${addrPrefix}valoperpub`, - consAddr: `${addrPrefix}valcons`, - consPub: `${addrPrefix}valconspub`, - }); - const address = walletType.fromPublicKey(pubKey); - // eslint-disable-next-line no-prototype-builtins - if (cosmosclient.ValAddress !== walletType && validate) { - account = await cosmosclient.rest.auth - .account(sdk, address) - .then((res) => - cosmosclient.codec.protoJSONToInstance( - cosmosclient.codec.castProtoJSONOfProtoAny(res.data.account), - ), - ) - .catch((e) => { - console.log(e); - throw e; - }); - - if ( - !(account instanceof cosmosclient.proto.cosmos.auth.v1beta1.BaseAccount) - ) { - throw new Error("can't get account"); - } - } - return new Wallet(address, account, pubKey, privKey, addrPrefix); -}; - -export const getSequenceId = (rawLog: string | undefined): number => { - if (!rawLog) { - throw 'getSequenceId: empty rawLog'; - } - const events = JSON.parse(rawLog)[0]['events']; - const sequence = events - .find((e) => e['type'] === 'send_packet') - ['attributes'].find((a) => a['key'] === 'packet_sequence').value; - return +sequence; -}; - -export const getIBCDenom = (portName, channelName, denom: string): string => { - const uatomIBCHash = crypto - .createHash('sha256') - .update(`${portName}/${channelName}/${denom}`) - .digest('hex') - .toUpperCase(); - return `ibc/${uatomIBCHash}`; -}; - -export const createBankMessage = ( - addr: string, - amount: number, - denom: string, -) => ({ - bank: { - send: { - to_address: addr, - amount: [ - { - denom: denom, - amount: amount.toString(), - }, - ], - }, - }, -}); - -export const getEventAttribute = ( - events: { type: string; attributes: { key: string; value: string }[] }[], - eventType: string, - attribute: string, -): string => { - const attributes = events - .filter((event) => event.type === eventType) - .map((event) => event.attributes) - .flat(); - - const attrValue = attributes?.find((attr) => attr.key === attribute) - ?.value as string; - - expect(attrValue).toBeDefined(); - - return attrValue; -}; - -export const filterIBCDenoms = (list: ICoin[]) => - list.filter( - (coin) => - coin.denom && ![IBC_ATOM_DENOM, IBC_USDC_DENOM].includes(coin.denom), - ); - -export const wrapMsg = (x) => Buffer.from(JSON.stringify(x)).toString('base64'); diff --git a/src/helpers/dao.ts b/src/helpers/dao.ts deleted file mode 100644 index c90c049a..00000000 --- a/src/helpers/dao.ts +++ /dev/null @@ -1,1900 +0,0 @@ -import axios from 'axios'; -import { - ADMIN_MODULE_ADDRESS, - CosmosWrapper, - createBankMessage, - getEventAttribute, - WalletWrapper, - wrapMsg, -} from './cosmos'; -import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; -import { getWithAttempts, wait } from './wait'; -import { - MultiChoiceOption, - NeutronContract, - SingleChoiceProposal, - TotalPowerAtHeightResponse, - VotingPowerAtHeightResponse, -} from './types'; -import { - addSchedule, - addSubdaoProposal, - clearAdminProposal, - clientUpdateProposal, - paramChangeProposal, - ParamChangeProposalInfo, - pinCodesCustomAutrhorityProposal, - pinCodesProposal, - removeSchedule, - SendProposalInfo, - unpinCodesProposal, - updateAdminProposal, - updateContractmanagerParamsProposal, - ParamsCronInfo, - ParamsFeerefunderInfo, - ParamsInterchainqueriesInfo, - ParamsInterchaintxsInfo, - ParamsTokenfactoryInfo, - upgradeProposal, - ParamsFeeburnerInfo, -} from './proposal'; -import { ibc } from '../generated/ibc/proto'; -import cosmosclient from '@cosmos-client/core'; -import Long from 'long'; - -export type GetSubdaoResponse = { addr: string; charter: string }; - -export type SubdaoProposalConfig = { - threshold: any; - max_voting_period: Duration; - min_voting_period: Duration; - allow_revoting: boolean; - dao: string; - close_proposal_on_execution_failure: boolean; -}; - -export type Duration = { - height: number | null; - time: number | null; -}; - -export type TimeLockSingleChoiceProposal = { - id: number; - msgs: Array>; // Vec> - status: string; -}; - -export type TimelockConfig = { - owner: string; - overrule_pre_propose: string; - subdao: string; -}; - -export type TimelockProposalListResponse = { - proposals: Array; -}; - -export type SubDaoConfig = { - name: string; - description: string; - dao_uri: string; - main_dao: string; - security_dao: string; -}; - -export type LockdropVaultConfig = { - name: string; - description: string; - lockdrop_contract: string; - oracle_usdc_contract: string; - oracle_atom_contract: string; - owner: string; -}; - -export type VestingLpVaultConfig = { - name: string; - description: string; - atom_vesting_lp_contract: string; - atom_oracle_contract: string; - usdc_vesting_lp_contract: string; - usdc_oracle_contract: string; - owner: string; -}; - -export type CreditsVaultConfig = { - name: string; - description: string; - credits_contract_address: string; - owner: string; - airdrop_contract_address: string; -}; - -export type VaultBondingStatus = { - bonding_enabled: string; - unbondable_amount: string; - height: number; -}; - -export type VotingVaultsModule = { - address: string; - vaults: { - neutron: { - address: string; - }; - lockdrop: { - address: string; - }; - }; -}; - -export type VotingCw4Module = { - address: string; - cw4group: { - address: string; - }; -}; - -export type ProposalModule = { - address: string; - pre_propose: { - address: string; - timelock?: { - address: string; - }; - }; -}; - -export const DaoContractLabels = { - DAO_CORE: 'neutron.core', - NEUTRON_VAULT: 'neutron.voting.vaults.neutron', - LOCKDROP_VAULT: 'neutron.voting.vaults.lockdrop', - TREASURY: 'treasury', - DISTRIBUTION: 'distribution', - DAO_PRE_PROPOSAL_SINGLE: 'neutron.proposals.single.pre_propose', - DAO_PRE_PROPOSAL_MULTIPLE: 'neutron.proposals.multiple.pre_propose', - DAO_PRE_PROPOSAL_OVERRULE: 'neutron.proposals.overrule.pre_propose', - DAO_VOTING_REGISTRY: 'neutron.voting', - DAO_PROPOSAL_SINGLE: 'neutron.proposals.single', - DAO_PROPOSAL_MULTIPLE: 'neutron.proposals.multiple', - DAO_PROPOSAL_OVERRULE: 'neutron.proposals.overrule', -}; - -export const DaoPrefixes = { - 'Neutron DAO': 'neutron', - 'Security SubDAO': 'security', - 'Grants SubDAO': 'grants', -}; - -export type DaoContracts = { - name: string; - core: { - address: string; - }; - proposals: { - [name: string]: ProposalModule; - }; - voting: VotingVaultsModule | VotingCw4Module; - subdaos?: { - [name: string]: DaoContracts; - }; -}; - -export const getVotingModule = async ( - cm: CosmosWrapper, - daoAddress: string, -): Promise => - await cm.queryContract(daoAddress, { - voting_module: {}, - }); - -export const getVotingVaults = async ( - cm: CosmosWrapper, - votingModuleAddress: string, -): Promise => { - const votingVaults = await cm.queryContract< - [{ address: string; name: string }] - >(votingModuleAddress, { voting_vaults: {} }); - - let ntrnVaultAddress; - let lockdropVaultAddress; - for (const vault of votingVaults) { - const vaultContractInfo = await cm.getContractInfo(vault.address); - - switch (vaultContractInfo['contract_info']['label']) { - case DaoContractLabels.NEUTRON_VAULT: - ntrnVaultAddress = vault.address; - break; - case DaoContractLabels.LOCKDROP_VAULT: - lockdropVaultAddress = vault.address; - break; - } - } - - return { - neutron: { address: ntrnVaultAddress }, - lockdrop: { address: lockdropVaultAddress }, - }; -}; - -export const getProposalModules = async ( - cm: CosmosWrapper, - daoAddress: string, -): Promise => { - const proposalModules = await cm.queryContract<{ address: string }[]>( - daoAddress, - { proposal_modules: {} }, - ); - - const proposalsStructure: DaoContracts['proposals'] = {}; - - for (const proposalModule of proposalModules) { - const proposalContractInfo = await cm.getContractInfo( - proposalModule.address, - ); - const preProposalContract = await cm.queryContract<{ - Module: { addr: string }; - }>(proposalModule.address, { proposal_creation_policy: {} }); - const modulePath = - proposalContractInfo['contract_info']['label'].split('.'); - const moduleType = modulePath.at(-1); - - const preProposeModule: ProposalModule['pre_propose'] = { - address: preProposalContract.Module.addr, - }; - - try { - const timelockAddr = await cm.queryContract( - preProposalContract.Module.addr, - { - query_extension: { msg: { timelock_address: {} } }, - }, - ); - preProposeModule.timelock = { - address: timelockAddr, - }; - // eslint-disable-next-line no-empty - } catch (e) {} - - proposalsStructure[moduleType] = { - address: proposalModule.address, - pre_propose: preProposeModule, - }; - } - - return proposalsStructure; -}; - -export const getDaoContracts = async ( - cm: CosmosWrapper, - daoAddress: string, -): Promise => { - const config = await cm.queryContract<{ name: string }>(daoAddress, { - config: {}, - }); - - const votingModuleAddress = await getVotingModule(cm, daoAddress); - const votingVaults = await getVotingVaults(cm, votingModuleAddress); - - const proposalsStructure = await getProposalModules(cm, daoAddress); - - const subdaosList = await cm.queryContract<{ addr: string }[]>(daoAddress, { - list_sub_daos: {}, - }); - - const subdaos = {}; - for (const subdao of subdaosList) { - const subDaoContracts = await getSubDaoContracts(cm, subdao.addr); - subdaos[DaoPrefixes[subDaoContracts.name]] = subDaoContracts; - } - - return { - name: config.name, - core: { address: daoAddress }, - proposals: proposalsStructure, - voting: { - address: votingModuleAddress, - vaults: votingVaults, - }, - subdaos: subdaos, - }; -}; - -export const getSubDaoContracts = async ( - cm: CosmosWrapper, - daoAddress: string, -): Promise => { - const config = await cm.queryContract<{ name: string }>(daoAddress, { - config: {}, - }); - - const votingModuleAddress = await cm.queryContract(daoAddress, { - voting_module: {}, - }); - const cw4GroupAddress = await cm.queryContract(votingModuleAddress, { - group_contract: {}, - }); - - const proposalsStructure = await getProposalModules(cm, daoAddress); - - return { - name: config.name, - core: { - address: daoAddress, - }, - proposals: proposalsStructure, - voting: { - address: votingModuleAddress, - cw4group: { - address: cw4GroupAddress, - }, - }, - }; -}; - -export const getTreasuryContract = async ( - cm: CosmosWrapper, -): Promise => { - const url = `${cm.sdk.url}/neutron/feeburner/params`; - const resp = await axios.get<{ - params: { treasury_address: string }; - }>(url); - return resp.data.params.treasury_address; -}; - -export class Dao { - readonly chain: CosmosWrapper; - readonly contracts: DaoContracts; - - constructor(cm: CosmosWrapper, contracts: DaoContracts) { - this.chain = cm; - this.contracts = contracts; - } - - async checkPassedProposal(proposalId: number) { - await getWithAttempts( - this.chain.blockWaiter, - async () => await this.queryProposal(proposalId), - async (response) => response.proposal.status === 'passed', - 20, - ); - } - - async checkPassedMultiChoiceProposal(proposalId: number) { - await getWithAttempts( - this.chain.blockWaiter, - async () => await this.queryMultiChoiceProposal(proposalId), - async (response) => response.proposal.status === 'passed', - 20, - ); - } - - async checkExecutedMultiChoiceProposal(proposalId: number) { - await getWithAttempts( - this.chain.blockWaiter, - async () => await this.queryMultiChoiceProposal(proposalId), - async (response) => response.proposal.status === 'executed', - 20, - ); - } - - async queryMultiChoiceProposal(proposalId: number): Promise { - return await this.chain.queryContract( - this.contracts.proposals.multiple.address, - { - proposal: { - proposal_id: proposalId, - }, - }, - ); - } - - async queryProposal( - proposalId: number, - customModule = 'single', - ): Promise { - return await this.chain.queryContract( - this.contracts.proposals[customModule].address, - { - proposal: { - proposal_id: proposalId, - }, - }, - ); - } - - async queryOverruleProposal( - proposalId: number, - ): Promise { - return await this.chain.queryContract( - this.contracts.proposals.overrule.address, - { - proposal: { - proposal_id: proposalId, - }, - }, - ); - } - - async queryTotalVotingPower(): Promise { - return await this.chain.queryContract( - this.contracts.core.address, - { - total_power_at_height: {}, - }, - ); - } - - async queryVotingPower(addr: string): Promise { - return await this.chain.queryContract( - this.contracts.core.address, - { - voting_power_at_height: { - address: addr, - }, - }, - ); - } - - async makeSingleChoiceProposalPass( - loyalVoters: DaoMember[], - title: string, - description: string, - msgs: any[], - deposit: string, - ) { - const proposalId = await loyalVoters[0].submitSingleChoiceProposal( - title, - description, - msgs, - deposit, - ); - await loyalVoters[0].user.chain.blockWaiter.waitBlocks(1); - - for (const voter of loyalVoters) { - await voter.voteYes(proposalId); - } - await loyalVoters[0].executeProposal(proposalId); - - await getWithAttempts( - loyalVoters[0].user.chain.blockWaiter, - async () => await this.queryProposal(proposalId), - async (response) => response.proposal.status === 'executed', - 20, - ); - } - - async getTimelockedProposal( - proposalId: number, - customModule = 'single', - ): Promise { - return this.chain.queryContract( - this.contracts.proposals[customModule].pre_propose.timelock.address, - { - proposal: { - proposal_id: proposalId, - }, - }, - ); - } - - async getSubDaoList(): Promise { - const res = await this.chain.queryContract<{ addr: string }[]>( - this.contracts.core.address, - { - list_sub_daos: {}, - }, - ); - return res.map((x) => x.addr); - } - - async querySubDao(subdaoAddress: string): Promise { - return this.chain.queryContract( - this.contracts.core.address, - { - get_sub_dao: { - address: subdaoAddress, - }, - }, - ); - } - - async getOverruleProposalId( - timelockAddress: string, - subdaoProposalId: number, - ): Promise { - return await this.chain.queryContract( - this.contracts.proposals.overrule.pre_propose.address, - { - query_extension: { - msg: { - overrule_proposal_id: { - timelock_address: timelockAddress, - subdao_proposal_id: subdaoProposalId, - }, - }, - }, - }, - ); - } -} - -export class DaoMember { - readonly user: WalletWrapper; - readonly dao: Dao; - - constructor(cm: WalletWrapper, dao: Dao) { - this.user = cm; - this.dao = dao; - } - - /** - * voteYes vote 'yes' for given proposal. - */ - async voteYes( - proposalId: number, - customModule = 'single', - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.user.chain.denom, amount: '10000' }], - }, - ): Promise { - return await this.user.executeContract( - this.dao.contracts.proposals[customModule].address, - JSON.stringify({ vote: { proposal_id: proposalId, vote: 'yes' } }), - [], - fee, - ); - } - - /** - * voteNo vote 'no' for given proposal. - */ - async voteNo( - proposalId: number, - customModule = 'single', - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.user.chain.denom, amount: '10000' }], - }, - ): Promise { - return await this.user.executeContract( - this.dao.contracts.proposals[customModule].address, - JSON.stringify({ vote: { proposal_id: proposalId, vote: 'no' } }), - [], - fee, - ); - } - - /** - * voteForOption vote for option for given multi choice proposal. - */ - async voteForOption( - proposalId: number, - optionId: number, - ): Promise { - return await this.user.executeContract( - this.dao.contracts.proposals.multiple.address, - JSON.stringify({ - vote: { proposal_id: proposalId, vote: { option_id: optionId } }, - }), - ); - } - - async bondFunds(amount: string): Promise { - const vaultAddress = (this.dao.contracts.voting as VotingVaultsModule) - .vaults.neutron.address; - return await this.user.executeContract( - vaultAddress, - JSON.stringify({ - bond: {}, - }), - [{ denom: this.user.chain.denom, amount: amount }], - ); - } - - async unbondFunds(amount: string): Promise { - const vaultAddress = (this.dao.contracts.voting as VotingVaultsModule) - .vaults.neutron.address; - return await this.user.executeContract( - vaultAddress, - JSON.stringify({ - unbond: { amount: amount }, - }), - ); - } - - /** - * submitSingleChoiceProposal creates proposal with given message. - */ - async submitSingleChoiceProposal( - title: string, - description: string, - msgs: any[], - deposit = '', - customModule = 'single', - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.user.chain.denom, amount: '10000' }], - }, - ): Promise { - let depositFunds = []; - if (deposit !== '') { - depositFunds = [{ denom: this.user.chain.denom, amount: deposit }]; - } - const proposalTx = await this.user.executeContract( - this.dao.contracts.proposals[customModule].pre_propose.address, - JSON.stringify({ - propose: { - msg: { - propose: { - title: title, - description: description, - msgs, - }, - }, - }, - }), - depositFunds, - fee, - ); - - const attribute = getEventAttribute( - (proposalTx as any).events, - 'wasm', - 'proposal_id', - ); - - const proposalId = parseInt(attribute); - expect(proposalId).toBeGreaterThanOrEqual(0); - return proposalId; - } - - /** - * executeProposal executes given proposal. - */ - async executeProposal( - proposalId: number, - customModule = 'single', - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.user.chain.denom, amount: '10000' }], - }, - ): Promise { - return await this.user.executeContract( - this.dao.contracts.proposals[customModule].address, - JSON.stringify({ execute: { proposal_id: proposalId } }), - [], - fee, - ); - } - - async executeProposalWithAttempts( - proposalId: number, - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.user.chain.denom, amount: '10000' }], - }, - ) { - await this.executeProposal(proposalId, 'single', fee); - await getWithAttempts( - this.user.chain.blockWaiter, - async () => await this.dao.queryProposal(proposalId), - async (response) => response.proposal.status === 'executed', - 20, - ); - } - - async executeMultiChoiceProposalWithAttempts(proposalId: number) { - await this.executeMultiChoiceProposal(proposalId); - await getWithAttempts( - this.user.chain.blockWaiter, - async () => await this.dao.queryMultiChoiceProposal(proposalId), - async (response) => response.proposal.status === 'executed', - 20, - ); - } - - /** - * executeMultiChoiceProposal executes given multichoice proposal. - */ - async executeMultiChoiceProposal(proposalId: number): Promise { - return await this.user.executeContract( - this.dao.contracts.proposals.multiple.address, - JSON.stringify({ execute: { proposal_id: proposalId } }), - ); - } - - /** - * submitSendProposal creates proposal to send funds from DAO core contract for given address. - */ - async submitSendProposal( - title: string, - description: string, - dest: { recipient: string; amount: number; denom: string }[], - deposit = '', - ): Promise { - const messages = dest.map((d) => - createBankMessage(d.recipient, d.amount, d.denom), - ); - return await this.submitSingleChoiceProposal( - title, - description, - messages, - deposit, - ); - } - - /** - * submitParameterChangeProposal creates parameter change proposal. - */ - async submitParameterChangeProposal( - title: string, - description: string, - subspace: string, - key: string, - value: string, - deposit: string, - fee = { - gas_limit: Long.fromString('4000000'), - amount: [{ denom: this.user.chain.denom, amount: '10000' }], - }, - ): Promise { - const message = paramChangeProposal({ - title, - description, - subspace, - key, - value, - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - deposit, - 'single', - fee, - ); - } - - /** - * submitMultiChoiceSendProposal creates parameter change proposal with multiple choices. - */ - async submitMultiChoiceSendProposal( - choices: SendProposalInfo[], - title: string, - description: string, - deposit: string, - ): Promise { - const messages: MultiChoiceOption[] = choices.map((choice, idx) => ({ - description: 'choice' + idx, - msgs: [ - createBankMessage(choice.to, parseInt(choice.amount), choice.denom), - ], - })); - return await this.submitMultiChoiceProposal( - title, - description, - deposit, - messages, - ); - } - - /** - * submitMultiChoiceParameterChangeProposal creates parameter change proposal with multiple choices. - */ - async submitMultiChoiceParameterChangeProposal( - choices: ParamChangeProposalInfo[], - title: string, - description: string, - deposit: string, - ): Promise { - const messages: MultiChoiceOption[] = choices.map((choice, idx) => ({ - description: 'choice' + idx, - msgs: [paramChangeProposal(choice)], - })); - return await this.submitMultiChoiceProposal( - title, - description, - deposit, - messages, - ); - } - - /** - * submitMultiChoiceProposal creates multi-choice proposal with given message. - */ - async submitMultiChoiceProposal( - title: string, - description: string, - deposit: string, - options: MultiChoiceOption[], - ): Promise { - const proposalTx = await this.user.executeContract( - this.dao.contracts.proposals.multiple.pre_propose.address, - JSON.stringify({ - propose: { - msg: { - propose: { - title: title, - description: description, - choices: { options }, - }, - }, - }, - }), - [{ denom: this.user.chain.denom, amount: deposit }], - ); - - const attribute = getEventAttribute( - (proposalTx as any).events, - 'wasm', - 'proposal_id', - ); - - const proposalId = parseInt(attribute); - expect(proposalId).toBeGreaterThanOrEqual(0); - return proposalId; - } - - /** - * submitSoftwareUpgradeProposal creates proposal. - */ - async submitSoftwareUpgradeProposal( - title: string, - description: string, - name: string, - height: number, - info: string, - deposit: string, - ): Promise { - const message = { - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade', - authority: ADMIN_MODULE_ADDRESS, - plan: { - name, - height, - info, - }, - }), - }, - }, - }, - }, - }; - return await this.submitSingleChoiceProposal( - title, - description, - [message], - deposit, - ); - } - - /** - * submitCancelSoftwareUpgradeProposal creates proposal. - */ - async submitCancelSoftwareUpgradeProposal( - title: string, - description: string, - deposit: string, - ): Promise { - const message = { - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmos.upgrade.v1beta1.MsgCancelUpgrade', - authority: 'neutron1hxskfdxpp5hqgtjj6am6nkjefhfzj359x0ar3z', - }), - }, - }, - }, - }, - }; - return await this.submitSingleChoiceProposal( - title, - description, - [message], - deposit, - ); - } - /** - * submitBankSendProposal creates proposal. - */ - async submitBankSendProposal( - title: string, - description: string, - deposit: string, - ): Promise { - const message = { - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmos.bank.v1beta1.MsgSend', - from_address: ADMIN_MODULE_ADDRESS, - to_address: ADMIN_MODULE_ADDRESS, - amount: [], - }), - }, - }, - }, - }, - }; - return await this.submitSingleChoiceProposal( - title, - description, - [message], - deposit, - ); - } - - async supportAndExecuteProposal( - proposalId: number, - customModule = 'single', - ): Promise { - await this.voteYes(proposalId, customModule); - await this.executeProposal(proposalId, customModule); - return await this.dao.getTimelockedProposal(proposalId, customModule); - } - - async executeTimelockedProposal( - proposalId: number, - customModule = 'single', - ): Promise { - return this.user.executeContract( - this.dao.contracts.proposals[customModule].pre_propose.timelock.address, - JSON.stringify({ - execute_proposal: { - proposal_id: proposalId, - }, - }), - ); - } - - async overruleTimelockedProposal( - timelockAddress: string, - proposalId: number, - ): Promise { - const overruleProposalId = await this.dao.getOverruleProposalId( - timelockAddress, - proposalId, - ); - await this.user.executeContract( - this.dao.contracts.proposals.overrule.address, - JSON.stringify({ - vote: { proposal_id: overruleProposalId, vote: 'yes' }, - }), - ); - return await this.user.executeContract( - this.dao.contracts.proposals.overrule.address, - JSON.stringify({ execute: { proposal_id: overruleProposalId } }), - ); - } - - /** - * submitOverruleProposal tries to create overrule proposal. - * Actually, it will always fail since even while creation of overrule proposals - * is permissionless, there is no moment in time when user can do that. - * The overrule proposal is created automatically when subdao proposal is timelocked - * and there is no way to create it for non-timelocked proposal or create a duplicate. - * Thus, this function is for testing purposes only. - */ - async submitOverruleProposal( - timelockAddress: string, - proposalId: number, - ): Promise { - const proposalTx = await this.user.executeContract( - this.dao.contracts.proposals.overrule.pre_propose.address, - JSON.stringify({ - propose: { - msg: { - propose_overrule: { - timelock_contract: timelockAddress, - proposal_id: proposalId, - }, - }, - }, - }), - ); - - const attribute = getEventAttribute( - (proposalTx as any).events, - 'wasm', - 'proposal_id', - ); - - const proposalId1 = parseInt(attribute); - expect(proposalId1).toBeGreaterThanOrEqual(0); - return proposalId1; - } - - async submitUpdateConfigProposal( - title: string, - description: string, - config: SubdaoProposalConfig, - deposit: string, - customModule = 'single', - ): Promise { - const msg = { - update_config: config, - }; - const message = { - wasm: { - execute: { - contract_addr: this.dao.contracts.proposals[customModule].address, - msg: Buffer.from(JSON.stringify(msg)).toString('base64'), - funds: [], - }, - }, - }; - return await this.submitSingleChoiceProposal( - title, - description, - [message], - deposit, - ); - } - - async submitUpdateSubDaoConfigProposal( - newConfig: { - name?: string; - description?: string; - dao_uri?: string; - }, - customModule = 'single', - ): Promise { - const message = { - wasm: { - execute: { - contract_addr: this.dao.contracts.core.address, - msg: wrapMsg({ - update_config: newConfig, - }), - funds: [], - }, - }, - }; - - return await this.submitSingleChoiceProposal( - 'update subDAO config', - 'sets subDAO config to new value', - [message], - '', - customModule, - ); - } - - async submitTypedPauseProposal( - contractAddr: string, - duration = 10, - customModule = 'single', - ): Promise { - const message = { - wasm: { - execute: { - contract_addr: contractAddr, - msg: wrapMsg({ - pause: { - duration: { time: duration }, - }, - }), - funds: [], - }, - }, - }; - - return await this.submitSingleChoiceProposal( - 'pause proposal', - 'pauses contract', - [message], - '', - customModule, - ); - } - - async submitUntypedPauseProposal( - contractAddr: string, - duration = 10, - customModule = 'single', - ): Promise { - const message = { - wasm: { - execute: { - contract_addr: contractAddr, - msg: wrapMsg({ - pause: { - duration: duration, - }, - }), - funds: [], - }, - }, - }; - - return await this.submitSingleChoiceProposal( - 'pause proposal', - 'pauses contract', - [message], - '', - customModule, - ); - } - - async submitUntypedPauseProposalWFunds( - contractAddr: string, - duration = 10, - customModule = 'single', - denom = 'untrn', - amount = '100', - ): Promise { - const message = { - wasm: { - execute: { - contract_addr: contractAddr, - msg: wrapMsg({ - pause: { - duration: duration, - }, - }), - funds: [{ denom: denom, amount: amount }], - }, - }, - }; - - return await this.submitSingleChoiceProposal( - 'pause proposal', - 'pauses contract', - [message], - '', - customModule, - ); - } - - async submitUpdateSubDaoMultisigParticipants( - newParticipants: string[], - ): Promise { - const message = { - wasm: { - execute: { - contract_addr: (this.dao.contracts.voting as VotingCw4Module).cw4group - .address, - msg: wrapMsg({ - update_members: { - remove: [], - add: newParticipants.map((m) => ({ - addr: m, - weight: 1, - })), - }, - }), - funds: [], - }, - }, - }; - - return await this.submitSingleChoiceProposal( - 'update members', - 'update members', - [message], - ); - } - - /** - * submitPinCodesProposal creates proposal which pins given code ids to wasmvm. - */ - async submitPinCodesProposal( - title: string, - description: string, - codesIds: number[], - amount: string, - ): Promise { - const message = pinCodesProposal({ - title, - description, - codes_ids: codesIds, - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitPinCodesCustomAuthorityProposal creates proposal which pins given code ids to wasmvm. - */ - async submitPinCodesCustomAuthorityProposal( - title: string, - description: string, - codesIds: number[], - amount: string, - authority: string, - ): Promise { - const message = pinCodesCustomAutrhorityProposal( - { - title, - description, - codes_ids: codesIds, - }, - authority, - ); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUnpinCodesProposal creates proposal which unpins given code ids to wasmvm. - */ - - async submitUnpinCodesProposal( - title: string, - description: string, - codesIds: number[], - amount: string, - ): Promise { - const message = unpinCodesProposal({ - title, - description, - codes_ids: codesIds, - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsInterchaintxsProposal creates proposal which changes params of interchaintxs module. - */ - - async submitUpdateParamsInterchaintxsProposal( - title: string, - description: string, - message: ParamsInterchaintxsInfo, - amount: string, - ): Promise { - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsInterchainqueriesProposal creates proposal which changes params of interchaintxs module. - */ - - async submitUpdateParamsInterchainqueriesProposal( - title: string, - description: string, - message: ParamsInterchainqueriesInfo, - amount: string, - ): Promise { - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsTokenfactoryProposal creates proposal which changes params of tokenfactory module. - */ - - async submitUpdateParamsTokenfactoryProposal( - title: string, - description: string, - message: ParamsTokenfactoryInfo, - amount: string, - ): Promise { - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsFeeburnerProposal creates proposal which changes some params of feeburner module. - */ - - async submitUpdateParamsFeeburnerProposal( - title: string, - description: string, - message: ParamsFeeburnerInfo, - amount: string, - ): Promise { - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsFeerefunderProposal creates proposal which changes some params of feerefunder module. - */ - - async submitUpdateParamsFeerefunderProposal( - title: string, - description: string, - amount: string, - message: ParamsFeerefunderInfo = { - min_fee: { recv_fee: null, ack_fee: null, timeout_fee: null }, - }, - ): Promise { - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsCronProposal creates proposal which changes soe params of cron module. - */ - - async submitUpdateParamsCronProposal( - title: string, - description: string, - message: ParamsCronInfo, - amount: string, - ): Promise { - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateParamsContractmanageProposal creates proposal which changes some params of contractmanager module. - */ - - async submitUpdateParamsContractmanageProposal( - title: string, - description: string, - sudoCallGasLimit: string, - amount: string, - ): Promise { - const message = updateContractmanagerParamsProposal({ - sudo_call_gas_limit: sudoCallGasLimit, - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitClientUpdateProposal creates proposal which updates client. - */ - async submitClientUpdateProposal( - title: string, - description: string, - subjectClientId: string, - substituteClientId: string, - amount: string, - ): Promise { - const message = clientUpdateProposal({ - title, - description, - subject_client_id: subjectClientId, - substitute_client_id: substituteClientId, - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpgradeProposal creates proposal which upgrades ibc. - */ - async submitUpgradeProposal( - title: string, - description: string, - name: string, - height: number, - info: string, - amount: string, - ): Promise { - const message = upgradeProposal({ - title, - description, - name, - height, - info, - upgraded_client_state: cosmosclient.codec.instanceToProtoAny( - new ibc.lightclients.tendermint.v1.ClientState({}), - ), - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitUpdateAminProposal creates proposal which updates an admin of a contract. - */ - async submitUpdateAdminProposal( - title: string, - description: string, - sender: string, - contract: string, - newAdmin: string, - amount: string, - ): Promise { - const message = updateAdminProposal({ - sender, - contract, - new_admin: newAdmin, - }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitClearAdminProposal creates proposal which removes an admin of a contract. - */ - async submitClearAdminProposal( - title: string, - description: string, - sender: string, - contract: string, - amount: string, - ): Promise { - const message = clearAdminProposal({ sender, contract }); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitAddSchedule creates proposal to add new schedule. - */ - async submitAddSchedule( - title: string, - description: string, - amount: string, - name: string, - period: number, - msgs: any[], - ): Promise { - const message = addSchedule(name, period, msgs); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - ); - } - - /** - * submitRemoveSchedule creates proposal to remove added schedule. - */ - async submitRemoveSchedule( - title: string, - description: string, - amount: string, - name: string, - customModule = 'single', - ): Promise { - const message = removeSchedule(name); - return await this.submitSingleChoiceProposal( - title, - description, - [message], - amount, - customModule, - ); - } - - async queryVotingPower(): Promise { - return await this.dao.queryVotingPower(this.user.wallet.address.toString()); - } - - async addSubdaoToDao(subDaoCore: string) { - const p = await this.submitSingleChoiceProposal( - 'add subdao', - '', - [addSubdaoProposal(this.dao.contracts.core.address, subDaoCore)], - '1000', - ); - await this.voteYes(p); - await this.executeProposalWithAttempts(p); - } -} - -export const deploySubdao = async ( - cm: WalletWrapper, - mainDaoCoreAddress: string, - overrulePreProposeAddress: string, - securityDaoAddr: string, - closeProposalOnExecutionFailure = true, -): Promise => { - const coreCodeId = await cm.storeWasm(NeutronContract.SUBDAO_CORE); - const cw4VotingCodeId = await cm.storeWasm(NeutronContract.CW4_VOTING); - const cw4GroupCodeId = await cm.storeWasm(NeutronContract.CW4_GROUP); - const proposeCodeId = await cm.storeWasm(NeutronContract.SUBDAO_PROPOSAL); - const preProposeTimelockedCodeId = await cm.storeWasm( - NeutronContract.SUBDAO_PREPROPOSE, - ); - const preProposeNonTimelockedPauseCodeId = await cm.storeWasm( - NeutronContract.SUBDAO_PREPROPOSE_NO_TIMELOCK, - ); - const timelockCodeId = await cm.storeWasm(NeutronContract.SUBDAO_TIMELOCK); - const votingModuleInstantiateInfo = { - code_id: cw4VotingCodeId, - label: 'subDAO_Neutron_voting_module', - msg: wrapMsg({ - cw4_group_code_id: cw4GroupCodeId, - initial_members: [ - { - addr: cm.wallet.address.toString(), - weight: 1, - }, - ], - }), - }; - - const proposeInstantiateMessage = { - threshold: { absolute_count: { threshold: '1' } }, - max_voting_period: { height: 10 }, - allow_revoting: false, - pre_propose_info: { - module_may_propose: { - info: { - code_id: preProposeTimelockedCodeId, - label: 'neutron.subdaos.test.proposal.single.pre_propose', - msg: wrapMsg({ - open_proposal_submission: true, - timelock_module_instantiate_info: { - code_id: timelockCodeId, - label: - 'neutron.subdaos.test.proposal.single.pre_propose.timelock', - msg: wrapMsg({ - overrule_pre_propose: overrulePreProposeAddress, - }), - }, - }), - }, - }, - }, - close_proposal_on_execution_failure: closeProposalOnExecutionFailure, - }; - const proposalModuleInstantiateInfo = { - code_id: proposeCodeId, - label: 'neutron.subdaos.test.proposal.single', - msg: wrapMsg(proposeInstantiateMessage), - }; - - const propose2InstantiateMessage = { - threshold: { absolute_count: { threshold: '1' } }, - max_voting_period: { height: 10 }, - allow_revoting: false, - pre_propose_info: { - module_may_propose: { - info: { - code_id: preProposeTimelockedCodeId, - label: 'neutron.subdaos.test.proposal.single2.pre_propose', - msg: wrapMsg({ - open_proposal_submission: true, - timelock_module_instantiate_info: { - code_id: timelockCodeId, - label: - 'neutron.subdaos.test.proposal.single2.pre_propose.timelock', - msg: wrapMsg({ - overrule_pre_propose: overrulePreProposeAddress, - }), - }, - }), - }, - }, - }, - close_proposal_on_execution_failure: false, - }; - const proposal2ModuleInstantiateInfo = { - code_id: proposeCodeId, - label: 'neutron.subdaos.test.proposal.single2', - msg: wrapMsg(propose2InstantiateMessage), - }; - - const nonTimelockedPauseProposeInstantiateMessage = { - threshold: { absolute_count: { threshold: '1' } }, - max_voting_period: { height: 10 }, - allow_revoting: false, - pre_propose_info: { - module_may_propose: { - info: { - code_id: preProposeNonTimelockedPauseCodeId, - label: 'neutron.subdaos.test.proposal.single_nt_pause.pre_propose', - msg: wrapMsg({ - open_proposal_submission: true, - }), - }, - }, - }, - close_proposal_on_execution_failure: false, - }; - const nonTimelockedPauseProposalModuleInstantiateInfo = { - code_id: proposeCodeId, - label: 'neutron.subdaos.test.proposal.single_nt_pause', - msg: wrapMsg(nonTimelockedPauseProposeInstantiateMessage), - }; - - const coreInstantiateMessage = { - name: 'SubDAO core test 1', - description: 'serves testing purposes', - vote_module_instantiate_info: votingModuleInstantiateInfo, - proposal_modules_instantiate_info: [ - proposalModuleInstantiateInfo, - proposal2ModuleInstantiateInfo, - nonTimelockedPauseProposalModuleInstantiateInfo, - ], - main_dao: mainDaoCoreAddress, - security_dao: securityDaoAddr, - }; - const res = await cm.instantiateContract( - coreCodeId, - JSON.stringify(coreInstantiateMessage), - 'neutron.subdaos.test.core', - ); - - const f = (arr: Record[], id: number) => - (arr.find((v) => Number(v.code_id) == id) || {})._contract_address; - - return new Dao( - cm.chain, - await getSubDaoContracts(cm.chain, f(res, coreCodeId)), - ); -}; - -export const setupSubDaoTimelockSet = async ( - cm: WalletWrapper, - mainDaoAddress: string, - securityDaoAddr: string, - mockMainDao: boolean, -): Promise => { - const daoContracts = await getDaoContracts(cm.chain, mainDaoAddress); - const subDao = await deploySubdao( - cm, - mockMainDao ? cm.wallet.address.toString() : daoContracts.core.address, - daoContracts.proposals.overrule.pre_propose.address, - securityDaoAddr, - ); - - const mainDaoMember = new DaoMember(cm, new Dao(cm.chain, daoContracts)); - await mainDaoMember.addSubdaoToDao(subDao.contracts.core.address); - - return subDao; -}; - -export const deployNeutronDao = async ( - cm: WalletWrapper, -): Promise => { - const coreCodeId = await cm.storeWasm(NeutronContract.DAO_CORE); - const proposeSingleCodeId = await cm.storeWasm( - NeutronContract.DAO_PROPOSAL_SINGLE, - ); - const preProposeSingleCodeId = await cm.storeWasm( - NeutronContract.DAO_PREPROPOSAL_SINGLE, - ); - const proposeMultipleCodeId = await cm.storeWasm( - NeutronContract.DAO_PROPOSAL_MULTI, - ); - const preProposeMultipleCodeId = await cm.storeWasm( - NeutronContract.DAO_PREPROPOSAL_MULTI, - ); - const preProposeOverruleCodeId = await cm.storeWasm( - NeutronContract.DAO_PREPROPOSAL_OVERRULE, - ); - const votingRegistryCodeId = await cm.storeWasm( - NeutronContract.VOTING_REGISTRY, - ); - - const neutronVaultCodeId = await cm.storeWasm(NeutronContract.NEUTRON_VAULT); - const neutronVaultInitMsg = { - owner: cm.wallet.address.toString(), - name: 'voting vault', - denom: cm.chain.denom, - description: 'a simple voting vault for testing purposes', - }; - - const neutronVaultCodeIdRes = await cm.instantiateContract( - neutronVaultCodeId, - JSON.stringify(neutronVaultInitMsg), - DaoContractLabels.NEUTRON_VAULT, - ); - - const f = (arr: Record[], id: number) => - (arr.find((v) => Number(v.code_id) == id) || {})._contract_address; - const neutronVaultAddess = f(neutronVaultCodeIdRes, neutronVaultCodeId); - const votingRegistryInstantiateInfo = { - admin: { - core_module: {}, - }, - code_id: votingRegistryCodeId, - label: DaoContractLabels.DAO_VOTING_REGISTRY, - msg: wrapMsg({ - manager: null, - owner: cm.wallet.address.toString(), - voting_vaults: [neutronVaultAddess], - }), - }; - const preProposeInitMsg = { - deposit_info: { - denom: { - token: { - denom: { - native: cm.chain.denom, - }, - }, - }, - amount: '1000', - refund_policy: 'always', - }, - open_proposal_submission: false, - }; - const proposeSingleInitMsg = { - allow_revoting: false, - pre_propose_info: { - module_may_propose: { - info: { - admin: { - core_module: {}, - }, - code_id: preProposeSingleCodeId, - msg: wrapMsg(preProposeInitMsg), - label: DaoContractLabels.DAO_PRE_PROPOSAL_SINGLE, - }, - }, - }, - only_members_execute: false, - max_voting_period: { - time: 604800, - }, - close_proposal_on_execution_failure: false, - threshold: { - threshold_quorum: { - quorum: { - percent: '0.20', - }, - threshold: { - majority: {}, - }, - }, - }, - }; - - const proposeMultipleInitMsg = { - allow_revoting: false, - pre_propose_info: { - module_may_propose: { - info: { - admin: { - core_module: {}, - }, - code_id: preProposeMultipleCodeId, - msg: wrapMsg(preProposeInitMsg), - label: DaoContractLabels.DAO_PRE_PROPOSAL_MULTIPLE, - }, - }, - }, - only_members_execute: false, - max_voting_period: { - time: 604800, - }, - close_proposal_on_execution_failure: false, - voting_strategy: { - single_choice: { - quorum: { - majority: {}, - }, - }, - }, - }; - - const proposeOverruleInitMsg = { - allow_revoting: false, - pre_propose_info: { - module_may_propose: { - info: { - admin: { - core_module: {}, - }, - code_id: preProposeOverruleCodeId, - msg: wrapMsg({}), - label: DaoContractLabels.DAO_PRE_PROPOSAL_OVERRULE, - }, - }, - }, - only_members_execute: false, - max_voting_period: { - height: 10, - }, - close_proposal_on_execution_failure: false, - threshold: { - absolute_percentage: { - percentage: { - percent: '0.10', - }, - }, - }, - }; - - const coreInstantiateMessage = { - name: 'SubDAO core test 1', - description: 'serves testing purposes', - initial_items: null, - voting_registry_module_instantiate_info: votingRegistryInstantiateInfo, - proposal_modules_instantiate_info: [ - { - admin: { - core_module: {}, - }, - code_id: proposeSingleCodeId, - label: DaoContractLabels.DAO_PROPOSAL_SINGLE, - msg: wrapMsg(proposeSingleInitMsg), - }, - { - admin: { - core_module: {}, - }, - code_id: proposeMultipleCodeId, - label: DaoContractLabels.DAO_PROPOSAL_MULTIPLE, - msg: wrapMsg(proposeMultipleInitMsg), - }, - { - admin: { - core_module: {}, - }, - code_id: proposeSingleCodeId, - label: DaoContractLabels.DAO_PROPOSAL_OVERRULE, - msg: wrapMsg(proposeOverruleInitMsg), - }, - ], - }; - const res = await cm.instantiateContract( - coreCodeId, - JSON.stringify(coreInstantiateMessage), - DaoContractLabels.DAO_CORE, - ); - // wait a couple of secs before we can query voting vaults from registry's 'Map' - await wait(10); - return getDaoContracts(cm.chain, f(res, coreCodeId)); -}; diff --git a/src/helpers/env.ts b/src/helpers/env.ts deleted file mode 100644 index d442bc96..00000000 --- a/src/helpers/env.ts +++ /dev/null @@ -1,168 +0,0 @@ -import axios from 'axios'; -import { execSync } from 'child_process'; -import { ChannelsList, NeutronContract } from './types'; -import { wait } from './wait'; -import { promises as fsPromise } from 'fs'; -import path from 'path'; -import crypto from 'crypto'; - -const CONTRACTS_PATH = process.env.CONTRACTS_PATH || './contracts'; -export const DEBUG_SUBMIT_TX = process.env.DEBUG_SUBMIT_TX; - -const BLOCKS_COUNT_BEFORE_START = process.env.BLOCKS_COUNT_BEFORE_START - ? parseInt(process.env.BLOCKS_COUNT_BEFORE_START, 10) - : 10; - -let alreadySetUp = false; - -export const getContractBinary = async (fileName: string): Promise => - fsPromise.readFile(path.resolve(CONTRACTS_PATH, fileName)); - -export const getContractsHashes = async (): Promise> => { - const hashes = {}; - for (const key of Object.keys(NeutronContract)) { - const binary = await getContractBinary(NeutronContract[key]); - hashes[NeutronContract[key]] = crypto - .createHash('sha256') - .update(binary) - .digest('hex'); - } - return hashes; -}; - -export const setup = async (host1: string, host2: string) => { - if (alreadySetUp) { - console.log('already set up'); - return; - } - if (process.env.NO_DOCKER) { - console.log('NO_DOCKER ENV provided'); - return; - } - try { - execSync(`cd setup && make stop-cosmopark`); - // eslint-disable-next-line no-empty - } catch (e) {} - console.log('Starting container... it may take long'); - if (process.env.NO_REBUILD) { - console.log('NO_REBUILD ENV provided. do not rebuild docker images'); - execSync(`cd setup && make start-cosmopark-no-rebuild`); - } else { - execSync(`cd setup && make start-cosmopark`); - } - showVersions(); - await showContractsHashes(); - await waitForHTTP(host1); - !process.env.NO_WAIT_CHANNEL1 && (await waitForChannel(host1)); - !process.env.NO_WAIT_HTTP2 && (await waitForHTTP(host2)); - !process.env.NO_WAIT_CHANNEL2 && (await waitForChannel(host2)); - !process.env.NO_WAIT_DELAY && (await wait(20)); // FIXME: this hardcoded sleep is here to wait until hermes is fully initialized. - // proper fix would be to monitor hermes status events. - alreadySetUp = true; -}; - -const waitForHTTP = async ( - host = 'http://127.0.0.1:1317', - path = `cosmos/base/tendermint/v1beta1/blocks/${BLOCKS_COUNT_BEFORE_START}`, - timeout = 280000, -) => { - const start = Date.now(); - while (Date.now() < start + timeout) { - try { - const r = await axios.get(`${host}/${path}`, { - timeout: 1000, - }); - if (r.status === 200) { - return; - } - // eslint-disable-next-line no-empty - } catch (e) {} - await wait(1); - } - throw new Error('No port opened'); -}; - -export const waitForChannel = async ( - host = 'http://127.0.0.1:1317', - timeout = 100000, -) => { - const start = Date.now(); - - while (Date.now() < start + timeout) { - try { - const r = await axios.get( - `${host}/ibc/core/channel/v1/channels`, - { - timeout: 1000, - }, - ); - if ( - r.data.channels.length > 0 && - r.data.channels.every( - (channel) => channel.counterparty.channel_id !== '', - ) - ) { - await wait(20); - return; - } - // eslint-disable-next-line no-empty - } catch (e) {} - await wait(1); - } - - throw new Error('No channel opened'); -}; - -export const showVersions = () => { - if (process.env.NO_DOCKER) { - console.log('Cannot get versions since NO_DOCKER ENV provided'); - return; - } - const servicesAndGetVersionCommandsText = [ - [ - 'ICQ relayer', - 'cd setup && docker compose exec relayer neutron_query_relayer version', - ], - ['hermes', 'cd setup && docker compose exec hermes hermes version'], - ['Integration tests', "git log -1 --format='%H'"], - ]; - for (const service of servicesAndGetVersionCommandsText) { - try { - const version = execSync(service[1]).toString().trim(); - console.log(`${service[0]} version:\n${version}`); - } catch (err) { - console.log(`Cannot get ${service[0]} version:\n${err}`); - } - } - const servicesAndGetVersionCommandsJson = [ - [ - 'neutrond', - 'cd setup && docker compose exec neutron-node /go/bin/neutrond version --long -o json', - ], - [ - 'gaiad', - 'cd setup && docker compose exec gaia-node gaiad version --long 2>&1 -o json', - ], - ]; - for (const service of servicesAndGetVersionCommandsJson) { - try { - const versionLong = JSON.parse(execSync(service[1]).toString().trim()); - console.log( - `${service[0]} version:\nversion: ${versionLong['version']}\ncommit: ${versionLong['commit']}`, - ); - } catch (err) { - console.log(`Cannot get ${service[0]} version:\n${err}`); - } - } -}; - -const showContractsHashes = async () => { - const hashes = await getContractsHashes(); - - let result = 'Contracts hashes:\n'; - for (const key of Object.keys(hashes)) { - result = result.concat(`${hashes[key]} ${key}\n`); - } - - console.log(result); -}; diff --git a/src/helpers/ica.ts b/src/helpers/ica.ts deleted file mode 100644 index f37eb9d6..00000000 --- a/src/helpers/ica.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { CosmosWrapper } from './cosmos'; -import { getWithAttempts } from './wait'; - -export const getIca = ( - cm: CosmosWrapper, - contractAddress: string, - icaId: string, - connectionId: string, - numAttempts = 20, -) => - getWithAttempts( - cm.blockWaiter, - () => - cm.queryContract<{ - interchain_account_address: string; - }>(contractAddress, { - interchain_account_address: { - interchain_account_id: icaId, - connection_id: connectionId, - }, - }), - async (response) => response != null, - numAttempts, - ); diff --git a/src/helpers/icq.ts b/src/helpers/icq.ts deleted file mode 100644 index f0c842b4..00000000 --- a/src/helpers/icq.ts +++ /dev/null @@ -1,179 +0,0 @@ -import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; -import axios, { AxiosResponse } from 'axios'; -import { CosmosWrapper, WalletWrapper } from './cosmos'; -import { getWithAttempts } from './wait'; -import cosmosclient from '@cosmos-client/core'; - -/** - * getRegisteredQuery queries the contract for a registered query details registered by the given - * queryId. - */ -export const getRegisteredQuery = ( - cm: CosmosWrapper, - contractAddress: string, - queryId: number, -) => - cm.queryContract<{ - registered_query: { - id: number; - owner: string; - keys: { - path: string; - key: string; - }[]; - query_type: string; - transactions_filter: string; - connection_id: string; - update_period: number; - last_submitted_result_local_height: number; - last_submitted_result_remote_height: { - revision_number: number; - revision_height: number; - }; - deposit: { denom: string; amount: string }[]; - submit_timeout: number; - registered_at_height: number; - }; - }>(contractAddress, { - get_registered_query: { - query_id: queryId, - }, - }); - -/** - * waitForICQResultWithRemoteHeight waits until ICQ gets updated to - * reflect data corresponding to remote height `>= targetHeight` - */ -export const waitForICQResultWithRemoteHeight = ( - cm: CosmosWrapper, - contractAddress: string, - queryId: number, - targetHeight: number, - numAttempts = 20, -) => - getWithAttempts( - cm.blockWaiter, - () => getRegisteredQuery(cm, contractAddress, queryId), - async (query) => - query.registered_query.last_submitted_result_remote_height - .revision_height >= targetHeight, - numAttempts, - ); - -/** - * queryTransfersNumber queries the contract for recorded transfers number. - */ -export const queryTransfersNumber = ( - cm: CosmosWrapper, - contractAddress: string, -) => - cm.queryContract<{ - transfers_number: number; - }>(contractAddress, { - get_transfers_number: {}, - }); - -/** - * waitForTransfersAmount waits until contract has `expectedTransfersAmount` - * number of incoming transfers stored. - */ -export const waitForTransfersAmount = ( - cm: CosmosWrapper, - contractAddress: string, - expectedTransfersAmount: number, - numAttempts = 50, -) => - getWithAttempts( - cm.blockWaiter, - async () => - (await queryTransfersNumber(cm, contractAddress)).transfers_number, - async (amount) => amount == expectedTransfersAmount, - numAttempts, - ); - -type UnsuccessfulSubmitIcqTx = { - // QueryID is the query_id transactions was submitted for - query_id: number; - // SubmittedTxHash is the hash of the *remote fetched transaction* was submitted - submitted_tx_hash: string; - // NeutronHash is the hash of the *neutron chain transaction* which is responsible for delivering remote transaction to neutron - neutron_hash: string; - // ErrorTime is the time when the error was added - error_time: string; - // Status is the status of unsuccessful tx - status: string; - // Message is the more descriptive message for the error - message: string; -}; - -export type ResubmitQuery = { - query_id: number; - hash: string; -}; - -export const getUnsuccessfulTxs = async ( - icqWebHost: string, -): Promise> => { - const url = `${icqWebHost}/unsuccessful-txs`; - const req = await axios.get>(url); - return req.data; -}; - -export const postResubmitTxs = async ( - icqWebHost: string, - txs: Array, -): Promise => { - const url = `${icqWebHost}/resubmit-txs`; - const data = { txs: txs }; - return await axios.post(url, data); -}; - -/** - * registerTransfersQuery sends a register_transfers_query execute msg to the contractAddress with - * the given parameters and checks the tx result to be successful. - */ -export const registerTransfersQuery = async ( - cm: WalletWrapper, - contractAddress: string, - connectionId: string, - updatePeriod: number, - recipient: string, -) => { - const res = await cm.executeContract( - contractAddress, - JSON.stringify({ - register_transfers_query: { - connection_id: connectionId, - update_period: updatePeriod, - recipient: recipient, - }, - }), - ); - expect(res.code).toEqual(0); - const tx = await cosmosclient.rest.tx.getTx( - cm.chain.sdk as CosmosSDK, - res.txhash as string, - ); - expect(tx?.data.tx_response?.code).toEqual(0); -}; - -/** - * queryRecipientTxs queries the contract for recorded transfers to the given recipient address. - */ -export const queryRecipientTxs = ( - cm: CosmosWrapper, - contractAddress: string, - recipient: string, -) => - cm.queryContract<{ - transfers: [ - recipient: string, - sender: string, - denom: string, - amount: string, - ]; - }>(contractAddress, { - get_recipient_txs: { - recipient: recipient, - }, - }); diff --git a/src/helpers/proposal.ts b/src/helpers/proposal.ts deleted file mode 100644 index 360e2671..00000000 --- a/src/helpers/proposal.ts +++ /dev/null @@ -1,499 +0,0 @@ -import { google } from '../generated/proto'; -import Any = google.protobuf.Any; -import { ADMIN_MODULE_ADDRESS } from './cosmos'; - -export type ParamChangeProposalInfo = { - title: string; - description: string; - subspace: string; - key: string; - value: string; -}; - -export type PinCodesInfo = { - title: string; - description: string; - codes_ids: number[]; -}; - -export type ParamsInterchaintxsInfo = { - msg_submit_tx_max_messages: number; -}; - -export type ParamsInterchainqueriesInfo = { - query_submit_timeout: number; - query_deposit: null; - tx_query_removal_limit: number; -}; - -export type ParamsTokenfactoryInfo = { - denom_creation_fee: any; - denom_creation_gas_consume: number; -}; - -export type ParamsFeeburnerInfo = { - treasury_address: string; -}; - -export type ParamsFeerefunderInfo = { - min_fee: { - recv_fee: any; - ack_fee: any; - timeout_fee: any; - }; -}; - -export type ParamsCronInfo = { - security_address: string; - limit: number; -}; - -export type ParamsContractmanagerInfo = { - sudo_call_gas_limit: string; -}; - -export type UpdateAdmin = { - sender: string; - contract: string; - new_admin: string; -}; - -export type ClearAdmin = { - sender: string; - contract: string; -}; - -export type ClientUpdateInfo = { - title: string; - description: string; - subject_client_id: string; - substitute_client_id; -}; - -export type UpgradeInfo = { - title: string; - description: string; - name: string; - height: number; - info: string; - upgraded_client_state: Any; -}; - -export type SendProposalInfo = { - to: string; - denom: string; - amount: string; -}; - -export type MultiChoiceProposal = { - readonly title: string; - readonly description: string; - // The address that created this proposal. - readonly proposer: string; - // The block height at which this proposal was created. Voting - // power queries should query for voting power at this block - // height. - readonly start_height: number; - // The minimum amount of time this proposal must remain open for - // voting. The proposal may not pass unless this is expired or - // None. - readonly min_voting_period: { - at_height: number; - at_time: number; - never: any; - }; - // The the time at which this proposal will expire and close for - // additional votes. - readonly expiration: { - at_height: number; - at_time: number; - never: any; - }; - // The options to be chosen from in the vote. - readonly choices: CheckedMultipleChoiceOption[]; - // Proposal status (Open, rejected, executed, execution failed, closed, passed) - readonly status: - | 'open' - | 'rejected' - | 'passed' - | 'executed' - | 'closed' - | 'execution_failed'; - // Voting settings (threshold, quorum, etc.) - readonly voting_strategy: VotingStrategy; - // The total power when the proposal started (used to calculate percentages) - readonly total_power: string; - // The vote tally. - readonly votes: MultipleChoiceVotes; - // Whether DAO members are allowed to change their votes. - // When disabled, proposals can be executed as soon as they pass. - // When enabled, proposals can only be executed after the voting - // period has ended and the proposal passed. - readonly allow_revoting: boolean; -}; - -export type CheckedMultipleChoiceOption = { - readonly index: number; - readonly option_type: MultipleChoiceOptionType; - readonly description: string; - // readonly msgs: Option>>, - readonly vote_count: string; -}; - -export type VotingStrategy = { - single_choice: { - quorum: { - majority: any; - percent: string; - }; - }; -}; - -export type MultipleChoiceVotes = { - vote_weights: string[]; -}; - -// 'none' is a choice that represents selecting none of the options; still counts toward quorum -// and allows proposals with all bad options to be voted against. -export type MultipleChoiceOptionType = 'none' | 'standard'; - -export const paramChangeProposal = (info: ParamChangeProposalInfo): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - param_change_proposal: { - title: info.title, - description: info.description, - param_changes: [ - { - subspace: info.subspace, - key: info.key, - value: info.value, - }, - ], - }, - }, - }, - }, -}); - -export const pinCodesProposal = (info: PinCodesInfo): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmwasm.wasm.v1.MsgPinCodes', - authority: ADMIN_MODULE_ADDRESS, - code_ids: info.codes_ids, - }), - }, - }, - }, - }, -}); - -export const pinCodesCustomAutrhorityProposal = ( - info: PinCodesInfo, - authority: string, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmwasm.wasm.v1.MsgPinCodes', - authority: authority, - code_ids: info.codes_ids, - }), - }, - }, - }, - }, -}); - -export const unpinCodesProposal = (info: PinCodesInfo): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmwasm.wasm.v1.MsgUnpinCodes', - authority: ADMIN_MODULE_ADDRESS, - code_ids: info.codes_ids, - }), - }, - }, - }, - }, -}); - -export const updateInterchaintxsParamsProposal = ( - info: ParamsInterchaintxsInfo, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/neutron.interchaintxs.v1.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - msg_submit_tx_max_messages: info.msg_submit_tx_max_messages, - }, - }), - }, - }, - }, - }, -}); - -export const updateInterchainqueriesParamsProposal = ( - info: ParamsInterchainqueriesInfo, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/neutron.interchainqueries.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - query_submit_timeout: info.query_submit_timeout, - query_deposit: null, - tx_query_removal_limit: info.tx_query_removal_limit, - }, - }), - }, - }, - }, - }, -}); - -export const updateTokenfacoryParamsProposal = ( - info: ParamsTokenfactoryInfo, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/osmosis.tokenfactory.v1beta1.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - denom_creation_fee: info.denom_creation_fee, - denom_creation_gas_consume: info.denom_creation_gas_consume, - fee_collector_address: null, - }, - }), - }, - }, - }, - }, -}); - -export const updateFeeburnerParamsProposal = ( - info: ParamsFeeburnerInfo, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/neutron.feeburner.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - treasury_address: info.treasury_address, - }, - }), - }, - }, - }, - }, -}); - -export const updateFeerefunderParamsProposal = ( - info: ParamsFeerefunderInfo, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/neutron.feerefunder.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - min_fee: info.min_fee, - }, - }), - }, - }, - }, - }, -}); - -export const updateCronParamsProposal = (info: ParamsCronInfo): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/neutron.cron.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - security_address: info.security_address, - limit: info.limit, - }, - }), - }, - }, - }, - }, -}); - -export const updateContractmanagerParamsProposal = ( - info: ParamsContractmanagerInfo, -): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/neutron.contractmanager.MsgUpdateParams', - authority: ADMIN_MODULE_ADDRESS, - params: { - sudo_call_gas_limit: info.sudo_call_gas_limit, - }, - }), - }, - }, - }, - }, -}); - -export const updateAdminProposal = (info: UpdateAdmin): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmwasm.wasm.v1.MsgUpdateAdmin', - sender: info.sender, - contract: info.contract, - new_admin: info.new_admin, - }), - }, - }, - }, - }, -}); - -export const clearAdminProposal = (info: ClearAdmin): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - proposal_execute_message: { - message: JSON.stringify({ - '@type': '/cosmwasm.wasm.v1.MsgClearAdmin', - sender: info.sender, - contract: info.contract, - }), - }, - }, - }, - }, -}); - -export const clientUpdateProposal = (info: ClientUpdateInfo): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - client_update_proposal: { - title: info.title, - description: info.description, - subject_client_id: info.subject_client_id, - substitute_client_id: info.substitute_client_id, - }, - }, - }, - }, -}); - -export const upgradeProposal = (info: UpgradeInfo): any => ({ - custom: { - submit_admin_proposal: { - admin_proposal: { - upgrade_proposal: { - title: info.title, - description: info.description, - plan: { - name: info.name, - height: info.height, - info: info.info, - }, - upgraded_client_state: info.upgraded_client_state, - }, - }, - }, - }, -}); - -export const addSubdaoProposal = ( - mainDaoCoreAddress: string, - subdaoCoreAddress: string, -): any => ({ - wasm: { - execute: { - contract_addr: mainDaoCoreAddress, - msg: Buffer.from( - JSON.stringify({ - update_sub_daos: { - to_add: [ - { - addr: subdaoCoreAddress, - }, - ], - to_remove: [], - }, - }), - ).toString('base64'), - funds: [], - }, - }, -}); - -export const sendProposal = (info: SendProposalInfo): any => ({ - bank: { - send: { - to_address: info.to, - amount: [ - { - denom: info.denom, - amount: info.amount, - }, - ], - }, - }, -}); - -export const addSchedule = ( - name: string, - period: number, - msgs: string[], -): any => ({ - custom: { - add_schedule: { - name, - period, - msgs, - }, - }, -}); - -export const removeSchedule = (name: string): any => ({ - custom: { - remove_schedule: { - name, - }, - }, -}); diff --git a/src/helpers/tge.ts b/src/helpers/tge.ts deleted file mode 100644 index 18710742..00000000 --- a/src/helpers/tge.ts +++ /dev/null @@ -1,1348 +0,0 @@ -import MerkleTree from 'merkletreejs'; -import crypto from 'crypto'; -import { CosmosWrapper, WalletWrapper, getEventAttribute } from './cosmos'; -import { CodeId } from '../types'; -import { - NativeToken, - Token, - NeutronContract, - nativeTokenInfo, - vestingAccount, - vestingSchedule, - vestingSchedulePoint, -} from './types'; -import { - CreditsVaultConfig, - LockdropVaultConfig, - VestingLpVaultConfig, -} from './dao'; -import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; -import { msgMintDenom, msgCreateDenom } from './tokenfactory'; - -// subdenom of rewards asset distributed by the generator contract. -const ASTRO_SUBDENOM = 'uastro'; -// total size of rewards allocated for generator contract. -const GENERATOR_REWARDS_TOTAL = 1000000; -// fraction of generator rewards allocated with each new block. -const GENERATOR_REWARDS_PER_BLOCK = 500; - -const sha256 = (x: string): Buffer => { - const hash = crypto.createHash('sha256'); - hash.update(x); - return hash.digest(); -}; - -export class Airdrop { - private tree: MerkleTree; - - constructor(accounts: Array<{ address: string; amount: string }>) { - const leaves = accounts.map((a) => sha256(a.address + a.amount)); - this.tree = new MerkleTree(leaves, sha256, { sort: true }); - } - - public getMerkleRoot(): string { - return this.tree.getHexRoot().replace('0x', ''); - } - - public getMerkleProof(account: { - address: string; - amount: string; - }): string[] { - return this.tree - .getHexProof(sha256(account.address + account.amount)) - .map((v) => v.replace('0x', '')); - } -} - -export const getTimestamp = (secondsFromNow: number): number => - (Date.now() / 1000 + secondsFromNow) | 0; - -/* - * This class is designed to make TGE deployment easy. - * Current flow of using this class: - * - * let tge: Tge; - * tge = new Tge( - * neutronChain, - * walletWrapperInstantiator, - * walletwrapperTokenManager, - * // just some address which will receive funds as it is a reserve - * reserveAddress, - * IBC_ATOM_DENOM, - * IBC_USDC_DENOM, - * NEUTON_DENOM, - * ); - * this.airdropAccounts = [ { address: 'neutron1…', amount: '1000' } ]; - * tge.times.airdropStart = getTimestamp(0); - * tge.times.airdropVestingStart = getTimestamp(300); - * await tge.deployPreAuction(); - * tge.times.auctionInit = getTimestamp(30); - * await tge.deployAuction(); - * tge.times.lockdropInit = getTimestamp(10); - * await tge.deployLockdrop(); - * await tge.deployLockdropVault(); - * - */ -export class Tge { - chain: CosmosWrapper; - instantiator: WalletWrapper; - tokenInfoManager: WalletWrapper; - reserve: string; - codeIds: Record; - contracts: { - airdrop: string; - credits: string; - creditsVault: string; - priceFeed: string; - coinRegistry: string; - astroFactory: string; - vestingAtomLp: string; - vestingUsdcLp: string; - vestingLpVault: string; - auction: string; - lockdrop: string; - astroGenerator: string; - astroVesting: string; - lockdropVault: string; - oracleAtom: string; - oracleUsdc: string; - }; - atomDenom: string; - usdcDenom: string; - neutronDenom: string; - astroDenom: string; - generatorRewardsTotal: number; - generatorRewardsPerBlock: number; - pairs: { - atom_ntrn: { contract: string; liquidity: string }; - usdc_ntrn: { contract: string; liquidity: string }; - }; - times: Record; - lockdropVaultName: string; - lockdropVaultDescription: string; - airdropAccounts: { - address: string; - amount: string; - }[]; - airdrop: Airdrop; - vestingLpVaultName: string; - vestingLpVaultDescription: string; - creditsVaultName: string; - creditsVaultDescription: string; - - constructor( - chain: CosmosWrapper, - instantiator: WalletWrapper, - tokenInfoManager: WalletWrapper, - reserve: string, - atomDenom: string, - usdcDenom: string, - neutronDenom: string, - ) { - this.chain = chain; - this.instantiator = instantiator; - this.tokenInfoManager = tokenInfoManager; - this.reserve = reserve; - this.codeIds = {}; - this.contracts = { - airdrop: null, - credits: null, - creditsVault: null, - priceFeed: null, - coinRegistry: null, - astroFactory: null, - vestingAtomLp: null, - vestingUsdcLp: null, - vestingLpVault: null, - auction: null, - lockdrop: null, - astroGenerator: null, - astroVesting: null, - lockdropVault: null, - oracleAtom: null, - oracleUsdc: null, - }; - this.atomDenom = atomDenom; - this.usdcDenom = usdcDenom; - this.neutronDenom = neutronDenom; - this.generatorRewardsTotal = GENERATOR_REWARDS_TOTAL; - this.generatorRewardsPerBlock = GENERATOR_REWARDS_PER_BLOCK; - this.times = {}; - this.times.airdropStart = 0; - this.times.airdropVestingStart = 0; - this.times.vestingDuration = 3600 * 24 * 30; - this.times.auctionInit = 0; - this.times.auctionDepositWindow = 60; - this.times.auctionWithdrawalWindow = 60; - this.times.lockdropDepositDuration = 60; - this.times.lockdropWithdrawalDuration = 60; - this.times.auctionVestingLpDuration = 20; - this.times.lockdropInit = 0; - this.times.vestTimestamp = 0; - this.lockdropVaultName = 'Lockdrop vault'; - this.lockdropVaultDescription = 'A lockdrop vault for testing purposes'; - this.vestingLpVaultName = 'Vesting LP vault'; - this.vestingLpVaultDescription = 'A vesting LP vault for testing purposes'; - this.creditsVaultName = 'Credits vault'; - this.creditsVaultDescription = 'A credits vault for testing purposes'; - this.airdropAccounts = []; - } - - async deployPreAuction() { - for (const contract of [ - 'TGE_CREDITS', - 'TGE_AUCTION', - 'TGE_LOCKDROP', - 'TGE_AIRDROP', - 'TGE_PRICE_FEED_MOCK', - 'ASTRO_PAIR', - 'ASTRO_FACTORY', - 'ASTRO_TOKEN', - 'ASTRO_GENERATOR', - 'ASTRO_WHITELIST', - 'ASTRO_VESTING', - 'ASTRO_COIN_REGISTRY', - 'VESTING_LP', - 'LOCKDROP_VAULT', - 'CREDITS_VAULT', - 'VESTING_LP_VAULT', - 'ORACLE_HISTORY', - ]) { - const codeId = await this.instantiator.storeWasm( - NeutronContract[contract], - ); - expect(codeId).toBeGreaterThan(0); - this.codeIds[contract] = codeId; - } - - this.contracts.credits = await instantiateCredits( - this.instantiator, - this.codeIds.TGE_CREDITS, - this.instantiator.wallet.address.toString(), - ); - - this.airdrop = new Airdrop(this.airdropAccounts); - this.contracts.airdrop = await instantiateAirdrop( - this.instantiator, - this.codeIds.TGE_AIRDROP, - this.contracts.credits, - this.reserve, - this.airdrop.getMerkleRoot(), - this.times.airdropStart, - this.times.airdropVestingStart, - this.times.vestingDuration, - null, - null, - ); - - this.contracts.creditsVault = await instantiateCreditsVault( - this.instantiator, - this.codeIds.CREDITS_VAULT, - this.creditsVaultName, - this.creditsVaultDescription, - this.contracts.credits, - this.instantiator.wallet.address.toString(), - this.contracts.airdrop, - ); - - this.contracts.priceFeed = await instantiatePriceFeed( - this.instantiator, - this.codeIds.TGE_PRICE_FEED_MOCK, - ); - - this.contracts.coinRegistry = await instantiateCoinRegistry( - this.instantiator, - this.codeIds.ASTRO_COIN_REGISTRY, - ); - const res = await this.instantiator.executeContract( - this.contracts.coinRegistry, - JSON.stringify({ - add: { - native_coins: [ - [this.atomDenom, 6], - [this.usdcDenom, 6], - [this.neutronDenom, 6], - ], - }, - }), - ); - expect(res.code).toEqual(0); - - this.contracts.astroFactory = await instantiateAstroFactory( - this.instantiator, - this.codeIds.ASTRO_FACTORY, - this.codeIds.ASTRO_PAIR, - this.codeIds.ASTRO_TOKEN, - this.contracts.coinRegistry, - ); - - await this.createNativeAstroDenom(); - - this.contracts.astroVesting = await instantiateAstroVesting( - this.instantiator, - this.codeIds.ASTRO_VESTING, - nativeTokenInfo(this.astroDenom), - ); - - this.contracts.astroGenerator = await instantiateAstroGenerator( - this.instantiator, - this.codeIds.ASTRO_GENERATOR, - this.astroDenom, - this.contracts.astroFactory, - '1', - this.generatorRewardsPerBlock.toString(), - this.contracts.astroVesting, - this.codeIds.ASTRO_WHITELIST, - ); - - await this.instantiator.executeContract( - this.contracts.astroVesting, - JSON.stringify({ - register_vesting_accounts: { - vesting_accounts: [ - vestingAccount(this.contracts.astroGenerator, [ - vestingSchedule( - vestingSchedulePoint(0, this.generatorRewardsTotal.toString()), - ), - ]), - ], - }, - }), - [ - { - denom: this.astroDenom, - amount: this.generatorRewardsTotal.toString(), - }, - ], - ); - - await this.instantiator.executeContract( - this.contracts.astroFactory, - JSON.stringify({ - update_config: { - generator_address: this.contracts.astroGenerator, - }, - }), - ); - - for (const denom of [this.atomDenom, this.usdcDenom]) { - const res = await executeFactoryCreatePair( - this.instantiator, - this.contracts.astroFactory, - denom, - this.neutronDenom, - ); - expect(res.code).toEqual(0); - } - - const pairs = ( - await queryFactoryPairs(this.chain, this.contracts.astroFactory) - ).pairs; - expect(pairs).toHaveLength(2); - this.pairs = { - atom_ntrn: { - contract: pairs[0].contract_addr, - liquidity: pairs[0].liquidity_token, - }, - usdc_ntrn: { - contract: pairs[1].contract_addr, - liquidity: pairs[1].liquidity_token, - }, - }; - - await this.instantiator.executeContract( - this.contracts.astroGenerator, - JSON.stringify({ - setup_pools: { - pools: [ - [this.pairs.atom_ntrn.liquidity, '1'], - [this.pairs.usdc_ntrn.liquidity, '1'], - ], - }, - }), - ); - - this.contracts.vestingAtomLp = await instantiateVestingLp( - this.instantiator, - this.codeIds.VESTING_LP, - this.tokenInfoManager.wallet.address.toString(), - 'vesting_atom_lp', - ); - this.contracts.vestingUsdcLp = await instantiateVestingLp( - this.instantiator, - this.codeIds.VESTING_LP, - this.tokenInfoManager.wallet.address.toString(), - 'vesting_usdc_lp', - ); - - for (const [contract, liquidity] of [ - [this.contracts.vestingAtomLp, this.pairs.atom_ntrn.liquidity], - [this.contracts.vestingUsdcLp, this.pairs.usdc_ntrn.liquidity], - ]) { - const res = await executeVestingLpSetVestingToken( - this.instantiator, - contract, - liquidity, - ); - expect(res.code).toEqual(0); - } - } - - async deployAuction() { - this.contracts.auction = await instantiateAuction( - this.instantiator, - this.codeIds.TGE_AUCTION, - null, - this.tokenInfoManager.wallet.address.toString(), - this.contracts.priceFeed, - null, - this.reserve, - this.contracts.vestingUsdcLp, - this.contracts.vestingAtomLp, - this.times.lockdropDepositDuration + - this.times.lockdropWithdrawalDuration, - this.times.auctionInit, - this.times.auctionDepositWindow, - this.times.auctionWithdrawalWindow, - 1000, - '100000', - 4, - this.times.auctionVestingLpDuration, - ); - - const res = await executeAuctionSetTokenInfo( - this.tokenInfoManager, - this.contracts.auction, - this.atomDenom, - this.usdcDenom, - ); - expect(res.code).toEqual(0); - } - - async deployLockdrop() { - this.contracts.lockdrop = await instantiateLockdrop( - this.instantiator, - this.codeIds.TGE_LOCKDROP, - null, - this.tokenInfoManager.wallet.address.toString(), - this.contracts.credits, - this.contracts.auction, - this.times.lockdropInit, - this.times.lockdropDepositDuration, - this.times.lockdropWithdrawalDuration, - 1, - 2, - 3, - [ - { duration: 1, coefficient: '0' }, - { duration: 2, coefficient: '1' }, - ], - ); - - let res = await executeLockdropSetTokenInfo( - this.tokenInfoManager, - this.contracts.lockdrop, - this.pairs.atom_ntrn.liquidity, - this.pairs.usdc_ntrn.liquidity, - this.contracts.astroGenerator, - ); - expect(res.code).toEqual(0); - - res = await executeAuctionUpdateConfig( - this.instantiator, - this.contracts.auction, - this.contracts.lockdrop, - { - ntrn_usdc_pool_address: this.pairs.usdc_ntrn.contract, - ntrn_atom_pool_address: this.pairs.atom_ntrn.contract, - ntrn_usdc_lp_token_address: this.pairs.usdc_ntrn.liquidity, - ntrn_atom_lp_token_address: this.pairs.atom_ntrn.liquidity, - }, - ); - expect(res.code).toEqual(0); - - for (const contract of [ - this.contracts.vestingAtomLp, - this.contracts.vestingUsdcLp, - ]) { - res = await executeVestingLpSetVestingManagers( - this.instantiator, - contract, - [this.contracts.auction], - ); - expect(res.code).toEqual(0); - } - - res = await executeCreditsUpdateConfig( - this.instantiator, - this.contracts.credits, - this.contracts.airdrop, - this.contracts.lockdrop, - ); - expect(res.code).toEqual(0); - // 4000100 - users - // 10000000 - extra to test its ignored in credits vault voting power - res = await executeCreditsMint( - this.instantiator, - this.contracts.credits, - this.neutronDenom, - '14000100', - ); - expect(res.code).toEqual(0); - } - - async deployLockdropVault() { - this.contracts.oracleAtom = await instantiateAstroportOracle( - this.instantiator, - this.codeIds.ORACLE_HISTORY, - this.contracts.astroFactory, - 1, - this.tokenInfoManager.wallet.address.toString(), - 'astroport_oracle_atom', - ); - this.contracts.oracleUsdc = await instantiateAstroportOracle( - this.instantiator, - this.codeIds.ORACLE_HISTORY, - this.contracts.astroFactory, - 1, - this.tokenInfoManager.wallet.address.toString(), - 'astroport_oracle_usdc', - ); - - for (const [contract, denom1, denom2] of [ - [this.contracts.oracleAtom, this.atomDenom, this.neutronDenom], - [this.contracts.oracleUsdc, this.usdcDenom, this.neutronDenom], - ]) { - const res = await executeAstroportOracleSetAssetInfos( - this.tokenInfoManager, - contract, - denom1, - denom2, - ); - expect(res.code).toEqual(0); - } - - this.contracts.lockdropVault = await instantiateLockdropVault( - this.instantiator, - this.codeIds.LOCKDROP_VAULT, - this.lockdropVaultName, - this.lockdropVaultDescription, - this.contracts.lockdrop, - this.contracts.oracleUsdc, - this.contracts.oracleAtom, - this.instantiator.wallet.address.toString(), - this.tokenInfoManager.wallet.address.toString(), - ); - - this.contracts.vestingLpVault = await instantiateVestingLpVault( - this.instantiator, - this.codeIds.VESTING_LP_VAULT, - this.vestingLpVaultName, - this.vestingLpVaultDescription, - this.contracts.lockdrop, - this.contracts.oracleAtom, - this.contracts.oracleUsdc, - this.contracts.vestingAtomLp, - this.contracts.vestingUsdcLp, - this.instantiator.wallet.address.toString(), - this.tokenInfoManager.wallet.address.toString(), - ); - } - - async createNativeAstroDenom() { - const data = await msgCreateDenom( - this.instantiator, - this.instantiator.wallet.address.toString(), - ASTRO_SUBDENOM, - ); - this.astroDenom = getEventAttribute( - (data as any).events, - 'create_denom', - 'new_token_denom', - ); - await msgMintDenom( - this.instantiator, - this.instantiator.wallet.address.toString(), - { - denom: this.astroDenom, - amount: this.generatorRewardsTotal.toString(), - }, - ); - } - - /** - * retrieves user's ntrn and astro balances, lockdrop info and user's LP token balances. - */ - async generatorRewardsState(user: string): Promise { - const balanceNtrn = await this.chain.queryDenomBalance( - user, - this.neutronDenom, - ); - const balanceAstro = await this.chain.queryDenomBalance( - user, - this.astroDenom, - ); - const userInfo = await queryLockdropUserInfo( - this.chain, - this.contracts.lockdrop, - user, - ); - const atomNtrnLpTokenBalance = await this.chain.queryContract<{ - balance: string; - }>(this.pairs.atom_ntrn.liquidity, { - balance: { - address: user, - }, - }); - const usdcNtrnLpTokenBalance = await this.chain.queryContract<{ - balance: string; - }>(this.pairs.usdc_ntrn.liquidity, { - balance: { - address: user, - }, - }); - return { - balanceNtrn, - balanceAstro, - userInfo, - atomNtrnLpTokenBalance: +atomNtrnLpTokenBalance.balance, - usdcNtrnLpTokenBalance: +usdcNtrnLpTokenBalance.balance, - }; - } -} - -export const instantiateAuction = async ( - cm: WalletWrapper, - codeId: CodeId, - ownerAddress: string | null, - tokenInfoManager: string, - priceFeedContract: string, - lockdropContractAddress: string | null, - reserveContractAddress: string, - vestingUsdcContractAddress: string, - vestingAtomContractAddress: string, - lpTokensLockWindow: number, - initTimestamp: number, - depositWindow: number, - withdrawalWindow: number, - maxExchangeRateAge: number, - minNtrnAmount: string, - vestingMigrationPackSize: number, - vestingLpDuration: number, - label = 'auction', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - owner: ownerAddress, - token_info_manager: tokenInfoManager, - price_feed_contract: priceFeedContract, - lockdrop_contract_address: lockdropContractAddress, - reserve_contract_address: reserveContractAddress, - vesting_usdc_contract_address: vestingUsdcContractAddress, - vesting_atom_contract_address: vestingAtomContractAddress, - lp_tokens_lock_window: lpTokensLockWindow, - init_timestamp: initTimestamp, - deposit_window: depositWindow, - withdrawal_window: withdrawalWindow, - max_exchange_rate_age: maxExchangeRateAge, - min_ntrn_amount: minNtrnAmount, - vesting_migration_pack_size: vestingMigrationPackSize, - vesting_lp_duration: vestingLpDuration, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const instantiateAirdrop = async ( - cm: WalletWrapper, - codeId: CodeId, - creditsAddress: string, - reserveAddress: string, - merkleRoot: string, - airdropStart: number, - vestingStart: number, - vestingDurationSeconds: number, - totalAmount: string | null, - hrp: string | null, - label = 'airdrop', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - credits_address: creditsAddress, - reserve_address: reserveAddress, - merkle_root: merkleRoot, - airdrop_start: airdropStart, - vesting_start: vestingStart, - vesting_duration_seconds: vestingDurationSeconds, - total_amount: totalAmount, - hrp, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeAuctionUpdateConfig = async ( - cm: WalletWrapper, - contractAddress: string, - lockdropAddress: string | null, - poolInfo: { - ntrn_usdc_pool_address: string; - ntrn_atom_pool_address: string; - ntrn_usdc_lp_token_address: string; - ntrn_atom_lp_token_address: string; - } | null, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - update_config: { - new_config: { - lockdrop_contract_address: lockdropAddress, - pool_info: poolInfo, - }, - }, - }), - ); - -export const executeAuctionSetTokenInfo = async ( - cm: WalletWrapper, - contractAddress: string, - atomDenom: string, - usdcDenom: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - set_token_info: { - atom_denom: atomDenom, - usdc_denom: usdcDenom, - }, - }), - ); - -export const instantiateCredits = async ( - cm: WalletWrapper, - codeId: CodeId, - daoAddress: string, - label = 'credits', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - dao_address: daoAddress, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeCreditsUpdateConfig = async ( - cm: WalletWrapper, - contractAddress: string, - airdrop: string, - lockdrop: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - update_config: { - config: { - airdrop_address: airdrop, - lockdrop_address: lockdrop, - }, - }, - }), - ); - -export const executeCreditsMint = async ( - cm: WalletWrapper, - contractAddress: string, - denom: string, - amount: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - mint: {}, - }), - [ - { - amount, - denom, - }, - ], - ); - -export const instantiateCreditsVault = async ( - cm: WalletWrapper, - codeId: CodeId, - name: string, - description: string, - creditsContract: string, - owner: string, - airdropContract: string, - label = 'credits_vault', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - name, - description, - credits_contract_address: creditsContract, - owner, - airdrop_contract_address: airdropContract, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeCreditsVaultUpdateConfig = async ( - cm: WalletWrapper, - contractAddress: string, - creditsContract: string | null, - owner: string | null, - name: string | null, - description: string | null, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - update_config: { - credits_contract_address: creditsContract, - owner, - name, - description, - }, - }), - ); - -export const queryCreditsVaultConfig = async ( - cm: CosmosWrapper, - contractAddress: string, -) => - cm.queryContract(contractAddress, { - config: {}, - }); - -export type LockupRewardsInfo = { - duration: number; - coefficient: string; -}; - -export type LockdropLockUpInfoResponse = { - astroport_lp_token: string; - astroport_lp_transferred: string | null; - astroport_lp_units: string | null; - claimable_generator_astro_debt: string; - claimable_generator_proxy_debt: unknown[]; - duration: number; - generator_ntrn_debt: string; - generator_proxy_debt: unknown[]; - lp_units_locked: string; - ntrn_rewards: string; - pool_type: string; - unlock_timestamp: number; - withdrawal_flag: boolean; -}; - -export type LockdropUserInfoResponse = { - claimable_generator_ntrn_debt: string; - lockup_infos: LockdropLockUpInfoResponse[]; - lockup_positions_index: number; - ntrn_transferred: boolean; - total_ntrn_rewards: string; -}; - -export const instantiateLockdrop = async ( - cm: WalletWrapper, - codeId: CodeId, - ownerAddress: string | null, - tokenInfoManager: string, - creditsContract: string, - auctionContract: string, - initTimestamp: number, - lockWindow: number, - withdrawalWindow: number, - minLockDuration: number, - maxLockDuration: number, - maxPositionsPerUser: number, - lockupRewardsInfo: LockupRewardsInfo[], - label = 'credits', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - owner: ownerAddress, - token_info_manager: tokenInfoManager, - credits_contract: creditsContract, - auction_contract: auctionContract, - init_timestamp: initTimestamp, - lock_window: lockWindow, - withdrawal_window: withdrawalWindow, - min_lock_duration: minLockDuration, - max_lock_duration: maxLockDuration, - max_positions_per_user: maxPositionsPerUser, - lockup_rewards_info: lockupRewardsInfo, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const queryLockdropUserInfo = async ( - chain: CosmosWrapper, - contractAddress: string, - userAddress: string, -) => - chain.queryContract(contractAddress, { - user_info: { address: userAddress }, - }); - -export const executeLockdropUpdateConfig = async ( - cm: WalletWrapper, - contractAddress: string, - newGeneratorAddress: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - update_config: { - new_config: { - generator_address: newGeneratorAddress, - }, - }, - }), - ); - -export const executeLockdropSetTokenInfo = async ( - cm: WalletWrapper, - contractAddress: string, - atomToken: string, - usdcToken: string, - astroGenerator: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - set_token_info: { - atom_token: atomToken, - usdc_token: usdcToken, - generator: astroGenerator, - }, - }), - ); - -export const instantiatePriceFeed = async ( - cm: WalletWrapper, - codeId: CodeId, - label = 'price_feed', -) => { - const res = await cm.instantiateContract(codeId, JSON.stringify({}), label); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const instantiateCoinRegistry = async ( - cm: WalletWrapper, - codeId: CodeId, - label = 'coin_registry', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - owner: cm.wallet.address.toString(), - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const instantiateAstroFactory = async ( - cm: WalletWrapper, - codeId: CodeId, - astroPairCodeId: CodeId, - astroTokenCodeId: CodeId, - coinRegistryAddress: string, - label = 'astro_factory', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - pair_configs: [ - { - code_id: astroPairCodeId, - pair_type: { - xyk: {}, - }, - total_fee_bps: 0, - maker_fee_bps: 0, - is_disabled: false, - is_generator_disabled: false, - }, - ], - token_code_id: astroTokenCodeId, - owner: cm.wallet.address.toString(), - whitelist_code_id: 0, - coin_registry_address: coinRegistryAddress, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeFactoryCreatePair = async ( - cm: WalletWrapper, - contractAddress: string, - denom1: string, - denom2: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - create_pair: { - pair_type: { - xyk: {}, - }, - asset_infos: [ - { - native_token: { - denom: denom1, - }, - }, - { - native_token: { - denom: denom2, - }, - }, - ], - }, - }), - ); - -export type PairInfo = { - asset_infos: Record<'native_token' | 'token', { denom: string }>[]; - contract_addr: string; - liquidity_token: string; - pair_type: Record; -}; - -export type FactoryPairsResponse = { - pairs: PairInfo[]; -}; - -export const queryFactoryPairs = async ( - chain: CosmosWrapper, - contractAddress: string, -) => - chain.queryContract(contractAddress, { - pairs: {}, - }); - -export const instantiateAstroVesting = async ( - cm: WalletWrapper, - codeId: CodeId, - vestingToken: Token | NativeToken, - label = 'astro_vesting', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - owner: cm.wallet.address.toString(), - vesting_token: vestingToken, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export type VestingAccountResponse = { - address: string; - info: { - released_amount: string; - schedules: { - end_point: { amount: string; time: number }; - start_point: { amount: string; time: number }; - }[]; - }; -}; - -type GeneratorRewardsState = { - balanceNtrn: number; - balanceAstro: number; - userInfo: LockdropUserInfoResponse; - atomNtrnLpTokenBalance: number; - usdcNtrnLpTokenBalance: number; -}; - -export const instantiateVestingLp = async ( - cm: WalletWrapper, - codeId: CodeId, - tokenInfoManager: string, - label = 'vesting_lp', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - owner: cm.wallet.address.toString(), - token_info_manager: tokenInfoManager, - vesting_managers: [], - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeVestingLpSetVestingToken = async ( - cm: WalletWrapper, - contractAddress: string, - vestingTokenContract: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - set_vesting_token: { - vesting_token: { - token: { - contract_addr: vestingTokenContract, - }, - }, - }, - }), - ); - -export const executeVestingLpSetVestingManagers = async ( - cm: WalletWrapper, - contractAddress: string, - managers: string[], -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - with_managers_extension: { - msg: { - add_vesting_managers: { - managers, - }, - }, - }, - }), - ); - -export const instantiateAstroGenerator = async ( - cm: WalletWrapper, - codeId: CodeId, - denom: string, - factoryContract: string, - startBlock: string, - tokensPerBlock: string, - vestingContract: string, - whitelistCodeId: CodeId, - label = 'astro_generator', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - astro_token: { - native_token: { - denom, - }, - }, - factory: factoryContract, - owner: cm.wallet.address.toString(), - start_block: startBlock, - tokens_per_block: tokensPerBlock, - vesting_contract: vestingContract, - whitelist_code_id: whitelistCodeId, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const instantiateLockdropVault = async ( - cm: WalletWrapper, - codeId: CodeId, - name: string, - description: string, - lockdropContract: string, - oracleUsdc: string, - oracleAtom: string, - owner: string, - tokenInfoManager: string | null, - label = 'lockdrop_vault', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - name: name, - description: description, - lockdrop_contract: lockdropContract, - oracle_usdc_contract: oracleUsdc, - oracle_atom_contract: oracleAtom, - manager: tokenInfoManager, - owner, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeLockdropVaultUpdateConfig = async ( - cm: WalletWrapper, - contractAddress: string, - owner: string | null, - lockdropContract: string | null, - oracleUsdcContract: string | null, - oracleAtomContract: string | null, - name: string | null, - description: string | null, -): Promise => - cm.executeContract( - contractAddress, - JSON.stringify({ - update_config: { - owner: owner, - lockdrop_contract: lockdropContract, - oracle_usdc_contract: oracleUsdcContract, - oracle_atom_contract: oracleAtomContract, - name: name, - description: description, - }, - }), - ); - -export const queryLockdropVaultConfig = async ( - cm: CosmosWrapper, - contractAddress: string, -): Promise => - cm.queryContract(contractAddress, { - config: {}, - }); - -export const executeVestingLpVaultUpdateConfig = async ( - cm: WalletWrapper, - contractAddress: string, - owner: string, - atomVestingLp: string, - atomOracle: string, - usdcVestingLp: string, - usdcOracle: string, - name: string, - description: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - update_config: { - owner, - atom_vesting_lp_contract: atomVestingLp, - atom_oracle_contract: atomOracle, - usdc_vesting_lp_contract: usdcVestingLp, - usdc_oracle_contract: usdcOracle, - name, - description, - }, - }), - ); - -export const queryVestingLpVaultConfig = async ( - cm: CosmosWrapper, - contractAddress: string, -) => - cm.queryContract(contractAddress, { - config: {}, - }); - -export const instantiateAstroportOracle = async ( - cm: WalletWrapper, - codeId: CodeId, - factoryContract: string, - period: number, - tokenInfoManager: string, - label = 'astroport_oracle', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - factory_contract: factoryContract, - period, - manager: tokenInfoManager, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; - -export const executeAstroportOracleSetAssetInfos = async ( - cm: WalletWrapper, - contractAddress: string, - denom1: string, - denom2: string, -) => - cm.executeContract( - contractAddress, - JSON.stringify({ - set_asset_infos: [ - { - native_token: { - denom: denom1, - }, - }, - { - native_token: { - denom: denom2, - }, - }, - ], - }), - ); - -export const instantiateVestingLpVault = async ( - cm: WalletWrapper, - codeId: CodeId, - name: string, - description: string, - lockdrop: string, - atomOracle: string, - usdcOracle: string, - atomVestingLp: string, - usdcVestingLp: string, - owner: string, - tokenInfoManager: string, - label = 'vesting_lp_vault', -) => { - const res = await cm.instantiateContract( - codeId, - JSON.stringify({ - name, - description, - lockdrop_contract: lockdrop, - atom_oracle_contract: atomOracle, - usdc_oracle_contract: usdcOracle, - atom_vesting_lp_contract: atomVestingLp, - usdc_vesting_lp_contract: usdcVestingLp, - owner: cm.wallet.address.toString(), - manager: tokenInfoManager, - }), - label, - ); - expect(res).toBeTruthy(); - return res[0]._contract_address; -}; diff --git a/src/helpers/tokenfactory.ts b/src/helpers/tokenfactory.ts deleted file mode 100644 index 58aa3fa6..00000000 --- a/src/helpers/tokenfactory.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import cosmosclient from '@cosmos-client/core'; -import { cosmos, osmosis } from '../generated/proto'; -import ICoin = cosmos.base.v1beta1.ICoin; -import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; -import { WalletWrapper } from '../helpers/cosmos'; -import Long from 'long'; - -cosmosclient.codec.register( - '/osmosis.tokenfactory.v1beta1.MsgCreateDenom', - osmosis.tokenfactory.v1beta1.MsgCreateDenom, -); -cosmosclient.codec.register( - '/osmosis.tokenfactory.v1beta1.MsgMint', - osmosis.tokenfactory.v1beta1.MsgMint, -); -cosmosclient.codec.register( - '/osmosis.tokenfactory.v1beta1.MsgBurn', - osmosis.tokenfactory.v1beta1.MsgBurn, -); -cosmosclient.codec.register( - '/osmosis.tokenfactory.v1beta1.MsgChangeAdmin', - osmosis.tokenfactory.v1beta1.MsgChangeAdmin, -); -cosmosclient.codec.register( - '/osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook', - osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook, -); - -export const msgMintDenom = async ( - cmNeutron: WalletWrapper, - creator: string, - amount: ICoin, -): Promise => { - const msgMint = new osmosis.tokenfactory.v1beta1.MsgMint({ - sender: creator, - amount, - }); - const res = await cmNeutron.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: cmNeutron.chain.denom, amount: '1000' }], - }, - [msgMint], - 10, - ); - - return res.tx_response!; -}; - -export const msgCreateDenom = async ( - cmNeutron: WalletWrapper, - creator: string, - subdenom: string, -): Promise => { - const msgCreateDenom = new osmosis.tokenfactory.v1beta1.MsgCreateDenom({ - sender: creator, - subdenom, - }); - const res = await cmNeutron.execTx( - { - gas_limit: Long.fromString('2000000'), - amount: [{ denom: cmNeutron.chain.denom, amount: '5000' }], - }, - [msgCreateDenom], - 10, - ); - - return res.tx_response!; -}; - -export const msgBurn = async ( - cmNeutron: WalletWrapper, - creator: string, - denom: string, - amountToBurn: string, -): Promise => { - const msgBurn = new osmosis.tokenfactory.v1beta1.MsgBurn({ - sender: creator, - amount: { - denom: denom, - amount: amountToBurn, - }, - burnFromAddress: creator, - }); - const res = await cmNeutron.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: cmNeutron.chain.denom, amount: '5000' }], - }, - [msgBurn], - 10, - ); - - return res.tx_response!; -}; - -// Create MsgChangeAdmin message -export const msgChangeAdmin = async ( - cmNeutron: WalletWrapper, - creator: string, - denom: string, - newAdmin: string, -): Promise => { - const msgChangeAdmin = new osmosis.tokenfactory.v1beta1.MsgChangeAdmin({ - sender: creator, - denom, - new_admin: newAdmin, - }); - const res = await cmNeutron.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: cmNeutron.chain.denom, amount: '5000' }], - }, - [msgChangeAdmin], - 10, - ); - - return res.tx_response!; -}; - -export const msgSetBeforeSendHook = async ( - cmNeutron: WalletWrapper, - creator: string, - denom: string, - contractAddr: string, -): Promise => { - const msgMint = new osmosis.tokenfactory.v1beta1.MsgSetBeforeSendHook({ - sender: creator, - denom, - contract_addr: contractAddr, - }); - const res = await cmNeutron.execTx( - { - gas_limit: Long.fromString('200000'), - amount: [{ denom: cmNeutron.chain.denom, amount: '1000' }], - }, - [msgMint], - 10, - ); - - return res.tx_response!; -}; diff --git a/src/helpers/types.ts b/src/helpers/types.ts deleted file mode 100644 index febab718..00000000 --- a/src/helpers/types.ts +++ /dev/null @@ -1,293 +0,0 @@ -import { cosmos } from '@cosmos-client/core/cjs/proto'; - -export type AcknowledgementResult = - | { success: string[] } - | { error: string[] } - | { timeout: string }; - -export type ChannelsList = { - channels: { - state: string; - ordering: string; - counterparty: { - port_id: string; - channel_id: string; - }; - connection_hops: string[]; - version: string; - port_id: string; - channel_id: string; - }[]; -}; - -// SingleChoiceProposal represents a single governance proposal item (partial object). -export type SingleChoiceProposal = { - readonly title: string; - readonly description: string; - /// The address that created this proposal. - readonly proposer: string; - /// The block height at which this proposal was created. Voting - /// power queries should query for voting power at this block - /// height. - readonly start_height: number; - /// The threshold at which this proposal will pass. - /// proposal's creation. - readonly total_power: string; - readonly proposal: { - status: - | 'open' - | 'rejected' - | 'passed' - | 'executed' - | 'closed' - | 'execution_failed'; - readonly votes: { - yes: string; - no: string; - abstain: string; - }; - }; -}; - -export type TotalPowerAtHeightResponse = { - readonly height: string; - readonly power: number; -}; - -export type VotingPowerAtHeightResponse = { - readonly height: string; - readonly power: number; -}; - -// PageRequest is the params of pagination for request -export type PageRequest = { - 'pagination.key'?: string; - 'pagination.offset'?: string; - 'pagination.limit'?: string; - 'pagination.count_total'?: boolean; -}; - -// AckFailuresResponse is the response model for the contractmanager failures. -export type AckFailuresResponse = { - failures: Failure[]; - pagination: { - next_key: string; - total: string; - }; -}; - -// Failure represents a single contractmanager failure -type Failure = { - address: string; - id: string; - sudo_payload: string; // base64 encoded json bytes -}; - -export type ScheduleResponse = { - schedules: Schedule[]; - pagination: { - next_key: string; - total: string; - }; -}; - -// Schedule represents a single cron added schedule -type Schedule = { - name: string; - period: number; - msgs: any[]; -}; - -// BalancesResponse is the response model for the bank balances query. -export type PauseInfoResponse = { - paused: { - until_height: number; - }; - unpaused: Record; -}; - -export const NeutronContract = { - IBC_TRANSFER: 'ibc_transfer.wasm', - MSG_RECEIVER: 'msg_receiver.wasm', - STARGATE_QUERIER: 'stargate_querier.wasm', - INTERCHAIN_QUERIES: 'neutron_interchain_queries.wasm', - INTERCHAIN_TXS: 'neutron_interchain_txs.wasm', - REFLECT: 'reflect.wasm', - DISTRIBUTION: 'neutron_distribution.wasm', - DAO_CORE: 'cwd_core.wasm', - DAO_PROPOSAL_SINGLE: 'cwd_proposal_single.wasm', - DAO_PROPOSAL_MULTI: 'cwd_proposal_multiple.wasm', - DAO_PREPROPOSAL_SINGLE: 'cwd_pre_propose_single.wasm', - DAO_PREPROPOSAL_MULTI: 'cwd_pre_propose_multiple.wasm', - DAO_PREPROPOSAL_OVERRULE: 'cwd_pre_propose_overrule.wasm', - VOTING_REGISTRY: 'neutron_voting_registry.wasm', - NEUTRON_VAULT: 'neutron_vault.wasm', - RESERVE: 'neutron_reserve.wasm', - SUBDAO_CORE: 'cwd_subdao_core.wasm', - SUBDAO_PREPROPOSE: 'cwd_subdao_pre_propose_single.wasm', - SUBDAO_PREPROPOSE_NO_TIMELOCK: 'cwd_security_subdao_pre_propose.wasm', - SUBDAO_PROPOSAL: 'cwd_subdao_proposal_single.wasm', - SUBDAO_TIMELOCK: 'cwd_subdao_timelock_single.wasm', - LOCKDROP_VAULT: 'lockdrop_vault.wasm', - ORACLE_HISTORY: 'astroport_oracle.wasm', - TGE_CREDITS: 'credits.wasm', - TGE_AIRDROP: 'cw20_merkle_airdrop.wasm', - CW4_VOTING: '../contracts_thirdparty/cw4_voting.wasm', - CW4_GROUP: '../contracts_thirdparty/cw4_group.wasm', - CW20_BASE: '../contracts_thirdparty/cw20_base.wasm', - TGE_AUCTION: 'neutron_auction.wasm', - TGE_LOCKDROP: 'neutron_lockdrop.wasm', - TGE_PRICE_FEED_MOCK: 'neutron_price_feed_mock.wasm', - ASTRO_PAIR: '../contracts_thirdparty/astroport_pair.wasm', - ASTRO_COIN_REGISTRY: - '../contracts_thirdparty/astroport_native_coin_registry.wasm', - ASTRO_FACTORY: '../contracts_thirdparty/astroport_factory.wasm', - ASTRO_TOKEN: '../contracts_thirdparty/astroport_token.wasm', - ASTRO_GENERATOR: '../contracts_thirdparty/astroport_generator.wasm', - ASTRO_WHITELIST: '../contracts_thirdparty/astroport_whitelist.wasm', - ASTRO_VESTING: '../contracts_thirdparty/astroport_vesting.wasm', - VESTING_LP: 'vesting_lp.wasm', - VESTING_LP_VAULT: 'vesting_lp_vault.wasm', - CREDITS_VAULT: 'credits_vault.wasm', - VESTING_INVESTORS: 'vesting_investors.wasm', - INVESTORS_VESTING_VAULT: 'investors_vesting_vault.wasm', - TOKENFACTORY: 'tokenfactory.wasm', - BEFORE_SEND_HOOK_TEST: 'before_send_hook_test.wasm', - // https://github.com/CosmWasm/cosmwasm/tree/main/contracts/floaty - FLOATY: '../contracts_thirdparty/floaty_2.0.wasm', -}; - -export type MultiChoiceOption = { - description: string; - msgs: any[]; -}; - -// https://github.com/cosmos/cosmos-sdk/blob/main/proto/cosmos/upgrade/v1beta1/query.proto#L53 -export type CurrentPlanResponse = { - plan: Plan | null; -}; - -// https://github.com/cosmos/cosmos-sdk/blob/main/proto/cosmos/upgrade/v1beta1/upgrade.proto#L14 -export type Plan = { - name: string; - height: string; - info: string; -}; - -export const nativeToken = (denom: string, amount: string): Asset => ({ - info: nativeTokenInfo(denom), - amount: amount, -}); - -export const token = (contractAddr: string, amount: string): Asset => ({ - info: tokenInfo(contractAddr), - amount: amount, -}); - -export const nativeTokenInfo = (denom: string): NativeToken => ({ - native_token: { - denom: denom, - }, -}); - -export const tokenInfo = (contractAddr: string): Token => ({ - token: { - contract_addr: contractAddr, - }, -}); - -export const vestingAccount = ( - addr: string, - schedules: VestingSchedule[], -): VestingAccount => ({ - address: addr, - schedules: schedules, -}); - -export const vestingSchedule = ( - startPoint: VestingSchedulePoint, - endPoint?: VestingSchedulePoint, -): VestingSchedule => ({ - start_point: startPoint, - end_point: endPoint, -}); - -export const vestingSchedulePoint = ( - time: number, - amount: string, -): VestingSchedulePoint => ({ - time: time, - amount: amount, -}); - -export type PoolStatus = { - assets: Asset[]; - total_share: string; -}; - -export type Asset = { - info: Token | NativeToken; - amount: string; -}; - -export type Token = { - token: { - contract_addr: string; - }; -}; - -export type NativeToken = { - native_token: { - denom: string; - }; -}; - -export type VestingAccount = { - address: string; - schedules: VestingSchedule[]; -}; - -export type VestingSchedule = { - start_point: VestingSchedulePoint; - end_point: VestingSchedulePoint | undefined; -}; - -export type VestingSchedulePoint = { - time: number; - amount: string; -}; - -export type PinnedCodesResponse = { - code_ids: number[]; -}; - -export type IcaHostParamsResponse = { - params: { - host_enabled: boolean; - }; -}; - -export type InterchainqueriesParamsResponse = { - params: { - query_submit_timeout: number; - tx_query_removal_limit: number; - }; -}; - -export type InterchaintxsParamsResponse = { - params: { - msg_submit_tx_max_messages: string; - }; -}; - -export type GlobalfeeParamsResponse = { - minimum_gas_prices: cosmos.base.v1beta1.ICoin[]; - bypass_min_fee_msg_types: string[]; - max_total_bypass_min_fee_msg_gas_usage: string; -}; - -export type ContractAdminResponse = { - contract_info: { - admin: string; - }; -}; diff --git a/src/helpers/wait.ts b/src/helpers/wait.ts deleted file mode 100644 index add8bf64..00000000 --- a/src/helpers/wait.ts +++ /dev/null @@ -1,83 +0,0 @@ -import cosmosclient from '@cosmos-client/core'; -import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; - -global.WebSocket = require('ws'); - -export const wait = async (seconds: number) => - new Promise((r) => { - setTimeout(() => r(true), 1000 * seconds); - }); - -export const getHeight = async (sdk: CosmosSDK) => { - const block = await cosmosclient.rest.tendermint.getLatestBlock(sdk); - return +block.data.block.header.height; -}; - -export class BlockWaiter { - url: string; - - constructor(url: string) { - this.url = url; - } - - waitBlocks(n: number, timeout = 120000): Promise { - return new Promise((resolve, reject) => { - let ws = null; - const x = setTimeout(() => { - if (ws != null) { - ws.unsubscribe(); - } - reject(new Error('waitBlocks: timeout')); - }, timeout); - ws = cosmosclient.websocket.connect(this.url); - ws.next({ - id: '1', - jsonrpc: '2.0', - method: 'subscribe', - params: ["tm.event='NewBlock'"], - }); - ws.subscribe((res: cosmosclient.websocket.ResponseSchema) => { - if (Object.entries(res.result).length !== 0) { - n--; - if (n == 0) { - ws.unsubscribe(); - clearTimeout(x); - resolve(); - } - } - }); - }); - } -} - -/** - * getWithAttempts waits until readyFunc(getFunc()) returns true - * and only then returns result of getFunc() - */ -export const getWithAttempts = async ( - blockWaiter: BlockWaiter, - getFunc: () => Promise, - readyFunc: (t: T) => Promise, - numAttempts = 20, -): Promise => { - let error = null; - let data: T; - while (numAttempts > 0) { - numAttempts--; - try { - data = await getFunc(); - if (await readyFunc(data)) { - return data; - } - } catch (e) { - error = e; - } - await blockWaiter.waitBlocks(1); - } - throw error != null - ? error - : new Error( - 'getWithAttempts: no attempts left. Latest get response: ' + - (data === Object(data) ? JSON.stringify(data) : data).toString(), - ); -}; diff --git a/src/testcases/common_localcosmosnet.ts b/src/testcases/common_localcosmosnet.ts deleted file mode 100644 index 8a2c0bee..00000000 --- a/src/testcases/common_localcosmosnet.ts +++ /dev/null @@ -1,254 +0,0 @@ -import { exec } from 'child_process'; -import cosmosclient from '@cosmos-client/core'; -import { Wallet } from '../types'; -import { - COSMOS_DENOM, - CosmosWrapper, - IBC_ATOM_DENOM, - IBC_USDC_DENOM, - mnemonicToWallet, - NEUTRON_DENOM, - WalletWrapper, -} from '../helpers/cosmos'; -import { BlockWaiter } from '../helpers/wait'; -import { generateMnemonic } from 'bip39'; -import Long from 'long'; -import { AccAddress } from '@cosmos-client/core/cjs/types'; -import { cosmos } from '@cosmos-client/core/cjs/proto'; -import ICoin = cosmos.base.v1beta1.ICoin; - -const config = require('../config.json'); - -export const disconnectValidator = async (name: string) => { - const { stdout } = await exec(`docker stop ${name}`); - return stdout; -}; - -const walletSet = async ( - sdk: cosmosclient.CosmosSDK, - prefix: string, -): Promise> => ({ - val1: await mnemonicToWallet( - cosmosclient.ValAddress, - sdk, - config.VAL_MNEMONIC_1, - prefix, - ), - demo1: await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - config.DEMO_MNEMONIC_1, - prefix, - ), - demo2: await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - config.DEMO_MNEMONIC_2, - prefix, - ), - icq: await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - config.DEMO_MNEMONIC_3, - prefix, - ), - rly1: await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - config.RLY_MNEMONIC_1, - prefix, - ), - rly2: await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - config.RLY_MNEMONIC_2, - prefix, - ), -}); - -export class TestStateLocalCosmosTestNet { - sdk1: cosmosclient.CosmosSDK; - sdk2: cosmosclient.CosmosSDK; - blockWaiter1: BlockWaiter; - blockWaiter2: BlockWaiter; - wallets: Record>; - icq_web_host: string; - - async init() { - const neutronPrefix = process.env.NEUTRON_ADDRESS_PREFIX || 'neutron'; - const cosmosPrefix = process.env.COSMOS_ADDRESS_PREFIX || 'cosmos'; - - const host1 = process.env.NODE1_URL || 'http://localhost:1317'; - const host2 = process.env.NODE2_URL || 'http://localhost:1316'; - - this.sdk1 = new cosmosclient.CosmosSDK(host1, config.CHAIN_ID_1); - this.sdk2 = new cosmosclient.CosmosSDK(host2, config.CHAIN_ID_2); - - this.icq_web_host = 'http://localhost:9999'; - - this.blockWaiter1 = new BlockWaiter( - process.env.NODE1_WS_URL || 'ws://localhost:26657', - ); - this.blockWaiter2 = new BlockWaiter( - process.env.NODE2_WS_URL || 'ws://localhost:16657', - ); - - this.wallets = {}; - const neutron = await walletSet(this.sdk1, neutronPrefix); - const cosmos = await walletSet(this.sdk2, cosmosPrefix); - - const qaNeutron = await this.createQaWallet( - neutronPrefix, - this.sdk1, - this.blockWaiter1, - neutron.demo1, - NEUTRON_DENOM, - [ - { - denom: NEUTRON_DENOM, - amount: '11500000000', - }, - { - denom: IBC_ATOM_DENOM, - amount: '11500000000', - }, - { - denom: IBC_USDC_DENOM, - amount: '11500000000', - }, - ], - ); - - const qaNeutronThree = await this.createQaWallet( - neutronPrefix, - this.sdk1, - this.blockWaiter1, - neutron.demo1, - NEUTRON_DENOM, - ); - - const qaNeutronFour = await this.createQaWallet( - neutronPrefix, - this.sdk1, - this.blockWaiter1, - neutron.demo1, - NEUTRON_DENOM, - ); - - const qaNeutronFive = await this.createQaWallet( - neutronPrefix, - this.sdk1, - this.blockWaiter1, - neutron.demo1, - NEUTRON_DENOM, - ); - - const qaCosmos = await this.createQaWallet( - cosmosPrefix, - this.sdk2, - this.blockWaiter2, - cosmos.demo2, - COSMOS_DENOM, - ); - - const qaCosmosTwo = await this.createQaWallet( - cosmosPrefix, - this.sdk2, - this.blockWaiter2, - cosmos.demo2, - COSMOS_DENOM, - ); - - this.wallets = { - cosmos, - neutron, - qaNeutron, - qaCosmos, - qaCosmosTwo, - qaNeutronThree, - qaNeutronFour, - qaNeutronFive, - }; - return this.wallets; - } - - sendTokensWithRetry = async ( - cm: WalletWrapper, - to: AccAddress, - amount: string, - denom = cm.chain.denom, - retryCount = 100, - ): Promise => { - const fee = { - gas_limit: Long.fromString('200000'), - amount: [{ denom: cm.chain.denom, amount: '1000' }], - }; - let attemptCount = 0; - let res; - while (retryCount > attemptCount) { - try { - const sequence = await cm.chain.getSeq(cm.wallet.address); - res = await cm.msgSend( - to.toString(), - { amount, denom }, - fee, - sequence, - cosmosclient.rest.tx.BroadcastTxMode.Async, - ); - break; - } catch (e) { - console.log(e); - await cm.chain.blockWaiter.waitBlocks(1); - attemptCount++; - } - } - if (!res) { - throw new Error(`Failed to send tokens after ${retryCount} retries.`); - } - }; - - async createQaWallet( - prefix: string, - sdk: cosmosclient.CosmosSDK, - blockWaiter: BlockWaiter, - wallet: Wallet, - denom: string, - balances: ICoin[] = [], - ) { - if (balances.length === 0) { - balances = [ - { - denom, - amount: '11500000000', - }, - ]; - } - const cm = new WalletWrapper( - new CosmosWrapper(sdk, blockWaiter, denom), - wallet, - ); - const mnemonic = generateMnemonic(); - const newWallet = await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - mnemonic, - prefix, - false, - ); - for (const balance of balances) { - await this.sendTokensWithRetry( - cm, - newWallet.address, - balance.amount, - balance.denom, - ); - } - const wal = await mnemonicToWallet( - cosmosclient.AccAddress, - sdk, - mnemonic, - prefix, - ); - return { genQaWal1: wal }; - } -} diff --git a/src/testcases/parallel/dao_assert.test.ts b/src/testcases/parallel/dao_assert.test.ts index 12d4c3fa..91376dd7 100644 --- a/src/testcases/parallel/dao_assert.test.ts +++ b/src/testcases/parallel/dao_assert.test.ts @@ -1,13 +1,19 @@ -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { CosmosWrapper, NEUTRON_DENOM } from '../../helpers/cosmos'; +import '@neutron-org/neutronjsplus'; +import { + CosmosWrapper, + NEUTRON_DENOM, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { NeutronContract } from '@neutron-org/neutronjsplus/dist/types'; import { - getDaoContracts, DaoContracts, - VotingVaultsModule, + getDaoContracts, getTreasuryContract, -} from '../../helpers/dao'; -import { getContractsHashes } from '../../helpers/env'; -import { NeutronContract } from '../../helpers/types'; + VotingVaultsModule, +} from '@neutron-org/neutronjsplus/dist/dao'; +import { getContractsHashes } from '@neutron-org/neutronjsplus/dist/env'; + +const config = require('../../config.json'); describe('DAO / Check', () => { let testState: TestStateLocalCosmosTestNet; @@ -24,7 +30,7 @@ describe('DAO / Check', () => { let treasuryContract: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( diff --git a/src/testcases/parallel/governance.test.ts b/src/testcases/parallel/governance.test.ts index 48f10185..9324a4e9 100644 --- a/src/testcases/parallel/governance.test.ts +++ b/src/testcases/parallel/governance.test.ts @@ -1,14 +1,21 @@ +import '@neutron-org/neutronjsplus'; import { - ADMIN_MODULE_ADDRESS, + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { getWithAttempts } from '../../helpers/wait'; -import { NeutronContract } from '../../helpers/types'; -import { Dao, DaoMember, getDaoContracts } from '../../helpers/dao'; -import { updateInterchaintxsParamsProposal } from '../../helpers/proposal'; + ADMIN_MODULE_ADDRESS, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getWithAttempts } from '@neutron-org/neutronjsplus/dist/wait'; +import { NeutronContract } from '@neutron-org/neutronjsplus/dist/types'; +import { + Dao, + DaoMember, + getDaoContracts, +} from '@neutron-org/neutronjsplus/dist/dao'; +import { updateInterchaintxsParamsProposal } from '@neutron-org/neutronjsplus/dist/proposal'; + +const config = require('../../config.json'); describe('Neutron / Governance', () => { let testState: TestStateLocalCosmosTestNet; @@ -17,13 +24,13 @@ describe('Neutron / Governance', () => { let daoMember1: DaoMember; let daoMember2: DaoMember; let daoMember3: DaoMember; - let dao: Dao; + let mainDao: Dao; let contractAddress: string; let contractAddressForAdminMigration: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -36,21 +43,21 @@ describe('Neutron / Governance', () => { ); const daoCoreAddress = (await neutronChain.getChainAdmins())[0]; const daoContracts = await getDaoContracts(neutronChain, daoCoreAddress); - dao = new Dao(neutronChain, daoContracts); - daoMember1 = new DaoMember(neutronAccount, dao); + mainDao = new Dao(neutronChain, daoContracts); + daoMember1 = new DaoMember(neutronAccount, mainDao); daoMember2 = new DaoMember( new WalletWrapper( neutronChain, testState.wallets.qaNeutronThree.genQaWal1, ), - dao, + mainDao, ); daoMember3 = new DaoMember( new WalletWrapper( neutronChain, testState.wallets.qaNeutronFour.genQaWal1, ), - dao, + mainDao, ); const contractCodeId = await neutronAccount.storeWasm( @@ -61,7 +68,7 @@ describe('Neutron / Governance', () => { contractCodeId, '{}', 'ibc_transfer', - dao.contracts.core.address, + mainDao.contracts.core.address, ); contractAddressForAdminMigration = contractRes[0]._contract_address; expect(contractAddressForAdminMigration).toBeDefined(); @@ -90,7 +97,9 @@ describe('Neutron / Governance', () => { await getWithAttempts( neutronChain.blockWaiter, async () => - await dao.queryVotingPower(daoMember1.user.wallet.address.toString()), + await mainDao.queryVotingPower( + daoMember1.user.wallet.address.toString(), + ), async (response) => response.power == 10000, 20, ); @@ -100,7 +109,9 @@ describe('Neutron / Governance', () => { await getWithAttempts( neutronChain.blockWaiter, async () => - await dao.queryVotingPower(daoMember1.user.wallet.address.toString()), + await mainDao.queryVotingPower( + daoMember1.user.wallet.address.toString(), + ), async (response) => response.power == 10000, 20, ); @@ -110,7 +121,9 @@ describe('Neutron / Governance', () => { await getWithAttempts( neutronChain.blockWaiter, async () => - await dao.queryVotingPower(daoMember1.user.wallet.address.toString()), + await mainDao.queryVotingPower( + daoMember1.user.wallet.address.toString(), + ), async (response) => response.power == 10000, 20, ); @@ -118,7 +131,8 @@ describe('Neutron / Governance', () => { test('check voting power', async () => { await getWithAttempts( neutronChain.blockWaiter, - async () => await dao.queryTotalVotingPower(), + async () => await mainDao.queryTotalVotingPower(), + // 3x10000 + 1000 from investors vault (see neutron/network/init-neutrond.sh) async (response) => response.power == 31000, 20, ); @@ -128,7 +142,7 @@ describe('Neutron / Governance', () => { describe('send a bit funds to core contracts', () => { test('send funds from wallet 1', async () => { const res = await daoMember1.user.msgSend( - dao.contracts.core.address, + mainDao.contracts.core.address, '1000', ); expect(res.code).toEqual(0); @@ -164,7 +178,7 @@ describe('Neutron / Governance', () => { 'This one will pass', [ { - recipient: dao.contracts.core.address.toString(), + recipient: mainDao.contracts.core.address.toString(), amount: 1000, denom: neutronChain.denom, }, @@ -442,7 +456,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #1', () => { const proposalId = 1; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { const host = await neutronChain.queryHostEnabled(); @@ -480,7 +494,7 @@ describe('Neutron / Governance', () => { expect(rawLog.includes("proposal is not in 'passed' state")); await getWithAttempts( neutronChain.blockWaiter, - async () => await dao.queryProposal(proposalId), + async () => await mainDao.queryProposal(proposalId), async (response) => response.proposal.status === 'rejected', 20, ); @@ -502,7 +516,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #3', () => { const proposalId = 3; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -525,13 +539,13 @@ describe('Neutron / Governance', () => { describe('execute multichoice proposal #1', () => { const proposalId = 1; test('check if proposal is passed', async () => { - await dao.checkPassedMultiChoiceProposal(proposalId); + await mainDao.checkPassedMultiChoiceProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeMultiChoiceProposalWithAttempts(proposalId); }); test('check if proposal is executed', async () => { - await dao.checkExecutedMultiChoiceProposal(proposalId); + await mainDao.checkExecutedMultiChoiceProposal(proposalId); }); }); @@ -561,7 +575,7 @@ describe('Neutron / Governance', () => { expect(rawLog.includes("proposal is not in 'passed' state")); await getWithAttempts( neutronChain.blockWaiter, - async () => await dao.queryMultiChoiceProposal(proposalId), + async () => await mainDao.queryMultiChoiceProposal(proposalId), async (response) => response.proposal.status === 'rejected', 20, ); @@ -584,7 +598,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #4', () => { const proposalId = 4; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -616,7 +630,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #5', () => { const proposalId = 5; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -669,7 +683,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #7', () => { const proposalId = 7; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -695,7 +709,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #8', () => { const proposalId = 8; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -721,7 +735,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #9', () => { const proposalId = 9; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -749,7 +763,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #10', () => { const proposalId = 10; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -778,7 +792,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #11', () => { const proposalId = 11; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -838,7 +852,7 @@ describe('Neutron / Governance', () => { expect(res.schedules.length).toEqual(1); }); test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -868,7 +882,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #13', () => { const proposalId = 13; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -910,7 +924,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #14', () => { const proposalId = 14; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -933,7 +947,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #15', () => { const proposalId = 15; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -959,7 +973,7 @@ describe('Neutron / Governance', () => { describe('try to execute proposal #16', () => { const proposalId = 16; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); @@ -1001,7 +1015,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #18', () => { const proposalId = 18; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal, should fail', async () => { let rawLog: any; @@ -1034,7 +1048,7 @@ describe('Neutron / Governance', () => { describe('execute proposal #19', () => { const proposalId = 19; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal, should fail', async () => { let rawLog: any; @@ -1063,7 +1077,7 @@ describe('Neutron / Governance', () => { describe('try to execute proposal #20', () => { const proposalId = 20; test('check if proposal is passed', async () => { - await dao.checkPassedProposal(proposalId); + await mainDao.checkPassedProposal(proposalId); }); test('execute passed proposal', async () => { await daoMember1.executeProposalWithAttempts(proposalId); diff --git a/src/testcases/parallel/interchain_tx_query_resubmit.test.ts b/src/testcases/parallel/interchain_tx_query_resubmit.test.ts index 35ace736..1f471319 100644 --- a/src/testcases/parallel/interchain_tx_query_resubmit.test.ts +++ b/src/testcases/parallel/interchain_tx_query_resubmit.test.ts @@ -1,10 +1,12 @@ +import '@neutron-org/neutronjsplus'; import { - COSMOS_DENOM, + WalletWrapper, CosmosWrapper, + COSMOS_DENOM, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { NeutronContract, CodeId } from '@neutron-org/neutronjsplus/dist/types'; import { getRegisteredQuery, getUnsuccessfulTxs, @@ -12,9 +14,9 @@ import { queryRecipientTxs, registerTransfersQuery, waitForTransfersAmount, -} from '../../helpers/icq'; -import { NeutronContract } from '../../helpers/types'; -import { CodeId } from '../../types'; +} from '@neutron-org/neutronjsplus/dist/icq'; + +const config = require('../../config.json'); describe('Neutron / Interchain TX Query Resubmit', () => { let testState: TestStateLocalCosmosTestNet; @@ -26,7 +28,7 @@ describe('Neutron / Interchain TX Query Resubmit', () => { const connectionId = 'connection-0'; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, diff --git a/src/testcases/parallel/overrule.test.ts b/src/testcases/parallel/overrule.test.ts index 534cd343..89d771b5 100644 --- a/src/testcases/parallel/overrule.test.ts +++ b/src/testcases/parallel/overrule.test.ts @@ -1,16 +1,20 @@ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; + +import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; import { Dao, DaoMember, deployNeutronDao, deploySubdao, -} from '../../helpers/dao'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; +} from '@neutron-org/neutronjsplus/dist/dao'; + +const config = require('../../config.json'); describe('Neutron / Subdao', () => { let testState: TestStateLocalCosmosTestNet; @@ -24,7 +28,7 @@ describe('Neutron / Subdao', () => { let mainDao: Dao; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -56,7 +60,7 @@ describe('Neutron / Subdao', () => { daoContracts.core.address, daoContracts.proposals.overrule?.pre_propose?.address || '', neutronAccount1.wallet.address.toString(), - false, + false, // do not close proposal on failure since otherwise we wont get an error exception from submsgs ); subdaoMember1 = new DaoMember(neutronAccount1, subDao); diff --git a/src/testcases/parallel/simple.test.ts b/src/testcases/parallel/simple.test.ts index 2e140e13..6bd00d5b 100644 --- a/src/testcases/parallel/simple.test.ts +++ b/src/testcases/parallel/simple.test.ts @@ -1,54 +1,49 @@ import Long from 'long'; import { + cosmosWrapper, COSMOS_DENOM, - CosmosWrapper, - getIBCDenom, + env, IBC_RELAYER_NEUTRON_ADDRESS, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { - AckFailuresResponse, - NeutronContract, - PageRequest, -} from '../../helpers/types'; + TestStateLocalCosmosTestNet, + types, + wait, +} from '@neutron-org/neutronjsplus'; -import { getHeight, getWithAttempts } from '../../helpers/wait'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { CodeId } from '../../types'; +const config = require('../../config.json'); describe('Neutron / Simple', () => { let testState: TestStateLocalCosmosTestNet; - let neutronChain: CosmosWrapper; - let gaiaChain: CosmosWrapper; - let neutronAccount: WalletWrapper; - let gaiaAccount: WalletWrapper; - let gaiaAccount2: WalletWrapper; + let neutronChain: cosmosWrapper.CosmosWrapper; + let gaiaChain: cosmosWrapper.CosmosWrapper; + let neutronAccount: cosmosWrapper.WalletWrapper; + let gaiaAccount: cosmosWrapper.WalletWrapper; + let gaiaAccount2: cosmosWrapper.WalletWrapper; let contractAddress: string; let receiverContractAddress: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); - neutronChain = new CosmosWrapper( + neutronChain = new cosmosWrapper.CosmosWrapper( testState.sdk1, testState.blockWaiter1, NEUTRON_DENOM, ); - neutronAccount = new WalletWrapper( + neutronAccount = new cosmosWrapper.WalletWrapper( neutronChain, testState.wallets.qaNeutron.genQaWal1, ); - gaiaChain = new CosmosWrapper( + gaiaChain = new cosmosWrapper.CosmosWrapper( testState.sdk2, testState.blockWaiter2, COSMOS_DENOM, ); - gaiaAccount = new WalletWrapper( + gaiaAccount = new cosmosWrapper.WalletWrapper( gaiaChain, testState.wallets.qaCosmos.genQaWal1, ); - gaiaAccount2 = new WalletWrapper( + gaiaAccount2 = new cosmosWrapper.WalletWrapper( gaiaChain, testState.wallets.qaCosmosTwo.genQaWal1, ); @@ -66,9 +61,11 @@ describe('Neutron / Simple', () => { }); describe('Contracts', () => { - let codeId: CodeId; + let codeId: types.CodeId; test('store contract', async () => { - codeId = await neutronAccount.storeWasm(NeutronContract.IBC_TRANSFER); + codeId = await neutronAccount.storeWasm( + types.NeutronContract.IBC_TRANSFER, + ); expect(codeId).toBeGreaterThan(0); }); test('instantiate', async () => { @@ -84,7 +81,7 @@ describe('Neutron / Simple', () => { describe('Staking', () => { test('store and instantiate mgs receiver contract', async () => { const codeId = await neutronAccount.storeWasm( - NeutronContract.MSG_RECEIVER, + types.NeutronContract.MSG_RECEIVER, ); expect(codeId).toBeGreaterThan(0); @@ -361,7 +358,11 @@ describe('Neutron / Simple', () => { describe('Fee in wrong denom', () => { const portName = 'transfer'; const channelName = 'channel-0'; - const uatomIBCDenom = getIBCDenom(portName, channelName, 'uatom'); + const uatomIBCDenom = cosmosWrapper.getIBCDenom( + portName, + channelName, + 'uatom', + ); expect(uatomIBCDenom).toEqual( 'ibc/27394FB092D2ECCD56123C74F36E4C1F926001CEADA9CA97EA622B25F41E5EB2', ); @@ -499,7 +500,7 @@ describe('Neutron / Simple', () => { current gaia block is actually N+15, but neutron knows nothing about it, and successfully sends package hermes checks height on remote chain and Timeout error occurs. */ - const currentHeight = await getHeight(gaiaChain.sdk); + const currentHeight = await env.getHeight(gaiaChain.sdk); await gaiaChain.blockWaiter.waitBlocks(15); await neutronAccount.executeContract( @@ -515,29 +516,34 @@ describe('Neutron / Simple', () => { }), ); - const failuresAfterCall = await getWithAttempts( - neutronChain.blockWaiter, - async () => neutronChain.queryAckFailures(contractAddress), - // Wait until there 4 failures in the list - async (data) => data.failures.length == 4, - ); + const failuresAfterCall = + await wait.getWithAttempts( + neutronChain.blockWaiter, + async () => neutronChain.queryAckFailures(contractAddress), + // Wait until there 4 failures in the list + async (data) => data.failures.length == 4, + ); expect(failuresAfterCall.failures).toEqual([ expect.objectContaining({ address: contractAddress, id: '0', + error: 'codespace: wasm, code: 5', }), expect.objectContaining({ address: contractAddress, id: '1', + error: 'codespace: wasm, code: 5', }), expect.objectContaining({ address: contractAddress, id: '2', + error: 'codespace: wasm, code: 5', }), expect.objectContaining({ address: contractAddress, id: '3', + error: 'codespace: wasm, code: 5', }), ]); @@ -608,7 +614,7 @@ describe('Neutron / Simple', () => { await neutronChain.blockWaiter.waitBlocks(5); - const res = await getWithAttempts( + const res = await wait.getWithAttempts( neutronChain.blockWaiter, async () => neutronChain.queryAckFailures(contractAddress), // Wait until there 6 failures in the list @@ -693,7 +699,7 @@ describe('Neutron / Simple', () => { describe('Failures limit test', () => { test("failures with small limit doesn't return an error", async () => { - const pagination: PageRequest = { + const pagination: types.PageRequest = { 'pagination.limit': '1', 'pagination.offset': '0', }; @@ -704,7 +710,7 @@ describe('Neutron / Simple', () => { expect(failures.failures.length).toEqual(1); }); test('failures with big limit returns an error', async () => { - const pagination: PageRequest = { + const pagination: types.PageRequest = { 'pagination.limit': '10000', 'pagination.offset': '0', }; diff --git a/src/testcases/parallel/stargate_queries.test.ts b/src/testcases/parallel/stargate_queries.test.ts index b732a430..fe84a020 100644 --- a/src/testcases/parallel/stargate_queries.test.ts +++ b/src/testcases/parallel/stargate_queries.test.ts @@ -1,16 +1,17 @@ import Long from 'long'; +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, COSMOS_DENOM, NEUTRON_DENOM, - WalletWrapper, getEventAttribute, -} from '../../helpers/cosmos'; -import { NeutronContract } from '../../helpers/types'; -import { msgCreateDenom } from '../../helpers/tokenfactory'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { NeutronContract, CodeId } from '@neutron-org/neutronjsplus/dist/types'; +import { msgCreateDenom } from '@neutron-org/neutronjsplus/dist/tokenfactory'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { CodeId } from '../../types'; +const config = require('../../config.json'); describe('Neutron / Simple', () => { let testState: TestStateLocalCosmosTestNet; @@ -24,7 +25,7 @@ describe('Neutron / Simple', () => { let newTokenDenom: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, diff --git a/src/testcases/parallel/subdao.test.ts b/src/testcases/parallel/subdao.test.ts index 5ec1520d..b22be54a 100644 --- a/src/testcases/parallel/subdao.test.ts +++ b/src/testcases/parallel/subdao.test.ts @@ -1,27 +1,34 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, - createBankMessage, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; + createBankSendMessage, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getHeight } from '@neutron-org/neutronjsplus/dist/env'; import { - TimelockConfig, - TimelockProposalListResponse, - SubDaoConfig, Dao, DaoMember, - setupSubDaoTimelockSet, deployNeutronDao, + setupSubDaoTimelockSet, + SubDaoConfig, SubdaoProposalConfig, -} from '../../helpers/dao'; -import { getHeight, wait } from '../../helpers/wait'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { AccAddress, ValAddress } from '@cosmos-client/core/cjs/types'; -import { Wallet } from '../../types'; + TimelockConfig, + TimelockProposalListResponse, +} from '@neutron-org/neutronjsplus/dist/dao'; +import { Wallet } from '@neutron-org/neutronjsplus/dist/types'; import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; +import cosmosclient from '@cosmos-client/core'; +import { waitSeconds } from '@neutron-org/neutronjsplus/dist/wait'; +import { + paramChangeProposal, + sendProposal, +} from '@neutron-org/neutronjsplus/dist/proposal'; import Long from 'long'; -import { paramChangeProposal, sendProposal } from '../../helpers/proposal'; + +const config = require('../../config.json'); describe('Neutron / Subdao', () => { let testState: TestStateLocalCosmosTestNet; @@ -34,14 +41,14 @@ describe('Neutron / Subdao', () => { let demo1Wallet: Wallet; let securityDaoWallet: Wallet; let demo2Wallet: Wallet; - let demo1Addr: AccAddress | ValAddress; - let securityDaoAddr: AccAddress | ValAddress; - let demo2Addr: AccAddress | ValAddress; + let demo1Addr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let securityDaoAddr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let demo2Addr: cosmosclient.AccAddress | cosmosclient.ValAddress; let subDao: Dao; let mainDao: Dao; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); demo1Wallet = testState.wallets.qaNeutron.genQaWal1; securityDaoWallet = testState.wallets.qaNeutronThree.genQaWal1; @@ -129,13 +136,16 @@ describe('Neutron / Subdao', () => { test('execute timelocked: execution failed', async () => { //wait for timelock durations - await wait(20); + await waitSeconds(20); // timelocked proposal execution failed due to insufficient funds on timelock contract await subdaoMember1.executeTimelockedProposal(proposalId); const timelockedProp = await subDao.getTimelockedProposal(proposalId); expect(timelockedProp.id).toEqual(proposalId); expect(timelockedProp.status).toEqual('execution_failed'); expect(timelockedProp.msgs).toHaveLength(1); + + const error = await subDao.getTimelockedProposalError(proposalId); + expect(error).toEqual('codespace: sdk, code: 5'); // 'insufficient funds' error }); test('execute timelocked(ExecutionFailed): WrongStatus error', async () => { @@ -186,7 +196,7 @@ describe('Neutron / Subdao', () => { const balance2 = await neutronAccount2.queryDenomBalance(NEUTRON_DENOM); //wait for timelock durations - await wait(20); + await waitSeconds(20); // timelocked proposal execution failed due to invalid param value await subdaoMember1.executeTimelockedProposal(proposalId2); const timelockedProp = await subDao.getTimelockedProposal(proposalId2); @@ -229,7 +239,7 @@ describe('Neutron / Subdao', () => { ); expect(timelockedProp.status).toEqual('timelocked'); //wait for timelock durations - await wait(20); + await waitSeconds(20); await subdaoMember1.executeTimelockedProposal(proposalId); // should execute no problem await neutronChain.blockWaiter.waitBlocks(2); @@ -276,7 +286,7 @@ describe('Neutron / Subdao', () => { expect(subdaoConfig.close_proposal_on_execution_failure).toEqual(false); //wait for timelock durations - await wait(20); + await waitSeconds(20); // timelocked proposal execution failed due to insufficient funds await expect( subdaoMember1.executeTimelockedProposal(proposalId3), @@ -286,6 +296,10 @@ describe('Neutron / Subdao', () => { expect(timelockedProp.status).toEqual('timelocked'); expect(timelockedProp.msgs).toHaveLength(1); + const error = await subDao.getTimelockedProposalError(proposalId3); + // do not have an error because we did not have reply + expect(error).toEqual(null); + await neutronAccount1.msgSend(subDao.contracts.core.address, '300000'); // now that we have funds should execute without problems @@ -329,7 +343,7 @@ describe('Neutron / Subdao', () => { test('execute timelocked: success', async () => { await neutronAccount1.msgSend(subDao.contracts.core.address, '20000'); // fund the subdao treasury const balance2 = await neutronAccount2.queryDenomBalance(NEUTRON_DENOM); - await wait(20); + await waitSeconds(20); await subdaoMember1.executeTimelockedProposal(proposalId); const balance2After = await neutronAccount2.queryDenomBalance( NEUTRON_DENOM, @@ -417,7 +431,7 @@ describe('Neutron / Subdao', () => { }); test('execute timelocked: success', async () => { - await wait(20); + await waitSeconds(20); await subdaoMember1.executeTimelockedProposal(proposalId, 'single2'); const timelockedProp = await subDao.getTimelockedProposal( @@ -580,7 +594,7 @@ describe('Neutron / Subdao', () => { }); test('update members: success', async () => { - await wait(20); + await waitSeconds(20); const votingPowerBefore = await subdaoMember2.queryVotingPower(); expect(votingPowerBefore.power).toEqual('0'); const res = await subdaoMember1.executeTimelockedProposal(proposalId); @@ -670,7 +684,7 @@ describe('Neutron / Subdao', () => { ); await subdaoMember1.executeProposalWithAttempts(proposalId); - await wait(20); // wait until timelock duration passes + await waitSeconds(20); // wait until timelock duration passes await subdaoMember1.executeTimelockedProposal(proposalId); const timelockedProp = await subDao.getTimelockedProposal(proposalId); expect(timelockedProp.id).toEqual(proposalId); @@ -852,8 +866,16 @@ describe('Neutron / Subdao', () => { `Proposal ${i}`, `proposal ${i} description`, [ - createBankMessage(demo1Addr.toString(), 1000, neutronChain.denom), - createBankMessage(demo2Addr.toString(), 2000, neutronChain.denom), + createBankSendMessage( + demo1Addr.toString(), + 1000, + neutronChain.denom, + ), + createBankSendMessage( + demo2Addr.toString(), + 2000, + neutronChain.denom, + ), ], ); @@ -955,7 +977,7 @@ describe('Neutron / Subdao', () => { }); await subdaoMember1.supportAndExecuteProposal(proposalId); - await wait(20); + await waitSeconds(20); await subdaoMember1.executeTimelockedProposal(proposalId); const configAfter = await neutronChain.queryContract( subDao.contracts.core.address, @@ -978,7 +1000,7 @@ describe('Neutron / Subdao', () => { }); await subdaoMember1.supportAndExecuteProposal(proposalId); - await wait(20); + await waitSeconds(20); await expect( subdaoMember1.executeTimelockedProposal(proposalId), ).rejects.toThrow(/config name cannot be empty/); diff --git a/src/testcases/parallel/tge.credits_vault.test.ts b/src/testcases/parallel/tge.credits_vault.test.ts index 9109bc49..d5651088 100644 --- a/src/testcases/parallel/tge.credits_vault.test.ts +++ b/src/testcases/parallel/tge.credits_vault.test.ts @@ -1,15 +1,17 @@ -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { AccAddress, ValAddress } from '@cosmos-client/core/cjs/types'; -import { Wallet } from '../../types'; -import { CreditsVaultConfig } from '../../helpers/dao'; -import { NeutronContract } from '../../helpers/types'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import cosmosclient from '@cosmos-client/core'; import { BroadcastTx200ResponseTxResponse } from '@cosmos-client/core/cjs/openapi/api'; -import { getHeight } from '../../helpers/wait'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getHeight } from '@neutron-org/neutronjsplus/dist/env'; +import { NeutronContract, Wallet } from '@neutron-org/neutronjsplus/dist/types'; +import { CreditsVaultConfig } from '@neutron-org/neutronjsplus/dist/dao'; + +const config = require('../../config.json'); describe('Neutron / Credits Vault', () => { let testState: TestStateLocalCosmosTestNet; @@ -21,12 +23,12 @@ describe('Neutron / Credits Vault', () => { let daoAccount: WalletWrapper; let airdropAccount: WalletWrapper; - let daoAddr: AccAddress | ValAddress; - let airdropAddr: AccAddress | ValAddress; - let lockdropAddr: AccAddress | ValAddress; + let daoAddr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let airdropAddr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let lockdropAddr: cosmosclient.AccAddress | cosmosclient.ValAddress; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); daoWallet = testState.wallets.qaNeutron.genQaWal1; airdropWallet = testState.wallets.qaNeutronFour.genQaWal1; diff --git a/src/testcases/parallel/tge.investors_vesting_vault.test.ts b/src/testcases/parallel/tge.investors_vesting_vault.test.ts index 0c0027d5..f40058a6 100644 --- a/src/testcases/parallel/tge.investors_vesting_vault.test.ts +++ b/src/testcases/parallel/tge.investors_vesting_vault.test.ts @@ -1,52 +1,48 @@ import { - CosmosWrapper, + cosmosWrapper, + env, IBC_ATOM_DENOM, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { - NeutronContract, - vestingAccount, - vestingSchedule, - vestingSchedulePoint, -} from '../../helpers/types'; -import { getHeight } from '../../helpers/wait'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; + TestStateLocalCosmosTestNet, + types, +} from '@neutron-org/neutronjsplus'; const INVESTORS_VESTING_CONTRACT_KEY = 'VESTING_INVESTORS'; const INVESTORS_VESTING_VAULT_CONTRACT_KEY = 'INVESTORS_VESTING_VAULT'; const CW20_BASE_CONTRACT_KEY = 'CW20_BASE'; +const config = require('../../config.json'); + describe('Neutron / TGE / Investors vesting vault', () => { let testState: TestStateLocalCosmosTestNet; - let neutronChain: CosmosWrapper; - let cmInstantiator: WalletWrapper; - let cmManager: WalletWrapper; - let cmUser1: WalletWrapper; - let cmUser2: WalletWrapper; + let neutronChain: cosmosWrapper.CosmosWrapper; + let cmInstantiator: cosmosWrapper.WalletWrapper; + let cmManager: cosmosWrapper.WalletWrapper; + let cmUser1: cosmosWrapper.WalletWrapper; + let cmUser2: cosmosWrapper.WalletWrapper; let contractAddresses: Record = {}; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); - neutronChain = new CosmosWrapper( + neutronChain = new cosmosWrapper.CosmosWrapper( testState.sdk1, testState.blockWaiter1, NEUTRON_DENOM, ); - cmInstantiator = new WalletWrapper( + cmInstantiator = new cosmosWrapper.WalletWrapper( neutronChain, testState.wallets.qaNeutronThree.genQaWal1, ); - cmManager = new WalletWrapper( + cmManager = new cosmosWrapper.WalletWrapper( neutronChain, testState.wallets.qaNeutron.genQaWal1, ); - cmUser1 = new WalletWrapper( + cmUser1 = new cosmosWrapper.WalletWrapper( neutronChain, testState.wallets.qaNeutronFour.genQaWal1, ); - cmUser2 = new WalletWrapper( + cmUser2 = new cosmosWrapper.WalletWrapper( neutronChain, testState.wallets.qaNeutronFive.genQaWal1, ); @@ -109,19 +105,25 @@ describe('Neutron / TGE / Investors vesting vault', () => { describe('prepare investors vesting vault', () => { test('create vesting accounts', async () => { - const execRes = await cmInstantiator.executeContract( + await cmInstantiator.executeContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], JSON.stringify({ register_vesting_accounts: { vesting_accounts: [ - vestingAccount(cmUser1.wallet.address.toString(), [ - vestingSchedule( - vestingSchedulePoint(0, user1VestingAmount.toString()), + types.vestingAccount(cmUser1.wallet.address.toString(), [ + types.vestingSchedule( + types.vestingSchedulePoint( + 0, + user1VestingAmount.toString(), + ), ), ]), - vestingAccount(cmUser2.wallet.address.toString(), [ - vestingSchedule( - vestingSchedulePoint(0, user2VestingAmount.toString()), + types.vestingAccount(cmUser2.wallet.address.toString(), [ + types.vestingSchedule( + types.vestingSchedulePoint( + 0, + user2VestingAmount.toString(), + ), ), ]), ], @@ -129,11 +131,10 @@ describe('Neutron / TGE / Investors vesting vault', () => { }), [{ denom: NEUTRON_DENOM, amount: totalVestingAmount.toString() }], ); - expect(execRes.code).toBe(0); }); test('check unclaimed amounts', async () => { await neutronChain.blockWaiter.waitBlocks(1); - const currentHeight = await getHeight(neutronChain.sdk); + const currentHeight = await env.getHeight(neutronChain.sdk); expect( await neutronChain.queryContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], @@ -167,36 +168,39 @@ describe('Neutron / TGE / Investors vesting vault', () => { }); }); + // vars for init state + let user1VpInit: VotingPowerResponse; + let user2VpInit: VotingPowerResponse; + let totalVpInit: VotingPowerResponse; + let heightInit: number; describe('voting power', () => { describe('check initial voting power', () => { test('total power at height', async () => { - const res = await neutronChain.queryContract( + heightInit = await env.getHeight(neutronChain.sdk); + totalVpInit = await totalPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { total_power_at_height: {} }, + heightInit, ); - expect(+res.power).toBe(totalVestingAmount); + expect(+totalVpInit.power).toBe(totalVestingAmount); }); test('user1 power at height', async () => { - const res = await neutronChain.queryContract( + user1VpInit = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser1.wallet.address.toString(), - }, - }, + cmUser1.wallet.address.toString(), + heightInit, ); - expect(+res.power).toBe(user1VestingAmount); + expect(+user1VpInit.power).toBe(user1VestingAmount); }); test('user2 power at height', async () => { - const res = await neutronChain.queryContract( + user2VpInit = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser2.wallet.address.toString(), - }, - }, + cmUser2.wallet.address.toString(), + heightInit, ); - expect(+res.power).toBe(user2VestingAmount); + expect(+user2VpInit.power).toBe(user2VestingAmount); }); }); @@ -204,11 +208,11 @@ describe('Neutron / TGE / Investors vesting vault', () => { describe('check voting power on claim', () => { const user1PartialClaim = Math.round(user1VestingAmount / 2); beforeAll(async () => { - heightBeforeClaim = await getHeight(neutronChain.sdk); + heightBeforeClaim = await env.getHeight(neutronChain.sdk); await neutronChain.blockWaiter.waitBlocks(1); // so it's before claim for sure }); test('user1 partial claim', async () => { - const execRes = await cmUser1.executeContract( + await cmUser1.executeContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], JSON.stringify({ claim: { @@ -216,51 +220,43 @@ describe('Neutron / TGE / Investors vesting vault', () => { }, }), ); - expect(execRes.code).toBe(0); await neutronChain.blockWaiter.waitBlocks(1); - const res = await neutronChain.queryContract( + const res = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser1.wallet.address.toString(), - }, - }, + cmUser1.wallet.address.toString(), ); expect(+res.power).toBe(user1VestingAmount - user1PartialClaim); }); test('total voting power check after user1 partial claim', async () => { - const res = await neutronChain.queryContract( + const res = await totalPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { total_power_at_height: {} }, ); expect(+res.power).toBe(totalVestingAmount - user1PartialClaim); }); test('user2 full claim', async () => { - const execRes = await cmUser2.executeContract( + await cmUser2.executeContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], JSON.stringify({ claim: {}, }), ); - expect(execRes.code).toBe(0); await neutronChain.blockWaiter.waitBlocks(1); - const res = await neutronChain.queryContract( + const res = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser2.wallet.address.toString(), - }, - }, + cmUser2.wallet.address.toString(), ); expect(+res.power).toBe(0); }); test('total voting power check after user2 full claim', async () => { - const res = await neutronChain.queryContract( + const res = await totalPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { total_power_at_height: {} }, ); expect(+res.power).toBe( totalVestingAmount - user1PartialClaim - user2VestingAmount, @@ -268,29 +264,25 @@ describe('Neutron / TGE / Investors vesting vault', () => { }); test('user1 full claim', async () => { - const execRes = await cmUser1.executeContract( + await cmUser1.executeContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], JSON.stringify({ claim: {}, }), ); - expect(execRes.code).toBe(0); await neutronChain.blockWaiter.waitBlocks(1); - const res = await neutronChain.queryContract( + const res = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser1.wallet.address.toString(), - }, - }, + cmUser1.wallet.address.toString(), ); expect(+res.power).toBe(0); }); test('total voting power check after full claim', async () => { - const res = await neutronChain.queryContract( + const res = await totalPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { total_power_at_height: {} }, ); expect(+res.power).toBe(0); }); @@ -301,33 +293,28 @@ describe('Neutron / TGE / Investors vesting vault', () => { // at that point regardless of the following claim calls and TWAP changes. describe('check voting power before claim', () => { test('total power', async () => { - const res = await neutronChain.queryContract( + const res = await totalPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { total_power_at_height: { height: heightBeforeClaim } }, + heightBeforeClaim, ); expect(+res.power).toBe(totalVestingAmount); }); test('user1 power', async () => { - const res = await neutronChain.queryContract( + const res = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser1.wallet.address.toString(), - height: heightBeforeClaim, - }, - }, + cmUser1.wallet.address.toString(), + heightBeforeClaim, ); expect(+res.power).toBe(user1VestingAmount); }); test('user2 power', async () => { - const res = await neutronChain.queryContract( + const res = await votingPowerAtHeight( + neutronChain, contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], - { - voting_power_at_height: { - address: cmUser2.wallet.address.toString(), - height: heightBeforeClaim, - }, - }, + cmUser2.wallet.address.toString(), + heightBeforeClaim, ); expect(+res.power).toBe(user2VestingAmount); }); @@ -335,69 +322,259 @@ describe('Neutron / TGE / Investors vesting vault', () => { }); }); + /* + Here we test how vesting account addition/removal affect current and historical voting power + The flow is as follows: + 1. record voting power before vesting account additions/removals; + 2. add a vesting account for both user1 and user2 (endPoint=vestingAmount); + 3. record voting power and make sure it's changed properly; + 4. make sure historical voting power (cmp to init and p.1) hasn't changed; + 5. remove a vesting account for user2 (vestingAmount); + 6. make sure voting power has changed properly; + 7. make sure historical voting power (cmp to init, p.1 and p.3) hasn't changed; + */ describe('manage vesting accounts', () => { const vestingAmount = 500_000_000; - test('create a new vesting account', async () => { - const execRes = await cmInstantiator.executeContract( - contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], - JSON.stringify({ - register_vesting_accounts: { - vesting_accounts: [ - vestingAccount(cmUser1.wallet.address.toString(), [ - vestingSchedule( - vestingSchedulePoint(0, vestingAmount.toString()), - ), - ]), + // vars for state before voting accounts added + let user1VpBeforeAdd: VotingPowerResponse; + let user2VpBeforeAdd: VotingPowerResponse; + let totalVpBeforeAdd: VotingPowerResponse; + let heightBeforeAdd: number; + // vars for state after voting accounts added + let user1VpAfterAdd: VotingPowerResponse; + let user2VpAfterAdd: VotingPowerResponse; + let totalVpAfterAdd: VotingPowerResponse; + let heightAfterAdd: number; + describe('add vesting accounts', () => { + test('record current voting power', async () => { + heightBeforeAdd = await env.getHeight(neutronChain.sdk); + user1VpBeforeAdd = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightBeforeAdd, + ); + user2VpBeforeAdd = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightBeforeAdd, + ); + totalVpBeforeAdd = await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightBeforeAdd, + ); + }); + + describe('register vesting accounts', () => { + test('execute register_vesting_accounts', async () => { + await cmInstantiator.executeContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + JSON.stringify({ + register_vesting_accounts: { + vesting_accounts: [ + types.vestingAccount(cmUser1.wallet.address.toString(), [ + types.vestingSchedule( + types.vestingSchedulePoint(0, vestingAmount.toString()), + ), + ]), + types.vestingAccount(cmUser2.wallet.address.toString(), [ + types.vestingSchedule( + types.vestingSchedulePoint(0, vestingAmount.toString()), + ), + ]), + ], + }, + }), + [ + { + denom: NEUTRON_DENOM, + amount: (2 * vestingAmount).toString(), + }, ], - }, - }), - [{ denom: NEUTRON_DENOM, amount: vestingAmount.toString() }], - ); - expect(execRes.code).toBe(0); - await neutronChain.blockWaiter.waitBlocks(1); - const currentHeight = await getHeight(neutronChain.sdk); - expect( - await neutronChain.queryContract( - contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], - { - historical_extension: { - msg: { - unclaimed_amount_at_height: { - address: cmUser1.wallet.address.toString(), - height: currentHeight, + ); + await neutronChain.blockWaiter.waitBlocks(1); + }); + + test('check available amounts', async () => { + const currentHeight = await env.getHeight(neutronChain.sdk); + expect( + await neutronChain.queryContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + { + historical_extension: { + msg: { + unclaimed_amount_at_height: { + address: cmUser1.wallet.address.toString(), + height: currentHeight, + }, + }, }, }, - }, - }, - ), - ).toBe(vestingAmount.toString()); - expect( - await neutronChain.queryContract( - contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], - { - historical_extension: { - msg: { - unclaimed_total_amount_at_height: { - height: currentHeight, + ), + ).toBe(vestingAmount.toString()); + expect( + await neutronChain.queryContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + { + historical_extension: { + msg: { + unclaimed_amount_at_height: { + address: cmUser2.wallet.address.toString(), + height: currentHeight, + }, + }, }, }, - }, - }, - ), - ).toBe(vestingAmount.toString()); + ), + ).toBe(vestingAmount.toString()); + expect( + await neutronChain.queryContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + { + historical_extension: { + msg: { + unclaimed_total_amount_at_height: { + height: currentHeight, + }, + }, + }, + }, + ), + ).toBe((2 * vestingAmount).toString()); + }); + + test('record voting power after vesting account addition', async () => { + heightAfterAdd = await env.getHeight(neutronChain.sdk); + user1VpAfterAdd = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightAfterAdd, + ); + user2VpAfterAdd = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightAfterAdd, + ); + totalVpAfterAdd = await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightAfterAdd, + ); + }); + test('check voting power change', async () => { + expect(+user1VpAfterAdd.power).toEqual( + +user1VpBeforeAdd.power + vestingAmount, + ); + expect(+user2VpAfterAdd.power).toEqual( + +user2VpBeforeAdd.power + vestingAmount, + ); + expect(+totalVpAfterAdd.power).toEqual( + +totalVpBeforeAdd.power + 2 * vestingAmount, + ); + }); + }); + + describe('check historical voting power', () => { + test('compare to initial voting power', async () => { + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightInit, + ), + ).toEqual(user1VpInit); + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightInit, + ), + ).toEqual(user2VpInit); + expect( + await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightInit, + ), + ).toEqual(totalVpInit); + }); + + test('compare to voting power before vesting account addition', async () => { + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightBeforeAdd, + ), + ).toEqual(user1VpBeforeAdd); + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightBeforeAdd, + ), + ).toEqual(user2VpBeforeAdd); + expect( + await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightBeforeAdd, + ), + ).toEqual(totalVpBeforeAdd); + }); + }); }); - describe('remove vesting account', () => { + describe('remove vesting accounts', () => { let clawbackAccount: string; let clawbackAccountBalance: number; - test('not allowed to a stranger', async () => { - clawbackAccount = cmManager.wallet.address.toString(); - clawbackAccountBalance = await neutronChain.queryDenomBalance( - clawbackAccount, - NEUTRON_DENOM, + // vars for state before voting accounts removed + let user1VpBeforeRm: VotingPowerResponse; + let user2VpBeforeRm: VotingPowerResponse; + let totalVpBeforeRm: VotingPowerResponse; + let heightBeforeRm: number; + // vars for state after voting accounts removed + let user1VpAfterRm: VotingPowerResponse; + let user2VpAfterRm: VotingPowerResponse; + let totalVpAfterRm: VotingPowerResponse; + let heightAfterRm: number; + test('record current voting power', async () => { + heightBeforeRm = await env.getHeight(neutronChain.sdk); + user1VpBeforeRm = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightBeforeRm, ); - await expect( - cmUser2.executeContract( + user2VpBeforeRm = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightBeforeRm, + ); + totalVpBeforeRm = await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightBeforeRm, + ); + }); + + describe('remove vesting accounts', () => { + test('execute remove_vesting_accounts', async () => { + clawbackAccount = cmManager.wallet.address.toString(); + clawbackAccountBalance = await neutronChain.queryDenomBalance( + clawbackAccount, + NEUTRON_DENOM, + ); + await cmInstantiator.executeContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], JSON.stringify({ managed_extension: { @@ -409,69 +586,162 @@ describe('Neutron / TGE / Investors vesting vault', () => { }, }, }), - [{ denom: NEUTRON_DENOM, amount: vestingAmount.toString() }], - ), - ).rejects.toThrow(/Unauthorized/); - }); - test('successful as the owner', async () => { - const execRes = await cmInstantiator.executeContract( - contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], - JSON.stringify({ - managed_extension: { - msg: { - remove_vesting_accounts: { - vesting_accounts: [cmUser1.wallet.address.toString()], - clawback_account: clawbackAccount, - }, - }, - }, - }), - [{ denom: NEUTRON_DENOM, amount: vestingAmount.toString() }], - ); - expect(execRes.code).toBe(0); - }); - test('unclaimed amount after removal', async () => { - await neutronChain.blockWaiter.waitBlocks(1); - const currentHeight = await getHeight(neutronChain.sdk); - expect( - await neutronChain.queryContract( - contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], - { - historical_extension: { - msg: { - unclaimed_amount_at_height: { - address: cmUser1.wallet.address.toString(), - height: currentHeight, + ); + }); + + test('unclaimed amount after removal', async () => { + await neutronChain.blockWaiter.waitBlocks(1); + const currentHeight = await env.getHeight(neutronChain.sdk); + expect( + await neutronChain.queryContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + { + historical_extension: { + msg: { + unclaimed_amount_at_height: { + address: cmUser1.wallet.address.toString(), + height: currentHeight, + }, }, }, }, - }, - ), - ).toBe('0'); - expect( - await neutronChain.queryContract( - contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], - { - historical_extension: { - msg: { - unclaimed_total_amount_at_height: { - height: currentHeight, + ), + ).toBe('0'); + expect( + await neutronChain.queryContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + { + historical_extension: { + msg: { + unclaimed_total_amount_at_height: { + height: currentHeight, + }, }, }, }, - }, - ), - ).toBe('0'); - }); - test('clawback account topped up', async () => { - const clawbackAccountBalanceAfterRemoval = - await neutronChain.queryDenomBalance( - clawbackAccount, - NEUTRON_DENOM, + ), + ).toBe(vestingAmount.toString()); // only user2's part left + }); + + test('record voting power after vesting account removal', async () => { + heightAfterRm = await env.getHeight(neutronChain.sdk); + user1VpAfterRm = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightAfterRm, ); - expect(clawbackAccountBalanceAfterRemoval).toBe( - clawbackAccountBalance + vestingAmount, - ); + user2VpAfterRm = await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightAfterRm, + ); + totalVpAfterRm = await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightAfterRm, + ); + }); + + test('check voting power change', async () => { + expect(+user1VpAfterRm.power).toEqual(0); + expect(+user2VpAfterRm.power).toEqual( + +user2VpBeforeRm.power, // wasn't changed + ); + expect(+totalVpAfterRm.power).toEqual( + +user2VpBeforeRm.power, // only user2's part left + ); + }); + + test('clawback account topped up', async () => { + const clawbackAccountBalanceAfterRemoval = + await neutronChain.queryDenomBalance( + clawbackAccount, + NEUTRON_DENOM, + ); + expect(clawbackAccountBalanceAfterRemoval).toBe( + clawbackAccountBalance + vestingAmount, + ); + }); + }); + + describe('check historical voting power', () => { + test('compare to initial voting power', async () => { + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightInit, + ), + ).toEqual(user1VpInit); + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightInit, + ), + ).toEqual(user2VpInit); + expect( + await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightInit, + ), + ).toEqual(totalVpInit); + }); + test('compare to voting power before vesting account addition', async () => { + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightBeforeAdd, + ), + ).toEqual(user1VpBeforeAdd); + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightBeforeAdd, + ), + ).toEqual(user2VpBeforeAdd); + expect( + await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightBeforeAdd, + ), + ).toEqual(totalVpBeforeAdd); + }); + test('compare to voting power before vesting account removal', async () => { + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser1.wallet.address.toString(), + heightBeforeRm, + ), + ).toEqual(user1VpBeforeRm); + expect( + await votingPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + cmUser2.wallet.address.toString(), + heightBeforeRm, + ), + ).toEqual(user2VpBeforeRm); + expect( + await totalPowerAtHeight( + neutronChain, + contractAddresses[INVESTORS_VESTING_VAULT_CONTRACT_KEY], + heightBeforeRm, + ), + ).toEqual(totalVpBeforeRm); + }); }); }); }); @@ -511,11 +781,48 @@ describe('Neutron / TGE / Investors vesting vault', () => { ).rejects.toThrow(/Unauthorized/); }); + test('set vesting token not allowed more than once', async () => { + await expect( + cmManager.executeContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + JSON.stringify({ + set_vesting_token: { + vesting_token: { + native_token: { + denom: IBC_ATOM_DENOM, + }, + }, + }, + }), + ), + ).rejects.toThrow(/Vesting token is already set!/); + }); + + describe('remove vesting accounts is permissioned', () => { + test('removal not allowed to a stranger', async () => { + await expect( + cmUser2.executeContract( + contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], + JSON.stringify({ + managed_extension: { + msg: { + remove_vesting_accounts: { + vesting_accounts: [cmUser1.wallet.address.toString()], + clawback_account: cmUser2.wallet.address.toString(), + }, + }, + }, + }), + ), + ).rejects.toThrow(/Unauthorized/); + }); + }); + describe('register vesting accounts is permissioned', () => { test('via send cw20 by a stranger', async () => { // create a random cw20 token with allocation to user1 const codeId = await cmInstantiator.storeWasm( - NeutronContract[CW20_BASE_CONTRACT_KEY], + types.NeutronContract[CW20_BASE_CONTRACT_KEY], ); expect(codeId).toBeGreaterThan(0); const initRes = await cmInstantiator.instantiateContract( @@ -543,9 +850,14 @@ describe('Neutron / TGE / Investors vesting vault', () => { JSON.stringify({ register_vesting_accounts: { vesting_accounts: [ - vestingAccount(cmUser1.wallet.address.toString(), [ - vestingSchedule(vestingSchedulePoint(0, '1000')), - ]), + types.vestingAccount( + cmUser1.wallet.address.toString(), + [ + types.vestingSchedule( + types.vestingSchedulePoint(0, '1000'), + ), + ], + ), ], }, }), @@ -562,8 +874,10 @@ describe('Neutron / TGE / Investors vesting vault', () => { JSON.stringify({ register_vesting_accounts: { vesting_accounts: [ - vestingAccount(cmUser2.wallet.address.toString(), [ - vestingSchedule(vestingSchedulePoint(0, '1000')), + types.vestingAccount(cmUser2.wallet.address.toString(), [ + types.vestingSchedule( + types.vestingSchedulePoint(0, '1000'), + ), ]), ], }, @@ -578,16 +892,18 @@ describe('Neutron / TGE / Investors vesting vault', () => { }); const deployContracts = async ( - chain: CosmosWrapper, - instantiator: WalletWrapper, - cmManager: WalletWrapper, + chain: cosmosWrapper.CosmosWrapper, + instantiator: cosmosWrapper.WalletWrapper, + cmManager: cosmosWrapper.WalletWrapper, ): Promise> => { const codeIds: Record = {}; for (const contract of [ INVESTORS_VESTING_CONTRACT_KEY, INVESTORS_VESTING_VAULT_CONTRACT_KEY, ]) { - const codeId = await instantiator.storeWasm(NeutronContract[contract]); + const codeId = await instantiator.storeWasm( + types.NeutronContract[contract], + ); expect(codeId).toBeGreaterThan(0); codeIds[contract] = codeId; } @@ -609,8 +925,8 @@ const deployContracts = async ( }; const deployInvestorsVestingContract = async ( - instantiator: WalletWrapper, - cmManager: WalletWrapper, + instantiator: cosmosWrapper.WalletWrapper, + cmManager: cosmosWrapper.WalletWrapper, codeIds: Record, contractAddresses: Record, ) => { @@ -628,10 +944,10 @@ const deployInvestorsVestingContract = async ( }; const setInvestorsVestingAsset = async ( - instantiator: WalletWrapper, + instantiator: cosmosWrapper.WalletWrapper, contractAddresses: Record, ) => { - const execRes = await instantiator.executeContract( + await instantiator.executeContract( contractAddresses[INVESTORS_VESTING_CONTRACT_KEY], JSON.stringify({ set_vesting_token: { @@ -643,11 +959,10 @@ const setInvestorsVestingAsset = async ( }, }), ); - expect(execRes.code).toBe(0); }; const deployInvestorsVestingVaultContract = async ( - instantiator: WalletWrapper, + instantiator: cosmosWrapper.WalletWrapper, codeIds: Record, contractAddresses: Record, ) => { @@ -682,3 +997,31 @@ type VotingPowerResponse = { power: string; height: number; }; + +const totalPowerAtHeight = async ( + chain: cosmosWrapper.CosmosWrapper, + contract: string, + height?: number, +): Promise => + chain.queryContract(contract, { + total_power_at_height: + typeof height === 'undefined' ? {} : { height: height }, + }); + +const votingPowerAtHeight = async ( + chain: cosmosWrapper.CosmosWrapper, + contract: string, + address: string, + height?: number, +): Promise => + chain.queryContract(contract, { + voting_power_at_height: + typeof height === 'undefined' + ? { + address: address, + } + : { + address: address, + height: height, + }, + }); diff --git a/src/testcases/parallel/tge.vesting_lp_vault.test.ts b/src/testcases/parallel/tge.vesting_lp_vault.test.ts index 87249420..6d703b9e 100644 --- a/src/testcases/parallel/tge.vesting_lp_vault.test.ts +++ b/src/testcases/parallel/tge.vesting_lp_vault.test.ts @@ -1,23 +1,26 @@ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, - IBC_ATOM_DENOM, - IBC_USDC_DENOM, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getHeight } from '@neutron-org/neutronjsplus/dist/env'; import { - NeutronContract, + NativeToken, nativeToken, - PoolStatus, nativeTokenInfo, + NeutronContract, + PoolStatus, + Token, vestingAccount, vestingSchedule, vestingSchedulePoint, - NativeToken, - Token, -} from '../../helpers/types'; -import { getHeight, wait } from '../../helpers/wait'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; +} from '@neutron-org/neutronjsplus/dist/types'; +import { IBC_ATOM_DENOM, IBC_USDC_DENOM } from '@neutron-org/neutronjsplus'; +import { waitSeconds } from '@neutron-org/neutronjsplus/dist/wait'; + +const config = require('../../config.json'); // general contract keys used across the tests const ASTRO_PAIR_CONTRACT_KEY = 'ASTRO_PAIR'; @@ -48,7 +51,7 @@ describe('Neutron / TGE / Vesting LP vault', () => { let contractAddresses: Record = {}; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -406,7 +409,7 @@ describe('Neutron / TGE / Vesting LP vault', () => { describe('check unclaimed amounts', () => { let currentHeight: number; beforeAll(async () => { - await wait(5); + await waitSeconds(5); currentHeight = await getHeight(neutronChain.sdk); }); test('user1 ATOM lp contract', async () => { @@ -978,6 +981,38 @@ describe('Neutron / TGE / Vesting LP vault', () => { ).rejects.toThrow(/Unauthorized/); }); + test('set vesting token not allowed more than once', async () => { + await expect( + cmManager.executeContract( + contractAddresses[VESTING_LP_USDC_CONTRACT_KEY], + JSON.stringify({ + set_vesting_token: { + vesting_token: { + native_token: { + denom: NEUTRON_DENOM, + }, + }, + }, + }), + ), + ).rejects.toThrow(/Vesting token is already set!/); + + await expect( + cmManager.executeContract( + contractAddresses[VESTING_LP_ATOM_CONTRACT_KEY], + JSON.stringify({ + set_vesting_token: { + vesting_token: { + native_token: { + denom: NEUTRON_DENOM, + }, + }, + }, + }), + ), + ).rejects.toThrow(/Vesting token is already set!/); + }); + describe('register vesting accounts not allowed to a stranger', () => { test('via send cw20', async () => { // create a random cw20 token with allocation to user1 diff --git a/src/testcases/parallel/tokenfactory.test.ts b/src/testcases/parallel/tokenfactory.test.ts index 7b904ad0..e9360672 100644 --- a/src/testcases/parallel/tokenfactory.test.ts +++ b/src/testcases/parallel/tokenfactory.test.ts @@ -1,33 +1,25 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, - getEventAttribute, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import axios from 'axios'; -import { Wallet } from '../../types'; -import { NeutronContract } from '../../helpers/types'; + getEventAttribute, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { NeutronContract, Wallet } from '@neutron-org/neutronjsplus/dist/types'; import { msgBurn, msgChangeAdmin, msgCreateDenom, msgMintDenom, msgSetBeforeSendHook, -} from '../../helpers/tokenfactory'; + getDenomsFromCreator, + checkTokenfactoryParams, + getAuthorityMetadata, + getBeforeSendHook, +} from '@neutron-org/neutronjsplus/dist/tokenfactory'; -interface DenomsFromCreator { - readonly denoms: readonly string[]; -} - -interface AuthorityMetadata { - readonly authority_metadata: { readonly Admin: string }; -} - -interface BeforeSendHook { - readonly contract_addr: string; -} +const config = require('../../config.json'); describe('Neutron / Tokenfactory', () => { let testState: TestStateLocalCosmosTestNet; @@ -36,7 +28,7 @@ describe('Neutron / Tokenfactory', () => { let ownerWallet: Wallet; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); ownerWallet = testState.wallets.qaNeutron.genQaWal1; neutronChain = new CosmosWrapper( @@ -471,45 +463,3 @@ describe('Neutron / Tokenfactory', () => { }); }); }); - -const checkTokenfactoryParams = async (sdkUrl: string): Promise => { - try { - await axios.get(`${sdkUrl}/osmosis/tokenfactory/v1beta1/params`); - return true; - } catch (e) { - return false; - } -}; - -const getDenomsFromCreator = async ( - sdkUrl: string, - creator: string, -): Promise => { - const res = await axios.get( - `${sdkUrl}/osmosis/tokenfactory/v1beta1/denoms_from_creator/${creator}`, - ); - - return res.data; -}; - -const getAuthorityMetadata = async ( - sdkUrl: string, - denom: string, -): Promise => { - const res = await axios.get( - `${sdkUrl}/osmosis/tokenfactory/v1beta1/denoms/${denom}/authority_metadata`, - ); - - return res.data; -}; - -const getBeforeSendHook = async ( - sdkUrl: string, - denom: string, -): Promise => { - const res = await axios.get( - `${sdkUrl}/osmosis/tokenfactory/v1beta1/denoms/${denom}/before_send_hook`, - ); - - return res.data; -}; diff --git a/src/testcases/parallel/voting_registry.test.ts b/src/testcases/parallel/voting_registry.test.ts new file mode 100644 index 00000000..58807ffe --- /dev/null +++ b/src/testcases/parallel/voting_registry.test.ts @@ -0,0 +1,861 @@ +import { + NEUTRON_DENOM, + cosmosWrapper, + types, + env, + TestStateLocalCosmosTestNet, +} from '@neutron-org/neutronjsplus'; + +const config = require('../../config.json'); + +// general contract keys used across the tests +const VOTING_REGISTRY_CONTRACT_KEY = 'VOTING_REGISTRY'; +const NEUTRON_VAULT_CONTRACT_KEY = 'NEUTRON_VAULT'; +// specific contract keys used across the tests +const NEUTRON_VAULT_1_CONTRACT_KEY = 'NEUTRON_VAULT_1'; +const NEUTRON_VAULT_2_CONTRACT_KEY = 'NEUTRON_VAULT_2'; +const NEUTRON_VAULT_3_CONTRACT_KEY = 'NEUTRON_VAULT_3'; + +describe('Neutron / Voting Registry', () => { + let testState: TestStateLocalCosmosTestNet; + let neutronChain: cosmosWrapper.CosmosWrapper; + let cmInstantiator: cosmosWrapper.WalletWrapper; + let cmDaoMember: cosmosWrapper.WalletWrapper; + let contractAddresses: Record = {}; + let votingRegistryAddr: string; + let vault1Addr: string; + let vault2Addr: string; + let vault3Addr: string; + + let vpHistory: VotingPowerInfoHistory; + // initial bondings + const vault1Bonding = 1_000_000; + const vault2Bonding = 500_000; + // additional bonding amount + const vault1AddBonding = 10_000; + // partial unbonding amount + const vault1Unbonding = 100_000; + // bonding to an additional vault + const vault3Bonding = 5_000_000; + + beforeAll(async () => { + testState = new TestStateLocalCosmosTestNet(config); + await testState.init(); + neutronChain = new cosmosWrapper.CosmosWrapper( + testState.sdk1, + testState.blockWaiter1, + NEUTRON_DENOM, + ); + cmInstantiator = new cosmosWrapper.WalletWrapper( + neutronChain, + testState.wallets.qaNeutronThree.genQaWal1, + ); + cmDaoMember = new cosmosWrapper.WalletWrapper( + neutronChain, + testState.wallets.qaNeutron.genQaWal1, + ); + contractAddresses = await deployContracts(neutronChain, cmInstantiator); + votingRegistryAddr = contractAddresses[VOTING_REGISTRY_CONTRACT_KEY]; + vault1Addr = contractAddresses[NEUTRON_VAULT_1_CONTRACT_KEY]; + vault2Addr = contractAddresses[NEUTRON_VAULT_2_CONTRACT_KEY]; + vault3Addr = contractAddresses[NEUTRON_VAULT_3_CONTRACT_KEY]; + + vpHistory = initVotingPowerInfoHistory(); + }); + + describe('assert init state', () => { + test('check voting vaults', async () => { + const votingVaults = await getVotingVaults( + neutronChain, + votingRegistryAddr, + ); + // initially there are only vault1 and vault2 in the registry, vault3 is to be added later + expect(votingVaults.length).toBe(2); + expect(votingVaults).toContainEqual({ + address: vault1Addr, + description: NEUTRON_VAULT_1_CONTRACT_KEY, + name: NEUTRON_VAULT_1_CONTRACT_KEY, + state: 'Active', + }); + expect(votingVaults).toContainEqual({ + address: vault2Addr, + description: NEUTRON_VAULT_2_CONTRACT_KEY, + name: NEUTRON_VAULT_2_CONTRACT_KEY, + state: 'Active', + }); + }); + test('check voting power', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + expect(vpInfo.vault1Power).toBe(0); + expect(vpInfo.vault1TotalPower).toBe(0); + expect(vpInfo.vault2Power).toBe(0); + expect(vpInfo.vault2TotalPower).toBe(0); + expect(vpInfo.vault3Power).toBe(0); + expect(vpInfo.vault3TotalPower).toBe(0); + expect(vpInfo.votingRegistryPower).toBe(0); + expect(vpInfo.votingRegistryTotalPower).toBe(0); + }); + }); + + describe('accrue init voting power', () => { + test('bond funds', async () => { + await bondFunds(cmDaoMember, vault1Addr, vault1Bonding.toString()); + await bondFunds(cmDaoMember, vault2Addr, vault2Bonding.toString()); + // we bond to vault3 in advance regardless of this is not in the registry yet + await bondFunds(cmDaoMember, vault3Addr, vault3Bonding.toString()); + await neutronChain.blockWaiter.waitBlocks(1); + }); + + test('check accrued voting power', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + expect(vpInfo.vault1Power).toEqual(vault1Bonding); + expect(vpInfo.vault1TotalPower).toEqual(vault1Bonding); + expect(vpInfo.vault2Power).toEqual(vault2Bonding); + expect(vpInfo.vault2TotalPower).toEqual(vault2Bonding); + expect(vpInfo.vault3Power).toEqual(vault3Bonding); + expect(vpInfo.vault3TotalPower).toEqual(vault3Bonding); + // no vault3 in the registry yet + expect(vpInfo.votingRegistryPower).toEqual(vault1Bonding + vault2Bonding); + expect(vpInfo.votingRegistryTotalPower).toEqual( + vault1Bonding + vault2Bonding, + ); + vpHistory.init = vpInfo; + }); + }); + + describe('VP on bond and unbond', () => { + test('bond funds', async () => { + await bondFunds(cmDaoMember, vault1Addr, vault1AddBonding.toString()); + await neutronChain.blockWaiter.waitBlocks(1); + }); + test('check voting power after bonding', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + + // compare the new values to the prev state ones + // expect the vault1 VP to increase by bonding amount + expect(vpInfo.vault1Power).toEqual( + vpHistory.init.vault1Power + vault1AddBonding, + ); + expect(vpInfo.vault1TotalPower).toEqual( + vpHistory.init.vault1TotalPower + vault1AddBonding, + ); + + // expect the vault2 VP to remain the same + expect(vpInfo.vault2Power).toEqual(vpHistory.init.vault2Power); + expect(vpInfo.vault2TotalPower).toEqual(vpHistory.init.vault2TotalPower); + + // expect the vault3 VP to remain the same + expect(vpInfo.vault3Power).toEqual(vpHistory.init.vault3Power); + expect(vpInfo.vault3TotalPower).toEqual(vpHistory.init.vault3TotalPower); + + // expect the registry VP to increase by bonding amount + expect(vpInfo.votingRegistryPower).toEqual( + vpHistory.init.vault1TotalPower + + vault1AddBonding + + vpHistory.init.vault2TotalPower, + ); + expect(vpInfo.votingRegistryTotalPower).toEqual( + vpHistory.init.vault1TotalPower + + vault1AddBonding + + vpHistory.init.vault2TotalPower, + ); + vpHistory.additionalBonding = vpInfo; + }); + + test('unbond funds', async () => { + await unbondFunds(cmDaoMember, vault1Addr, vault1Unbonding.toString()); + await neutronChain.blockWaiter.waitBlocks(1); + }); + test('check voting power after unbonding', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + + // compare the new values to the prev state ones + // expect the vault1 VP to decrease by bonding amount + expect(vpInfo.vault1Power).toEqual( + vpHistory.additionalBonding.vault1Power - vault1Unbonding, + ); + expect(vpInfo.vault1TotalPower).toEqual( + vpHistory.additionalBonding.vault1TotalPower - vault1Unbonding, + ); + + // expect the vault2 VP to remain the same + expect(vpInfo.vault2Power).toEqual( + vpHistory.additionalBonding.vault2Power, + ); + expect(vpInfo.vault2TotalPower).toEqual( + vpHistory.additionalBonding.vault2TotalPower, + ); + + // expect the vault3 VP to remain the same + expect(vpInfo.vault3Power).toEqual( + vpHistory.additionalBonding.vault3Power, + ); + expect(vpInfo.vault3TotalPower).toEqual( + vpHistory.additionalBonding.vault3TotalPower, + ); + + // expect the registry VP to decrease by unbonding amount + expect(vpInfo.votingRegistryPower).toEqual( + vpHistory.additionalBonding.vault1TotalPower - + vault1Unbonding + + vpHistory.additionalBonding.vault2TotalPower, + ); + expect(vpInfo.votingRegistryTotalPower).toEqual( + vpHistory.additionalBonding.vault1TotalPower - + vault1Unbonding + + vpHistory.additionalBonding.vault2TotalPower, + ); + vpHistory.unbonding = vpInfo; + }); + + // expect VP infos taken from heights in the past to be the same as they were at that points + test('check historical voting power', async () => { + const initVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.init.height, + ); + expect(initVpInfo).toMatchObject(vpHistory.init); + + const atAdditionalBondingVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.additionalBonding.height, + ); + expect(atAdditionalBondingVpInfo).toMatchObject( + vpHistory.additionalBonding, + ); + + const atUnbondingVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.unbonding.height, + ); + expect(atUnbondingVpInfo).toMatchObject(vpHistory.unbonding); + }); + }); + + describe('VP on vaults list mutation', () => { + test('deactivate vault', async () => { + await deactivateVotingVault( + cmInstantiator, + votingRegistryAddr, + vault2Addr, + ); + await neutronChain.blockWaiter.waitBlocks(1); + + const votingVaults = await getVotingVaults( + neutronChain, + votingRegistryAddr, + ); + expect(votingVaults.length).toBe(2); + expect(votingVaults).toContainEqual({ + address: vault1Addr, + description: NEUTRON_VAULT_1_CONTRACT_KEY, + name: NEUTRON_VAULT_1_CONTRACT_KEY, + state: 'Active', + }); + expect(votingVaults).toContainEqual({ + address: vault2Addr, + description: NEUTRON_VAULT_2_CONTRACT_KEY, + name: NEUTRON_VAULT_2_CONTRACT_KEY, + state: 'Inactive', + }); + }); + test('check voting power after deactivation', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + + // compare the new values to the prev state ones + // expect the vault1 VP to remain the same + expect(vpInfo.vault1Power).toEqual(vpHistory.unbonding.vault1Power); + expect(vpInfo.vault1TotalPower).toEqual( + vpHistory.unbonding.vault1TotalPower, + ); + + // expect the vault2 VP to remain the same + expect(vpInfo.vault2Power).toEqual(vpHistory.unbonding.vault2Power); + expect(vpInfo.vault2TotalPower).toEqual( + vpHistory.unbonding.vault2TotalPower, + ); + + // expect the vault3 VP to remain the same + expect(vpInfo.vault3Power).toEqual(vpHistory.unbonding.vault3Power); + expect(vpInfo.vault3TotalPower).toEqual( + vpHistory.unbonding.vault3TotalPower, + ); + + // expect the registry VP to decrease by deactivated vault's power + expect(vpInfo.votingRegistryPower).toEqual( + vpHistory.unbonding.votingRegistryPower - + vpHistory.unbonding.vault2Power, + ); + expect(vpInfo.votingRegistryTotalPower).toEqual( + vpHistory.unbonding.votingRegistryTotalPower - + vpHistory.unbonding.vault2TotalPower, + ); + vpHistory.vaultDeactivation = vpInfo; + }); + + test('add another vault', async () => { + await addVotingVault(cmInstantiator, votingRegistryAddr, vault3Addr); + await neutronChain.blockWaiter.waitBlocks(1); + + const votingVaults = await getVotingVaults( + neutronChain, + votingRegistryAddr, + ); + expect(votingVaults.length).toBe(3); + expect(votingVaults).toContainEqual({ + address: vault1Addr, + description: NEUTRON_VAULT_1_CONTRACT_KEY, + name: NEUTRON_VAULT_1_CONTRACT_KEY, + state: 'Active', + }); + expect(votingVaults).toContainEqual({ + address: vault2Addr, + description: NEUTRON_VAULT_2_CONTRACT_KEY, + name: NEUTRON_VAULT_2_CONTRACT_KEY, + state: 'Inactive', + }); + expect(votingVaults).toContainEqual({ + address: vault3Addr, + description: NEUTRON_VAULT_3_CONTRACT_KEY, + name: NEUTRON_VAULT_3_CONTRACT_KEY, + state: 'Active', + }); + }); + test('check voting power after vault addition', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + + // compare the new values to the prev state ones + // expect the vault1 VP to remain the same + expect(vpInfo.vault1Power).toEqual( + vpHistory.vaultDeactivation.vault1Power, + ); + expect(vpInfo.vault1TotalPower).toEqual( + vpHistory.vaultDeactivation.vault1TotalPower, + ); + + // expect the vault2 VP to remain the same + expect(vpInfo.vault2Power).toEqual( + vpHistory.vaultDeactivation.vault2Power, + ); + expect(vpInfo.vault2TotalPower).toEqual( + vpHistory.vaultDeactivation.vault2TotalPower, + ); + + // expect the vault3 VP to remain the same + expect(vpInfo.vault3Power).toEqual( + vpHistory.vaultDeactivation.vault3Power, + ); + expect(vpInfo.vault3TotalPower).toEqual( + vpHistory.vaultDeactivation.vault3TotalPower, + ); + + // expect the registry VP to increase by added vault's power + expect(vpInfo.votingRegistryPower).toEqual( + vpHistory.vaultDeactivation.votingRegistryPower + + vpHistory.vaultDeactivation.vault3Power, + ); + expect(vpInfo.votingRegistryTotalPower).toEqual( + vpHistory.vaultDeactivation.votingRegistryTotalPower + + vpHistory.vaultDeactivation.vault3TotalPower, + ); + vpHistory.vaultAdded = vpInfo; + }); + + test('activate vault', async () => { + await activateVotingVault(cmInstantiator, votingRegistryAddr, vault2Addr); + await neutronChain.blockWaiter.waitBlocks(1); + + const votingVaults = await getVotingVaults( + neutronChain, + votingRegistryAddr, + ); + expect(votingVaults.length).toBe(3); + expect(votingVaults).toContainEqual({ + address: vault1Addr, + description: NEUTRON_VAULT_1_CONTRACT_KEY, + name: NEUTRON_VAULT_1_CONTRACT_KEY, + state: 'Active', + }); + expect(votingVaults).toContainEqual({ + address: vault2Addr, + description: NEUTRON_VAULT_2_CONTRACT_KEY, + name: NEUTRON_VAULT_2_CONTRACT_KEY, + state: 'Active', + }); + expect(votingVaults).toContainEqual({ + address: vault3Addr, + description: NEUTRON_VAULT_3_CONTRACT_KEY, + name: NEUTRON_VAULT_3_CONTRACT_KEY, + state: 'Active', + }); + }); + test('check voting power after activation', async () => { + const vpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + ); + + // compare the new values to the prev state ones + // expect the vault1 VP to remain the same + expect(vpInfo.vault1Power).toEqual(vpHistory.vaultAdded.vault1Power); + expect(vpInfo.vault1TotalPower).toEqual( + vpHistory.vaultAdded.vault1TotalPower, + ); + + // expect the vault2 VP to remain the same + expect(vpInfo.vault2Power).toEqual(vpHistory.vaultAdded.vault2Power); + expect(vpInfo.vault2TotalPower).toEqual( + vpHistory.vaultAdded.vault2TotalPower, + ); + + // expect the vault3 VP to remain the same + expect(vpInfo.vault3Power).toEqual(vpHistory.vaultAdded.vault3Power); + expect(vpInfo.vault3TotalPower).toEqual( + vpHistory.vaultAdded.vault3TotalPower, + ); + + // expect the registry VP to increase by activated vault's power + expect(vpInfo.votingRegistryPower).toEqual( + vpHistory.vaultAdded.votingRegistryPower + + vpHistory.vaultAdded.vault2Power, + ); + expect(vpInfo.votingRegistryTotalPower).toEqual( + vpHistory.vaultAdded.votingRegistryTotalPower + + vpHistory.vaultAdded.vault2TotalPower, + ); + vpHistory.vaultActivation = vpInfo; + }); + + // expect VP infos taken from heights in the past to be the same as they were at that points + test('check historical voting power', async () => { + const initVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.init.height, + ); + expect(initVpInfo).toMatchObject(vpHistory.init); + + const atAdditionalBondingVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.additionalBonding.height, + ); + expect(atAdditionalBondingVpInfo).toMatchObject( + vpHistory.additionalBonding, + ); + expect(atAdditionalBondingVpInfo.height).toBeGreaterThan( + initVpInfo.height, + ); + + const atUnbondingVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.unbonding.height, + ); + expect(atUnbondingVpInfo).toMatchObject(vpHistory.unbonding); + expect(atUnbondingVpInfo.height).toBeGreaterThan( + atAdditionalBondingVpInfo.height, + ); + + const atVaultDeactivationVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.vaultDeactivation.height, + ); + expect(atVaultDeactivationVpInfo).toMatchObject( + vpHistory.vaultDeactivation, + ); + expect(atVaultDeactivationVpInfo.height).toBeGreaterThan( + atUnbondingVpInfo.height, + ); + + const atVaultAddedVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.vaultAdded.height, + ); + expect(atVaultAddedVpInfo).toMatchObject(vpHistory.vaultAdded); + expect(atVaultAddedVpInfo.height).toBeGreaterThan( + atVaultDeactivationVpInfo.height, + ); + + const atVaultActivationVpInfo = await getVotingPowerInfo( + neutronChain, + cmDaoMember.wallet.address.toString(), + contractAddresses, + vpHistory.vaultActivation.height, + ); + expect(atVaultActivationVpInfo).toMatchObject(vpHistory.vaultActivation); + expect(atVaultActivationVpInfo.height).toBeGreaterThan( + atVaultAddedVpInfo.height, + ); + }); + }); +}); + +const deployContracts = async ( + chain: cosmosWrapper.CosmosWrapper, + instantiator: cosmosWrapper.WalletWrapper, +): Promise> => { + const codeIds: Record = {}; + for (const contract of [ + VOTING_REGISTRY_CONTRACT_KEY, + NEUTRON_VAULT_CONTRACT_KEY, + ]) { + const codeId = await instantiator.storeWasm( + types.NeutronContract[contract], + ); + expect(codeId).toBeGreaterThan(0); + codeIds[contract] = codeId; + } + + const contractAddresses: Record = {}; + await deployNeutronVault( + instantiator, + NEUTRON_VAULT_1_CONTRACT_KEY, + codeIds, + contractAddresses, + ); + await deployNeutronVault( + instantiator, + NEUTRON_VAULT_2_CONTRACT_KEY, + codeIds, + contractAddresses, + ); + await deployVotingRegistry( + instantiator, + [ + contractAddresses[NEUTRON_VAULT_1_CONTRACT_KEY], + contractAddresses[NEUTRON_VAULT_2_CONTRACT_KEY], + ], + codeIds, + contractAddresses, + ); + + // just deploy for later use + await deployNeutronVault( + instantiator, + NEUTRON_VAULT_3_CONTRACT_KEY, + codeIds, + contractAddresses, + ); + return contractAddresses; +}; + +const deployVotingRegistry = async ( + instantiator: cosmosWrapper.WalletWrapper, + vaults: string[], + codeIds: Record, + contractAddresses: Record, +) => { + const res = await instantiator.instantiateContract( + codeIds[VOTING_REGISTRY_CONTRACT_KEY], + JSON.stringify({ + owner: instantiator.wallet.address.toString(), + voting_vaults: vaults, + }), + 'voting_registry', + ); + expect(res).toBeTruthy(); + contractAddresses[VOTING_REGISTRY_CONTRACT_KEY] = res[0]._contract_address; +}; + +const deployNeutronVault = async ( + instantiator: cosmosWrapper.WalletWrapper, + vaultKey: string, + codeIds: Record, + contractAddresses: Record, +) => { + const res = await instantiator.instantiateContract( + codeIds[NEUTRON_VAULT_CONTRACT_KEY], + JSON.stringify({ + owner: instantiator.wallet.address.toString(), + name: vaultKey, + description: vaultKey, + denom: NEUTRON_DENOM, + }), + 'neutron_vault', + ); + expect(res).toBeTruthy(); + contractAddresses[vaultKey] = res[0]._contract_address; +}; + +const bondFunds = async ( + cm: cosmosWrapper.WalletWrapper, + vault: string, + amount: string, +) => + cm.executeContract( + vault, + JSON.stringify({ + bond: {}, + }), + [{ denom: NEUTRON_DENOM, amount: amount }], + ); + +const unbondFunds = async ( + cm: cosmosWrapper.WalletWrapper, + vault: string, + amount: string, +) => + cm.executeContract( + vault, + JSON.stringify({ + unbond: { amount: amount }, + }), + [], + ); + +const activateVotingVault = async ( + cm: cosmosWrapper.WalletWrapper, + registry: string, + vault: string, +) => + cm.executeContract( + registry, + JSON.stringify({ + activate_voting_vault: { + voting_vault_contract: vault, + }, + }), + [], + ); + +const deactivateVotingVault = async ( + cm: cosmosWrapper.WalletWrapper, + registry: string, + vault: string, +) => + cm.executeContract( + registry, + JSON.stringify({ + deactivate_voting_vault: { + voting_vault_contract: vault, + }, + }), + [], + ); + +const addVotingVault = async ( + cm: cosmosWrapper.WalletWrapper, + registry: string, + vault: string, +) => + cm.executeContract( + registry, + JSON.stringify({ + add_voting_vault: { + new_voting_vault_contract: vault, + }, + }), + [], + ); + +/** + * Retrieves voting power data for a given address from both vaults and voting registry. Also + * retrieves total voting powerdata from the same contracts. + */ +const getVotingPowerInfo = async ( + chain: cosmosWrapper.CosmosWrapper, + address: string, + contractAddresses: Record, + height?: number, +): Promise => { + if (typeof height === 'undefined') { + height = await env.getHeight(chain.sdk); + } + const vault1Power = getVotingPowerAtHeight( + chain, + contractAddresses[NEUTRON_VAULT_1_CONTRACT_KEY], + address, + height, + ); + const vault1TotalPower = getTotalPowerAtHeight( + chain, + contractAddresses[NEUTRON_VAULT_1_CONTRACT_KEY], + height, + ); + const vault2Power = getVotingPowerAtHeight( + chain, + contractAddresses[NEUTRON_VAULT_2_CONTRACT_KEY], + address, + height, + ); + const vault2TotalPower = getTotalPowerAtHeight( + chain, + contractAddresses[NEUTRON_VAULT_2_CONTRACT_KEY], + height, + ); + const vault3Power = getVotingPowerAtHeight( + chain, + contractAddresses[NEUTRON_VAULT_3_CONTRACT_KEY], + address, + height, + ); + const vault3TotalPower = getTotalPowerAtHeight( + chain, + contractAddresses[NEUTRON_VAULT_3_CONTRACT_KEY], + height, + ); + const registryPower = getVotingPowerAtHeight( + chain, + contractAddresses[VOTING_REGISTRY_CONTRACT_KEY], + address, + height, + ); + const registryTotalPower = getTotalPowerAtHeight( + chain, + contractAddresses[VOTING_REGISTRY_CONTRACT_KEY], + height, + ); + + return { + height: height, + vault1Power: +(await vault1Power).power, + vault1TotalPower: +(await vault1TotalPower).power, + vault2Power: +(await vault2Power).power, + vault2TotalPower: +(await vault2TotalPower).power, + vault3Power: +(await vault3Power).power, + vault3TotalPower: +(await vault3TotalPower).power, + votingRegistryPower: +(await registryPower).power, + votingRegistryTotalPower: +(await registryTotalPower).power, + }; +}; + +const getTotalPowerAtHeight = async ( + chain: cosmosWrapper.CosmosWrapper, + contract: string, + height?: number, +): Promise => + chain.queryContract(contract, { + total_power_at_height: + typeof height === 'undefined' ? {} : { height: height }, + }); + +const getVotingPowerAtHeight = async ( + chain: cosmosWrapper.CosmosWrapper, + contract: string, + address: string, + height?: number, +): Promise => + chain.queryContract(contract, { + voting_power_at_height: + typeof height === 'undefined' + ? { + address: address, + } + : { + address: address, + height: height, + }, + }); + +const getVotingVaults = async ( + chain: cosmosWrapper.CosmosWrapper, + registry: string, + height?: number, +): Promise => + chain.queryContract(registry, { + voting_vaults: typeof height === 'undefined' ? {} : { height: height }, + }); + +type VotingPowerResponse = { + power: string; + height: number; +}; + +type VotingPowerInfo = { + height: number; + vault1Power: number; + vault1TotalPower: number; + vault2Power: number; + vault2TotalPower: number; + vault3Power: number; + vault3TotalPower: number; + votingRegistryPower: number; + votingRegistryTotalPower: number; +}; + +/** + * Contains voting power info for each important point in the test history. Used to make sure + * historical voting power queries are correct. Fields are placed in order of their occurrence + * in the test. + */ +type VotingPowerInfoHistory = { + /** initial voting power info */ + init: VotingPowerInfo; + /** voting power info after making an additional bonding */ + additionalBonding: VotingPowerInfo; + /** voting power info after making a partial unbonding */ + unbonding: VotingPowerInfo; + /** voting power info after a vault deactivation */ + vaultDeactivation: VotingPowerInfo; + /** voting power info after vault addition */ + vaultAdded: VotingPowerInfo; + /** voting power info after the deactivated vault activation */ + vaultActivation: VotingPowerInfo; +}; + +const initVotingPowerInfoHistory = (): VotingPowerInfoHistory => ({ + init: initVotingPowerInfo(), + additionalBonding: initVotingPowerInfo(), + unbonding: initVotingPowerInfo(), + vaultDeactivation: initVotingPowerInfo(), + vaultAdded: initVotingPowerInfo(), + vaultActivation: initVotingPowerInfo(), +}); + +const initVotingPowerInfo = (): VotingPowerInfo => ({ + height: 0, + vault1Power: 0, + vault1TotalPower: 0, + vault2Power: 0, + vault2TotalPower: 0, + vault3Power: 0, + vault3TotalPower: 0, + votingRegistryPower: 0, + votingRegistryTotalPower: 0, +}); + +type VotingVault = { + address: string; + name: string; + description: string; + state: string; +}; diff --git a/src/testcases/run_in_band/floaty.test.ts b/src/testcases/run_in_band/floaty.test.ts index 37692214..1b6bdcc8 100644 --- a/src/testcases/run_in_band/floaty.test.ts +++ b/src/testcases/run_in_band/floaty.test.ts @@ -1,11 +1,12 @@ +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; import { CosmosWrapper, - NEUTRON_DENOM, WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { NeutronContract } from '../../helpers/types'; -import { CodeId } from '../../types'; + NEUTRON_DENOM, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { CodeId, NeutronContract } from '@neutron-org/neutronjsplus/dist/types'; + +const config = require('../../config.json'); describe('Float operations support', () => { let testState: TestStateLocalCosmosTestNet; @@ -14,7 +15,7 @@ describe('Float operations support', () => { let contractAddress: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, diff --git a/src/testcases/run_in_band/globalfee.test.ts b/src/testcases/run_in_band/globalfee.test.ts index 5eb25da1..9b024413 100644 --- a/src/testcases/run_in_band/globalfee.test.ts +++ b/src/testcases/run_in_band/globalfee.test.ts @@ -1,22 +1,29 @@ +import Long from 'long'; +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { getWithAttempts } from '../../helpers/wait'; -import { Dao, DaoMember, getDaoContracts } from '../../helpers/dao'; -import Long from 'long'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getWithAttempts } from '@neutron-org/neutronjsplus/dist/wait'; +import { + Dao, + DaoMember, + getDaoContracts, +} from '@neutron-org/neutronjsplus/dist/dao'; + +const config = require('../../config.json'); describe('Neutron / Global Fee', () => { let testState: TestStateLocalCosmosTestNet; let neutronChain: CosmosWrapper; let neutronAccount: WalletWrapper; let daoMember: DaoMember; - let dao: Dao; + let daoMain: Dao; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -29,25 +36,27 @@ describe('Neutron / Global Fee', () => { ); const daoCoreAddress = (await neutronChain.getChainAdmins())[0]; const daoContracts = await getDaoContracts(neutronChain, daoCoreAddress); - dao = new Dao(neutronChain, daoContracts); - daoMember = new DaoMember(neutronAccount, dao); - await daoMember.bondFunds('1000'); + daoMain = new Dao(neutronChain, daoContracts); + daoMember = new DaoMember(neutronAccount, daoMain); + await daoMember.bondFunds('10000'); await getWithAttempts( neutronChain.blockWaiter, async () => - await dao.queryVotingPower(daoMember.user.wallet.address.toString()), + await daoMain.queryVotingPower( + daoMember.user.wallet.address.toString(), + ), async (response) => response.power == 1000, 20, ); - await daoMember.user.msgSend(dao.contracts.core.address, '1000', { + await daoMember.user.msgSend(daoMain.contracts.core.address, '1000', { gas_limit: Long.fromString('200000'), amount: [{ denom: daoMember.user.chain.denom, amount: '500' }], }); }); afterAll(async () => { - await daoMember.unbondFunds('1000'); + await daoMember.unbondFunds('10000'); }); let counter = 1; @@ -74,7 +83,7 @@ describe('Neutron / Global Fee', () => { gas_limit: Long.fromString('4000000'), amount: [{ denom: daoMember.user.chain.denom, amount: '100000' }], }); - await dao.checkPassedProposal(proposalId); + await daoMain.checkPassedProposal(proposalId); await daoMember.executeProposalWithAttempts(proposalId, { gas_limit: Long.fromString('4000000'), amount: [{ denom: daoMember.user.chain.denom, amount: '100000' }], @@ -118,7 +127,7 @@ describe('Neutron / Global Fee', () => { test('check minumum global fees with bank send command', async () => { await expect( - neutronAccount.msgSend(dao.contracts.core.address, '1000', { + neutronAccount.msgSend(daoMain.contracts.core.address, '1000', { gas_limit: Long.fromString('200000'), amount: [{ denom: daoMember.user.chain.denom, amount: '500' }], }), @@ -144,7 +153,7 @@ describe('Neutron / Global Fee', () => { test('check that MsgSend passes check for allowed messages - now works with only validator fees', async () => { const res = await neutronAccount.msgSend( - dao.contracts.core.address, + daoMain.contracts.core.address, '1000', { gas_limit: Long.fromString('200000'), @@ -173,7 +182,7 @@ describe('Neutron / Global Fee', () => { test('check that MsgSend does not work without minimal fees now', async () => { await neutronChain.blockWaiter.waitBlocks(2); await expect( - neutronAccount.msgSend(dao.contracts.core.address, '1000', { + neutronAccount.msgSend(daoMain.contracts.core.address, '1000', { gas_limit: Long.fromString('200000'), amount: [{ denom: daoMember.user.chain.denom, amount: '500' }], }), @@ -200,7 +209,7 @@ describe('Neutron / Global Fee', () => { test('check minumum global fees with bank send command after revert with zero value (only validator min fee settings applied)', async () => { const res = await neutronAccount.msgSend( - dao.contracts.core.address, + daoMain.contracts.core.address, '1000', { gas_limit: Long.fromString('200000'), diff --git a/src/testcases/run_in_band/ibc_hooks.test.ts b/src/testcases/run_in_band/ibc_hooks.test.ts index 0e3b8b19..509f2aeb 100644 --- a/src/testcases/run_in_band/ibc_hooks.test.ts +++ b/src/testcases/run_in_band/ibc_hooks.test.ts @@ -1,13 +1,15 @@ import Long from 'long'; +import '@neutron-org/neutronjsplus'; import { - COSMOS_DENOM, + WalletWrapper, CosmosWrapper, + COSMOS_DENOM, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { NeutronContract } from '../../helpers/types'; -import { CodeId } from '../../types'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { NeutronContract, CodeId } from '@neutron-org/neutronjsplus/dist/types'; + +const config = require('../../config.json'); describe('Neutron / IBC hooks', () => { let testState: TestStateLocalCosmosTestNet; @@ -20,7 +22,7 @@ describe('Neutron / IBC hooks', () => { 'ibc/4E41ED8F3DCAEA15F4D6ADC6EDD7C04A676160735C9710B904B7BF53525B56D6'; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, diff --git a/src/testcases/run_in_band/interchain_kv_query.test.ts b/src/testcases/run_in_band/interchain_kv_query.test.ts index 781099ac..ff4ecd78 100644 --- a/src/testcases/run_in_band/interchain_kv_query.test.ts +++ b/src/testcases/run_in_band/interchain_kv_query.test.ts @@ -1,26 +1,31 @@ -import cosmosclient from '@cosmos-client/core'; +import '@neutron-org/neutronjsplus'; import { - COSMOS_DENOM, + WalletWrapper, CosmosWrapper, - getEventAttribute, NEUTRON_DENOM, - WalletWrapper, filterIBCDenoms, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { getHeight, getWithAttempts } from '../../helpers/wait'; -import { AccAddress, ValAddress } from '@cosmos-client/core/cjs/types'; -import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; + getEventAttribute, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getWithAttempts } from '@neutron-org/neutronjsplus/dist/wait'; +import { + Dao, + DaoMember, + getDaoContracts, +} from '@neutron-org/neutronjsplus/dist/dao'; +import cosmosclient from '@cosmos-client/core'; +import ICoin = cosmosclient.proto.cosmos.base.v1beta1.ICoin; +import { getHeight } from '@neutron-org/neutronjsplus/dist/env'; import { getRegisteredQuery, waitForICQResultWithRemoteHeight, -} from '../../helpers/icq'; -import { NeutronContract } from '../../helpers/types'; -import { Dao, DaoMember, getDaoContracts } from '../../helpers/dao'; -import { paramChangeProposal } from '../../helpers/proposal'; -import { CodeId } from '../../types'; -import { cosmos } from '@cosmos-client/core/cjs/proto'; -import ICoin = cosmos.base.v1beta1.ICoin; +} from '@neutron-org/neutronjsplus/dist/icq'; +import { CodeId, NeutronContract } from '@neutron-org/neutronjsplus/dist/types'; +import { paramChangeProposal } from '@neutron-org/neutronjsplus/dist/proposal'; +import { COSMOS_DENOM } from '@neutron-org/neutronjsplus'; + +const config = require('../../config.json'); + const getKvCallbackStatus = ( cm: CosmosWrapper, contractAddress: string, @@ -110,7 +115,7 @@ const registerBalanceQuery = async ( connectionId: string, updatePeriod: number, denom: string, - addr: AccAddress, + addr: cosmosclient.AccAddress, ) => { const txResult = await cm.executeContract( contractAddress, @@ -180,7 +185,7 @@ const removeQuery = async ( const removeQueryViaTx = async ( cm: WalletWrapper, - queryId: number, + queryId: bigint, sender: string = cm.wallet.address.toString(), ) => await cm.msgRemoveInterchainQuery(queryId, sender); @@ -189,8 +194,8 @@ const registerDelegatorDelegationsQuery = async ( contractAddress: string, connectionId: string, updatePeriod: number, - delegator: AccAddress, - validators: ValAddress[], + delegator: cosmosclient.AccAddress, + validators: cosmosclient.ValAddress[], ) => { await cm.executeContract( contractAddress, @@ -210,7 +215,7 @@ const validateBalanceQuery = async ( targetCm: CosmosWrapper, contractAddress: string, queryId: number, - address: AccAddress, + address: cosmosclient.AccAddress, ) => { const interchainQueryResult = await getQueryBalanceResult( neutronCm, @@ -218,8 +223,8 @@ const validateBalanceQuery = async ( queryId, ); const directQueryResult = await cosmosclient.rest.bank.allBalances( - targetCm.sdk as CosmosSDK, - address, + targetCm.sdk as cosmosclient.CosmosSDK, + address.toString(), ); expect(filterIBCDenoms(interchainQueryResult.balances.coins)).toEqual( filterIBCDenoms(directQueryResult.data.balances as ICoin[]), @@ -242,7 +247,7 @@ describe('Neutron / Interchain KV Query', () => { 'neutron14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s5c2epq'; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -632,7 +637,7 @@ describe('Neutron / Interchain KV Query', () => { }); test('should fail to remove icq #2 from non owner address before timeout expiration', async () => { - const queryId = 2; + const queryId = BigInt(2); const result = await removeQueryViaTx(neutronAccount, queryId); expect(result.raw_log).toMatch( /only owner can remove a query within its service period: unauthorized/i, diff --git a/src/testcases/run_in_band/interchain_tx_query_plain.test.ts b/src/testcases/run_in_band/interchain_tx_query_plain.test.ts index f6e22350..48620194 100644 --- a/src/testcases/run_in_band/interchain_tx_query_plain.test.ts +++ b/src/testcases/run_in_band/interchain_tx_query_plain.test.ts @@ -1,21 +1,26 @@ +import Long from 'long'; +import { CodeId } from '../../types'; +import { MsgSend } from '@neutron-org/neutronjsplus/dist/proto/cosmos_sdk/cosmos/bank/v1beta1/tx_pb'; import { - COSMOS_DENOM, CosmosWrapper, - NEUTRON_DENOM, + packAnyMsg, WalletWrapper, -} from '../../helpers/cosmos'; -import cosmosclient from '@cosmos-client/core'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import Long from 'long'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { + TestStateLocalCosmosTestNet, + NEUTRON_DENOM, + COSMOS_DENOM, +} from '@neutron-org/neutronjsplus'; +import { NeutronContract } from '@neutron-org/neutronjsplus/dist/types'; import { getRegisteredQuery, queryRecipientTxs, queryTransfersNumber, registerTransfersQuery, waitForTransfersAmount, -} from '../../helpers/icq'; -import { NeutronContract } from '../../helpers/types'; -import { CodeId } from '../../types'; +} from '@neutron-org/neutronjsplus/dist/icq'; + +const config = require('../../config.json'); describe('Neutron / Interchain TX Query', () => { let testState: TestStateLocalCosmosTestNet; @@ -27,7 +32,7 @@ describe('Neutron / Interchain TX Query', () => { const connectionId = 'connection-0'; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -403,29 +408,32 @@ describe('Neutron / Interchain TX Query', () => { test('exec tx with two transfers', async () => { addr1ExpectedBalance += amountToAddrFirst2; addr2ExpectedBalance += amountToAddrSecond2; + const sendMsg1 = new MsgSend({ + fromAddress: gaiaAccount.wallet.address.toString(), + toAddress: watchedAddr1, + amount: [ + { denom: gaiaChain.denom, amount: amountToAddrFirst2.toString() }, + ], + }); + const sendMsg2 = new MsgSend({ + fromAddress: gaiaAccount.wallet.address.toString(), + toAddress: watchedAddr2, + amount: [ + { + denom: gaiaChain.denom, + amount: amountToAddrSecond2.toString(), + }, + ], + }); + const res = await gaiaAccount.execTx( { gas_limit: Long.fromString('200000'), amount: [{ denom: gaiaChain.denom, amount: '1000' }], }, [ - new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ - from_address: gaiaAccount.wallet.address.toString(), - to_address: watchedAddr1, - amount: [ - { denom: gaiaChain.denom, amount: amountToAddrFirst2.toString() }, - ], - }), - new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ - from_address: gaiaAccount.wallet.address.toString(), - to_address: watchedAddr2, - amount: [ - { - denom: gaiaChain.denom, - amount: amountToAddrSecond2.toString(), - }, - ], - }), + packAnyMsg('/cosmos.bank.v1beta1.MsgSend', sendMsg1), + packAnyMsg('/cosmos.bank.v1beta1.MsgSend', sendMsg2), ], ); expectedIncomingTransfers += 2; diff --git a/src/testcases/run_in_band/interchaintx.test.ts b/src/testcases/run_in_band/interchaintx.test.ts index f6bb42a4..adf2f233 100644 --- a/src/testcases/run_in_band/interchaintx.test.ts +++ b/src/testcases/run_in_band/interchaintx.test.ts @@ -1,22 +1,22 @@ -import 'jest-extended'; -import cosmosclient from '@cosmos-client/core'; -import { AccAddress } from '@cosmos-client/core/cjs/types'; +import '@neutron-org/neutronjsplus'; import { - COSMOS_DENOM, + WalletWrapper, CosmosWrapper, - getSequenceId, + COSMOS_DENOM, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; + getSequenceId, +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import cosmosclient from '@cosmos-client/core'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getWithAttempts } from '@neutron-org/neutronjsplus/dist/wait'; import { + AckFailuresResponse, AcknowledgementResult, NeutronContract, - AckFailuresResponse, -} from '../../helpers/types'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { getWithAttempts } from '../../helpers/wait'; -import { CosmosSDK } from '@cosmos-client/core/cjs/sdk'; -import { getIca } from '../../helpers/ica'; +} from '@neutron-org/neutronjsplus/dist/types'; +import { getIca } from '@neutron-org/neutronjsplus/dist/ica'; + +const config = require('../../config.json'); describe('Neutron / Interchain TXs', () => { let testState: TestStateLocalCosmosTestNet; @@ -27,12 +27,13 @@ describe('Neutron / Interchain TXs', () => { let contractAddress: string; let icaAddress1: string; let icaAddress2: string; + const icaId1 = 'test1'; const icaId2 = 'test2'; const connectionId = 'connection-0'; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -210,8 +211,8 @@ describe('Neutron / Interchain TXs', () => { gaiaChain.blockWaiter, () => cosmosclient.rest.staking.delegatorDelegations( - gaiaChain.sdk as CosmosSDK, - icaAddress1 as unknown as AccAddress, + gaiaChain.sdk as cosmosclient.CosmosSDK, + icaAddress1 as unknown as cosmosclient.AccAddress, ), async (delegations) => delegations.data.delegation_responses?.length == 1, @@ -228,8 +229,8 @@ describe('Neutron / Interchain TXs', () => { }, ]); const res2 = await cosmosclient.rest.staking.delegatorDelegations( - gaiaChain.sdk as CosmosSDK, - icaAddress2 as unknown as AccAddress, + gaiaChain.sdk as cosmosclient.CosmosSDK, + icaAddress2 as unknown as cosmosclient.AccAddress, ); expect(res2.data.delegation_responses).toEqual([]); }); @@ -283,8 +284,8 @@ describe('Neutron / Interchain TXs', () => { gaiaChain.blockWaiter, () => cosmosclient.rest.staking.delegatorDelegations( - gaiaChain.sdk as CosmosSDK, - icaAddress1 as unknown as AccAddress, + gaiaChain.sdk as cosmosclient.CosmosSDK, + icaAddress1 as unknown as cosmosclient.AccAddress, ), async (delegations) => delegations.data.delegation_responses?.length === 1, @@ -301,8 +302,8 @@ describe('Neutron / Interchain TXs', () => { }, ]); const res2 = await cosmosclient.rest.staking.delegatorDelegations( - gaiaChain.sdk as CosmosSDK, - icaAddress2 as unknown as AccAddress, + gaiaChain.sdk as cosmosclient.CosmosSDK, + icaAddress2 as unknown as cosmosclient.AccAddress, ); expect(res2.data.delegation_responses).toEqual([]); }); @@ -595,8 +596,8 @@ describe('Neutron / Interchain TXs', () => { }); test('check validator state after ICA recreation', async () => { const res = await cosmosclient.rest.staking.delegatorDelegations( - gaiaChain.sdk as CosmosSDK, - icaAddress1 as unknown as AccAddress, + gaiaChain.sdk as cosmosclient.CosmosSDK, + icaAddress1 as unknown as cosmosclient.AccAddress, ); expect(res.data.delegation_responses).toEqual([ { @@ -892,38 +893,32 @@ describe('Neutron / Interchain TXs', () => { // 4 ack failures, 2 timeout failure, just as described in the tests above expect(failures.failures).toEqual([ expect.objectContaining({ - address: - 'neutron1nxshmmwrvxa2cp80nwvf03t8u5kvl2ttr8m8f43vamudsqrdvs8qqvfwpj', + address: contractAddress, id: '0', error: 'codespace: wasm, code: 5', // execute wasm contract failer }), expect.objectContaining({ - address: - 'neutron1nxshmmwrvxa2cp80nwvf03t8u5kvl2ttr8m8f43vamudsqrdvs8qqvfwpj', + address: contractAddress, id: '1', error: 'codespace: wasm, code: 5', // execute wasm contract failer }), expect.objectContaining({ - address: - 'neutron1nxshmmwrvxa2cp80nwvf03t8u5kvl2ttr8m8f43vamudsqrdvs8qqvfwpj', + address: contractAddress, id: '2', error: 'codespace: wasm, code: 5', // execute wasm contract failer }), expect.objectContaining({ - address: - 'neutron1nxshmmwrvxa2cp80nwvf03t8u5kvl2ttr8m8f43vamudsqrdvs8qqvfwpj', + address: contractAddress, id: '3', error: 'codespace: contractmanager, code: 1103', // contractmanager sudo limit exceeded }), expect.objectContaining({ - address: - 'neutron1nxshmmwrvxa2cp80nwvf03t8u5kvl2ttr8m8f43vamudsqrdvs8qqvfwpj', + address: contractAddress, id: '4', error: 'codespace: wasm, code: 5', // execute wasm contract failer }), expect.objectContaining({ - address: - 'neutron1nxshmmwrvxa2cp80nwvf03t8u5kvl2ttr8m8f43vamudsqrdvs8qqvfwpj', + address: contractAddress, id: '5', error: 'codespace: contractmanager, code: 1103', // contractmanager sudo limit exceeded }), diff --git a/src/testcases/run_in_band/parameters.test.ts b/src/testcases/run_in_band/parameters.test.ts index 72e1ced6..2981f19f 100644 --- a/src/testcases/run_in_band/parameters.test.ts +++ b/src/testcases/run_in_band/parameters.test.ts @@ -1,19 +1,27 @@ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { getWithAttempts } from '../../helpers/wait'; -import { Dao, DaoMember, getDaoContracts } from '../../helpers/dao'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getWithAttempts } from '@neutron-org/neutronjsplus/dist/wait'; +import { + Dao, + DaoMember, + getDaoContracts, +} from '@neutron-org/neutronjsplus/dist/dao'; import { updateContractmanagerParamsProposal, updateCronParamsProposal, updateFeeburnerParamsProposal, + updateFeerefunderParamsProposal, updateInterchainqueriesParamsProposal, updateInterchaintxsParamsProposal, updateTokenfacoryParamsProposal, -} from '../../helpers/proposal'; +} from '@neutron-org/neutronjsplus/dist/proposal'; + +const config = require('../../config.json'); describe('Neutron / Parameters', () => { let testState: TestStateLocalCosmosTestNet; @@ -23,7 +31,7 @@ describe('Neutron / Parameters', () => { let dao: Dao; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -42,12 +50,12 @@ describe('Neutron / Parameters', () => { describe('prepare: bond funds', () => { test('bond form wallet 1', async () => { - await daoMember1.bondFunds('1000'); + await daoMember1.bondFunds('10000'); await getWithAttempts( neutronChain.blockWaiter, async () => await dao.queryVotingPower(daoMember1.user.wallet.address.toString()), - async (response) => response.power == 1000, + async (response) => response.power == 10000, 20, ); }); @@ -55,7 +63,7 @@ describe('Neutron / Parameters', () => { await getWithAttempts( neutronChain.blockWaiter, async () => await dao.queryTotalVotingPower(), - async (response) => response.power == 1000, + async (response) => response.power == 11000, 20, ); }); @@ -199,6 +207,13 @@ describe('Neutron / Parameters', () => { await daoMember1.submitUpdateParamsFeerefunderProposal( 'Proposal #4', 'Feerefunder update params proposal', + updateFeerefunderParamsProposal({ + min_fee: { + recv_fee: [], + ack_fee: [], + timeout_fee: [], + }, + }), '1000', ); }); @@ -283,7 +298,7 @@ describe('Neutron / Parameters', () => { describe('Contractanager params proposal', () => { test('create proposal', async () => { - await daoMember1.submitUpdateParamsContractmanageProposal( + await daoMember1.submitUpdateParamsContractmanagerProposal( 'Proposal #6', 'Contractanager params proposal', updateContractmanagerParamsProposal({ diff --git a/src/testcases/run_in_band/reserve.test.ts b/src/testcases/run_in_band/reserve.test.ts index 308ba8ca..43e8f88a 100644 --- a/src/testcases/run_in_band/reserve.test.ts +++ b/src/testcases/run_in_band/reserve.test.ts @@ -1,14 +1,15 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ -import { AccAddress, ValAddress } from '@cosmos-client/core/cjs/types'; -import { InlineResponse20071TxResponseEvents } from '@cosmos-client/ibc/cjs/openapi/api'; +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { Wallet } from '../../types'; -import { NeutronContract } from '../../helpers/types'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { InlineResponse20071TxResponseEvents } from '@cosmos-client/ibc/cjs/openapi/api'; +import { NeutronContract, Wallet } from '@neutron-org/neutronjsplus/dist/types'; +import cosmosclient from '@cosmos-client/core'; + +const config = require('../../config.json'); interface ReserveStats { readonly total_distributed: string; @@ -25,12 +26,12 @@ describe('Neutron / Treasury', () => { let securityDaoWallet: Wallet; let holder1Wallet: Wallet; let holder2Wallet: Wallet; - let mainDaoAddr: AccAddress | ValAddress; - let securityDaoAddr: AccAddress | ValAddress; - let holder1Addr: AccAddress | ValAddress; - let holder2Addr: AccAddress | ValAddress; + let mainDaoAddr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let securityDaoAddr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let holder1Addr: cosmosclient.AccAddress | cosmosclient.ValAddress; + let holder2Addr: cosmosclient.AccAddress | cosmosclient.ValAddress; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, @@ -261,6 +262,8 @@ describe('Neutron / Treasury', () => { reserve, ); const burnedCoinsBefore = await getBurnedCoinsAmount(neutronChain); + expect(burnedCoinsBefore).not.toBeNull(); + await neutronAccount1.simulateFeeBurning(20_000_000); await neutronAccount1.msgSend(reserve, '1000000000'); @@ -274,6 +277,7 @@ describe('Neutron / Treasury', () => { await neutronChain.blockWaiter.waitBlocks(1); const burnedCoinsAfter = await getBurnedCoinsAmount(neutronChain); + expect(burnedCoinsAfter).not.toBeNull(); const stats = await neutronChain.queryContract(reserve, { stats: {}, @@ -283,8 +287,8 @@ describe('Neutron / Treasury', () => { total_distributed: '42014', total_reserved: `${158053 + parseInt(reserveStats.total_reserved)}`, total_processed_burned_coins: `${ - parseInt(burnedCoinsAfter!) - - parseInt(burnedCoinsBefore!) + + parseInt(burnedCoinsAfter || '0') - + parseInt(burnedCoinsBefore || '0') + parseInt(reserveStats.total_processed_burned_coins) }`, }), @@ -313,7 +317,7 @@ describe('Neutron / Treasury', () => { }); test('claim pending', async () => { const balanceBefore = await neutronChain.queryDenomBalance( - holder1Addr, + holder1Addr.toString(), NEUTRON_DENOM, ); const res = await neutronAccount2.executeContract( @@ -337,7 +341,7 @@ describe('Neutron / Treasury', () => { ]); const balanceAfter = await neutronChain.queryDenomBalance( - holder1Addr, + holder1Addr.toString(), NEUTRON_DENOM, ); expect(balanceAfter - balanceBefore).toEqual(4005); @@ -418,7 +422,8 @@ describe('Neutron / Treasury', () => { }); test('distribution', async () => { - await neutronAccount1.testExecControl( + await testExecControl( + neutronAccount1, dsc, async () => { const res = await neutronAccount1.executeContract( @@ -448,7 +453,8 @@ describe('Neutron / Treasury', () => { test('reserve', async () => { await neutronAccount1.msgSend(reserve, '10000000'); - await neutronAccount1.testExecControl( + await testExecControl( + neutronAccount1, reserve, async () => { const res = await neutronAccount1.executeContract( @@ -520,9 +526,10 @@ const normalizeReserveBurnedCoins = async ( }); const burnedCoins = await getBurnedCoinsAmount(cm.chain); + expect(burnedCoins).not.toBeNull(); normalize = parseInt(reserveStats.total_processed_burned_coins) + 7500 !== - parseInt(burnedCoins!); + parseInt(burnedCoins || '0'); } return reserveStats; @@ -565,3 +572,83 @@ const setupReserve = async ( ) )[0]._contract_address; }; + +/** + * Tests a pausable contract execution control. + * @param testingContract is the contract the method tests; + * @param execAction is an executable action to be called during a pause and after unpausing + * as the main part of the test. Should return the execution response code; + * @param actionCheck is called after unpausing to make sure the executable action worked. + */ +async function testExecControl( + account: WalletWrapper, + testingContract: string, + execAction: () => Promise, + actionCheck: () => Promise, +) { + // check contract's pause info before pausing + let pauseInfo = await account.chain.queryPausedInfo(testingContract); + expect(pauseInfo).toEqual({ unpaused: {} }); + expect(pauseInfo.paused).toEqual(undefined); + + // pause contract + let res = await account.executeContract( + testingContract, + JSON.stringify({ + pause: { + duration: 50, + }, + }), + ); + expect(res.code).toEqual(0); + + // check contract's pause info after pausing + pauseInfo = await account.chain.queryPausedInfo(testingContract); + expect(pauseInfo.unpaused).toEqual(undefined); + expect(pauseInfo.paused.until_height).toBeGreaterThan(0); + + // execute msgs on paused contract + await expect(execAction()).rejects.toThrow(/Contract execution is paused/); + + // unpause contract + res = await account.executeContract( + testingContract, + JSON.stringify({ + unpause: {}, + }), + ); + expect(res.code).toEqual(0); + + // check contract's pause info after unpausing + pauseInfo = await account.chain.queryPausedInfo(testingContract); + expect(pauseInfo).toEqual({ unpaused: {} }); + expect(pauseInfo.paused).toEqual(undefined); + + // execute msgs on unpaused contract + const code = await execAction(); + expect(code).toEqual(0); + await actionCheck(); + + // pause contract again for a short period + const shortPauseDuration = 5; + res = await account.executeContract( + testingContract, + JSON.stringify({ + pause: { + duration: shortPauseDuration, + }, + }), + ); + expect(res.code).toEqual(0); + + // check contract's pause info after pausing + pauseInfo = await account.chain.queryPausedInfo(testingContract); + expect(pauseInfo.unpaused).toEqual(undefined); + expect(pauseInfo.paused.until_height).toBeGreaterThan(0); + + // wait and check contract's pause info after unpausing + await account.chain.blockWaiter.waitBlocks(shortPauseDuration); + pauseInfo = await account.chain.queryPausedInfo(testingContract); + expect(pauseInfo).toEqual({ unpaused: {} }); + expect(pauseInfo.paused).toEqual(undefined); +} diff --git a/src/testcases/run_in_band/tge.airdrop.test.ts b/src/testcases/run_in_band/tge.airdrop.test.ts index 7d15a9d8..44a2318b 100644 --- a/src/testcases/run_in_band/tge.airdrop.test.ts +++ b/src/testcases/run_in_band/tge.airdrop.test.ts @@ -1,12 +1,14 @@ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { NeutronContract } from '../../helpers/types'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { Airdrop, getTimestamp } from '../../helpers/tge'; -import { CodeId } from '../../types'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { CodeId, NeutronContract } from '@neutron-org/neutronjsplus/dist/types'; +import { Airdrop, getTimestamp } from '@neutron-org/neutronjsplus/dist/tge'; + +const config = require('../../config.json'); const waitTill = (timestamp: number): Promise => new Promise((resolve) => { @@ -29,7 +31,7 @@ describe('Neutron / TGE / Airdrop', () => { let reserveAddress: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); reserveAddress = testState.wallets.qaNeutronThree.genQaWal1.address.toString(); diff --git a/src/testcases/run_in_band/tge.auction.test.ts b/src/testcases/run_in_band/tge.auction.test.ts index 1748711f..e52ed2cb 100644 --- a/src/testcases/run_in_band/tge.auction.test.ts +++ b/src/testcases/run_in_band/tge.auction.test.ts @@ -1,14 +1,10 @@ -/* eslint-disable @typescript-eslint/no-non-null-assertion */ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, - IBC_ATOM_DENOM, - IBC_USDC_DENOM, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { Asset, TotalPowerAtHeightResponse } from '../../helpers/types'; -import { getHeight } from '../../helpers/wait'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; import { executeAuctionSetTokenInfo, executeCreditsVaultUpdateConfig, @@ -17,13 +13,26 @@ import { executeVestingLpSetVestingToken, executeVestingLpVaultUpdateConfig, getTimestamp, + LockdropLockUpInfoResponse, queryCreditsVaultConfig, queryLockdropVaultConfig, queryVestingLpVaultConfig, Tge, VestingAccountResponse, -} from '../../helpers/tge'; -import { Dao, DaoMember, getDaoContracts } from '../../helpers/dao'; +} from '@neutron-org/neutronjsplus/dist/tge'; +import { + Dao, + DaoMember, + getDaoContracts, +} from '@neutron-org/neutronjsplus/dist/dao'; +import { + Asset, + TotalPowerAtHeightResponse, +} from '@neutron-org/neutronjsplus/dist/types'; +import { IBC_ATOM_DENOM, IBC_USDC_DENOM } from '@neutron-org/neutronjsplus'; +import { getHeight } from '@neutron-org/neutronjsplus/dist/env'; + +const config = require('../../config.json'); const MIN_LIQUDITY = 1000; const ATOM_DEPOSIT_AMOUNT = 10000; @@ -126,7 +135,7 @@ const waitTill = (timestamp: number): Promise => { describe('Neutron / TGE / Auction', () => { let testState: TestStateLocalCosmosTestNet; - let tge: Tge; + let tgeMain: Tge; let neutronChain: CosmosWrapper; let cmInstantiator: WalletWrapper; let cmTokenManager: WalletWrapper; @@ -143,10 +152,10 @@ describe('Neutron / TGE / Auction', () => { let usdcLpLocked = 0; let tgeEndHeight = 0; let daoMember1: DaoMember; - let dao: Dao; + let daoMain: Dao; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); reserveAddress = testState.wallets.qaNeutronThree.genQaWal1.address.toString(); @@ -170,10 +179,10 @@ describe('Neutron / TGE / Auction', () => { ); const daoCoreAddress = (await neutronChain.getChainAdmins())[0]; const daoContracts = await getDaoContracts(neutronChain, daoCoreAddress); - dao = new Dao(neutronChain, daoContracts); - daoMember1 = new DaoMember(cmInstantiator, dao); - await daoMember1.bondFunds('1000'); - tge = new Tge( + daoMain = new Dao(neutronChain, daoContracts); + daoMember1 = new DaoMember(cmInstantiator, daoMain); + await daoMember1.bondFunds('10000'); + tgeMain = new Tge( neutronChain, cmInstantiator, cmTokenManager, @@ -223,7 +232,7 @@ describe('Neutron / TGE / Auction', () => { describe('Deploy', () => { it('should deploy contracts for auction', async () => { - tge.airdropAccounts = [ + tgeMain.airdropAccounts = [ { address: tgeWallets['airdropAuctionLockdrop'].wallet.address.toString(), @@ -246,50 +255,50 @@ describe('Neutron / TGE / Auction', () => { amount: '1000000', }, ]; - tge.times.airdropStart = getTimestamp(0); - tge.times.airdropVestingStart = getTimestamp(300); - await tge.deployPreAuction(); + tgeMain.times.airdropStart = getTimestamp(0); + tgeMain.times.airdropVestingStart = getTimestamp(300); + await tgeMain.deployPreAuction(); }); it('should not be able to set token info by stranger', async () => { await expect( executeVestingLpSetVestingToken( cmStranger, - tge.contracts.vestingAtomLp, - tge.pairs.usdc_ntrn.liquidity, + tgeMain.contracts.vestingAtomLp, + tgeMain.pairs.usdc_ntrn.liquidity, ), ).rejects.toThrowError(/Unauthorized/); }); it('should deploy auction', async () => { - tge.times.auctionInit = getTimestamp(80); - await tge.deployAuction(); + tgeMain.times.auctionInit = getTimestamp(80); + await tgeMain.deployAuction(); }); it('should not be able to set denoms by stranger', async () => { await expect( executeAuctionSetTokenInfo( cmStranger, - tge.contracts.auction, + tgeMain.contracts.auction, IBC_ATOM_DENOM, IBC_USDC_DENOM, ), ).rejects.toThrowError(/Only owner and denom_manager can update denoms/); }); it('should deploy lockdrop and lockdrop vault', async () => { - tge.times.lockdropInit = - tge.times.auctionInit + - tge.times.auctionDepositWindow + - tge.times.auctionWithdrawalWindow + + tgeMain.times.lockdropInit = + tgeMain.times.auctionInit + + tgeMain.times.auctionDepositWindow + + tgeMain.times.auctionWithdrawalWindow + 5; - await tge.deployLockdrop(); - await tge.deployLockdropVault(); + await tgeMain.deployLockdrop(); + await tgeMain.deployLockdropVault(); }); it('should not be able to set token info by stranger', async () => { await expect( executeLockdropSetTokenInfo( cmStranger, - tge.contracts.lockdrop, - tge.pairs.atom_ntrn.liquidity, - tge.pairs.usdc_ntrn.liquidity, - tge.contracts.astroGenerator, + tgeMain.contracts.lockdrop, + tgeMain.pairs.atom_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, + tgeMain.contracts.astroGenerator, ), ).rejects.toThrowError(/Unauthorized/); }); @@ -305,10 +314,10 @@ describe('Neutron / TGE / Auction', () => { ]) { const address = tgeWallets[v].wallet.address.toString(); const amount = - tge.airdropAccounts.find( + tgeMain.airdropAccounts.find( ({ address }) => address == tgeWallets[v].wallet.address.toString(), )?.amount || '0'; - const proofs = tge.airdrop.getMerkleProof({ + const proofs = tgeMain.airdrop.getMerkleProof({ address: address, amount: amount, }); @@ -320,7 +329,7 @@ describe('Neutron / TGE / Auction', () => { }, }; const res = await tgeWallets[v].executeContract( - tge.contracts.airdrop, + tgeMain.contracts.airdrop, JSON.stringify(payload), ); expect(res.code).toEqual(0); @@ -333,7 +342,7 @@ describe('Neutron / TGE / Auction', () => { it('should not allow deposit before init', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ deposit: {}, }), @@ -347,13 +356,13 @@ describe('Neutron / TGE / Auction', () => { ).rejects.toThrow(/Deposit window closed/); }); it('should allow deposit ATOM', async () => { - await waitTill(tge.times.auctionInit + 3); + await waitTill(tgeMain.times.auctionInit + 3); const atomBalanceBefore = await neutronChain.queryDenomBalance( cmInstantiator.wallet.address.toString(), IBC_ATOM_DENOM, ); const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ deposit: {}, }), @@ -366,7 +375,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); const info = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -392,7 +401,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ deposit: {}, }), @@ -413,7 +422,7 @@ describe('Neutron / TGE / Auction', () => { IBC_USDC_DENOM, ); const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ deposit: {}, }), @@ -426,7 +435,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); const info = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -452,7 +461,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ deposit: {}, }), @@ -477,7 +486,7 @@ describe('Neutron / TGE / Auction', () => { IBC_USDC_DENOM, ); const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw: { amount_usdc: '5000', @@ -487,7 +496,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); const info = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -518,7 +527,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw: { amount_usdc: (USDC_DEPOSIT_AMOUNT / 2).toString(), @@ -535,11 +544,11 @@ describe('Neutron / TGE / Auction', () => { describe('Phase 2', () => { it('should not allow deposit when deposit window is closed', async () => { await waitTill( - tge.times.auctionInit + tge.times.auctionDepositWindow + 5, + tgeMain.times.auctionInit + tgeMain.times.auctionDepositWindow + 5, ); await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ deposit: {}, }), @@ -555,7 +564,7 @@ describe('Neutron / TGE / Auction', () => { it('should not be able to withdraw mode than 50% of current deposit', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw: { amount_usdc: '5000', @@ -577,7 +586,7 @@ describe('Neutron / TGE / Auction', () => { IBC_USDC_DENOM, ); const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw: { amount_usdc: '1000', @@ -589,7 +598,7 @@ describe('Neutron / TGE / Auction', () => { atomBalance -= 1000; usdcBalance -= 1000; const info = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -613,7 +622,7 @@ describe('Neutron / TGE / Auction', () => { it('should not allow to withdraw more than once', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw: { amount_usdc: '1000', @@ -628,7 +637,7 @@ describe('Neutron / TGE / Auction', () => { describe('intentivizing lockdrop', () => { it('should incentivize lockdrop', async () => { const res = await cmInstantiator.executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ increase_ntrn_incentives: {}, }), @@ -644,7 +653,7 @@ describe('Neutron / TGE / Auction', () => { }); describe('set_pool_size', () => { it('transfer some ATOM directly to auction contract to try affect pool', async () => { - await cmInstantiator.msgSend(tge.contracts.auction, { + await cmInstantiator.msgSend(tgeMain.contracts.auction, { amount: '100000000', denom: IBC_ATOM_DENOM, }); @@ -652,7 +661,7 @@ describe('Neutron / TGE / Auction', () => { it('should not be able to set pool size before withdrawal_window is closed', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ set_pool_size: {}, }), @@ -661,14 +670,14 @@ describe('Neutron / TGE / Auction', () => { }); it('should not be able to set pool size bc of wrong price feed data', async () => { await waitTill( - tge.times.auctionInit + - tge.times.auctionDepositWindow + - tge.times.auctionWithdrawalWindow + + tgeMain.times.auctionInit + + tgeMain.times.auctionDepositWindow + + tgeMain.times.auctionWithdrawalWindow + 5, ); await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ set_pool_size: {}, }), @@ -678,7 +687,7 @@ describe('Neutron / TGE / Auction', () => { it('should not be able to set pool size (no NTRN)', async () => { const time = (Date.now() / 1000) | 0; const r1 = await cmInstantiator.executeContract( - tge.contracts.priceFeed, + tgeMain.contracts.priceFeed, JSON.stringify({ set_rate: { symbol: 'ATOM', @@ -692,7 +701,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(r1.code).toEqual(0); const r2 = await cmInstantiator.executeContract( - tge.contracts.priceFeed, + tgeMain.contracts.priceFeed, JSON.stringify({ set_rate: { symbol: 'USDT', @@ -707,7 +716,7 @@ describe('Neutron / TGE / Auction', () => { expect(r2.code).toEqual(0); await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ set_pool_size: {}, }), @@ -715,12 +724,12 @@ describe('Neutron / TGE / Auction', () => { ).rejects.toThrow(/Not enough NTRN in the contract/); }); it('should not be able to set pool size when price feed data is set but too old', async () => { - await cmInstantiator.msgSend(tge.contracts.auction, { + await cmInstantiator.msgSend(tgeMain.contracts.auction, { amount: NTRN_AMOUNT.toString(), }); const time = (Date.now() / 1000 - 10000) | 0; const r1 = await cmInstantiator.executeContract( - tge.contracts.priceFeed, + tgeMain.contracts.priceFeed, JSON.stringify({ set_rate: { symbol: 'ATOM', @@ -734,7 +743,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(r1.code).toEqual(0); const r2 = await cmInstantiator.executeContract( - tge.contracts.priceFeed, + tgeMain.contracts.priceFeed, JSON.stringify({ set_rate: { symbol: 'USDT', @@ -750,7 +759,7 @@ describe('Neutron / TGE / Auction', () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ set_pool_size: {}, }), @@ -760,7 +769,7 @@ describe('Neutron / TGE / Auction', () => { it('should be able to set pool size', async () => { const time = (Date.now() / 1000) | 0; const r1 = await cmTokenManager.executeContract( - tge.contracts.priceFeed, + tgeMain.contracts.priceFeed, JSON.stringify({ set_rate: { symbol: 'ATOM', @@ -774,7 +783,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(r1.code).toEqual(0); const r2 = await cmTokenManager.executeContract( - tge.contracts.priceFeed, + tgeMain.contracts.priceFeed, JSON.stringify({ set_rate: { symbol: 'USDT', @@ -789,14 +798,14 @@ describe('Neutron / TGE / Auction', () => { expect(r2.code).toEqual(0); const res = await cmTokenManager.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ set_pool_size: {}, }), ); expect(res.code).toEqual(0); const state = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { state: {}, }, @@ -830,7 +839,7 @@ describe('Neutron / TGE / Auction', () => { it('should not be able to set pool size twice', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ set_pool_size: {}, }), @@ -841,7 +850,7 @@ describe('Neutron / TGE / Auction', () => { describe('lock_lp', () => { it('should be able to lock ATOM LP tokens', async () => { const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: '77', @@ -851,7 +860,7 @@ describe('Neutron / TGE / Auction', () => { }), ); const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -862,7 +871,7 @@ describe('Neutron / TGE / Auction', () => { expect(parseInt(userInfo.atom_lp_locked)).toEqual(77); atomLpLocked += 77; const info = await neutronChain.queryContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -882,7 +891,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: tgeWallets[v].wallet.address.toString(), @@ -890,7 +899,7 @@ describe('Neutron / TGE / Auction', () => { }, ); const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: userInfo.atom_lp_amount, @@ -905,7 +914,7 @@ describe('Neutron / TGE / Auction', () => { }); it('should be able to lock USDC LP tokens', async () => { const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: '50', @@ -915,7 +924,7 @@ describe('Neutron / TGE / Auction', () => { }), ); const res2 = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: '50', @@ -925,7 +934,7 @@ describe('Neutron / TGE / Auction', () => { }), ); const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -937,7 +946,7 @@ describe('Neutron / TGE / Auction', () => { usdcLpLocked += 100; expect(parseInt(userInfo.usdc_lp_locked)).toEqual(100); const info = await neutronChain.queryContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -961,7 +970,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: tgeWallets[v].wallet.address.toString(), @@ -969,7 +978,7 @@ describe('Neutron / TGE / Auction', () => { }, ); const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: userInfo.usdc_lp_amount, @@ -984,7 +993,7 @@ describe('Neutron / TGE / Auction', () => { }); it('should not be able to lock ATOM LP tokens more than have', async () => { const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -993,7 +1002,7 @@ describe('Neutron / TGE / Auction', () => { ); await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: userInfo.atom_lp_amount, @@ -1006,7 +1015,7 @@ describe('Neutron / TGE / Auction', () => { }); it('should not be able to lock USDC LP tokens more than have', async () => { const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -1015,7 +1024,7 @@ describe('Neutron / TGE / Auction', () => { ); await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: userInfo.usdc_lp_amount, @@ -1028,7 +1037,7 @@ describe('Neutron / TGE / Auction', () => { }); it('should be able to withdraw ATOM LP tokens', async () => { const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw_lp: { asset: 'ATOM', @@ -1039,7 +1048,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); const info = await neutronChain.queryContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -1052,7 +1061,7 @@ describe('Neutron / TGE / Auction', () => { pool_type: 'ATOM', }); const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -1067,7 +1076,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: tgeWallets[v].wallet.address.toString(), @@ -1075,7 +1084,7 @@ describe('Neutron / TGE / Auction', () => { }, ); const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw_lp: { amount: Math.round( @@ -1092,7 +1101,7 @@ describe('Neutron / TGE / Auction', () => { }); it('should be able to withdraw USDC LP tokens', async () => { let res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw_lp: { asset: 'USDC', @@ -1103,7 +1112,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw_lp: { asset: 'USDC', @@ -1115,7 +1124,7 @@ describe('Neutron / TGE / Auction', () => { expect(res.code).toEqual(0); usdcLpLocked -= 10; const info = await neutronChain.queryContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, { user_info: { address: cmInstantiator.wallet.address.toString(), @@ -1139,7 +1148,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { const userInfo = await neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { user_info: { address: tgeWallets[v].wallet.address.toString(), @@ -1147,7 +1156,7 @@ describe('Neutron / TGE / Auction', () => { }, ); const res2 = await tgeWallets[v].executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ withdraw_lp: { amount: Math.round( @@ -1164,11 +1173,13 @@ describe('Neutron / TGE / Auction', () => { }); it('should not be able to lock tokens when time is up', async () => { await waitTill( - tge.times.lockdropInit + tge.times.lockdropDepositDuration + 5, + tgeMain.times.lockdropInit + + tgeMain.times.lockdropDepositDuration + + 5, ); await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ lock_lp: { amount: '100', @@ -1182,11 +1193,11 @@ describe('Neutron / TGE / Auction', () => { }); it('should set generator to lockdrop', async () => { const res = await cmInstantiator.executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ update_config: { new_config: { - generator_address: tge.contracts.astroGenerator, + generator_address: tgeMain.contracts.astroGenerator, }, }, }), @@ -1197,13 +1208,13 @@ describe('Neutron / TGE / Auction', () => { describe('Init pool', () => { it('should init pool', async () => { await waitTill( - tge.times.lockdropInit + - tge.times.lockdropDepositDuration + - tge.times.lockdropWithdrawalDuration + + tgeMain.times.lockdropInit + + tgeMain.times.lockdropDepositDuration + + tgeMain.times.lockdropWithdrawalDuration + 5, ); const res = await cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ init_pool: {}, }), @@ -1223,25 +1234,25 @@ describe('Neutron / TGE / Auction', () => { generatorLPBalanceUsdcNtrn, ] = await Promise.all([ neutronChain.queryContract( - tge.contracts.auction, + tgeMain.contracts.auction, { state: {}, }, ), neutronChain.queryContract( - tge.pairs.atom_ntrn.contract, + tgeMain.pairs.atom_ntrn.contract, { pool: {}, }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.contract, + tgeMain.pairs.usdc_ntrn.contract, { pool: {}, }, ), neutronChain.queryContract( - tge.pairs.atom_ntrn.liquidity, + tgeMain.pairs.atom_ntrn.liquidity, { balance: { address: reserveAddress, @@ -1249,7 +1260,7 @@ describe('Neutron / TGE / Auction', () => { }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, { balance: { address: reserveAddress, @@ -1257,50 +1268,50 @@ describe('Neutron / TGE / Auction', () => { }, ), neutronChain.queryContract( - tge.pairs.atom_ntrn.liquidity, + tgeMain.pairs.atom_ntrn.liquidity, { balance: { - address: tge.contracts.auction, + address: tgeMain.contracts.auction, }, }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, { balance: { - address: tge.contracts.auction, + address: tgeMain.contracts.auction, }, }, ), neutronChain.queryContract( - tge.pairs.atom_ntrn.liquidity, + tgeMain.pairs.atom_ntrn.liquidity, { balance: { - address: tge.contracts.lockdrop, + address: tgeMain.contracts.lockdrop, }, }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, { balance: { - address: tge.contracts.lockdrop, + address: tgeMain.contracts.lockdrop, }, }, ), neutronChain.queryContract( - tge.pairs.atom_ntrn.liquidity, + tgeMain.pairs.atom_ntrn.liquidity, { balance: { - address: tge.contracts.astroGenerator, + address: tgeMain.contracts.astroGenerator, }, }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, { balance: { - address: tge.contracts.astroGenerator, + address: tgeMain.contracts.astroGenerator, }, }, ), @@ -1382,7 +1393,7 @@ describe('Neutron / TGE / Auction', () => { it('update oracles', async () => { tgeEndHeight = await getHeight(neutronChain.sdk); let res = await cmInstantiator.executeContract( - tge.contracts.oracleAtom, + tgeMain.contracts.oracleAtom, JSON.stringify({ update: {}, }), @@ -1390,7 +1401,7 @@ describe('Neutron / TGE / Auction', () => { expect(res.code).toEqual(0); res = await cmInstantiator.executeContract( - tge.contracts.oracleUsdc, + tgeMain.contracts.oracleUsdc, JSON.stringify({ update: {}, }), @@ -1399,14 +1410,14 @@ describe('Neutron / TGE / Auction', () => { testState.blockWaiter1.waitBlocks(3); res = await cmInstantiator.executeContract( - tge.contracts.oracleAtom, + tgeMain.contracts.oracleAtom, JSON.stringify({ update: {}, }), ); expect(res.code).toEqual(0); res = await cmInstantiator.executeContract( - tge.contracts.oracleUsdc, + tgeMain.contracts.oracleUsdc, JSON.stringify({ update: {}, }), @@ -1416,7 +1427,7 @@ describe('Neutron / TGE / Auction', () => { it('should not be able to init pool twice', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ init_pool: {}, }), @@ -1429,25 +1440,25 @@ describe('Neutron / TGE / Auction', () => { let claimUsdcLP: number; it('should vest LP (permissionless)', async () => { let res = await cmStranger.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ migrate_to_vesting: {}, }), ); expect(res.code).toEqual(0); res = await tgeWallets.airdropOnly.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ migrate_to_vesting: {}, }), ); expect(res.code).toEqual(0); - tge.times.vestTimestamp = Date.now(); + tgeMain.times.vestTimestamp = Date.now(); }); it('should not vest LP all 7 users have been migrated', async () => { await expect( cmInstantiator.executeContract( - tge.contracts.auction, + tgeMain.contracts.auction, JSON.stringify({ migrate_to_vesting: {}, }), @@ -1462,7 +1473,7 @@ describe('Neutron / TGE / Auction', () => { lpAuctionBalanceUsdc, ] = await Promise.all([ neutronChain.queryContract( - tge.contracts.vestingAtomLp, + tgeMain.contracts.vestingAtomLp, { vesting_account: { address: cmInstantiator.wallet.address.toString(), @@ -1470,7 +1481,7 @@ describe('Neutron / TGE / Auction', () => { }, ), neutronChain.queryContract( - tge.contracts.vestingUsdcLp, + tgeMain.contracts.vestingUsdcLp, { vesting_account: { address: cmInstantiator.wallet.address.toString(), @@ -1478,18 +1489,18 @@ describe('Neutron / TGE / Auction', () => { }, ), neutronChain.queryContract( - tge.pairs.atom_ntrn.liquidity, + tgeMain.pairs.atom_ntrn.liquidity, { balance: { - address: tge.contracts.auction, + address: tgeMain.contracts.auction, }, }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, { balance: { - address: tge.contracts.auction, + address: tgeMain.contracts.auction, }, }, ), @@ -1522,17 +1533,17 @@ describe('Neutron / TGE / Auction', () => { }); it('should be able to claim lpATOM_NTRN vesting after vesting period', async () => { await waitTill( - tge.times.vestTimestamp / 1000 + - tge.times.auctionVestingLpDuration + + tgeMain.times.vestTimestamp / 1000 + + tgeMain.times.auctionVestingLpDuration + 10, ); const [avaliableAtomLp, avaliableUsdcLp] = await Promise.all([ - neutronChain.queryContract(tge.contracts.vestingAtomLp, { + neutronChain.queryContract(tgeMain.contracts.vestingAtomLp, { available_amount: { address: cmInstantiator.wallet.address.toString(), }, }), - neutronChain.queryContract(tge.contracts.vestingUsdcLp, { + neutronChain.queryContract(tgeMain.contracts.vestingUsdcLp, { available_amount: { address: cmInstantiator.wallet.address.toString(), }, @@ -1541,14 +1552,14 @@ describe('Neutron / TGE / Auction', () => { expect(avaliableAtomLp).toEqual(claimAtomLP.toString()); expect(avaliableUsdcLp).toEqual(claimUsdcLP.toString()); const resAtom = await cmInstantiator.executeContract( - tge.contracts.vestingAtomLp, + tgeMain.contracts.vestingAtomLp, JSON.stringify({ claim: {}, }), ); expect(resAtom.code).toEqual(0); const resUsdc = await cmInstantiator.executeContract( - tge.contracts.vestingUsdcLp, + tgeMain.contracts.vestingUsdcLp, JSON.stringify({ claim: {}, }), @@ -1557,7 +1568,7 @@ describe('Neutron / TGE / Auction', () => { const [lpBalanceAtom, lpBalanceUsdc] = await Promise.all([ neutronChain.queryContract( - tge.pairs.atom_ntrn.liquidity, + tgeMain.pairs.atom_ntrn.liquidity, { balance: { address: cmInstantiator.wallet.address.toString(), @@ -1565,7 +1576,7 @@ describe('Neutron / TGE / Auction', () => { }, ), neutronChain.queryContract( - tge.pairs.usdc_ntrn.liquidity, + tgeMain.pairs.usdc_ntrn.liquidity, { balance: { address: cmInstantiator.wallet.address.toString(), @@ -1581,7 +1592,7 @@ describe('Neutron / TGE / Auction', () => { describe('basic checks', () => { it('oracle works', async () => { const rateNtrnAtom = await neutronChain.queryContract( - tge.contracts.oracleAtom, + tgeMain.contracts.oracleAtom, { t_w_a_p_at_height: { token: { native_token: { denom: NEUTRON_DENOM } }, @@ -1590,7 +1601,7 @@ describe('Neutron / TGE / Auction', () => { }, ); const rateAtomNtrn = await neutronChain.queryContract( - tge.contracts.oracleAtom, + tgeMain.contracts.oracleAtom, { t_w_a_p_at_height: { token: { native_token: { denom: IBC_ATOM_DENOM } }, @@ -1605,7 +1616,7 @@ describe('Neutron / TGE / Auction', () => { ), ).toBeLessThan(0.03); const rateNtrnUsdc = await neutronChain.queryContract( - tge.contracts.oracleUsdc, + tgeMain.contracts.oracleUsdc, { t_w_a_p_at_height: { token: { native_token: { denom: NEUTRON_DENOM } }, @@ -1614,7 +1625,7 @@ describe('Neutron / TGE / Auction', () => { }, ); const rateUsdcNtrn = await neutronChain.queryContract( - tge.contracts.oracleUsdc, + tgeMain.contracts.oracleUsdc, { t_w_a_p_at_height: { token: { native_token: { denom: IBC_USDC_DENOM } }, @@ -1641,14 +1652,14 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdrop', 'auctionLockdropVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); expect((await member.queryVotingPower()).power | 0).toBe(0); } }); it('add lockdrop vault to the registry', async () => { - let tvp = await dao.queryTotalVotingPower(); - expect(tvp.power | 0).toBe(2000); + let tvp = await daoMain.queryTotalVotingPower(); + expect(tvp.power | 0).toBe(11000); // the bonded 10000 + 1000 from investors vault (see neutron/network/init-neutrond.sh) const propID = await daoMember1.submitSingleChoiceProposal( 'Proposal #1', 'add LOCKDROP_VAULT', @@ -1656,9 +1667,9 @@ describe('Neutron / TGE / Auction', () => { { wasm: { execute: { - contract_addr: dao.contracts.voting.address, + contract_addr: daoMain.contracts.voting.address, msg: Buffer.from( - `{"add_voting_vault": {"new_voting_vault_contract":"${tge.contracts.lockdropVault}"}}`, + `{"add_voting_vault": {"new_voting_vault_contract":"${tgeMain.contracts.lockdropVault}"}}`, ).toString('base64'), funds: [], }, @@ -1669,9 +1680,9 @@ describe('Neutron / TGE / Auction', () => { ); await daoMember1.voteYes(propID); await daoMember1.executeProposal(propID); - await neutronChain.blockWaiter.waitBlocks(2); - tvp = await dao.queryTotalVotingPower(); - expect(tvp.power | 0).toBeGreaterThan(2000); + await neutronChain.blockWaiter.waitBlocks(2); // wait for a couple of blocks so the vault becomes active + tvp = await daoMain.queryTotalVotingPower(); + expect(tvp.power | 0).toBeGreaterThan(11000); // lockdrop participants get voting power for (const v of [ 'airdropAuctionLockdrop', @@ -1679,7 +1690,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdrop', 'auctionLockdropVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); expect((await member.queryVotingPower()).power | 0).toBeGreaterThan( 0, ); @@ -1689,13 +1700,13 @@ describe('Neutron / TGE / Auction', () => { 'airdropAuctionVesting', 'auctionVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); expect((await member.queryVotingPower()).power | 0).toBe(0); } }); it('add vesting vault to the registry', async () => { - const tvp = await dao.queryTotalVotingPower(); + const tvp = await daoMain.queryTotalVotingPower(); const propID = await daoMember1.submitSingleChoiceProposal( 'Proposal #2', 'add VESTING_LP_VAULT', @@ -1703,9 +1714,9 @@ describe('Neutron / TGE / Auction', () => { { wasm: { execute: { - contract_addr: dao.contracts.voting.address, + contract_addr: daoMain.contracts.voting.address, msg: Buffer.from( - `{"add_voting_vault": {"new_voting_vault_contract":"${tge.contracts.vestingLpVault}"}}`, + `{"add_voting_vault": {"new_voting_vault_contract":"${tgeMain.contracts.vestingLpVault}"}}`, ).toString('base64'), funds: [], }, @@ -1715,7 +1726,7 @@ describe('Neutron / TGE / Auction', () => { '1000', ); await daoMember1.voteYes(propID); - const prop = await dao.queryProposal(propID); + const prop = await daoMain.queryProposal(propID); // we connected new voting vault(vesting voting vault), now its not enough // daoMember1 voting power to pass proposal // lockdrop participant should vote @@ -1727,15 +1738,17 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdrop', 'auctionLockdropVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); vp[v] = (await member.queryVotingPower()).power | 0; - if ((await dao.queryProposal(propID)).proposal.status == 'open') { + if ( + (await daoMain.queryProposal(propID)).proposal.status == 'open' + ) { await member.voteYes(propID); } } await daoMember1.executeProposal(propID); - await neutronChain.blockWaiter.waitBlocks(2); - const tvpNew = await dao.queryTotalVotingPower(); + await neutronChain.blockWaiter.waitBlocks(2); // wait for a couple of blocks so the vault becomes active + const tvpNew = await daoMain.queryTotalVotingPower(); expect(tvpNew.power | 0).toBeGreaterThan(tvp.power | 0); // vesting participants get(increase) the voting power for (const v of [ @@ -1744,7 +1757,7 @@ describe('Neutron / TGE / Auction', () => { 'auctionVesting', 'auctionLockdropVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); expect((await member.queryVotingPower()).power | 0).toBeGreaterThan( vp[v] | 0, ); @@ -1752,7 +1765,7 @@ describe('Neutron / TGE / Auction', () => { }); it('add credits vault to the registry', async () => { - const tvp = await dao.queryTotalVotingPower(); + const tvp = await daoMain.queryTotalVotingPower(); const propID = await daoMember1.submitSingleChoiceProposal( 'Proposal #3', 'add CREDITS_VAULT', @@ -1760,9 +1773,9 @@ describe('Neutron / TGE / Auction', () => { { wasm: { execute: { - contract_addr: dao.contracts.voting.address, + contract_addr: daoMain.contracts.voting.address, msg: Buffer.from( - `{"add_voting_vault": {"new_voting_vault_contract":"${tge.contracts.creditsVault}"}}`, + `{"add_voting_vault": {"new_voting_vault_contract":"${tgeMain.contracts.creditsVault}"}}`, ).toString('base64'), funds: [], }, @@ -1772,7 +1785,7 @@ describe('Neutron / TGE / Auction', () => { '1000', ); await daoMember1.voteYes(propID); - const prop = await dao.queryProposal(propID); + const prop = await daoMain.queryProposal(propID); // lockdrop and vesting participants should vote expect(prop.proposal).toMatchObject({ status: 'open' }); const vp: Record = {}; @@ -1784,15 +1797,17 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', 'auctionVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); vp[v] = (await member.queryVotingPower()).power | 0; - if ((await dao.queryProposal(propID)).proposal.status == 'open') { + if ( + (await daoMain.queryProposal(propID)).proposal.status == 'open' + ) { await member.voteYes(propID); } } await daoMember1.executeProposal(propID); - await neutronChain.blockWaiter.waitBlocks(2); - const tvpNew = await dao.queryTotalVotingPower(); + await neutronChain.blockWaiter.waitBlocks(2); // wait for a couple of blocks so the vault becomes active + const tvpNew = await daoMain.queryTotalVotingPower(); expect(tvpNew.power | 0).toBeGreaterThan(tvp.power | 0); // airdrop participants get(increase) the voting power for (const v of [ @@ -1801,7 +1816,7 @@ describe('Neutron / TGE / Auction', () => { 'airdropAuctionLockdrop', 'airdropAuctionLockdropVesting', ]) { - const member = new DaoMember(tgeWallets[v], dao); + const member = new DaoMember(tgeWallets[v], daoMain); expect((await member.queryVotingPower()).power | 0).toBeGreaterThan( vp[v] | 0, ); @@ -1810,23 +1825,23 @@ describe('Neutron / TGE / Auction', () => { it('airdrop contract should not have credits vault voting power', async () => { const ctvp = await neutronChain.queryContract( - tge.contracts.creditsVault, + tgeMain.contracts.creditsVault, { total_power_at_height: {}, }, ); const airdropCNTRN = await neutronChain.queryContract( - tge.contracts.credits, + tgeMain.contracts.credits, { balance: { - address: tge.contracts.airdrop, + address: tgeMain.contracts.airdrop, }, }, ); const totalCNTRNSupply = await neutronChain.queryContract( - tge.contracts.credits, + tgeMain.contracts.credits, { total_supply_at_height: {}, }, @@ -1862,7 +1877,7 @@ describe('Neutron / TGE / Auction', () => { airdropAuctionLockdropVestingUserInfo = await neutronChain.queryContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, { user_info: { address: @@ -1877,20 +1892,20 @@ describe('Neutron / TGE / Auction', () => { describe('lockdrop rewards', () => { beforeAll(async () => { await waitTill( - tge.times.lockdropInit + - tge.times.lockdropDepositDuration + - tge.times.lockdropWithdrawalDuration + + tgeMain.times.lockdropInit + + tgeMain.times.lockdropDepositDuration + + tgeMain.times.lockdropWithdrawalDuration + 1, ); }); it('for cmInstantiator without withdraw', async () => { - const rewardsStateBeforeClaim = await tge.generatorRewardsState( + const rewardsStateBeforeClaim = await tgeMain.generatorRewardsState( cmInstantiator.wallet.address.toString(), ); const res = await cmInstantiator.executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ claim_rewards_and_optionally_unlock: { pool_type: 'USDC', @@ -1901,7 +1916,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); - const rewardsStateAfterClaim = await tge.generatorRewardsState( + const rewardsStateAfterClaim = await tgeMain.generatorRewardsState( cmInstantiator.wallet.address.toString(), ); @@ -1911,10 +1926,13 @@ describe('Neutron / TGE / Auction', () => { rewardsStateBeforeClaim.balanceNtrn, ).toEqual(44); // lockdrop rewards share for the user - const expectedGeneratorRewards = - +rewardsStateBeforeClaim.userInfo.lockup_infos.find( + const rewardStateBeforeClaimUsdc: LockdropLockUpInfoResponse = + rewardsStateBeforeClaim.userInfo.lockup_infos.find( (i) => i.pool_type == 'USDC' && i.duration == 2, - )!.claimable_generator_astro_debt; + ) as LockdropLockUpInfoResponse; + expect(rewardStateBeforeClaimUsdc).not.toBeNull(); + const expectedGeneratorRewards = + +rewardStateBeforeClaimUsdc.claimable_generator_astro_debt; expect(expectedGeneratorRewards).toBeGreaterThan(0); // we expect the astro balance to increase by somewhere between user rewards amount and user @@ -1926,7 +1944,7 @@ describe('Neutron / TGE / Auction', () => { expectedGeneratorRewards, ); expect(astroBalanceDiff).toBeLessThan( - expectedGeneratorRewards + tge.generatorRewardsPerBlock, + expectedGeneratorRewards + tgeMain.generatorRewardsPerBlock, ); // withdraw_lp_stake is false => no lp tokens returned @@ -1946,7 +1964,7 @@ describe('Neutron / TGE / Auction', () => { ]) { await expect( tgeWallets[v].executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ claim_rewards_and_optionally_unlock: { pool_type: 'USDC', @@ -1958,7 +1976,7 @@ describe('Neutron / TGE / Auction', () => { ).rejects.toThrowError(/LockupInfoV1 not found/); await expect( tgeWallets[v].executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ claim_rewards_and_optionally_unlock: { pool_type: 'ATOM', @@ -1978,12 +1996,12 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { it('for ' + v + ' without withdraw', async () => { - const rewardsStateBeforeClaim = await tge.generatorRewardsState( + const rewardsStateBeforeClaim = await tgeMain.generatorRewardsState( tgeWallets[v].wallet.address.toString(), ); const res = await tgeWallets[v].executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ claim_rewards_and_optionally_unlock: { pool_type: 'USDC', @@ -1994,7 +2012,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); - const rewardsStateAfterClaim = await tge.generatorRewardsState( + const rewardsStateAfterClaim = await tgeMain.generatorRewardsState( tgeWallets[v].wallet.address.toString(), ); @@ -2004,10 +2022,13 @@ describe('Neutron / TGE / Auction', () => { rewardsStateAfterClaim.balanceNtrn + FEE_SIZE, ).toBeGreaterThan(rewardsStateBeforeClaim.balanceNtrn); - const expectedGeneratorRewards = - +rewardsStateBeforeClaim.userInfo.lockup_infos.find( + const rewardsBeforeClaimUsdc = + rewardsStateBeforeClaim.userInfo.lockup_infos.find( (i) => i.pool_type == 'USDC' && i.duration == 1, - )!.claimable_generator_astro_debt; + ) as LockdropLockUpInfoResponse; + expect(rewardsBeforeClaimUsdc).not.toBeNull(); + const expectedGeneratorRewards = + +rewardsBeforeClaimUsdc.claimable_generator_astro_debt; expect(expectedGeneratorRewards).toBeGreaterThan(0); // we expect the astro balance to increase by somewhere between user rewards amount and user @@ -2019,7 +2040,7 @@ describe('Neutron / TGE / Auction', () => { expectedGeneratorRewards, ); expect(astroBalanceDiff).toBeLessThan( - expectedGeneratorRewards + tge.generatorRewardsPerBlock, + expectedGeneratorRewards + tgeMain.generatorRewardsPerBlock, ); // withdraw_lp_stake is false => no lp tokens returned @@ -2039,12 +2060,12 @@ describe('Neutron / TGE / Auction', () => { 'auctionLockdropVesting', ]) { it('for ' + v + ' with withdraw', async () => { - const rewardsStateBeforeClaim = await tge.generatorRewardsState( + const rewardsStateBeforeClaim = await tgeMain.generatorRewardsState( tgeWallets[v].wallet.address.toString(), ); let res = await tgeWallets[v].executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ claim_rewards_and_optionally_unlock: { pool_type: 'USDC', @@ -2055,7 +2076,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); res = await tgeWallets[v].executeContract( - tge.contracts.lockdrop, + tgeMain.contracts.lockdrop, JSON.stringify({ claim_rewards_and_optionally_unlock: { pool_type: 'ATOM', @@ -2066,7 +2087,7 @@ describe('Neutron / TGE / Auction', () => { ); expect(res.code).toEqual(0); - const rewardsStateAfterClaim = await tge.generatorRewardsState( + const rewardsStateAfterClaim = await tgeMain.generatorRewardsState( tgeWallets[v].wallet.address.toString(), ); @@ -2075,31 +2096,42 @@ describe('Neutron / TGE / Auction', () => { ); // ntrn rewards were sent at the previous claim, so no ntrn income is expected // withdraw_lp_stake is true => expect lp tokens to be unlocked and returned to the user - const usdcNtrnLockedLp = - +rewardsStateBeforeClaim.userInfo.lockup_infos.find( + const rewardsUscBeforeClaim = + rewardsStateBeforeClaim.userInfo.lockup_infos.find( (i) => i.pool_type == 'USDC' && i.duration == 1, - )!.lp_units_locked; + ) as LockdropLockUpInfoResponse; + expect(rewardsUscBeforeClaim).not.toBeNull(); + const usdcNtrnLockedLp = +rewardsUscBeforeClaim.lp_units_locked; expect(usdcNtrnLockedLp).toBeGreaterThan(0); expect(rewardsStateAfterClaim.usdcNtrnLpTokenBalance).toEqual( rewardsStateBeforeClaim.usdcNtrnLpTokenBalance + usdcNtrnLockedLp, ); - const atomNtrnLockedLp = - +rewardsStateBeforeClaim.userInfo.lockup_infos.find( + const rewardsAtomBeforeClaim = + rewardsStateBeforeClaim.userInfo.lockup_infos.find( (i) => i.pool_type == 'ATOM' && i.duration == 1, - )!.lp_units_locked; + ) as LockdropLockUpInfoResponse; + expect(rewardsAtomBeforeClaim).not.toBeNull(); + const atomNtrnLockedLp = +rewardsAtomBeforeClaim.lp_units_locked; expect(atomNtrnLockedLp).toBeGreaterThan(0); expect(rewardsStateAfterClaim.atomNtrnLpTokenBalance).toEqual( rewardsStateBeforeClaim.atomNtrnLpTokenBalance + atomNtrnLockedLp, ); // claimed from both pools above, so expected rewards amount is a sum of both - const expectedGeneratorRewards = - +rewardsStateBeforeClaim.userInfo.lockup_infos.find( + const rewardsBeforeClaimUsdc = + rewardsStateBeforeClaim.userInfo.lockup_infos.find( (i) => i.pool_type == 'USDC' && i.duration == 1, - )!.claimable_generator_astro_debt + - +rewardsStateBeforeClaim.userInfo.lockup_infos.find( + ) as LockdropLockUpInfoResponse; + expect(rewardsBeforeClaimUsdc).not.toBeNull(); + const rewardsBeforeClaimAtom = + rewardsStateBeforeClaim.userInfo.lockup_infos.find( (i) => i.pool_type == 'ATOM' && i.duration == 1, - )!.claimable_generator_astro_debt; + ) as LockdropLockUpInfoResponse; + expect(rewardsBeforeClaimAtom).not.toBeNull(); + + const expectedGeneratorRewards = + +rewardsBeforeClaimUsdc.claimable_generator_astro_debt + + +rewardsBeforeClaimAtom.claimable_generator_astro_debt; expect(expectedGeneratorRewards).toBeGreaterThan(0); // we expect the astro balance to increase by somewhere between user rewards amount and user @@ -2111,7 +2143,7 @@ describe('Neutron / TGE / Auction', () => { expectedGeneratorRewards, ); expect(astroBalanceDiff).toBeLessThan( - expectedGeneratorRewards + 2 * tge.generatorRewardsPerBlock, + expectedGeneratorRewards + 2 * tgeMain.generatorRewardsPerBlock, ); }); } @@ -2167,14 +2199,14 @@ describe('Neutron / TGE / Auction', () => { expect( await queryLockdropVaultConfig( neutronChain, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, ), ).toMatchObject({ - name: tge.lockdropVaultName, - description: tge.lockdropVaultDescription, - lockdrop_contract: tge.contracts.lockdrop, - oracle_usdc_contract: tge.contracts.oracleUsdc, - oracle_atom_contract: tge.contracts.oracleAtom, + name: tgeMain.lockdropVaultName, + description: tgeMain.lockdropVaultDescription, + lockdrop_contract: tgeMain.contracts.lockdrop, + oracle_usdc_contract: tgeMain.contracts.oracleUsdc, + oracle_atom_contract: tgeMain.contracts.oracleAtom, owner: cmInstantiator.wallet.address.toString(), }); }); @@ -2183,28 +2215,31 @@ describe('Neutron / TGE / Auction', () => { expect( await queryVestingLpVaultConfig( neutronChain, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, ), ).toMatchObject({ - name: tge.vestingLpVaultName, - description: tge.vestingLpVaultDescription, - atom_vesting_lp_contract: tge.contracts.vestingAtomLp, - atom_oracle_contract: tge.contracts.oracleAtom, - usdc_vesting_lp_contract: tge.contracts.vestingUsdcLp, - usdc_oracle_contract: tge.contracts.oracleUsdc, - owner: tge.instantiator.wallet.address.toString(), + name: tgeMain.vestingLpVaultName, + description: tgeMain.vestingLpVaultDescription, + atom_vesting_lp_contract: tgeMain.contracts.vestingAtomLp, + atom_oracle_contract: tgeMain.contracts.oracleAtom, + usdc_vesting_lp_contract: tgeMain.contracts.vestingUsdcLp, + usdc_oracle_contract: tgeMain.contracts.oracleUsdc, + owner: tgeMain.instantiator.wallet.address.toString(), }); }); test('Get credits vault config', async () => { expect( - await queryCreditsVaultConfig(neutronChain, tge.contracts.creditsVault), + await queryCreditsVaultConfig( + neutronChain, + tgeMain.contracts.creditsVault, + ), ).toMatchObject({ - name: tge.creditsVaultName, - description: tge.creditsVaultDescription, - credits_contract_address: tge.contracts.credits, - owner: tge.instantiator.wallet.address.toString(), - airdrop_contract_address: tge.contracts.airdrop, + name: tgeMain.creditsVaultName, + description: tgeMain.creditsVaultDescription, + credits_contract_address: tgeMain.contracts.credits, + owner: tgeMain.instantiator.wallet.address.toString(), + airdrop_contract_address: tgeMain.contracts.airdrop, }); }); @@ -2212,11 +2247,11 @@ describe('Neutron / TGE / Auction', () => { await expect( executeLockdropVaultUpdateConfig( cmStranger, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, cmStranger.wallet.address.toString(), - tge.contracts.lockdrop, - tge.contracts.oracleUsdc, - tge.contracts.oracleAtom, + tgeMain.contracts.lockdrop, + tgeMain.contracts.oracleUsdc, + tgeMain.contracts.oracleAtom, 'name', 'description', ), @@ -2225,14 +2260,14 @@ describe('Neutron / TGE / Auction', () => { expect( await queryLockdropVaultConfig( neutronChain, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, ), ).toMatchObject({ - name: tge.lockdropVaultName, - description: tge.lockdropVaultDescription, - lockdrop_contract: tge.contracts.lockdrop, - oracle_usdc_contract: tge.contracts.oracleUsdc, - oracle_atom_contract: tge.contracts.oracleAtom, + name: tgeMain.lockdropVaultName, + description: tgeMain.lockdropVaultDescription, + lockdrop_contract: tgeMain.contracts.lockdrop, + oracle_usdc_contract: tgeMain.contracts.oracleUsdc, + oracle_atom_contract: tgeMain.contracts.oracleAtom, owner: cmInstantiator.wallet.address.toString(), }); }); @@ -2241,12 +2276,12 @@ describe('Neutron / TGE / Auction', () => { await expect( executeVestingLpVaultUpdateConfig( cmStranger, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, cmStranger.wallet.address.toString(), - tge.contracts.vestingUsdcLp, - tge.contracts.oracleUsdc, - tge.contracts.vestingAtomLp, - tge.contracts.oracleAtom, + tgeMain.contracts.vestingUsdcLp, + tgeMain.contracts.oracleUsdc, + tgeMain.contracts.vestingAtomLp, + tgeMain.contracts.oracleAtom, 'name', 'description', ), @@ -2255,16 +2290,16 @@ describe('Neutron / TGE / Auction', () => { expect( await queryVestingLpVaultConfig( neutronChain, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, ), ).toMatchObject({ - name: tge.vestingLpVaultName, - description: tge.vestingLpVaultDescription, - atom_vesting_lp_contract: tge.contracts.vestingAtomLp, - atom_oracle_contract: tge.contracts.oracleAtom, - usdc_vesting_lp_contract: tge.contracts.vestingUsdcLp, - usdc_oracle_contract: tge.contracts.oracleUsdc, - owner: tge.instantiator.wallet.address.toString(), + name: tgeMain.vestingLpVaultName, + description: tgeMain.vestingLpVaultDescription, + atom_vesting_lp_contract: tgeMain.contracts.vestingAtomLp, + atom_oracle_contract: tgeMain.contracts.oracleAtom, + usdc_vesting_lp_contract: tgeMain.contracts.vestingUsdcLp, + usdc_oracle_contract: tgeMain.contracts.oracleUsdc, + owner: tgeMain.instantiator.wallet.address.toString(), }); }); @@ -2272,8 +2307,8 @@ describe('Neutron / TGE / Auction', () => { await expect( executeCreditsVaultUpdateConfig( cmStranger, - tge.contracts.creditsVault, - tge.contracts.auction, + tgeMain.contracts.creditsVault, + tgeMain.contracts.auction, cmStranger.wallet.address.toString(), 'name', 'description', @@ -2281,21 +2316,24 @@ describe('Neutron / TGE / Auction', () => { ).rejects.toThrow(/Unauthorized/); expect( - await queryCreditsVaultConfig(neutronChain, tge.contracts.creditsVault), + await queryCreditsVaultConfig( + neutronChain, + tgeMain.contracts.creditsVault, + ), ).toMatchObject({ - name: tge.creditsVaultName, - description: tge.creditsVaultDescription, - credits_contract_address: tge.contracts.credits, - owner: tge.instantiator.wallet.address.toString(), - airdrop_contract_address: tge.contracts.airdrop, + name: tgeMain.creditsVaultName, + description: tgeMain.creditsVaultDescription, + credits_contract_address: tgeMain.contracts.credits, + owner: tgeMain.instantiator.wallet.address.toString(), + airdrop_contract_address: tgeMain.contracts.airdrop, }); }); test('Bonding and Unbonding', async () => { for (const vault of [ - tge.contracts.creditsVault, - tge.contracts.vestingLpVault, - tge.contracts.lockdropVault, + tgeMain.contracts.creditsVault, + tgeMain.contracts.vestingLpVault, + tgeMain.contracts.lockdropVault, ]) { await expect( cmStranger.executeContract( @@ -2324,58 +2362,58 @@ describe('Neutron / TGE / Auction', () => { test('Change lockdrop vault owner to stranger', async () => { const res = await executeLockdropVaultUpdateConfig( cmInstantiator, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, cmStranger.wallet.address.toString(), - tge.contracts.lockdrop, - tge.contracts.oracleUsdc, - tge.contracts.oracleAtom, - tge.lockdropVaultName, - tge.lockdropVaultDescription, + tgeMain.contracts.lockdrop, + tgeMain.contracts.oracleUsdc, + tgeMain.contracts.oracleAtom, + tgeMain.lockdropVaultName, + tgeMain.lockdropVaultDescription, ); expect(res.code).toEqual(0); expect( await queryLockdropVaultConfig( neutronChain, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, ), ).toMatchObject({ - name: tge.lockdropVaultName, - description: tge.lockdropVaultDescription, - lockdrop_contract: tge.contracts.lockdrop, - oracle_usdc_contract: tge.contracts.oracleUsdc, - oracle_atom_contract: tge.contracts.oracleAtom, + name: tgeMain.lockdropVaultName, + description: tgeMain.lockdropVaultDescription, + lockdrop_contract: tgeMain.contracts.lockdrop, + oracle_usdc_contract: tgeMain.contracts.oracleUsdc, + oracle_atom_contract: tgeMain.contracts.oracleAtom, owner: cmStranger.wallet.address.toString(), }); }); test('Update lockdrop vault config by new owner', async () => { - tge.lockdropVaultName = 'New lockdrop name'; - tge.lockdropVaultDescription = 'New lockdrop description'; + tgeMain.lockdropVaultName = 'New lockdrop name'; + tgeMain.lockdropVaultDescription = 'New lockdrop description'; const res = await executeLockdropVaultUpdateConfig( cmStranger, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, cmStranger.wallet.address.toString(), - tge.contracts.lockdrop, - tge.contracts.oracleUsdc, - tge.contracts.oracleAtom, - tge.lockdropVaultName, - tge.lockdropVaultDescription, + tgeMain.contracts.lockdrop, + tgeMain.contracts.oracleUsdc, + tgeMain.contracts.oracleAtom, + tgeMain.lockdropVaultName, + tgeMain.lockdropVaultDescription, ); expect(res.code).toEqual(0); expect( await queryLockdropVaultConfig( neutronChain, - tge.contracts.lockdropVault, + tgeMain.contracts.lockdropVault, ), ).toMatchObject({ - name: tge.lockdropVaultName, - description: tge.lockdropVaultDescription, - lockdrop_contract: tge.contracts.lockdrop, - oracle_usdc_contract: tge.contracts.oracleUsdc, - oracle_atom_contract: tge.contracts.oracleAtom, + name: tgeMain.lockdropVaultName, + description: tgeMain.lockdropVaultDescription, + lockdrop_contract: tgeMain.contracts.lockdrop, + oracle_usdc_contract: tgeMain.contracts.oracleUsdc, + oracle_atom_contract: tgeMain.contracts.oracleAtom, owner: cmStranger.wallet.address.toString(), }); }); @@ -2383,61 +2421,61 @@ describe('Neutron / TGE / Auction', () => { test('Change vesting LP vault owner to stranger', async () => { const res = await executeVestingLpVaultUpdateConfig( cmInstantiator, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, cmStranger.wallet.address.toString(), - tge.contracts.vestingAtomLp, - tge.contracts.oracleAtom, - tge.contracts.vestingUsdcLp, - tge.contracts.oracleUsdc, - tge.vestingLpVaultName, - tge.vestingLpVaultDescription, + tgeMain.contracts.vestingAtomLp, + tgeMain.contracts.oracleAtom, + tgeMain.contracts.vestingUsdcLp, + tgeMain.contracts.oracleUsdc, + tgeMain.vestingLpVaultName, + tgeMain.vestingLpVaultDescription, ); expect(res.code).toEqual(0); expect( await queryVestingLpVaultConfig( neutronChain, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, ), ).toMatchObject({ - name: tge.vestingLpVaultName, - description: tge.vestingLpVaultDescription, - atom_vesting_lp_contract: tge.contracts.vestingAtomLp, - atom_oracle_contract: tge.contracts.oracleAtom, - usdc_vesting_lp_contract: tge.contracts.vestingUsdcLp, - usdc_oracle_contract: tge.contracts.oracleUsdc, + name: tgeMain.vestingLpVaultName, + description: tgeMain.vestingLpVaultDescription, + atom_vesting_lp_contract: tgeMain.contracts.vestingAtomLp, + atom_oracle_contract: tgeMain.contracts.oracleAtom, + usdc_vesting_lp_contract: tgeMain.contracts.vestingUsdcLp, + usdc_oracle_contract: tgeMain.contracts.oracleUsdc, owner: cmStranger.wallet.address.toString(), }); }); test('Update vesting LP vault config by new owner', async () => { - tge.vestingLpVaultName = 'New vesting LP name'; - tge.vestingLpVaultDescription = 'New vesting LP description'; + tgeMain.vestingLpVaultName = 'New vesting LP name'; + tgeMain.vestingLpVaultDescription = 'New vesting LP description'; const res = await executeVestingLpVaultUpdateConfig( cmStranger, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, cmStranger.wallet.address.toString(), - tge.contracts.vestingAtomLp, - tge.contracts.oracleAtom, - tge.contracts.vestingUsdcLp, - tge.contracts.oracleUsdc, - tge.vestingLpVaultName, - tge.vestingLpVaultDescription, + tgeMain.contracts.vestingAtomLp, + tgeMain.contracts.oracleAtom, + tgeMain.contracts.vestingUsdcLp, + tgeMain.contracts.oracleUsdc, + tgeMain.vestingLpVaultName, + tgeMain.vestingLpVaultDescription, ); expect(res.code).toEqual(0); expect( await queryVestingLpVaultConfig( neutronChain, - tge.contracts.vestingLpVault, + tgeMain.contracts.vestingLpVault, ), ).toMatchObject({ - name: tge.vestingLpVaultName, - description: tge.vestingLpVaultDescription, - atom_vesting_lp_contract: tge.contracts.vestingAtomLp, - atom_oracle_contract: tge.contracts.oracleAtom, - usdc_vesting_lp_contract: tge.contracts.vestingUsdcLp, - usdc_oracle_contract: tge.contracts.oracleUsdc, + name: tgeMain.vestingLpVaultName, + description: tgeMain.vestingLpVaultDescription, + atom_vesting_lp_contract: tgeMain.contracts.vestingAtomLp, + atom_oracle_contract: tgeMain.contracts.oracleAtom, + usdc_vesting_lp_contract: tgeMain.contracts.vestingUsdcLp, + usdc_oracle_contract: tgeMain.contracts.oracleUsdc, owner: cmStranger.wallet.address.toString(), }); }); @@ -2445,7 +2483,7 @@ describe('Neutron / TGE / Auction', () => { test('Change credits vault owner to stranger', async () => { const res = await executeCreditsVaultUpdateConfig( cmInstantiator, - tge.contracts.creditsVault, + tgeMain.contracts.creditsVault, null, cmStranger.wallet.address.toString(), null, @@ -2454,37 +2492,43 @@ describe('Neutron / TGE / Auction', () => { expect(res.code).toEqual(0); expect( - await queryCreditsVaultConfig(neutronChain, tge.contracts.creditsVault), + await queryCreditsVaultConfig( + neutronChain, + tgeMain.contracts.creditsVault, + ), ).toMatchObject({ - name: tge.creditsVaultName, - description: tge.creditsVaultDescription, - credits_contract_address: tge.contracts.credits, + name: tgeMain.creditsVaultName, + description: tgeMain.creditsVaultDescription, + credits_contract_address: tgeMain.contracts.credits, owner: cmStranger.wallet.address.toString(), - airdrop_contract_address: tge.contracts.airdrop, + airdrop_contract_address: tgeMain.contracts.airdrop, }); }); test('Update credits vault config by new owner', async () => { - tge.creditsVaultName = 'New credits name'; - tge.creditsVaultDescription = 'New credits description'; + tgeMain.creditsVaultName = 'New credits name'; + tgeMain.creditsVaultDescription = 'New credits description'; const res = await executeCreditsVaultUpdateConfig( cmStranger, - tge.contracts.creditsVault, + tgeMain.contracts.creditsVault, null, null, - tge.creditsVaultName, - tge.creditsVaultDescription, + tgeMain.creditsVaultName, + tgeMain.creditsVaultDescription, ); expect(res.code).toEqual(0); expect( - await queryCreditsVaultConfig(neutronChain, tge.contracts.creditsVault), + await queryCreditsVaultConfig( + neutronChain, + tgeMain.contracts.creditsVault, + ), ).toMatchObject({ - name: tge.creditsVaultName, - description: tge.creditsVaultDescription, - credits_contract_address: tge.contracts.credits, + name: tgeMain.creditsVaultName, + description: tgeMain.creditsVaultDescription, + credits_contract_address: tgeMain.contracts.credits, owner: cmStranger.wallet.address.toString(), - airdrop_contract_address: tge.contracts.airdrop, + airdrop_contract_address: tgeMain.contracts.airdrop, }); }); }); diff --git a/src/testcases/run_in_band/tge.credits.test.ts b/src/testcases/run_in_band/tge.credits.test.ts index 88f128cd..16fe65e1 100644 --- a/src/testcases/run_in_band/tge.credits.test.ts +++ b/src/testcases/run_in_band/tge.credits.test.ts @@ -1,12 +1,14 @@ +import '@neutron-org/neutronjsplus'; import { + WalletWrapper, CosmosWrapper, NEUTRON_DENOM, - WalletWrapper, -} from '../../helpers/cosmos'; -import { NeutronContract } from '../../helpers/types'; -import { wait } from '../../helpers/wait'; -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; -import { CodeId } from '../../types'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { NeutronContract, CodeId } from '@neutron-org/neutronjsplus/dist/types'; +import { waitSeconds } from '@neutron-org/neutronjsplus/dist/wait'; + +const config = require('../../config.json'); const getTimestamp = (secondsFromNow: number): number => (Date.now() / 1000 + secondsFromNow) | 0; @@ -24,7 +26,7 @@ describe('Neutron / TGE / Credits', () => { let neutronAccount2Address: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); airdropAddress = testState.wallets.qaNeutronThree.genQaWal1.address.toString(); @@ -315,7 +317,7 @@ describe('Neutron / TGE / Credits', () => { ).rejects.toThrow(/Too early to claim/); }); it('should return withdrawable amount', async () => { - await wait(15); + await waitSeconds(15); const res = await neutronChain.queryContract<{ amount: string }>( contractAddresses['TGE_CREDITS'], { @@ -328,7 +330,7 @@ describe('Neutron / TGE / Credits', () => { }); it('should be able to withdraw after vesting', async () => { - await wait(10); + await waitSeconds(10); const balanceNtrnBefore = await neutronChain.queryDenomBalance( neutronAccount2Address, NEUTRON_DENOM, diff --git a/src/testcases/run_in_band/tokenomics.test.ts b/src/testcases/run_in_band/tokenomics.test.ts index a2b561a1..1936504e 100644 --- a/src/testcases/run_in_band/tokenomics.test.ts +++ b/src/testcases/run_in_band/tokenomics.test.ts @@ -1,15 +1,18 @@ -import { TestStateLocalCosmosTestNet } from '../common_localcosmosnet'; +import Long from 'long'; +import '@neutron-org/neutronjsplus'; import { - COSMOS_DENOM, + WalletWrapper, CosmosWrapper, + COSMOS_DENOM, NEUTRON_DENOM, TotalBurnedNeutronsAmountResponse, TotalSupplyByDenomResponse, - WalletWrapper, -} from '../../helpers/cosmos'; -import Long from 'long'; -import { getWithAttempts } from '../../helpers/wait'; -import { getTreasuryContract } from '../../helpers/dao'; +} from '@neutron-org/neutronjsplus/dist/cosmos'; +import { TestStateLocalCosmosTestNet } from '@neutron-org/neutronjsplus'; +import { getTreasuryContract } from '@neutron-org/neutronjsplus/dist/dao'; +import { getWithAttempts } from '@neutron-org/neutronjsplus/dist/wait'; + +const config = require('../../config.json'); describe('Neutron / Tokenomics', () => { let testState: TestStateLocalCosmosTestNet; @@ -20,7 +23,7 @@ describe('Neutron / Tokenomics', () => { let treasuryContractAddress: string; beforeAll(async () => { - testState = new TestStateLocalCosmosTestNet(); + testState = new TestStateLocalCosmosTestNet(config); await testState.init(); neutronChain = new CosmosWrapper( testState.sdk1, diff --git a/yarn.lock b/yarn.lock index cdf29ac7..565f0c9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,617 +2,294 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.1.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.1.2.tgz#4edca94973ded9630d20101cd8559cedb8d8bd34" - integrity sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg== - dependencies: - "@jridgewell/trace-mapping" "^0.3.0" +"@aashutoshrathi/word-wrap@^1.2.3": + version "1.2.6" + resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" + integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" - integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== +"@ampproject/remapping@^2.2.0": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: - "@babel/highlight" "^7.16.7" - -"@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/compat-data@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2" - integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== - -"@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": - version "7.20.10" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" - integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== - -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" - integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.9" - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-module-transforms" "^7.17.7" - "@babel/helpers" "^7.17.9" - "@babel/parser" "^7.17.9" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.9" - "@babel/types" "^7.17.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" -"@babel/core@^7.11.6": - version "7.20.12" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.20.12.tgz#7930db57443c6714ad216953d1356dac0eb8496d" - integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helpers" "^7.20.7" - "@babel/parser" "^7.20.7" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.12" - "@babel/types" "^7.20.7" - convert-source-map "^1.7.0" +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.22.13", "@babel/code-frame@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.23.5.tgz#9009b69a8c602293476ad598ff53e4562e15c244" + integrity sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA== + dependencies: + "@babel/highlight" "^7.23.4" + chalk "^2.4.2" + +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9", "@babel/compat-data@^7.23.3", "@babel/compat-data@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.5.tgz#ffb878728bb6bdcb6f4510aa51b1be9afb8cfd98" + integrity sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw== + +"@babel/core@^7.11.6", "@babel/core@^7.12.3": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.5.tgz#6e23f2acbcb77ad283c5ed141f824fd9f70101c7" + integrity sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helpers" "^7.23.5" + "@babel/parser" "^7.23.5" + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.5" + "@babel/types" "^7.23.5" + convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/generator@^7.17.9", "@babel/generator@^7.7.2": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" - integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ== - dependencies: - "@babel/types" "^7.17.0" - jsesc "^2.5.1" - source-map "^0.5.0" - -"@babel/generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" - integrity sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug== - dependencies: - "@babel/types" "^7.18.9" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" + json5 "^2.2.3" + semver "^6.3.1" -"@babel/generator@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.7.tgz#f8ef57c8242665c5929fe2e8d82ba75460187b4a" - integrity sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw== +"@babel/generator@^7.23.5", "@babel/generator@^7.7.2": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.5.tgz#17d0a1ea6b62f351d281350a5f80b87a810c4755" + integrity sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA== dependencies: - "@babel/types" "^7.20.7" + "@babel/types" "^7.23.5" "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz#eaa49f6f80d5a33f9a5dd2276e6d6e451be0a6bb" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz#acd4edfd7a566d1d51ea975dff38fd52906981bb" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== +"@babel/helper-annotate-as-pure@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" + integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" + "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz#a3c2924f5e5f0379b356d4cfb313d1414dc30e46" - integrity sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w== +"@babel/helper-builder-binary-assignment-operator-visitor@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz#5426b109cf3ad47b91120f8328d8ab1be8b0b956" + integrity sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw== dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-validator-option" "^7.16.7" - browserslist "^4.17.5" - semver "^6.3.0" + "@babel/types" "^7.22.15" -"@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz#a6cd33e93629f5eb473b021aac05df62c4cd09bb" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== +"@babel/helper-compilation-targets@^7.22.15", "@babel/helper-compilation-targets@^7.22.6": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" + integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" + "@babel/compat-data" "^7.22.9" + "@babel/helper-validator-option" "^7.22.15" + browserslist "^4.21.9" lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.5", "@babel/helper-create-class-features-plugin@^7.20.7": - version "7.20.12" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz#4349b928e79be05ed2d1643b20b99bb87c503819" - integrity sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz#5ea79b59962a09ec2acf20a963a01ab4d076ccca" - integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.2.1" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz#8612e55be5d51f0cd1f36b4a5a83924e89884b7a" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.5.tgz#2a8792357008ae9ce8c0f2b78b9f646ac96b314b" + integrity sha512-QELlRWxSpgdwdJzSJn4WAhKC+hvw/AtHbbrIoncKHkhKKR/luAlKkgBDcri1EzWAo8f8VvYVryEHN4tax/V67A== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-member-expression-to-functions" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + semver "^6.3.1" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.15", "@babel/helper-create-regexp-features-plugin@^7.22.5": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz#5ee90093914ea09639b01c711db0d6775e558be1" + integrity sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + regexpu-core "^5.3.1" + semver "^6.3.1" + +"@babel/helper-define-polyfill-provider@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.3.tgz#a71c10f7146d809f4a256c373f462d9bba8cf6ba" + integrity sha512-WBrLmuPP47n7PNwsZ57pqam6G/RGo1vw/87b0Blc53tZNGZ4x7YvZ6HgQe2vo1W/FR20OgjeZuGXzudPiXHFug== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" debug "^4.1.1" lodash.debounce "^4.0.8" resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz#ff484094a839bde9d89cd63cba017d7aae80ecd7" - integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== - dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz#41f8228ef0a6f1a036b8dfdfec7ce94f9a6bc096" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.17.9": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" - integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== - dependencies: - "@babel/template" "^7.16.7" - "@babel/types" "^7.17.0" - -"@babel/helper-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" - integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== - dependencies: - "@babel/template" "^7.18.6" - "@babel/types" "^7.18.9" - -"@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" -"@babel/helper-hoist-variables@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" - integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== - dependencies: - "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" + integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== +"@babel/helper-function-name@^7.22.5", "@babel/helper-function-name@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" + integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== dependencies: - "@babel/types" "^7.18.6" + "@babel/template" "^7.22.15" + "@babel/types" "^7.23.0" -"@babel/helper-member-expression-to-functions@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz#a6f26e919582275a93c3aa6594756d71b0bb7f05" - integrity sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw== +"@babel/helper-hoist-variables@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" + integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== dependencies: - "@babel/types" "^7.20.7" + "@babel/types" "^7.22.5" -"@babel/helper-module-imports@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" - integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== +"@babel/helper-member-expression-to-functions@^7.22.15", "@babel/helper-member-expression-to-functions@^7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz#9263e88cc5e41d39ec18c9a3e0eced59a3e7d366" + integrity sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA== dependencies: - "@babel/types" "^7.16.7" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" - integrity sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw== - dependencies: - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-module-imports" "^7.16.7" - "@babel/helper-simple-access" "^7.17.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/helper-validator-identifier" "^7.16.7" - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" - "@babel/types" "^7.17.0" - -"@babel/helper-module-transforms@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" - integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.18.6" - "@babel/template" "^7.18.6" - "@babel/traverse" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-module-transforms@^7.20.11": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz#df4c7af713c557938c50ea3ad0117a7944b2f1b0" - integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.10" - "@babel/types" "^7.20.7" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz#9369aa943ee7da47edab2cb4e838acf09d290ffe" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== - -"@babel/helper-plugin-utils@^7.18.6": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" - integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== - -"@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.3": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz#d1b9000752b18d0877cff85a5c376ce5c3121629" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz#243ecd2724d2071532b2c8ad2f0f9f083bcae331" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" + "@babel/types" "^7.23.0" -"@babel/helper-simple-access@^7.17.7": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz#aaa473de92b7987c6dfa7ce9a7d9674724823367" - integrity sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA== +"@babel/helper-module-imports@^7.22.15": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" + integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== dependencies: - "@babel/types" "^7.17.0" + "@babel/types" "^7.22.15" -"@babel/helper-simple-access@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" - integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== +"@babel/helper-module-transforms@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz#d7d12c3c5d30af5b3c0fcab2a6d5217773e2d0f1" + integrity sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ== dependencies: - "@babel/types" "^7.18.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-simple-access" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/helper-validator-identifier" "^7.22.20" -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz#0ab452687fe0c2cfb1e2b9e0015de07fc2d62dd9" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== +"@babel/helper-optimise-call-expression@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" + integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== dependencies: - "@babel/types" "^7.20.2" + "@babel/types" "^7.22.5" -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" + integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== -"@babel/helper-split-export-declaration@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" - integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== +"@babel/helper-remap-async-to-generator@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz#7b68e1cb4fa964d2996fd063723fb48eca8498e0" + integrity sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw== dependencies: - "@babel/types" "^7.16.7" + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-wrap-function" "^7.22.20" -"@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== +"@babel/helper-replace-supers@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz#e37d367123ca98fe455a9887734ed2e16eb7a793" + integrity sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw== dependencies: - "@babel/types" "^7.18.6" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-member-expression-to-functions" "^7.22.15" + "@babel/helper-optimise-call-expression" "^7.22.5" -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-validator-identifier@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" - integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== - -"@babel/helper-validator-identifier@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" - integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== - -"@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-option@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" - integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz#75e2d84d499a0ab3b31c33bcfe59d6b8a45f62e3" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.17.9": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" - integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== - dependencies: - "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.9" - "@babel/types" "^7.17.0" - -"@babel/helpers@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.20.7.tgz#04502ff0feecc9f20ecfaad120a18f011a8e6dce" - integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== +"@babel/helper-simple-access@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" + integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - chalk "^2.0.0" - js-tokens "^4.0.0" + "@babel/types" "^7.22.5" -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" +"@babel/helper-skip-transparent-expression-wrappers@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" + integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-split-export-declaration@^7.22.6": + version "7.22.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" + integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== + dependencies: + "@babel/types" "^7.22.5" + +"@babel/helper-string-parser@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz#9478c707febcbbe1ddb38a3d91a2e054ae622d83" + integrity sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ== + +"@babel/helper-validator-identifier@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" + integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== + +"@babel/helper-validator-option@^7.22.15", "@babel/helper-validator-option@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz#907a3fbd4523426285365d1206c423c4c5520307" + integrity sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw== + +"@babel/helper-wrap-function@^7.22.20": + version "7.22.20" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz#15352b0b9bfb10fc9c76f79f6342c00e3411a569" + integrity sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw== + dependencies: + "@babel/helper-function-name" "^7.22.5" + "@babel/template" "^7.22.15" + "@babel/types" "^7.22.19" + +"@babel/helpers@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.5.tgz#52f522840df8f1a848d06ea6a79b79eefa72401e" + integrity sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg== + dependencies: + "@babel/template" "^7.22.15" + "@babel/traverse" "^7.23.5" + "@babel/types" "^7.23.5" + +"@babel/highlight@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.23.4.tgz#edaadf4d8232e1a961432db785091207ead0621b" + integrity sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A== + dependencies: + "@babel/helper-validator-identifier" "^7.22.20" + chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.9": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" - integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== - -"@babel/parser@^7.18.6", "@babel/parser@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" - integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== - -"@babel/parser@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" - integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz#da5b8f9a580acdfbe53494dba45ea389fb09a4d2" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz#d9c85589258539a22a901033853101a6198d4ef1" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" - -"@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz#bfb7276d2d573cb67ba379984a2334e262ba5326" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz#b110f59741895f7ec21a6fff696ec46265c446a3" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.20.7.tgz#92592e9029b13b15be0f7ce6a7aedc2879ca45a7" - integrity sha512-AveGOoi9DAjUYYuUAG//Ig69GlazLnoyzMw68VCDux+c1tsnnH/OkYcpz/5xzMkEFC6UxjR5Gw1c+iY2wOGVeQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz#72bcf8d408799f547d759298c3c27c7e7faa4d94" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz#5f7313ab348cdb19d590145f9247540e94761203" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz#7e8788c1811c393aff762817e7dbf1ebd0c05f0b" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz#fdd940a99a740e577d6c753ab6fbb43fdb9467e1" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz#899b14fbafe87f053d2c5ff05b36029c62e13c75" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz#f9400d0e6a3ea93ba9ef70b09e72dd6da638a2cb" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.5.tgz#37dee97c4752af148e1d38c34b856b2507660563" + integrity sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ== -"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz#49f2b372519ab31728cc14115bb0998b15bfda55" - integrity sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ== +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz#5cd1c87ba9380d0afb78469292c954fee5d2411a" + integrity sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz#5209de7d213457548a98436fa2882f52f4be6bea" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz#f6652bb16b94f8f9c20c50941e16e9756898dc5d" + integrity sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-transform-optional-chaining" "^7.23.3" -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz#309c7668f2263f1c711aa399b5a9a6291eef6135" - integrity sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ== +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.3.tgz#20c60d4639d18f7da8602548512e9d3a4c8d7098" + integrity sha512-XaJak1qcityzrX0/IU5nKHb34VaibwP3saKqG6a/tppelgllOH13LUann4ZCIBcVOeE6H18K4Vx9QKkVww3z/w== dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz#af613d2cd5e643643b65cded64207b15c85cb78e" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -656,14 +333,21 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== +"@babel/plugin-syntax-import-assertions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz#9c05a7f592982aff1a2768260ad84bcd3f0c77fc" + integrity sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw== dependencies: - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-syntax-import-meta@^7.8.3": +"@babel/plugin-syntax-import-attributes@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz#992aee922cf04512461d7dae3ff6951b90a2dc06" + integrity sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-import-meta@^7.10.4", "@babel/plugin-syntax-import-meta@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== @@ -677,6 +361,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" +"@babel/plugin-syntax-jsx@^7.23.3", "@babel/plugin-syntax-jsx@^7.7.2": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz#8f2e4f8a9b5f9aa16067e142c1ac9cd9f810f473" + integrity sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4", "@babel/plugin-syntax-logical-assignment-operators@^7.8.3": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -733,322 +424,440 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-syntax-typescript@^7.20.0": - version "7.20.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.20.0.tgz#4e9a0cfc769c85689b77a2e642d24e9f697fc8c7" - integrity sha512-rd9TkG+u1CExzS4SM1BlMEhMXwFLKVjOAFFCDx9PbX5ycJWDoWMcwdJH9RhkPu1dOgn5TrxLot/Gx6lWFuAUNQ== +"@babel/plugin-syntax-typescript@^7.23.3", "@babel/plugin-syntax-typescript@^7.7.2": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz#24f460c85dbbc983cd2b9c4994178bcc01df958f" + integrity sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ== dependencies: - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.18.6" + "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-syntax-typescript@^7.7.2": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz#39c9b55ee153151990fb038651d58d3fd03f98f8" - integrity sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A== +"@babel/plugin-transform-arrow-functions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz#94c6dcfd731af90f27a79509f9ab7fb2120fc38b" + integrity sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ== dependencies: - "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz#bea332b0e8b2dab3dafe55a163d8227531ab0551" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== +"@babel/plugin-transform-async-generator-functions@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.4.tgz#93ac8e3531f347fba519b4703f9ff2a75c6ae27a" + integrity sha512-efdkfPhHYTtn0G6n2ddrESE91fgXxjlqLsnUtPWnJs4a4mZIbUaK7ffqKIIUKXSHwcDvaCVX6GXkaJJFqtX7jw== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" + "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== +"@babel/plugin-transform-async-to-generator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz#d1f513c7a8a506d43f47df2bf25f9254b0b051fa" + integrity sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw== dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" + "@babel/helper-module-imports" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-remap-async-to-generator" "^7.22.20" -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz#9187bf4ba302635b9d70d986ad70f038726216a8" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== +"@babel/plugin-transform-block-scoped-functions@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz#fe1177d715fb569663095e04f3598525d98e8c77" + integrity sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-block-scoping@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz#b2d38589531c6c80fbe25e6b58e763622d2d3cf5" + integrity sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-class-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz#35c377db11ca92a785a718b6aa4e3ed1eb65dc48" + integrity sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-class-static-block@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz#2a202c8787a8964dd11dfcedf994d36bfc844ab5" + integrity sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-transform-block-scoping@^7.20.2": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.11.tgz#9f5a3424bd112a3f32fe0cf9364fbb155cff262a" - integrity sha512-tA4N427a7fjf1P0/2I4ScsHGc5jcHPbb30xMbaTke2gxDuWpUfXDuX1FEymJwKk4tuGUvGcejAR6HdZVqmmPyw== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz#f438216f094f6bb31dc266ebfab8ff05aecad073" - integrity sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" +"@babel/plugin-transform-classes@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz#e7a75f815e0c534cc4c9a39c56636c84fc0d64f2" + integrity sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-optimise-call-expression" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" + "@babel/helper-split-export-declaration" "^7.22.6" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.18.9": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz#704cc2fd155d1c996551db8276d55b9d46e4d0aa" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== +"@babel/plugin-transform-computed-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz#652e69561fcc9d2b50ba4f7ac7f60dcf65e86474" + integrity sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/template" "^7.20.7" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/template" "^7.22.15" -"@babel/plugin-transform-destructuring@^7.20.2": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz#8bda578f71620c7de7c93af590154ba331415454" - integrity sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA== +"@babel/plugin-transform-destructuring@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz#8c9ee68228b12ae3dff986e56ed1ba4f3c446311" + integrity sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz#b286b3e7aae6c7b861e45bed0a2fafd6b1a4fef8" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== +"@babel/plugin-transform-dotall-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz#3f7af6054882ede89c378d0cf889b854a993da50" + integrity sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz#687f15ee3cdad6d85191eb2a372c4528eaa0ae0e" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== +"@babel/plugin-transform-duplicate-keys@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz#664706ca0a5dfe8d066537f99032fc1dc8b720ce" + integrity sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz#421c705f4521888c65e91fdd1af951bfefd4dacd" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== +"@babel/plugin-transform-dynamic-import@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz#c7629e7254011ac3630d47d7f34ddd40ca535143" + integrity sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-transform-for-of@^7.18.8": - version "7.18.8" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz#6ef8a50b244eb6a0bdbad0c7c61877e4e30097c1" - integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== +"@babel/plugin-transform-exponentiation-operator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz#ea0d978f6b9232ba4722f3dbecdd18f450babd18" + integrity sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz#cc354f8234e62968946c61a46d6365440fc764e0" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== +"@babel/plugin-transform-export-namespace-from@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz#084c7b25e9a5c8271e987a08cf85807b80283191" + integrity sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ== dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz#72796fdbef80e56fba3c6a699d54f0de557444bc" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== +"@babel/plugin-transform-for-of@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.3.tgz#afe115ff0fbce735e02868d41489093c63e15559" + integrity sha512-X8jSm8X1CMwxmK878qsUGJRmbysKNbdpTv/O1/v0LuY/ZkZrng5WYiekYSdg9m09OTmDDUWeEDsTE+17WYbAZw== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz#ac9fdc1a118620ac49b7e7a5d2dc177a1bfee88e" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== +"@babel/plugin-transform-function-name@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz#8f424fcd862bf84cb9a1a6b42bc2f47ed630f8dc" + integrity sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-amd@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" - integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== +"@babel/plugin-transform-json-strings@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz#a871d9b6bd171976efad2e43e694c961ffa3714d" + integrity sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg== dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-transform-modules-commonjs@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.18.6.tgz#afd243afba166cca69892e24a8fd8c9f2ca87883" - integrity sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q== +"@babel/plugin-transform-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz#8214665f00506ead73de157eba233e7381f3beb4" + integrity sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ== dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-simple-access" "^7.18.6" - babel-plugin-dynamic-import-node "^2.3.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz#8cb23010869bf7669fd4b3098598b6b2be6dc607" - integrity sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw== +"@babel/plugin-transform-logical-assignment-operators@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz#e599f82c51d55fac725f62ce55d3a0886279ecb5" + integrity sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg== dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.20.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz#467ec6bba6b6a50634eea61c9c232654d8a4696e" - integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== +"@babel/plugin-transform-member-expression-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz#e37b3f0502289f477ac0e776b05a833d853cabcc" + integrity sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag== dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-identifier" "^7.19.1" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz#81d3832d6034b75b54e62821ba58f28ed0aab4b9" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== +"@babel/plugin-transform-modules-amd@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz#e19b55436a1416829df0a1afc495deedfae17f7d" + integrity sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw== dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz#626298dd62ea51d452c3be58b285d23195ba69a8" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== +"@babel/plugin-transform-modules-commonjs@^7.18.6", "@babel/plugin-transform-modules-commonjs@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz#661ae831b9577e52be57dd8356b734f9700b53b4" + integrity sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-simple-access" "^7.22.5" -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz#d128f376ae200477f37c4ddfcc722a8a1b3246a8" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== +"@babel/plugin-transform-modules-systemjs@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz#fa7e62248931cb15b9404f8052581c302dd9de81" + integrity sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-identifier" "^7.22.20" -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz#fb3c6ccdd15939b6ff7939944b51971ddc35912c" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== +"@babel/plugin-transform-modules-umd@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz#5d4395fccd071dfefe6585a4411aa7d6b7d769e9" + integrity sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-module-transforms" "^7.23.3" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz#0ee349e9d1bc96e78e3b37a7af423a4078a7083f" - integrity sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA== +"@babel/plugin-transform-named-capturing-groups-regex@^7.22.5": + version "7.22.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz#67fe18ee8ce02d57c855185e27e3dc959b2e991f" + integrity sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-create-regexp-features-plugin" "^7.22.5" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz#e22498903a483448e94e032e9bbb9c5ccbfc93a3" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== +"@babel/plugin-transform-new-target@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz#5491bb78ed6ac87e990957cea367eab781c4d980" + integrity sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.20.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz#57cda588c7ffb7f4f8483cc83bdcea02a907f04d" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== +"@babel/plugin-transform-nullish-coalescing-operator@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz#45556aad123fc6e52189ea749e33ce090637346e" + integrity sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - regenerator-transform "^0.15.1" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz#b1abd8ebf8edaa5f7fe6bbb8d2133d23b6a6f76a" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== +"@babel/plugin-transform-numeric-separator@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz#03d08e3691e405804ecdd19dd278a40cca531f29" + integrity sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz#6d6df7983d67b195289be24909e3f12a8f664dc9" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== +"@babel/plugin-transform-object-rest-spread@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz#2b9c2d26bf62710460bdc0d1730d4f1048361b83" + integrity sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/compat-data" "^7.23.3" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.23.3" -"@babel/plugin-transform-spread@^7.19.0": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== +"@babel/plugin-transform-object-super@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz#81fdb636dcb306dd2e4e8fd80db5b2362ed2ebcd" + integrity sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.20" -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz#c6706eb2b1524028e317720339583ad0f444adcc" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== +"@babel/plugin-transform-optional-catch-binding@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz#318066de6dacce7d92fa244ae475aa8d91778017" + integrity sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz#04ec6f10acdaa81846689d63fae117dd9c243a5e" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== +"@babel/plugin-transform-optional-chaining@^7.23.3", "@babel/plugin-transform-optional-chaining@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz#6acf61203bdfc4de9d4e52e64490aeb3e52bd017" + integrity sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz#c8cea68263e45addcd6afc9091429f80925762c0" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== +"@babel/plugin-transform-parameters@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz#83ef5d1baf4b1072fa6e54b2b0999a7b2527e2af" + integrity sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-typescript@^7.18.6": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.20.7.tgz#673f49499cd810ae32a1ea5f3f8fab370987e055" - integrity sha512-m3wVKEvf6SoszD8pu4NZz3PvfKRCMgk6D6d0Qi9hNnlM5M6CFS92EgF4EiHVLKbU0r/r7ty1hg7NPZwE7WRbYw== +"@babel/plugin-transform-private-methods@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz#b2d7a3c97e278bfe59137a978d53b2c2e038c0e4" + integrity sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g== dependencies: - "@babel/helper-create-class-features-plugin" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-typescript" "^7.20.0" + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz#1ecfb0eda83d09bbcb77c09970c2dd55832aa246" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== +"@babel/plugin-transform-private-property-in-object@^7.23.4": + version "7.23.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz#3ec711d05d6608fd173d9b8de39872d8dbf68bf5" + integrity sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz#194317225d8c201bbae103364ffe9e2cea36cdca" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== +"@babel/plugin-transform-property-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz#54518f14ac4755d22b92162e4a852d308a560875" + integrity sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-regenerator@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz#141afd4a2057298602069fce7f2dc5173e6c561c" + integrity sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + regenerator-transform "^0.15.2" + +"@babel/plugin-transform-reserved-words@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz#4130dcee12bd3dd5705c587947eb715da12efac8" + integrity sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-shorthand-properties@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz#97d82a39b0e0c24f8a981568a8ed851745f59210" + integrity sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-spread@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz#41d17aacb12bde55168403c6f2d6bdca563d362c" + integrity sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" + +"@babel/plugin-transform-sticky-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz#dec45588ab4a723cb579c609b294a3d1bd22ff04" + integrity sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-template-literals@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz#5f0f028eb14e50b5d0f76be57f90045757539d07" + integrity sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-typeof-symbol@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz#9dfab97acc87495c0c449014eb9c547d8966bca4" + integrity sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-typescript@^7.23.3": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.23.5.tgz#83da13ef62a1ebddf2872487527094b31c9adb84" + integrity sha512-2fMkXEJkrmwgu2Bsv1Saxgj30IXZdJ+84lQcKKI7sm719oXs0BBw2ZENKdJdR1PjWndgLCEBNXJOri0fk7RYQA== + dependencies: + "@babel/helper-annotate-as-pure" "^7.22.5" + "@babel/helper-create-class-features-plugin" "^7.23.5" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/plugin-syntax-typescript" "^7.23.3" + +"@babel/plugin-transform-unicode-escapes@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz#1f66d16cab01fab98d784867d24f70c1ca65b925" + integrity sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q== + dependencies: + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-property-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz#19e234129e5ffa7205010feec0d94c251083d7ad" + integrity sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz#26897708d8f42654ca4ce1b73e96140fbad879dc" + integrity sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + +"@babel/plugin-transform-unicode-sets-regex@^7.23.3": + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz#4fb6f0a719c2c5859d11f6b55a050cc987f3799e" + integrity sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" "@babel/preset-env@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.20.2.tgz#9b1642aa47bb9f43a86f9630011780dab7f86506" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== - dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.23.5.tgz#350a3aedfa9f119ad045b068886457e895ba0ca1" + integrity sha512-0d/uxVD6tFGWXGDSfyMD1p2otoaKmu6+GD+NfAx0tMaH+dxORnp7T9TaVQ6mKyya7iBtCIVxHjWT7MuzzM9z+A== + dependencies: + "@babel/compat-data" "^7.23.5" + "@babel/helper-compilation-targets" "^7.22.15" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.23.5" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.23.3" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.23.3" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.23.3" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" + "@babel/plugin-syntax-import-assertions" "^7.23.3" + "@babel/plugin-syntax-import-attributes" "^7.23.3" + "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" @@ -1058,178 +867,126 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.5.tgz#ef939d6e7f268827e1841638dc6ff95515e115d9" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.23.3" + "@babel/plugin-transform-async-generator-functions" "^7.23.4" + "@babel/plugin-transform-async-to-generator" "^7.23.3" + "@babel/plugin-transform-block-scoped-functions" "^7.23.3" + "@babel/plugin-transform-block-scoping" "^7.23.4" + "@babel/plugin-transform-class-properties" "^7.23.3" + "@babel/plugin-transform-class-static-block" "^7.23.4" + "@babel/plugin-transform-classes" "^7.23.5" + "@babel/plugin-transform-computed-properties" "^7.23.3" + "@babel/plugin-transform-destructuring" "^7.23.3" + "@babel/plugin-transform-dotall-regex" "^7.23.3" + "@babel/plugin-transform-duplicate-keys" "^7.23.3" + "@babel/plugin-transform-dynamic-import" "^7.23.4" + "@babel/plugin-transform-exponentiation-operator" "^7.23.3" + "@babel/plugin-transform-export-namespace-from" "^7.23.4" + "@babel/plugin-transform-for-of" "^7.23.3" + "@babel/plugin-transform-function-name" "^7.23.3" + "@babel/plugin-transform-json-strings" "^7.23.4" + "@babel/plugin-transform-literals" "^7.23.3" + "@babel/plugin-transform-logical-assignment-operators" "^7.23.4" + "@babel/plugin-transform-member-expression-literals" "^7.23.3" + "@babel/plugin-transform-modules-amd" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-modules-systemjs" "^7.23.3" + "@babel/plugin-transform-modules-umd" "^7.23.3" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.5" + "@babel/plugin-transform-new-target" "^7.23.3" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.23.4" + "@babel/plugin-transform-numeric-separator" "^7.23.4" + "@babel/plugin-transform-object-rest-spread" "^7.23.4" + "@babel/plugin-transform-object-super" "^7.23.3" + "@babel/plugin-transform-optional-catch-binding" "^7.23.4" + "@babel/plugin-transform-optional-chaining" "^7.23.4" + "@babel/plugin-transform-parameters" "^7.23.3" + "@babel/plugin-transform-private-methods" "^7.23.3" + "@babel/plugin-transform-private-property-in-object" "^7.23.4" + "@babel/plugin-transform-property-literals" "^7.23.3" + "@babel/plugin-transform-regenerator" "^7.23.3" + "@babel/plugin-transform-reserved-words" "^7.23.3" + "@babel/plugin-transform-shorthand-properties" "^7.23.3" + "@babel/plugin-transform-spread" "^7.23.3" + "@babel/plugin-transform-sticky-regex" "^7.23.3" + "@babel/plugin-transform-template-literals" "^7.23.3" + "@babel/plugin-transform-typeof-symbol" "^7.23.3" + "@babel/plugin-transform-unicode-escapes" "^7.23.3" + "@babel/plugin-transform-unicode-property-regex" "^7.23.3" + "@babel/plugin-transform-unicode-regex" "^7.23.3" + "@babel/plugin-transform-unicode-sets-regex" "^7.23.3" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.6" + babel-plugin-polyfill-corejs3 "^0.8.5" + babel-plugin-polyfill-regenerator "^0.5.3" + core-js-compat "^3.31.0" + semver "^6.3.1" + +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.yarnpkg.com/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz#ccb88a2c49c817236861fee7826080573b8a923a" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/types" "^7.4.4" esutils "^2.0.2" "@babel/preset-typescript@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.18.6.tgz#ce64be3e63eddc44240c6358daefac17b3186399" - integrity sha512-s9ik86kXBAnD760aybBucdpnLsAt0jK1xqJn2juOn9lkOvSHV60os5hxoVJsPzMQxvnUJFAlkont2DvvaYEBtQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-transform-typescript" "^7.18.6" - -"@babel/runtime@^7.11.2": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.5.tgz#8564dd588182ce0047d55d7a75e93921107b57ec" - integrity sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/runtime@^7.8.4": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd" - integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/template@^7.16.7", "@babel/template@^7.3.3": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" - integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== - dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/parser" "^7.16.7" - "@babel/types" "^7.16.7" - -"@babel/template@^7.18.10", "@babel/template@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.20.7.tgz#a15090c2839a83b02aa996c0b4994005841fd5a8" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== + version "7.23.3" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.23.3.tgz#14534b34ed5b6d435aa05f1ae1c5e7adcc01d913" + integrity sha512-17oIGVlqz6CchO9RFYn5U6ZpWRZIngayYCtrPRSgANSwC2V1Jb+iP74nVxzzXJte8b8BYxrL1yY96xfhTBrNNQ== dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/template@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" - integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.6" - "@babel/types" "^7.18.6" - -"@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d" - integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== - dependencies: - "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.9" - "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.17.9" - "@babel/helper-hoist-variables" "^7.16.7" - "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.9" - "@babel/types" "^7.17.0" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98" - integrity sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.18.9" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.18.9" - "@babel/types" "^7.18.9" - debug "^4.1.0" - globals "^11.1.0" + "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-validator-option" "^7.22.15" + "@babel/plugin-syntax-jsx" "^7.23.3" + "@babel/plugin-transform-modules-commonjs" "^7.23.3" + "@babel/plugin-transform-typescript" "^7.23.3" -"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7": - version "7.20.12" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.12.tgz#7f0f787b3a67ca4475adef1f56cb94f6abd4a4b5" - integrity sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" +"@babel/regjsgen@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" + integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== + +"@babel/runtime@^7.11.2", "@babel/runtime@^7.21.0", "@babel/runtime@^7.8.4": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.5.tgz#11edb98f8aeec529b82b211028177679144242db" + integrity sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.22.15", "@babel/template@^7.3.3": + version "7.22.15" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" + integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== + dependencies: + "@babel/code-frame" "^7.22.13" + "@babel/parser" "^7.22.15" + "@babel/types" "^7.22.15" + +"@babel/traverse@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.5.tgz#f546bf9aba9ef2b042c0e00d245990c15508e7ec" + integrity sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w== + dependencies: + "@babel/code-frame" "^7.23.5" + "@babel/generator" "^7.23.5" + "@babel/helper-environment-visitor" "^7.22.20" + "@babel/helper-function-name" "^7.23.0" + "@babel/helper-hoist-variables" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" + "@babel/parser" "^7.23.5" + "@babel/types" "^7.23.5" debug "^4.1.0" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.3.0", "@babel/types@^7.3.3": - version "7.17.0" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" - integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw== - dependencies: - "@babel/helper-validator-identifier" "^7.16.7" - to-fast-properties "^2.0.0" - -"@babel/types@^7.18.6", "@babel/types@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f" - integrity sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - to-fast-properties "^2.0.0" - -"@babel/types@^7.19.0", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.4.4": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.7.tgz#54ec75e252318423fc07fb644dc6a58a64c09b7f" - integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== +"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.23.5", "@babel/types@^7.3.3", "@babel/types@^7.4.4": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.5.tgz#48d730a00c95109fa4393352705954d74fb5b602" + integrity sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w== dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" + "@babel/helper-string-parser" "^7.23.4" + "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" "@bcoe/v8-coverage@^0.2.3": @@ -1237,6 +994,11 @@ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== +"@bufbuild/protobuf@^1.4.2": + version "1.4.2" + resolved "https://registry.yarnpkg.com/@bufbuild/protobuf/-/protobuf-1.4.2.tgz#dc4faf21264a47b71a15806616043cb006e80ac8" + integrity sha512-JyEH8Z+OD5Sc2opSg86qMHn1EM1Sa+zj/Tc0ovxdwk56ByVNONJSabuCUbLQp+eKN3rWNfrho0X+3SEqEPXIow== + "@confio/ics23@^0.6.8": version "0.6.8" resolved "https://registry.yarnpkg.com/@confio/ics23/-/ics23-0.6.8.tgz#2a6b4f1f2b7b20a35d9a0745bb5a446e72930b3d" @@ -1423,10 +1185,10 @@ resolved "https://registry.yarnpkg.com/@cosmjs/utils/-/utils-0.28.13.tgz#2fd2844ec832d7833811e2ae1691305d09791a08" integrity sha512-dVeMBiyg+46x7XBZEfJK8yTihphbCFpjVYmLJVqmTsHfJwymQ65cpyW/C+V/LgWARGK8hWQ/aX9HM5Ao8QmMSg== -"@cosmos-client/core@^0.47.1": - version "0.47.1" - resolved "https://registry.yarnpkg.com/@cosmos-client/core/-/core-0.47.1.tgz#f362ffbb26f98dc0f52aeaf5d5c1b9d342a9eafe" - integrity sha512-N/2MEm9ciZB9oeojY2y5/bQ8xn4wA/fqZ2mdR2OeRrd8w04cby3vG9qiQkJ1SK61EigOIETpthQtNw05+Swnsw== +"@cosmos-client/core@^0.47.4": + version "0.47.4" + resolved "https://registry.yarnpkg.com/@cosmos-client/core/-/core-0.47.4.tgz#ba95e70d6833581bb1611a26474a4b14a3273fd9" + integrity sha512-20+w5nTOlwWjhRcTB3feay2H6ZV/kXl9eovXCmUMxuNHgrsg2K5HNgMBAScRe7d9EoNBTpIZia57qTnRVeo9qQ== dependencies: axios "^0.23.0" bech32 "^1.1.4" @@ -1438,10 +1200,10 @@ secp256k1 "^4.0.2" tweetnacl "^1.0.3" -"@cosmos-client/cosmwasm@^0.40.1": - version "0.40.1" - resolved "https://registry.yarnpkg.com/@cosmos-client/cosmwasm/-/cosmwasm-0.40.1.tgz#6f02fa233e0ff7ff32ee8db2a151e20560b91df9" - integrity sha512-KjIZT8nMHkFMWzLmEcBIEaY5ktCS+MFlbrhR4QlLwCUR+wW/vvge4tMwgw1NfhVru5UWJXZTJIE1EAt8OCnyTw== +"@cosmos-client/cosmwasm@^0.40.3": + version "0.40.3" + resolved "https://registry.yarnpkg.com/@cosmos-client/cosmwasm/-/cosmwasm-0.40.3.tgz#fd3679022690567915113738f036900348e98021" + integrity sha512-iInWF5wT0zcXZ5AC2DtnY7abwxVpug3CQPDK6+sW32ZlesBZkRVdtZ3ckKXhzaOy1INbzKSY/oah9KZPIHpQvg== dependencies: axios "^0.23.0" bech32 "^1.1.4" @@ -1468,34 +1230,70 @@ tiny-secp256k1 "^2.0.1" tweetnacl "^1.0.3" -"@eslint/eslintrc@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.1.tgz#8b5e1c49f4077235516bc9ec7d41378c0f69b8c6" - integrity sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.4.0", "@eslint-community/regexpp@^4.6.1": + version "4.10.0" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.10.0.tgz#548f6de556857c8bb73bbee70c35dc82a2e74d63" + integrity sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA== + +"@eslint/eslintrc@^2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.3.tgz#797470a75fe0fbd5a53350ee715e85e87baff22d" + integrity sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.3.1" - globals "^13.9.0" + espree "^9.6.0" + globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" - minimatch "^3.0.4" + minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.9.2": - version "0.9.5" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.5.tgz#2cbaf9a89460da24b5ca6531b8bbfc23e1df50c7" - integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== +"@eslint/js@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.54.0.tgz#4fab9a2ff7860082c304f750e94acd644cf984cf" + integrity sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ== + +"@ethereumjs/rlp@^4.0.1": + version "4.0.1" + resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" + integrity sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw== + +"@ethereumjs/util@^8.1.0": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" + integrity sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA== + dependencies: + "@ethereumjs/rlp" "^4.0.1" + ethereum-cryptography "^2.0.0" + micro-ftch "^0.3.1" + +"@humanwhocodes/config-array@^0.11.13": + version "0.11.13" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.13.tgz#075dc9684f40a531d9b26b0822153c1e832ee297" + integrity sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" + "@humanwhocodes/object-schema" "^2.0.1" debug "^4.1.1" - minimatch "^3.0.4" + minimatch "^3.0.5" -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz#e5211452df060fa8522b55c7b3c0c4d1981cb044" + integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -1513,279 +1311,229 @@ resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== -"@jest/console@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/console/-/console-27.5.1.tgz#260fe7239602fe5130a94f1aa386eff54b014bba" - integrity sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg== +"@jest/console@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-29.7.0.tgz#cd4822dbdb84529265c5a2bdb529a3c9cc950ffc" + integrity sha512-5Ni4CU7XHQi32IJ398EEP4RrB8eV09sXP2ROqD4bksHrnTree52PsxvX8tpL8LvTZ3pFzXyPbNQReSN41CAhOg== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" -"@jest/core@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/core/-/core-27.5.1.tgz#267ac5f704e09dc52de2922cbf3af9edcd64b626" - integrity sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ== +"@jest/core@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/core/-/core-29.7.0.tgz#b6cccc239f30ff36609658c5a5e2291757ce448f" + integrity sha512-n7aeXWKMnGtDA48y8TLWJPJmLmmZ642Ceo78cYWEpiD7FzDgmNDV/GCVRorPABdXLJZ/9wzzgZAlHjXjxDHGsg== dependencies: - "@jest/console" "^27.5.1" - "@jest/reporters" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/reporters" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - emittery "^0.8.1" + ci-info "^3.2.0" exit "^0.1.2" graceful-fs "^4.2.9" - jest-changed-files "^27.5.1" - jest-config "^27.5.1" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-resolve-dependencies "^27.5.1" - jest-runner "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - jest-watcher "^27.5.1" + jest-changed-files "^29.7.0" + jest-config "^29.7.0" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-resolve-dependencies "^29.7.0" + jest-runner "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + jest-watcher "^29.7.0" micromatch "^4.0.4" - rimraf "^3.0.0" + pretty-format "^29.7.0" slash "^3.0.0" strip-ansi "^6.0.0" -"@jest/environment@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" - integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== +"@jest/environment@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-29.7.0.tgz#24d61f54ff1f786f3cd4073b4b94416383baf2a7" + integrity sha512-aQIfHDq33ExsN4jP1NWGXhxgQ/wixs60gDiKO+XVMd8Mn0NWPWgc34ZQDTb2jKaUWQ7MuwoitXAsN2XVXNMpAw== dependencies: - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^27.5.1" + jest-mock "^29.7.0" + +"@jest/expect-utils@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-29.7.0.tgz#023efe5d26a8a70f21677d0a1afc0f0a44e3a1c6" + integrity sha512-GlsNBWiFQFCVi9QVSx7f5AgMeLxe9YCCs5PuP2O2LdjDAA8Jh9eX7lA1Jq/xdXw3Wb3hyvlFNfZIfcRetSzYcA== + dependencies: + jest-get-type "^29.6.3" + +"@jest/expect@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-29.7.0.tgz#76a3edb0cb753b70dfbfe23283510d3d45432bf2" + integrity sha512-8uMeAMycttpva3P1lBHB8VciS9V0XAr3GymPpipdyQXbBcuhkLQOSe8E/p92RyAdToS6ZD1tFkX+CkhoECE0dQ== + dependencies: + expect "^29.7.0" + jest-snapshot "^29.7.0" -"@jest/fake-timers@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" - integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== +"@jest/fake-timers@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-29.7.0.tgz#fd91bf1fffb16d7d0d24a426ab1a47a49881a565" + integrity sha512-q4DH1Ha4TTFPdxLsqDXK1d3+ioSL7yL5oCMJZgDYm6i+6CygW5E5xVr/D1HdsGxjt1ZWSfUAs9OxSB/BNelWrQ== dependencies: - "@jest/types" "^27.5.1" - "@sinonjs/fake-timers" "^8.0.1" + "@jest/types" "^29.6.3" + "@sinonjs/fake-timers" "^10.0.2" "@types/node" "*" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-util "^29.7.0" -"@jest/globals@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" - integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== +"@jest/globals@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-29.7.0.tgz#8d9290f9ec47ff772607fa864ca1d5a2efae1d4d" + integrity sha512-mpiz3dutLbkW2MNFubUGUEVLkTGiqW6yLVTA+JbP6fI6J5iL9Y0Nlg8k95pcF8ctKwCS7WVxteBs29hhfAotzQ== dependencies: - "@jest/environment" "^27.5.1" - "@jest/types" "^27.5.1" - expect "^27.5.1" + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/types" "^29.6.3" + jest-mock "^29.7.0" -"@jest/reporters@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.5.1.tgz#ceda7be96170b03c923c37987b64015812ffec04" - integrity sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw== +"@jest/reporters@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-29.7.0.tgz#04b262ecb3b8faa83b0b3d321623972393e8f4c7" + integrity sha512-DApq0KJbJOEzAFYjHADNNxAE3KbhxQB1y5Kplb5Waqw6zVbuWatSnMjE5gs8FUgEPmNsnZA3NCWl9NG0ia04Pg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" "@types/node" "*" chalk "^4.0.0" collect-v8-coverage "^1.0.0" exit "^0.1.2" - glob "^7.1.2" + glob "^7.1.3" graceful-fs "^4.2.9" istanbul-lib-coverage "^3.0.0" - istanbul-lib-instrument "^5.1.0" + istanbul-lib-instrument "^6.0.0" istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-haste-map "^27.5.1" - jest-resolve "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" + jest-message-util "^29.7.0" + jest-util "^29.7.0" + jest-worker "^29.7.0" slash "^3.0.0" - source-map "^0.6.0" string-length "^4.0.1" - terminal-link "^2.0.0" - v8-to-istanbul "^8.1.0" - -"@jest/schemas@^28.1.3": - version "28.1.3" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" - integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== - dependencies: - "@sinclair/typebox" "^0.24.1" + strip-ansi "^6.0.0" + v8-to-istanbul "^9.0.1" -"@jest/schemas@^29.0.0": - version "29.0.0" - resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.0.0.tgz#5f47f5994dd4ef067fb7b4188ceac45f77fe952a" - integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-29.6.3.tgz#430b5ce8a4e0044a7e3819663305a7b3091c8e03" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== dependencies: - "@sinclair/typebox" "^0.24.1" + "@sinclair/typebox" "^0.27.8" -"@jest/source-map@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-27.5.1.tgz#6608391e465add4205eae073b55e7f279e04e8cf" - integrity sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg== +"@jest/source-map@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-29.6.3.tgz#d90ba772095cf37a34a5eb9413f1b562a08554c4" + integrity sha512-MHjT95QuipcPrpLM+8JMSzFx6eHp5Bm+4XeFDJlwsvVBjmKNiIAvasGK2fxz2WbGRlnvqehFbh07MMa7n3YJnw== dependencies: + "@jridgewell/trace-mapping" "^0.3.18" callsites "^3.0.0" graceful-fs "^4.2.9" - source-map "^0.6.0" -"@jest/test-result@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-27.5.1.tgz#56a6585fa80f7cdab72b8c5fc2e871d03832f5bb" - integrity sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag== +"@jest/test-result@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-29.7.0.tgz#8db9a80aa1a097bb2262572686734baed9b1657c" + integrity sha512-Fdx+tv6x1zlkJPcWXmMDAG2HBnaR9XPSd5aDWQVsfrZmLVT3lU1cwyxLgRmXR9yrq4NBoEm9BMsfgFzTQAbJYA== dependencies: - "@jest/console" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/types" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz#4057e0e9cea4439e544c6353c6affe58d095745b" - integrity sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ== - dependencies: - "@jest/test-result" "^27.5.1" - graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-runtime "^27.5.1" - -"@jest/transform@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-27.5.1.tgz#6c3501dcc00c4c08915f292a600ece5ecfe1f409" - integrity sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw== +"@jest/test-sequencer@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-29.7.0.tgz#6cef977ce1d39834a3aea887a1726628a6f072ce" + integrity sha512-GQwJ5WZVrKnOJuiYiAF52UNUJXgTZx1NHjFSEB0qEMmSZKAkdMoIzw/Cj6x6NF4AvV23AUqDpFzQkN/eYCYTxw== dependencies: - "@babel/core" "^7.1.0" - "@jest/types" "^27.5.1" - babel-plugin-istanbul "^6.1.1" - chalk "^4.0.0" - convert-source-map "^1.4.0" - fast-json-stable-stringify "^2.0.0" + "@jest/test-result" "^29.7.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-regex-util "^27.5.1" - jest-util "^27.5.1" - micromatch "^4.0.4" - pirates "^4.0.4" + jest-haste-map "^29.7.0" slash "^3.0.0" - source-map "^0.6.1" - write-file-atomic "^3.0.0" -"@jest/transform@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.3.1.tgz#1e6bd3da4af50b5c82a539b7b1f3770568d6e36d" - integrity sha512-8wmCFBTVGYqFNLWfcOWoVuMuKYPUBTnTMDkdvFtAYELwDOl9RGwOsvQWGPFxDJ8AWY9xM/8xCXdqmPK3+Q5Lug== +"@jest/transform@^29.7.0": + version "29.7.0" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-29.7.0.tgz#df2dd9c346c7d7768b8a06639994640c642e284c" + integrity sha512-ok/BTPFzFKVMwO5eOHRrvnBVHdRy9IrsrW1GpMaQ9MCnilNLXQKmAX8s1YXDFaai9xJpac2ySzV0YeRRECr2Vw== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^29.3.1" - "@jridgewell/trace-mapping" "^0.3.15" + "@jest/types" "^29.6.3" + "@jridgewell/trace-mapping" "^0.3.18" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^2.0.0" fast-json-stable-stringify "^2.1.0" graceful-fs "^4.2.9" - jest-haste-map "^29.3.1" - jest-regex-util "^29.2.0" - jest-util "^29.3.1" + jest-haste-map "^29.7.0" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" - write-file-atomic "^4.0.1" - -"@jest/types@^27.5.1": - version "27.5.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" - integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" + write-file-atomic "^4.0.2" -"@jest/types@^29.3.1": - version "29.3.1" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.3.1.tgz#7c5a80777cb13e703aeec6788d044150341147e3" - integrity sha512-d0S0jmmTpjnhCmNpApgX3jrUZgZ22ivKJRvL2lli5hpCRoNnp1f85r2/wpKfXuYu8E7Jjh1hGfhPyup1NM5AmA== +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-29.6.3.tgz#1131f8cf634e7e84c5e77bab12f052af585fba59" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== dependencies: - "@jest/schemas" "^29.0.0" + "@jest/schemas" "^29.6.3" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" "@types/yargs" "^17.0.8" chalk "^4.0.0" -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== +"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== dependencies: "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/resolve-uri@^3.0.3": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" - integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew== +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== -"@jridgewell/sourcemap-codec@1.4.14": - version "1.4.14" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.11" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" - integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== - -"@jridgewell/trace-mapping@^0.3.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3" - integrity sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/trace-mapping@^0.3.15": - version "0.3.17" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz#793041277af9073b0951a7fe0f0d8c4c98c36985" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.14" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" - integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.20" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz#72e45707cf240fa6b081d0366f8265b0cd10197f" + integrity sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q== dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" "@ledgerhq/devices@^5.51.1": version "5.51.1" @@ -1816,11 +1564,36 @@ resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.50.0.tgz#29c6419e8379d496ab6d0426eadf3c4d100cd186" integrity sha512-swKHYCOZUGyVt4ge0u8a7AwNcA//h4nx5wIi0sruGye1IJ5Cva0GyK9L2/WdX+kWVTKp92ZiEo1df31lrWGPgA== -"@noble/hashes@^1", "@noble/hashes@^1.0.0": +"@neutron-org/neutronjsplus@0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@neutron-org/neutronjsplus/-/neutronjsplus-0.1.0.tgz#69ad24b51b7f0146c7a6a46a53234159101895d7" + integrity sha512-O+1BrUFgtd2AJCUiBbtyiyVqNSphNQd0utIpkNwUy1c2hCGLRKHkBS9mZZTsC5RW4kE98kS/XUwnhZsaDv0PZQ== + dependencies: + "@bufbuild/protobuf" "^1.4.2" + "@cosmos-client/core" "^0.47.4" + "@cosmos-client/cosmwasm" "^0.40.3" + "@cosmos-client/ibc" "^1.2.1" + axios "^0.27.2" + long "^5.2.1" + merkletreejs "^0.3.9" + +"@noble/curves@1.1.0", "@noble/curves@~1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.1.0.tgz#f13fc667c89184bc04cccb9b11e8e7bae27d8c3d" + integrity sha512-091oBExgENk/kGj3AZmtBDMpxQPDtxQABR2B9lb1JbVTs6ytdzZNwvhxQ4MWasRNEzlbEH8jCWFCwhF/Obj5AA== + dependencies: + "@noble/hashes" "1.3.1" + +"@noble/hashes@1.3.1": version "1.3.1" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.1.tgz#8831ef002114670c603c458ab8b11328406953a9" integrity sha512-EbqwksQwz9xDRGfDST86whPBgM65E0OH/pCgqW0GBVzO22bNE+NuIbeTb714+IfSjU3aRk47EUvXIb5bTsenKA== +"@noble/hashes@^1", "@noble/hashes@^1.0.0", "@noble/hashes@^1.2.0", "@noble/hashes@~1.3.0", "@noble/hashes@~1.3.1": + version "1.3.2" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39" + integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ== + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1834,7 +1607,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -1895,330 +1668,328 @@ resolved "https://registry.yarnpkg.com/@protobufjs/utf8/-/utf8-1.1.0.tgz#a777360b5b39a1a2e5106f8e858f2fd2d060c570" integrity sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw== -"@sinclair/typebox@^0.24.1": - version "0.24.27" - resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.27.tgz#d55643516a1546174e10da681a8aaa81e757452d" - integrity sha512-K7C7IlQ3zLePEZleUN21ceBA2aLcMnLHTLph8QWk1JK37L90obdpY+QGY8bXMKxf1ht1Z0MNewvXxWv0oGDYFg== +"@scure/base@~1.1.0": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.3.tgz#8584115565228290a6c6c4961973e0903bb3df2f" + integrity sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q== + +"@scure/bip32@1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.3.1.tgz#7248aea723667f98160f593d621c47e208ccbb10" + integrity sha512-osvveYtyzdEVbt3OfwwXFr4P2iVBL5u1Q3q4ONBfDY/UpOuXmOlbgwc1xECEboY8wIays8Yt6onaWMUdUbfl0A== + dependencies: + "@noble/curves" "~1.1.0" + "@noble/hashes" "~1.3.1" + "@scure/base" "~1.1.0" + +"@scure/bip39@1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.2.1.tgz#5cee8978656b272a917b7871c981e0541ad6ac2a" + integrity sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg== + dependencies: + "@noble/hashes" "~1.3.0" + "@scure/base" "~1.1.0" -"@sinonjs/commons@^1.7.0": - version "1.8.3" - resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" - integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + +"@sinonjs/commons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^8.0.1": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" - integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== +"@sinonjs/fake-timers@^10.0.2": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== dependencies: - "@sinonjs/commons" "^1.7.0" - -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@sinonjs/commons" "^3.0.0" -"@types/babel__core@^7.0.0", "@types/babel__core@^7.1.14": - version "7.1.19" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.19.tgz#7b497495b7d1b4812bdb9d02804d0576f43ee460" - integrity sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw== +"@types/babel__core@^7.1.14": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== dependencies: - "@babel/parser" "^7.1.0" - "@babel/types" "^7.0.0" + "@babel/parser" "^7.20.7" + "@babel/types" "^7.20.7" "@types/babel__generator" "*" "@types/babel__template" "*" "@types/babel__traverse" "*" "@types/babel__generator@*": - version "7.6.4" - resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.4.tgz#1f20ce4c5b1990b37900b63f050182d28c2439b7" - integrity sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg== + version "7.6.7" + resolved "https://registry.yarnpkg.com/@types/babel__generator/-/babel__generator-7.6.7.tgz#a7aebf15c7bc0eb9abd638bdb5c0b8700399c9d0" + integrity sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ== dependencies: "@babel/types" "^7.0.0" "@types/babel__template@*": - version "7.4.1" - resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.1.tgz#3d1a48fd9d6c0edfd56f2ff578daed48f36c8969" - integrity sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g== + version "7.4.4" + resolved "https://registry.yarnpkg.com/@types/babel__template/-/babel__template-7.4.4.tgz#5672513701c1b2199bc6dad636a9d7491586766f" + integrity sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A== dependencies: "@babel/parser" "^7.1.0" "@babel/types" "^7.0.0" -"@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" - integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== +"@types/babel__traverse@*", "@types/babel__traverse@^7.0.6": + version "7.20.4" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.20.4.tgz#ec2c06fed6549df8bc0eb4615b683749a4a92e1b" + integrity sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA== dependencies: - "@babel/types" "^7.3.0" - -"@types/bn.js@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.1.tgz#b51e1b55920a4ca26e9285ff79936bbdec910682" - integrity sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g== - dependencies: - "@types/node" "*" + "@babel/types" "^7.20.7" "@types/body-parser@*": - version "1.19.2" - resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.2.tgz#aea2059e28b7658639081347ac4fab3de166e6f0" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== + version "1.19.5" + resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.19.5.tgz#04ce9a3b677dc8bd681a17da1ab9835dc9d3ede4" + integrity sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg== dependencies: "@types/connect" "*" "@types/node" "*" "@types/connect@*": - version "3.4.35" - resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.35.tgz#5fcf6ae445e4021d1fc2219a4873cc73a3bb2ad1" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== + version "3.4.38" + resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" + integrity sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug== dependencies: "@types/node" "*" -"@types/express-serve-static-core@^4.17.18": - version "4.17.28" - resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz#c47def9f34ec81dc6328d0b1b5303d1ec98d86b8" - integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== +"@types/express-serve-static-core@^4.17.33": + version "4.17.41" + resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.41.tgz#5077defa630c2e8d28aa9ffc2c01c157c305bef6" + integrity sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA== dependencies: "@types/node" "*" "@types/qs" "*" "@types/range-parser" "*" + "@types/send" "*" "@types/express@^4.17.9": - version "4.17.13" - resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.13.tgz#a76e2995728999bab51a33fabce1d705a3709034" - integrity sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA== + version "4.17.21" + resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d" + integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ== dependencies: "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.18" + "@types/express-serve-static-core" "^4.17.33" "@types/qs" "*" "@types/serve-static" "*" -"@types/graceful-fs@^4.1.2": - version "4.1.5" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" - integrity sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw== - dependencies: - "@types/node" "*" - "@types/graceful-fs@^4.1.3": - version "4.1.6" - resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.6.tgz#e14b2576a1c25026b7f02ede1de3b84c3a1efeae" - integrity sha512-Sig0SNORX9fdW+bQuTEovKj3uHcUL6LQKbCrrqb1X7J6/ReAbhCXRAhc+SMejhLELFj2QcyuxmUooZ4bt5ReSw== + version "4.1.9" + resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.9.tgz#2a06bc0f68a20ab37b3e36aa238be6abdf49e8b4" + integrity sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ== dependencies: "@types/node" "*" -"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": +"@types/http-errors@*": version "2.0.4" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44" - integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== + resolved "https://registry.yarnpkg.com/@types/http-errors/-/http-errors-2.0.4.tgz#7eb47726c391b7345a6ec35ad7f4de469cf5ba4f" + integrity sha512-D0CFMMtydbJAegzOyHjtiKPLlvnm3iTZyZRSZoLq2mRhDdmLfIWOCYPfQJ4cu2erKghU++QvjcUjp/5h7hESpA== + +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": + version "2.0.6" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== "@types/istanbul-lib-report@*": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" - integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz#53047614ae72e19fc0401d872de3ae2b4ce350bf" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": - version "3.0.1" - resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz#9153fe98bba2bd565a63add9436d6f0d7f8468ff" - integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz#0f03e3d2f670fbdac586e34b433783070cc16f54" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^28.1": - version "28.1.6" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-28.1.6.tgz#d6a9cdd38967d2d746861fb5be6b120e38284dd4" - integrity sha512-0RbGAFMfcBJKOmqRazM8L98uokwuwD5F8rHrv/ZMbrZBwVOWZUyPG6VFNscjYr/vjM3Vu4fRrCPbOs42AfemaQ== +"@types/jest@^29.5": + version "29.5.10" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-29.5.10.tgz#a10fc5bab9e426081c12b2ef73d24d4f0c9b7f50" + integrity sha512-tE4yxKEphEyxj9s4inideLHktW/x6DwesIwWZ9NN1FKf9zbJYsnhBoA9vrHA/IuIOKwPa5PcFBNV4lpMIOEzyQ== dependencies: - jest-matcher-utils "^28.0.0" - pretty-format "^28.0.0" + expect "^29.0.0" + pretty-format "^29.0.0" "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/lodash@^4.14.182": - version "4.14.182" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" - integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== + version "4.14.202" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.202.tgz#f09dbd2fb082d507178b2f2a5c7e74bd72ff98f8" + integrity sha512-OvlIYQK9tNneDlS0VN54LLd5uiPCBOp7gS5Z0f1mjoJYBrtStzgmJBxONW3U6OZqdtNzZPmn9BS/7WI7BFFcFQ== "@types/long@^4.0.1", "@types/long@^4.0.2": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== +"@types/mime@*": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-3.0.4.tgz#2198ac274de6017b44d941e00261d5bc6a0e0a45" + integrity sha512-iJt33IQnVRkqeqC7PzBHPTC6fDlRNRW8vjrgqtScAhrmMwe8c4Eo7+fUGTa+XdWrpEgpyKWMYmi2dIwMAYRzPw== + "@types/mime@^1": - version "1.3.2" - resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.2.tgz#93e25bf9ee75fe0fd80b594bc4feb0e862111b5a" - integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== + version "1.3.5" + resolved "https://registry.yarnpkg.com/@types/mime/-/mime-1.3.5.tgz#1ef302e01cf7d2b5a0fa526790c9123bf1d06690" + integrity sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w== -"@types/node@*": - version "17.0.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.17.tgz#a8ddf6e0c2341718d74ee3dc413a13a042c45a0c" - integrity sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw== +"@types/node@*", "@types/node@>=13.7.0": + version "20.10.0" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.0.tgz#16ddf9c0a72b832ec4fcce35b8249cf149214617" + integrity sha512-D0WfRmU9TQ8I9PFx9Yc+EBHw+vSpIub4IDvQivcp26PtPrdMGAq5SDcpXEo/epqa/DXotVpekHiLNTg3iaKXBQ== + dependencies: + undici-types "~5.26.4" "@types/node@10.12.18": version "10.12.18" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== -"@types/node@11.11.6": - version "11.11.6" - 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 "18.0.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.6.tgz#0ba49ac517ad69abe7a1508bc9b3a5483df9d5d7" - integrity sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/prettier@^2.1.5": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17" - integrity sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA== - "@types/qs@*": - version "6.9.7" - resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== + version "6.9.10" + resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.10.tgz#0af26845b5067e1c9a622658a51f60a3934d51e8" + integrity sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw== "@types/range-parser@*": - version "1.2.4" - resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== + version "1.2.7" + resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb" + integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ== -"@types/secp256k1@^4.0.1": - version "4.0.3" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" - integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== +"@types/semver@^7.3.12": + version "7.5.6" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" + integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== + +"@types/send@*": + version "0.17.4" + resolved "https://registry.yarnpkg.com/@types/send/-/send-0.17.4.tgz#6619cd24e7270793702e4e6a4b958a9010cfc57a" + integrity sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA== dependencies: + "@types/mime" "^1" "@types/node" "*" "@types/serve-static@*": - version "1.13.10" - resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.10.tgz#f5e0ce8797d2d7cc5ebeda48a52c96c4fa47a8d9" - integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== + version "1.15.5" + resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.5.tgz#15e67500ec40789a1e8c9defc2d32a896f05b033" + integrity sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ== dependencies: - "@types/mime" "^1" + "@types/http-errors" "*" + "@types/mime" "*" "@types/node" "*" "@types/stack-utils@^2.0.0": - version "2.0.1" - resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" - integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== + version "2.0.3" + resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" + integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== "@types/yargs-parser@*": - version "21.0.0" - resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" - integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== - -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== - dependencies: - "@types/yargs-parser" "*" + version "21.0.3" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.3.tgz#815e30b786d2e8f0dcd85fd5bcf5e1a04d008f15" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== "@types/yargs@^17.0.8": - version "17.0.19" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.19.tgz#8dbecdc9ab48bee0cb74f6e3327de3fa0d0c98ae" - integrity sha512-cAx3qamwaYX9R0fzOIZAlFpo4A+1uBVCxqpKz9D26uTF4srRXaGTTsikQmaotCtNdbhzyUH7ft6p9ktz9s6UNQ== + version "17.0.32" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-17.0.32.tgz#030774723a2f7faafebf645f4e5a48371dca6229" + integrity sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog== dependencies: "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.19.0.tgz#9608a4b6d0427104bccf132f058cba629a6553c0" - integrity sha512-w59GpFqDYGnWFim9p6TGJz7a3qWeENJuAKCqjGSx+Hq/bwq3RZwXYqy98KIfN85yDqz9mq6QXiY5h0FjGQLyEg== - dependencies: - "@typescript-eslint/scope-manager" "5.19.0" - "@typescript-eslint/type-utils" "5.19.0" - "@typescript-eslint/utils" "5.19.0" - debug "^4.3.2" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.2.0" - semver "^7.3.5" + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== + dependencies: + "@eslint-community/regexpp" "^4.4.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.0" + natural-compare-lite "^1.4.0" + semver "^7.3.7" tsutils "^3.21.0" "@typescript-eslint/parser@^5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.19.0.tgz#05e587c1492868929b931afa0cb5579b0f728e75" - integrity sha512-yhktJjMCJX8BSBczh1F/uY8wGRYrBeyn84kH6oyqdIJwTGKmzX5Qiq49LRQ0Jh0LXnWijEziSo6BRqny8nqLVQ== - dependencies: - "@typescript-eslint/scope-manager" "5.19.0" - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/typescript-estree" "5.19.0" - debug "^4.3.2" - -"@typescript-eslint/scope-manager@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.19.0.tgz#97e59b0bcbcb54dbcdfba96fc103b9020bbe9cb4" - integrity sha512-Fz+VrjLmwq5fbQn5W7cIJZ066HxLMKvDEmf4eu1tZ8O956aoX45jAuBB76miAECMTODyUxH61AQM7q4/GOMQ5g== - dependencies: - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/visitor-keys" "5.19.0" - -"@typescript-eslint/type-utils@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.19.0.tgz#80f2125b0dfe82494bbae1ea99f1c0186d420282" - integrity sha512-O6XQ4RI4rQcBGshTQAYBUIGsKqrKeuIOz9v8bckXZnSeXjn/1+BDZndHLe10UplQeJLXDNbaZYrAytKNQO2T4Q== - dependencies: - "@typescript-eslint/utils" "5.19.0" - debug "^4.3.2" + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== + dependencies: + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== + dependencies: + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" + debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.19.0.tgz#12d3d600d754259da771806ee8b2c842d3be8d12" - integrity sha512-zR1ithF4Iyq1wLwkDcT+qFnhs8L5VUtjgac212ftiOP/ZZUOCuuF2DeGiZZGQXGoHA50OreZqLH5NjDcDqn34w== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.19.0.tgz#fc987b8f62883f9ea6a5b488bdbcd20d33c0025f" - integrity sha512-dRPuD4ocXdaE1BM/dNR21elSEUPKaWgowCA0bqJ6YbYkvtrPVEvZ+zqcX5a8ECYn3q5iBSSUcBBD42ubaOp0Hw== +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== dependencies: - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/visitor-keys" "5.19.0" - debug "^4.3.2" - globby "^11.0.4" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" is-glob "^4.0.3" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.19.0.tgz#fe87f1e3003d9973ec361ed10d36b4342f1ded1e" - integrity sha512-ZuEckdupXpXamKvFz/Ql8YnePh2ZWcwz7APICzJL985Rp5C2AYcHO62oJzIqNhAMtMK6XvrlBTZeNG8n7gS3lQ== +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: + "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.19.0" - "@typescript-eslint/types" "5.19.0" - "@typescript-eslint/typescript-estree" "5.19.0" + "@types/semver" "^7.3.12" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" eslint-scope "^5.1.1" - eslint-utils "^3.0.0" + semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.19.0": - version "5.19.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.19.0.tgz#c84ebc7f6c744707a361ca5ec7f7f64cd85b8af6" - integrity sha512-Ym7zZoMDZcAKWsULi2s7UMLREdVQdScPQ/fKWMYefarCztWlHPFVJo8racf8R0Gc8FAEJ2eD4of8As1oFtnQlQ== +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== dependencies: - "@typescript-eslint/types" "5.19.0" - eslint-visitor-keys "^3.0.0" + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" -abab@^2.0.3, abab@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" - integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== +"@ungap/structured-clone@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" + integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== accepts@~1.3.8: version "1.3.8" @@ -2228,40 +1999,15 @@ accepts@~1.3.8: mime-types "~2.1.34" negotiator "0.6.3" -acorn-globals@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" - integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== - dependencies: - acorn "^7.1.1" - acorn-walk "^7.1.1" - -acorn-jsx@^5.3.1: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^7.1.1: - version "7.2.0" - resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" - integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== - -acorn@^7.1.1: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - -acorn@^8.2.4, acorn@^8.7.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" - integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== - -agent-base@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" +acorn@^8.9.0: + version "8.11.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.2.tgz#ca0d78b51895be5390a5903c5b3bdcdaf78ae40b" + integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== aggregate-error@^3.0.0: version "3.1.0" @@ -2271,7 +2017,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2318,14 +2064,14 @@ ansi-styles@^5.0.0: integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== ansi-styles@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.1.0.tgz#87313c102b8118abd57371afab34618bf7350ed3" - integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== + version "6.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== anymatch@^3.0.3: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" @@ -2350,7 +2096,7 @@ argparse@^2.0.1: array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== array-union@^2.1.0: version "2.1.0" @@ -2372,7 +2118,7 @@ astral-regex@^2.0.0: asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== axios@^0.21.2: version "0.21.4" @@ -2396,40 +2142,19 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -babel-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-27.5.1.tgz#a1bf8d61928edfefd21da27eb86a695bfd691444" - integrity sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg== - dependencies: - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__core" "^7.1.14" - babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^27.5.1" - chalk "^4.0.0" - graceful-fs "^4.2.9" - slash "^3.0.0" - -babel-jest@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.3.1.tgz#05c83e0d128cd48c453eea851482a38782249f44" - integrity sha512-aard+xnMoxgjwV70t0L6wkW/3HQQtV+O0PEimxKgzNqCJnbYmroPojdP2tqKSOAt8QAKV/uSZU8851M7B5+fcA== +babel-jest@^29.3.1, babel-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-29.7.0.tgz#f4369919225b684c56085998ac63dbd05be020d5" + integrity sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg== dependencies: - "@jest/transform" "^29.3.1" + "@jest/transform" "^29.7.0" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^29.2.0" + babel-preset-jest "^29.6.3" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" -babel-plugin-dynamic-import-node@^2.3.3: - version "2.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz#84fda19c976ec5c6defef57f9427b3def66e17a3" - integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - dependencies: - object.assign "^4.1.0" - babel-plugin-istanbul@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz#fa88ec59232fd9b4e36dbbc540a8ec9a9b47da73" @@ -2441,49 +2166,39 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz#9be98ecf28c331eb9f5df9c72d6f89deb8181c2e" - integrity sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ== - dependencies: - "@babel/template" "^7.3.3" - "@babel/types" "^7.3.3" - "@types/babel__core" "^7.0.0" - "@types/babel__traverse" "^7.0.6" - -babel-plugin-jest-hoist@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.2.0.tgz#23ee99c37390a98cfddf3ef4a78674180d823094" - integrity sha512-TnspP2WNiR3GLfCsUNHqeXw0RoQ2f9U5hQ5L3XFpwuO8htQmSrhh8qsB6vi5Yi8+kuynN1yjDjQsPfkebmB6ZA== +babel-plugin-jest-hoist@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-29.6.3.tgz#aadbe943464182a8922c3c927c3067ff40d24626" + integrity sha512-ESAc/RJvGTFEzRwOTT4+lNDk/GNHMkKbNzsvT0qKRfDyyYTskxB5rnU2njIDYVxXCBHHEI1c0YwHob3WaYujOg== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== +babel-plugin-polyfill-corejs2@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.6.tgz#b2df0251d8e99f229a8e60fc4efa9a68b41c8313" + integrity sha512-jhHiWVZIlnPbEUKSSNb9YoWcQGdlTLq7z1GHL4AjFxaoOUMuuEVJ+Y4pAaQUGOGk93YsVCKPbqbfw3m0SM6H8Q== dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.4.3" + semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz#56ad88237137eade485a71b52f72dbed57c6230a" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== +babel-plugin-polyfill-corejs3@^0.8.5: + version "0.8.6" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.6.tgz#25c2d20002da91fe328ff89095c85a391d6856cf" + integrity sha512-leDIc4l4tUgU7str5BWLS2h8q2N4Nf6lGZP6UrNDxdtfF2g69eJ5L0H7S8A5Ln/arfFAfHor5InAdZuIOwZdgQ== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" + "@babel/helper-define-polyfill-provider" "^0.4.3" + core-js-compat "^3.33.1" -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz#390f91c38d90473592ed43351e801a9d3e0fd747" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== +babel-plugin-polyfill-regenerator@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.3.tgz#d4c49e4b44614607c13fb769bcd85c72bb26a4a5" + integrity sha512-8sHeDOmXC8csczMrYEOf0UTNa4yE2SxV5JGeT/LP1n0OYVDUUFPxG9vdk2AlDlIit4t+Kf0xCtpgXPBwnn/9pw== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" + "@babel/helper-define-polyfill-provider" "^0.4.3" babel-preset-current-node-syntax@^1.0.0: version "1.0.1" @@ -2503,20 +2218,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz#91f10f58034cb7989cb4f962b69fa6eef6a6bc81" - integrity sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag== +babel-preset-jest@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.6.3.tgz#fa05fa510e7d493896d7b0dd2033601c840f171c" + integrity sha512-0B3bhxR6snWXJZtR/RliHTDPRgn1sNHOR0yVtq/IiQFyuOVjFS+wuio/R4gSNkyYmKmJB4wGZv2NZanmKmTnNA== dependencies: - babel-plugin-jest-hoist "^27.5.1" - babel-preset-current-node-syntax "^1.0.0" - -babel-preset-jest@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-29.2.0.tgz#3048bea3a1af222e3505e4a767a974c95a7620dc" - integrity sha512-z9JmMJppMxNv8N7fNRHvhMg9cvIkMxQBXgFkane3yKVEvEOP+kB50lk8DFRvF9PGqbyXxlmebKWhuDORO8RgdA== - dependencies: - babel-plugin-jest-hoist "^29.2.0" + babel-plugin-jest-hoist "^29.6.3" babel-preset-current-node-syntax "^1.0.0" babylon@^6.18.0: @@ -2547,9 +2254,9 @@ bech32@^1.1.4: integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== bignumber.js@^9.0.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" - integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== + version "9.1.2" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c" + integrity sha512-2/mKyZH9K85bzOEfhXDBFZTGd1CTs+5IHpeFQo9luiBG7hghdC851Pj2WAhb6E3R6b9tZj/XKhbg4fum+Kepug== bindings@^1.3.0: version "1.5.0" @@ -2572,19 +2279,11 @@ bip32@^2.0.6: wif "^2.0.6" bip39@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.0.4.tgz#5b11fed966840b5e1b8539f0f54ab6392969b2a0" - integrity sha512-YZKQlb752TrUWqHWj7XAwCSjYEgGAk+/Aas3V7NyjQeZYsztO8JnQUaCWhcnL4T+jL8nvB8typ2jRPzTlgugNw== + version "3.1.0" + resolved "https://registry.yarnpkg.com/bip39/-/bip39-3.1.0.tgz#c55a418deaf48826a6ceb34ac55b3ee1577e18a3" + integrity sha512-c9kiwdk45Do5GL0vJMe7tS95VjCii65mYAH7DfWl3uW8AVzXKQVUm64i3hzVybBDMp9r7j9iNxR85+ul8MdN/A== dependencies: - "@types/node" "11.11.6" - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - -blakejs@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" - integrity sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ== + "@noble/hashes" "^1.2.0" bn.js@4.11.6: version "4.11.6" @@ -2596,7 +2295,7 @@ bn.js@^4.11.8, bn.js@^4.11.9: resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== -bn.js@^5.1.2, bn.js@^5.2.0, bn.js@^5.2.1: +bn.js@^5.2.0, bn.js@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.1.tgz#0bc527a6a0d18d0aa8d5b0538ce4a77dccfa7b70" integrity sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ== @@ -2627,7 +2326,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.1: +braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -2639,43 +2338,15 @@ brorand@^1.1.0: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== -browser-process-hrtime@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" - integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - -browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserslist@^4.17.5: - version "4.20.2" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88" - integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA== - dependencies: - caniuse-lite "^1.0.30001317" - electron-to-chromium "^1.4.84" - escalade "^3.1.1" - node-releases "^2.0.2" - picocolors "^1.0.0" - -browserslist@^4.21.3, browserslist@^4.21.4: - version "4.21.4" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.4.tgz#e7496bbc67b9e39dd0f98565feccdcb0d4ff6987" - integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== +browserslist@^4.21.9, browserslist@^4.22.1: + version "4.22.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" + integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== dependencies: - caniuse-lite "^1.0.30001400" - electron-to-chromium "^1.4.251" - node-releases "^2.0.6" - update-browserslist-db "^1.0.9" + caniuse-lite "^1.0.30001541" + electron-to-chromium "^1.4.535" + node-releases "^2.0.13" + update-browserslist-db "^1.0.13" bs58@^4.0.0: version "4.0.1" @@ -2684,7 +2355,7 @@ bs58@^4.0.0: dependencies: base-x "^3.0.2" -bs58check@<3.0.0, bs58check@^2.1.1, bs58check@^2.1.2: +bs58check@<3.0.0, bs58check@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== @@ -2710,15 +2381,10 @@ buffer-reverse@^1.0.1: resolved "https://registry.yarnpkg.com/buffer-reverse/-/buffer-reverse-1.0.1.tgz#49283c8efa6f901bc01fa3304d06027971ae2f60" integrity sha512-M87YIUBsZ6N924W57vDwT/aOu8hw7ZgdByz6ijksLjmHJELBASmYTTlNHRgjE+pTsT9oJXGaDSgqqwfdHotDUg== -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== - builtin-modules@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" - integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + integrity sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ== bytes@3.1.2: version "3.1.2" @@ -2726,12 +2392,13 @@ bytes@3.1.2: integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== call-bind@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" callsites@^3.0.0: version "3.1.0" @@ -2748,17 +2415,12 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001317: - version "1.0.30001327" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001327.tgz#c1546d7d7bb66506f0ccdad6a7d07fc6d668c858" - integrity sha512-1/Cg4jlD9qjZzhbzkzEaAC2JHsP0WrOc8Rd/3a3LuajGzGWR/hD7TVyvq99VqmTy99eVh8Zkmdq213OgvgXx7w== +caniuse-lite@^1.0.30001541: + version "1.0.30001565" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz#a528b253c8a2d95d2b415e11d8b9942acc100c4f" + integrity sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w== -caniuse-lite@^1.0.30001400: - version "1.0.30001443" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001443.tgz#8fc85f912d5471c9821acacf9e715c421ca0dd1f" - integrity sha512-jUo8svymO8+Mkj3qbUbVjR8zv8LUGpGkUM/jKvc9SO2BvjCI980dp9fQbf/dyLs6RascPzgR4nhAKFA4OHeSaA== - -chalk@^2.0.0, chalk@^2.3.0: +chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2781,11 +2443,11 @@ char-regex@^1.0.2: integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== ci-info@^3.2.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" - integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== + version "3.9.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.9.0.tgz#4279a62028a7b1f262f3473fc9605f5e218c59b4" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: +cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== @@ -2794,9 +2456,9 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: safe-buffer "^5.0.1" cjs-module-lexer@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" - integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== + version "1.2.3" + resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz#6c370ab19f8a3394e318fe682686ec0ac684d107" + integrity sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ== clean-stack@^2.0.0: version "2.2.0" @@ -2835,24 +2497,24 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== +cliui@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" + integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== dependencies: string-width "^4.2.0" - strip-ansi "^6.0.0" + strip-ansi "^6.0.1" wrap-ansi "^7.0.0" co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" - integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= + integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== collect-v8-coverage@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59" - integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg== + version "1.0.2" + resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.2.tgz#c0b29bcd33bcd0779a1344c2136051e6afd3d9e9" + integrity sha512-lHl4d5/ONEbLlJvaJNtsF/Lz+WvB07u2ycqTYbdrq7UypDXailES4valYb2eWiJFxZlVmpGekfqoxQhzyFdT4Q== color-convert@^1.9.0: version "1.9.3" @@ -2871,7 +2533,7 @@ color-convert@^2.0.1: color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== color-name@~1.1.4: version "1.1.4" @@ -2879,9 +2541,9 @@ color-name@~1.1.4: integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== colorette@^2.0.16: - version "2.0.16" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" - integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== combined-stream@^1.0.8: version "1.0.8" @@ -2891,24 +2553,24 @@ combined-stream@^1.0.8: delayed-stream "~1.0.0" commander@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.0.tgz#71797971162cd3cf65f0b9d24eb28f8d303acdf1" - integrity sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA== + version "10.0.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== commander@^2.12.1: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^8.3.0: - version "8.3.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" - integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== +commander@^9.3.0: + version "9.5.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30" + integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== content-disposition@0.5.4: version "0.5.4" @@ -2918,16 +2580,9 @@ content-disposition@0.5.4: safe-buffer "5.2.1" content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" - integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== - dependencies: - safe-buffer "~5.1.1" + version "1.0.5" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" + integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== convert-source-map@^2.0.0: version "2.0.0" @@ -2937,24 +2592,24 @@ convert-source-map@^2.0.0: cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== cookie@0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.5.0.tgz#d1f5d71adec6558c58f389987c366aa47e994f8b" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -core-js-compat@^3.25.1: - version "3.27.1" - resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.27.1.tgz#b5695eb25c602d72b1d30cbfba3cb7e5e4cf0a67" - integrity sha512-Dg91JFeCDA17FKnneN7oCMz4BkQ4TcffkgHP4OWwp9yx3pi7ubqMDXXSacfNak1PQqjc95skyt+YBLHQJnkJwA== +core-js-compat@^3.31.0, core-js-compat@^3.33.1: + version "3.33.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.33.3.tgz#ec678b772c5a2d8a7c60a91c3a81869aa704ae01" + integrity sha512-cNzGqFsh3Ot+529GIXacjTJ7kegdt5fPXxCBVS1G0iaZpuo/tBz399ymceLJveQhFFZ8qThHiP3fzuoQjKN2ow== dependencies: - browserslist "^4.21.4" + browserslist "^4.22.1" core-js@^3.23.5: - version "3.23.5" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.23.5.tgz#1f82b0de5eece800827a2f59d597509c67650475" - integrity sha512-7Vh11tujtAZy82da4duVreQysIoO2EvVrur7y6IzZkH1IHPSekuDi8Vuw1+YKjkbfWLRD7Nc9ICQ/sIUDutcyg== + version "3.33.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.33.3.tgz#3c644a323f0f533a0d360e9191e37f7fc059088d" + integrity sha512-lo0kOocUlLKmm6kv/FswQL8zbkH7mVsLJ/FULClOhv8WRVmKLVcs6XPNQAzstfeJTCHMyButEwG+z1kHxHoDZw== cosmjs-types@^0.4.0: version "0.4.1" @@ -2981,7 +2636,7 @@ cosmwasm@^1.1.1: "@cosmjs/stargate" "^0.28.3" "@cosmjs/utils" "^0.28.3" -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: +create-hash@^1.1.0, create-hash@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== @@ -2992,7 +2647,7 @@ create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: ripemd160 "^2.0.1" sha.js "^2.4.0" -create-hmac@^1.1.4, create-hmac@^1.1.7: +create-hmac@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== @@ -3004,6 +2659,19 @@ create-hmac@^1.1.4, create-hmac@^1.1.7: safe-buffer "^5.0.1" sha.js "^2.4.8" +create-jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/create-jest/-/create-jest-29.7.0.tgz#a355c5b3cb1e1af02ba177fe7afd7feee49a5320" + integrity sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q== + dependencies: + "@jest/types" "^29.6.3" + chalk "^4.0.0" + exit "^0.1.2" + graceful-fs "^4.2.9" + jest-config "^29.7.0" + jest-util "^29.7.0" + prompts "^2.0.1" + create-require@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" @@ -3018,41 +2686,17 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crypto-js@^3.1.9-1: - version "3.3.0" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.3.0.tgz#846dd1cce2f68aacfa156c8578f926a609b7976b" - integrity sha512-DIT51nX0dCfKltpRiXV+/TVZq+Qq2NgF4644+K7Ttnla7zEzqc+kjJyiB96BHNyUTBxyjzRcZYpUdZa+QAqi6Q== - -cssom@^0.4.4: - version "0.4.4" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" - integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== - -cssom@~0.3.6: - version "0.3.8" - resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" - integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - -cssstyle@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" - integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== - dependencies: - cssom "~0.3.6" - -data-urls@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" - integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== - dependencies: - abab "^2.0.3" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.0.0" +crypto-js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.2.0.tgz#4d931639ecdfd12ff80e8186dba6af2c2e856631" + integrity sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q== date-fns@^2.16.1: - version "2.28.0" - resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.28.0.tgz#9570d656f5fc13143e50c975a3b6bbeb46cd08b2" - integrity sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw== + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" debug@2.6.9: version "2.6.9" @@ -3061,56 +2705,55 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.3.2, debug@^4.3.3: +debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" -debug@^4.1.1: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== -decimal.js@^10.2.1: - version "10.3.1" - resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" - integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== - -dedent@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" - integrity sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw= +dedent@^1.0.0: + version "1.5.1" + resolved "https://registry.yarnpkg.com/dedent/-/dedent-1.5.1.tgz#4f3fc94c8b711e9bb2800d185cd6ad20f2a90aff" + integrity sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg== -deep-is@^0.1.3, deep-is@~0.1.3: +deep-is@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== + +define-data-property@^1.0.1, define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== dependencies: - object-keys "^1.0.12" + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== depd@2.0.0: version "2.0.0" @@ -3127,15 +2770,10 @@ detect-newline@^3.0.0: resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -diff-sequences@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" - integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== - -diff-sequences@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-28.1.1.tgz#9989dc731266dc2903457a70e996f3a041913ac6" - integrity sha512-FU0iFaH/E23a+a718l8Qa/19bF9p06kgE0KipMOMadwa3SjnaElKzPaUC0vnibs6/B/9ni97s61mcejk8W1fQw== +diff-sequences@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" + integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== diff@^4, diff@^4.0.1: version "4.0.2" @@ -3156,13 +2794,6 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" -domexception@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" - integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== - dependencies: - webidl-conversions "^5.0.0" - eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" @@ -3171,17 +2802,12 @@ eastasianwidth@^0.2.0: ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -electron-to-chromium@^1.4.251: - version "1.4.284" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz#61046d1e4cab3a25238f6bf7413795270f125592" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -electron-to-chromium@^1.4.84: - version "1.4.106" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.106.tgz#e7a3bfa9d745dd9b9e597616cb17283cc349781a" - integrity sha512-ZYfpVLULm67K7CaaGP7DmjyeMY4naxsbTy+syVVxT6QHI1Ww8XbJjmr9fDckrhq44WzCrcC5kH3zGpdusxwwqg== +electron-to-chromium@^1.4.535: + version "1.4.596" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.596.tgz#6752d1aa795d942d49dfc5d3764d6ea283fab1d7" + integrity sha512-zW3zbZ40Icb2BCWjm47nxwcFGYlIgdXkAx85XDO7cyky9J4QQfq8t0W19/TLZqq3JPQXtlv8BPIGmfa9Jb4scg== elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: version "6.5.4" @@ -3196,10 +2822,10 @@ elliptic@^6.4.0, elliptic@^6.5.3, elliptic@^6.5.4: minimalistic-assert "^1.0.1" minimalistic-crypto-utils "^1.0.1" -emittery@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" - integrity sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg== +emittery@^0.13.1: + version "0.13.1" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" + integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== emoji-regex@^8.0.0: version "8.0.0" @@ -3214,7 +2840,7 @@ emoji-regex@^9.2.2: encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== error-ex@^1.3.1: version "1.3.2" @@ -3231,12 +2857,12 @@ escalade@^3.1.1: escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== escape-string-regexp@^2.0.0: version "2.0.0" @@ -3248,27 +2874,15 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -escodegen@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" - integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== - dependencies: - esprima "^4.0.1" - estraverse "^5.2.0" - esutils "^2.0.2" - optionator "^0.8.1" - optionalDependencies: - source-map "~0.6.1" - eslint-config-prettier@^8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" - integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + version "8.10.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz#3a06a662130807e2502fc3ff8b4143d8a0658e11" + integrity sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg== eslint-plugin-prettier@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.0.0.tgz#8b99d1e4b8b24a762472b4567992023619cb98e0" - integrity sha512-98MqmCJ7vJodoQK359bqQWaxOE0CS8paAz/GgjaZLyex4TTk3g9HugoO89EqWCrFiOqn9EVvcoo7gZzONCWVwQ== + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== dependencies: prettier-linter-helpers "^1.0.0" @@ -3280,90 +2894,81 @@ eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.1.1.tgz#fff34894c2f65e5226d3041ac480b4513a163642" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== eslint@^8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.13.0.tgz#6fcea43b6811e655410f5626cfcf328016badcd7" - integrity sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ== - dependencies: - "@eslint/eslintrc" "^1.2.1" - "@humanwhocodes/config-array" "^0.9.2" - ajv "^6.10.0" + version "8.54.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.54.0.tgz#588e0dd4388af91a2e8fa37ea64924074c783537" + integrity sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.3" + "@eslint/js" "8.54.0" + "@humanwhocodes/config-array" "^0.11.13" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.3.1" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^6.0.1" - globals "^13.6.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" + is-path-inside "^3.0.3" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^9.3.1: - version "9.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.1.tgz#8793b4bc27ea4c778c19908e0719e7b8f4115bcd" - integrity sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.7.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^3.3.0" + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" -esprima@^4.0.0, esprima@^4.0.1, esprima@~4.0.0: +esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" + integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== dependencies: estraverse "^5.1.0" @@ -3392,7 +2997,7 @@ esutils@^2.0.2: etag@~1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== ethereum-bloom-filters@^1.0.6: version "1.0.10" @@ -3401,37 +3006,15 @@ ethereum-bloom-filters@^1.0.6: dependencies: js-sha3 "^0.8.0" -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereumjs-util@^7.1.0: - version "7.1.5" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.5.tgz#9ecf04861e4fbbeed7465ece5f23317ad1129181" - integrity sha512-SDl5kKrQAudFBUe5OJM9Ac6WmMyYmXX/6sTmLZ3ffG2eY6ZIGBes3pEDxNN6V72WyOw4CPD5RomKdsa8DAAwLg== +ethereum-cryptography@^2.0.0, ethereum-cryptography@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-2.1.2.tgz#18fa7108622e56481157a5cb7c01c0c6a672eb67" + integrity sha512-Z5Ba0T0ImZ8fqXrJbpHcbpAvIswRte2wGNR/KePnu8GbbvgJ47lMxT/ZZPG6i9Jaht4azPDop4HaM00J0J59ug== dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - rlp "^2.2.4" + "@noble/curves" "1.1.0" + "@noble/hashes" "1.3.1" + "@scure/bip32" "1.3.1" + "@scure/bip39" "1.2.1" ethjs-unit@0.1.6: version "0.1.6" @@ -3446,14 +3029,6 @@ events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -3472,17 +3047,18 @@ execa@^5.0.0, execa@^5.1.1: exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" - integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= + integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== -expect@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" - integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== +expect@^29.0.0, expect@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/expect/-/expect-29.7.0.tgz#578874590dcb3214514084c08115d8aee61e11bc" + integrity sha512-2Zks0hf1VLFYI1kbh0I5jP3KHHyCHpkfyHBzsSXRFgl/Bg9mWYfMW8oD+PdMPlEwy5HNsR9JutYy6pMeOh61nw== dependencies: - "@jest/types" "^27.5.1" - jest-get-type "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" + "@jest/expect-utils" "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" express@^4.18.2: version "4.18.2" @@ -3527,14 +3103,14 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + version "1.3.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.3.0.tgz#ece407fa550a64d638536cd727e129c61616e0f0" + integrity sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw== fast-glob@^3.2.9: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -3547,22 +3123,22 @@ fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== -fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: +fast-levenshtein@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" fb-watchman@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.1.tgz#fc84fb39d2709cf3ff6d743706157bb5708a8a85" - integrity sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg== + version "2.0.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.2.tgz#e9524ee6b5c77e9e5001af0f85f3adbb8623255c" + integrity sha512-p5161BqbuCaSnB8jIbzQHOlpgsPmK5rJVDfDKO91Axs5NC1uu3HRQm6wt9cd9/+GtQQIO53JdGXXoyDpTAsgYA== dependencies: bser "2.1.1" @@ -3606,37 +3182,32 @@ find-up@^4.0.0, find-up@^4.1.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.2.0" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.2.0.tgz#2c0c2d5040c99b1632771a9d105725c0115363ee" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: - version "3.2.5" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" - integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== - -follow-redirects@^1.14.0, follow-redirects@^1.14.9: - version "1.15.2" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -follow-redirects@^1.14.4: - version "1.15.1" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.1.tgz#0ca6a452306c9b276e4d3127483e29575e207ad5" - integrity sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA== +flatted@^3.2.9: + version "3.2.9" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.9.tgz#7eb4c67ca1ba34232ca9d2d93e9886e611ad7daf" + integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" +follow-redirects@^1.14.0, follow-redirects@^1.14.4, follow-redirects@^1.14.9: + version "1.15.3" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.3.tgz#fe2f3ef2690afce7e82ed0b44db08165b207123a" + integrity sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q== form-data@^4.0.0: version "4.0.0" @@ -3655,27 +3226,22 @@ forwarded@0.2.0: fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== fsevents@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" @@ -3687,14 +3253,15 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== -get-intrinsic@^1.0.2: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== +get-intrinsic@^1.0.2, get-intrinsic@^1.1.3, get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.2.tgz#281b7622971123e1ef4b3c90fd7539306da93f3b" + integrity sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA== dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" get-package-type@^0.1.0: version "0.1.0" @@ -3713,22 +3280,22 @@ glob-parent@^5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@^6.0.1: +glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" -glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +glob@^7.1.1, glob@^7.1.3, glob@^7.1.4: + version "7.2.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" + integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" @@ -3737,10 +3304,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: - version "13.12.1" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.12.1.tgz#ec206be932e6c77236677127577aa8e50bf1c5cb" - integrity sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw== +globals@^13.19.0: + version "13.23.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.23.0.tgz#ef31673c926a0976e1f61dab4dca57e0c0a8af02" + integrity sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA== dependencies: type-fest "^0.20.2" @@ -3751,7 +3318,7 @@ globalthis@^1.0.1: dependencies: define-properties "^1.1.3" -globby@^11.0.4: +globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -3763,33 +3330,50 @@ globby@^11.0.4: merge2 "^1.4.1" slash "^3.0.0" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + version "4.2.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== + +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== has-flag@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has-symbols@^1.0.1: +has-property-descriptors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== + dependencies: + get-intrinsic "^1.2.2" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - hash-base@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" @@ -3799,7 +3383,7 @@ hash-base@^3.0.0: readable-stream "^3.6.0" safe-buffer "^5.2.0" -hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: +hash.js@^1.0.0, hash.js@^1.0.3: version "1.1.7" resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== @@ -3807,6 +3391,13 @@ hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + hmac-drbg@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" @@ -3816,13 +3407,6 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -html-encoding-sniffer@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" - integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== - dependencies: - whatwg-encoding "^1.0.5" - html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -3839,23 +3423,6 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - -https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== - dependencies: - agent-base "6" - debug "4" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -3868,12 +3435,12 @@ iconv-lite@0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" -ignore@^5.1.8, ignore@^5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +ignore@^5.2.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" + integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3892,7 +3459,7 @@ import-local@^3.0.2: imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" - integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== indent-string@^4.0.0: version "4.0.0" @@ -3902,7 +3469,7 @@ indent-string@^4.0.0: inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== dependencies: once "^1.3.0" wrappy "1" @@ -3920,26 +3487,19 @@ ipaddr.js@1.9.1: is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-core-module@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== - dependencies: - has "^1.0.3" + integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== +is-core-module@^2.13.0: + version "2.13.1" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.1.tgz#ad0d7532c6fea9da1ebdc82742d74525c6273384" + integrity sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw== dependencies: - has "^1.0.3" + hasown "^2.0.0" is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== is-fullwidth-code-point@^3.0.0: version "3.0.0" @@ -3973,25 +3533,20 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-potential-custom-element-name@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" - integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== -is-typedarray@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== isomorphic-ws@^4.0.1: version "4.0.1" @@ -3999,14 +3554,14 @@ isomorphic-ws@^4.0.1: integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz#189e7909d0a39fa5a3dfad5b03f71947770191d3" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== + version "3.2.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz#2d166c4b0644d43a39f04bf6c2edd1e585f31756" + integrity sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg== -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz#7b49198b657b27a730b8e9cb601f1e1bff24c59a" - integrity sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q== +istanbul-lib-instrument@^5.0.4: + version "5.2.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz#d10c8885c2125574e1c231cacadf955675e1ce3d" + integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== dependencies: "@babel/core" "^7.12.3" "@babel/parser" "^7.14.7" @@ -4014,13 +3569,24 @@ istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: istanbul-lib-coverage "^3.2.0" semver "^6.3.0" +istanbul-lib-instrument@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.1.tgz#71e87707e8041428732518c6fb5211761753fbdf" + integrity sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA== + dependencies: + "@babel/core" "^7.12.3" + "@babel/parser" "^7.14.7" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.2.0" + semver "^7.5.4" + istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + version "3.0.1" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz#908305bac9a5bd175ac6a74489eafd0fc2445a7d" + integrity sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw== dependencies: istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" + make-dir "^4.0.0" supports-color "^7.1.0" istanbul-lib-source-maps@^4.0.0: @@ -4033,506 +3599,388 @@ istanbul-lib-source-maps@^4.0.0: source-map "^0.6.1" istanbul-reports@^3.1.3: - version "3.1.4" - resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.4.tgz#1b6f068ecbc6c331040aab5741991273e609e40c" - integrity sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw== + version "3.1.6" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.6.tgz#2544bcab4768154281a2f0870471902704ccaa1a" + integrity sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg== dependencies: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jest-changed-files@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-27.5.1.tgz#a348aed00ec9bf671cc58a66fcbe7c3dfd6a68f5" - integrity sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw== +jest-changed-files@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-29.7.0.tgz#1c06d07e77c78e1585d020424dedc10d6e17ac3a" + integrity sha512-fEArFiwf1BpQ+4bXSprcDc3/x4HSzL4al2tozwVpDFpsxALjLYdyiIK4e5Vz66GQJIbXJ82+35PtysofptNX2w== dependencies: - "@jest/types" "^27.5.1" execa "^5.0.0" - throat "^6.0.1" - -jest-circus@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-27.5.1.tgz#37a5a4459b7bf4406e53d637b49d22c65d125ecc" - integrity sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + jest-util "^29.7.0" + p-limit "^3.1.0" + +jest-circus@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-29.7.0.tgz#b6817a45fcc835d8b16d5962d0c026473ee3668a" + integrity sha512-3E1nCMgipcTkCocFwM90XXQab9bS+GMsjdpmPrlelaxwD93Ad8iVEjX/vvHPdLPnFf+L40u+5+iutRdA1N9myw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/expect" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" - dedent "^0.7.0" - expect "^27.5.1" + dedent "^1.0.0" is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" + jest-each "^29.7.0" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-runtime "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" + p-limit "^3.1.0" + pretty-format "^29.7.0" + pure-rand "^6.0.0" slash "^3.0.0" stack-utils "^2.0.3" - throat "^6.0.1" -jest-cli@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-27.5.1.tgz#278794a6e6458ea8029547e6c6cbf673bd30b145" - integrity sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw== +jest-cli@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-29.7.0.tgz#5592c940798e0cae677eec169264f2d839a37995" + integrity sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg== dependencies: - "@jest/core" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/core" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" chalk "^4.0.0" + create-jest "^29.7.0" exit "^0.1.2" - graceful-fs "^4.2.9" import-local "^3.0.2" - jest-config "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" - prompts "^2.0.1" - yargs "^16.2.0" + jest-config "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" + yargs "^17.3.1" -jest-config@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-27.5.1.tgz#5c387de33dca3f99ad6357ddeccd91bf3a0e4a41" - integrity sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA== +jest-config@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-29.7.0.tgz#bcbda8806dbcc01b1e316a46bb74085a84b0245f" + integrity sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ== dependencies: - "@babel/core" "^7.8.0" - "@jest/test-sequencer" "^27.5.1" - "@jest/types" "^27.5.1" - babel-jest "^27.5.1" + "@babel/core" "^7.11.6" + "@jest/test-sequencer" "^29.7.0" + "@jest/types" "^29.6.3" + babel-jest "^29.7.0" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" - glob "^7.1.1" + glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-get-type "^27.5.1" - jest-jasmine2 "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runner "^27.5.1" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-circus "^29.7.0" + jest-environment-node "^29.7.0" + jest-get-type "^29.6.3" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-runner "^29.7.0" + jest-util "^29.7.0" + jest-validate "^29.7.0" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^27.5.1" + pretty-format "^29.7.0" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" - integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== - dependencies: - chalk "^4.0.0" - diff-sequences "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-diff@^28.0.0, jest-diff@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" - integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== +jest-diff@^29.0.0, jest-diff@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.7.0.tgz#017934a66ebb7ecf6f205e84699be10afd70458a" + integrity sha512-LMIgiIrhigmPrs03JHpxUh2yISK3vLFPkAodPeo0+BuF7wA2FoQbkEg1u8gBYBThncu7e1oEDUfIXVuTqLRUjw== dependencies: chalk "^4.0.0" - diff-sequences "^28.1.1" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" + diff-sequences "^29.6.3" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-docblock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0" - integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ== +jest-docblock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-29.7.0.tgz#8fddb6adc3cdc955c93e2a87f61cfd350d5d119a" + integrity sha512-q617Auw3A612guyaFgsbFeYpNP5t2aoUNLwBUbc/0kD1R4t9ixDbyFTHd1nok4epoVFpr7PmeWHrhvuV3XaJ4g== dependencies: detect-newline "^3.0.0" -jest-each@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-27.5.1.tgz#5bc87016f45ed9507fed6e4702a5b468a5b2c44e" - integrity sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ== +jest-each@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-29.7.0.tgz#162a9b3f2328bdd991beaabffbb74745e56577d1" + integrity sha512-gns+Er14+ZrEoC5fhOfYCY1LOHHr0TI+rQUHZS8Ttw2l7gl+80eHc/gFf2Ktkw0+SIACDTeWvpFcv3B04VembQ== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" chalk "^4.0.0" - jest-get-type "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - -jest-environment-jsdom@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz#ea9ccd1fc610209655a77898f86b2b559516a546" - integrity sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" + jest-get-type "^29.6.3" + jest-util "^29.7.0" + pretty-format "^29.7.0" + +jest-environment-node@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" + integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" - jsdom "^16.6.0" - -jest-environment-node@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-27.5.1.tgz#dedc2cfe52fab6b8f5714b4808aefa85357a365e" - integrity sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - jest-mock "^27.5.1" - jest-util "^27.5.1" + jest-mock "^29.7.0" + jest-util "^29.7.0" -jest-extended@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/jest-extended/-/jest-extended-3.0.2.tgz#f74ae82bdf280536552752b502f57f71e7d2fcf1" - integrity sha512-LnVZvwWLRV9AL8J7f4frKu0KHuTrbIFK15IqrvSwbFCYxalkuC5l7HfcofsksePrvlEJ2WAcfYNnu1+bEGvInA== +jest-extended@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/jest-extended/-/jest-extended-4.0.2.tgz#d23b52e687cedf66694e6b2d77f65e211e99e021" + integrity sha512-FH7aaPgtGYHc9mRjriS0ZEHYM5/W69tLrFTIdzm+yJgeoCmmrSB/luSfMSqWP9O29QWHPEmJ4qmU6EwsZideog== dependencies: - jest-diff "^28.0.0" - jest-get-type "^28.0.0" - -jest-get-type@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" - integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + jest-diff "^29.0.0" + jest-get-type "^29.0.0" -jest-get-type@^28.0.0, jest-get-type@^28.0.2: - version "28.0.2" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-28.0.2.tgz#34622e628e4fdcd793d46db8a242227901fcf203" - integrity sha512-ioj2w9/DxSYHfOm5lJKCdcAmPJzQXmbM/Url3rhlghrPvT3tt+7a/+oXc9azkKmLvoiXjtV83bEWqi+vs5nlPA== - -jest-haste-map@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.5.1.tgz#9fd8bd7e7b4fa502d9c6164c5640512b4e811e7f" - integrity sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng== - dependencies: - "@jest/types" "^27.5.1" - "@types/graceful-fs" "^4.1.2" - "@types/node" "*" - anymatch "^3.0.3" - fb-watchman "^2.0.0" - graceful-fs "^4.2.9" - jest-regex-util "^27.5.1" - jest-serializer "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - micromatch "^4.0.4" - walker "^1.0.7" - optionalDependencies: - fsevents "^2.3.2" +jest-get-type@^29.0.0, jest-get-type@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-29.6.3.tgz#36f499fdcea197c1045a127319c0481723908fd1" + integrity sha512-zrteXnqYxfQh7l5FHyL38jL39di8H8rHoecLH3JNxH3BwOrBsNeabdap5e0I23lD4HHI8W5VFBZqG4Eaq5LNcw== -jest-haste-map@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.3.1.tgz#af83b4347f1dae5ee8c2fb57368dc0bb3e5af843" - integrity sha512-/FFtvoG1xjbbPXQLFef+WSU4yrc0fc0Dds6aRPBojUid7qlPqZvxdUBA03HW0fnVHXVCnCdkuoghYItKNzc/0A== +jest-haste-map@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-29.7.0.tgz#3c2396524482f5a0506376e6c858c3bbcc17b104" + integrity sha512-fP8u2pyfqx0K1rGn1R9pyE0/KTn+G7PxktWidOBTqFPLYX0b9ksaMFkhK5vrS3DVun09pckLdlx90QthlW7AmA== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.6.3" "@types/graceful-fs" "^4.1.3" "@types/node" "*" anymatch "^3.0.3" fb-watchman "^2.0.0" graceful-fs "^4.2.9" - jest-regex-util "^29.2.0" - jest-util "^29.3.1" - jest-worker "^29.3.1" + jest-regex-util "^29.6.3" + jest-util "^29.7.0" + jest-worker "^29.7.0" micromatch "^4.0.4" walker "^1.0.8" optionalDependencies: fsevents "^2.3.2" -jest-jasmine2@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz#a037b0034ef49a9f3d71c4375a796f3b230d1ac4" - integrity sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - co "^4.6.0" - expect "^27.5.1" - is-generator-fn "^2.0.0" - jest-each "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-runtime "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" - pretty-format "^27.5.1" - throat "^6.0.1" - -jest-junit@^15.0.0: - version "15.0.0" - resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-15.0.0.tgz#a47544ab42e9f8fe7ada56306c218e09e52bd690" - integrity sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg== +jest-junit@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/jest-junit/-/jest-junit-16.0.0.tgz#d838e8c561cf9fdd7eb54f63020777eee4136785" + integrity sha512-A94mmw6NfJab4Fg/BlvVOUXzXgF0XIH6EmTgJ5NDPp4xoKq0Kr7sErb+4Xs9nZvu58pJojz5RFGpqnZYJTrRfQ== dependencies: mkdirp "^1.0.4" strip-ansi "^6.0.1" uuid "^8.3.2" xml "^1.0.1" -jest-leak-detector@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz#6ec9d54c3579dd6e3e66d70e3498adf80fde3fb8" - integrity sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ== - dependencies: - jest-get-type "^27.5.1" - pretty-format "^27.5.1" - -jest-matcher-utils@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" - integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== +jest-leak-detector@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz#5b7ec0dadfdfec0ca383dc9aa016d36b5ea4c728" + integrity sha512-kYA8IJcSYtST2BY9I+SMC32nDpBT3J2NvWJx8+JCuCdl/CR1I4EKUJROiP8XtCcxqgTTBGJNdbB1A8XRKbTetw== dependencies: - chalk "^4.0.0" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - pretty-format "^27.5.1" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-matcher-utils@^28.0.0: - version "28.1.3" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" - integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== +jest-matcher-utils@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-29.7.0.tgz#ae8fec79ff249fd592ce80e3ee474e83a6c44f12" + integrity sha512-sBkD+Xi9DtcChsI3L3u0+N0opgPYnCRPtGcQYrgXmR+hmt/fYfWAL0xRXYU8eWOdfuLgBe0YCW3AFtnRLagq/g== dependencies: chalk "^4.0.0" - jest-diff "^28.1.3" - jest-get-type "^28.0.2" - pretty-format "^28.1.3" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + pretty-format "^29.7.0" -jest-message-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" - integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== +jest-message-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-29.7.0.tgz#8bc392e204e95dfe7564abbe72a404e28e51f7f3" + integrity sha512-GBEV4GRADeP+qtB2+6u61stea8mGcOT4mCtrYISZwfu9/ISHFJ/5zOMXYbpBE9RsS5+Gb63DW4FgmnKJ79Kf6w== dependencies: "@babel/code-frame" "^7.12.13" - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/stack-utils" "^2.0.0" chalk "^4.0.0" graceful-fs "^4.2.9" micromatch "^4.0.4" - pretty-format "^27.5.1" + pretty-format "^29.7.0" slash "^3.0.0" stack-utils "^2.0.3" -jest-mock@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" - integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== +jest-mock@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-29.7.0.tgz#4e836cf60e99c6fcfabe9f99d017f3fdd50a6347" + integrity sha512-ITOMZn+UkYS4ZFh83xYAOzWStloNzJFO2s8DWrE4lhtGD+AorgnbkiKERe4wQVBydIGPx059g6riW5Btp6Llnw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" "@types/node" "*" + jest-util "^29.7.0" jest-pnp-resolver@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" - integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== - -jest-regex-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-27.5.1.tgz#4da143f7e9fd1e542d4aa69617b38e4a78365b95" - integrity sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg== - -jest-regex-util@^29.2.0: - version "29.2.0" - resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.2.0.tgz#82ef3b587e8c303357728d0322d48bbfd2971f7b" - integrity sha512-6yXn0kg2JXzH30cr2NlThF+70iuO/3irbaB4mh5WyqNIvLLP+B6sFdluO1/1RJmslyh/f9osnefECflHvTbwVA== - -jest-resolve-dependencies@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz#d811ecc8305e731cc86dd79741ee98fed06f1da8" - integrity sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg== - dependencies: - "@jest/types" "^27.5.1" - jest-regex-util "^27.5.1" - jest-snapshot "^27.5.1" - -jest-resolve@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-27.5.1.tgz#a2f1c5a0796ec18fe9eb1536ac3814c23617b384" - integrity sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw== - dependencies: - "@jest/types" "^27.5.1" + version "1.2.3" + resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz#930b1546164d4ad5937d5540e711d4d38d4cad2e" + integrity sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w== + +jest-regex-util@^29.6.3: + version "29.6.3" + resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-29.6.3.tgz#4a556d9c776af68e1c5f48194f4d0327d24e8a52" + integrity sha512-KJJBsRCyyLNWCNBOvZyRDnAIfUiRJ8v+hOBQYGn8gDyF3UegwiP4gwRR3/SDa42g1YbVycTidUF3rKjyLFDWbg== + +jest-resolve-dependencies@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-29.7.0.tgz#1b04f2c095f37fc776ff40803dc92921b1e88428" + integrity sha512-un0zD/6qxJ+S0et7WxeI3H5XSe9lTBBR7bOHCHXkKR6luG5mwDDlIzVQ0V5cZCuoTgEdcdwzTghYkTWfubi+nA== + dependencies: + jest-regex-util "^29.6.3" + jest-snapshot "^29.7.0" + +jest-resolve@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-29.7.0.tgz#64d6a8992dd26f635ab0c01e5eef4399c6bcbc30" + integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== + dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" + jest-haste-map "^29.7.0" jest-pnp-resolver "^1.2.2" - jest-util "^27.5.1" - jest-validate "^27.5.1" + jest-util "^29.7.0" + jest-validate "^29.7.0" resolve "^1.20.0" - resolve.exports "^1.1.0" + resolve.exports "^2.0.0" slash "^3.0.0" -jest-runner@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-27.5.1.tgz#071b27c1fa30d90540805c5645a0ec167c7b62e5" - integrity sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ== +jest-runner@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-29.7.0.tgz#809af072d408a53dcfd2e849a4c976d3132f718e" + integrity sha512-fsc4N6cPCAahybGBfTRcq5wFR6fpLznMg47sY5aDpsoejOcVYFb07AHuSnR0liMcPTgBsA3ZJL6kFOjPdoNipQ== dependencies: - "@jest/console" "^27.5.1" - "@jest/environment" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/console" "^29.7.0" + "@jest/environment" "^29.7.0" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" - emittery "^0.8.1" + emittery "^0.13.1" graceful-fs "^4.2.9" - jest-docblock "^27.5.1" - jest-environment-jsdom "^27.5.1" - jest-environment-node "^27.5.1" - jest-haste-map "^27.5.1" - jest-leak-detector "^27.5.1" - jest-message-util "^27.5.1" - jest-resolve "^27.5.1" - jest-runtime "^27.5.1" - jest-util "^27.5.1" - jest-worker "^27.5.1" - source-map-support "^0.5.6" - throat "^6.0.1" - -jest-runtime@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-27.5.1.tgz#4896003d7a334f7e8e4a53ba93fb9bcd3db0a1af" - integrity sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A== - dependencies: - "@jest/environment" "^27.5.1" - "@jest/fake-timers" "^27.5.1" - "@jest/globals" "^27.5.1" - "@jest/source-map" "^27.5.1" - "@jest/test-result" "^27.5.1" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" + jest-docblock "^29.7.0" + jest-environment-node "^29.7.0" + jest-haste-map "^29.7.0" + jest-leak-detector "^29.7.0" + jest-message-util "^29.7.0" + jest-resolve "^29.7.0" + jest-runtime "^29.7.0" + jest-util "^29.7.0" + jest-watcher "^29.7.0" + jest-worker "^29.7.0" + p-limit "^3.1.0" + source-map-support "0.5.13" + +jest-runtime@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-29.7.0.tgz#efecb3141cf7d3767a3a0cc8f7c9990587d3d817" + integrity sha512-gUnLjgwdGqW7B4LvOIkbKs9WGbn+QLqRQQ9juC6HndeDiezIwhDP+mhMwHWCEcfQ5RUXa6OPnFF8BJh5xegwwQ== + dependencies: + "@jest/environment" "^29.7.0" + "@jest/fake-timers" "^29.7.0" + "@jest/globals" "^29.7.0" + "@jest/source-map" "^29.6.3" + "@jest/test-result" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" + "@types/node" "*" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" - execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^27.5.1" - jest-message-util "^27.5.1" - jest-mock "^27.5.1" - jest-regex-util "^27.5.1" - jest-resolve "^27.5.1" - jest-snapshot "^27.5.1" - jest-util "^27.5.1" + jest-haste-map "^29.7.0" + jest-message-util "^29.7.0" + jest-mock "^29.7.0" + jest-regex-util "^29.6.3" + jest-resolve "^29.7.0" + jest-snapshot "^29.7.0" + jest-util "^29.7.0" slash "^3.0.0" strip-bom "^4.0.0" -jest-serializer@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-27.5.1.tgz#81438410a30ea66fd57ff730835123dea1fb1f64" - integrity sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w== - dependencies: - "@types/node" "*" - graceful-fs "^4.2.9" - -jest-snapshot@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-27.5.1.tgz#b668d50d23d38054a51b42c4039cab59ae6eb6a1" - integrity sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA== +jest-snapshot@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-29.7.0.tgz#c2c574c3f51865da1bb329036778a69bf88a6be5" + integrity sha512-Rm0BMWtxBcioHr1/OX5YCP8Uov4riHvKPknOGs804Zg9JGZgmIBkbtlxJC/7Z4msKYVbIJtfU+tKb8xlYNfdkw== dependencies: - "@babel/core" "^7.7.2" + "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" + "@babel/plugin-syntax-jsx" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" - "@babel/traverse" "^7.7.2" - "@babel/types" "^7.0.0" - "@jest/transform" "^27.5.1" - "@jest/types" "^27.5.1" - "@types/babel__traverse" "^7.0.4" - "@types/prettier" "^2.1.5" + "@babel/types" "^7.3.3" + "@jest/expect-utils" "^29.7.0" + "@jest/transform" "^29.7.0" + "@jest/types" "^29.6.3" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^27.5.1" + expect "^29.7.0" graceful-fs "^4.2.9" - jest-diff "^27.5.1" - jest-get-type "^27.5.1" - jest-haste-map "^27.5.1" - jest-matcher-utils "^27.5.1" - jest-message-util "^27.5.1" - jest-util "^27.5.1" + jest-diff "^29.7.0" + jest-get-type "^29.6.3" + jest-matcher-utils "^29.7.0" + jest-message-util "^29.7.0" + jest-util "^29.7.0" natural-compare "^1.4.0" - pretty-format "^27.5.1" - semver "^7.3.2" - -jest-util@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" - integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== - dependencies: - "@jest/types" "^27.5.1" - "@types/node" "*" - chalk "^4.0.0" - ci-info "^3.2.0" - graceful-fs "^4.2.9" - picomatch "^2.2.3" + pretty-format "^29.7.0" + semver "^7.5.3" -jest-util@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.3.1.tgz#1dda51e378bbcb7e3bc9d8ab651445591ed373e1" - integrity sha512-7YOVZaiX7RJLv76ZfHt4nbNEzzTRiMW/IiOG7ZOKmTXmoGBxUDefgMAxQubu6WPVqP5zSzAdZG0FfLcC7HOIFQ== +jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-29.7.0.tgz#23c2b62bfb22be82b44de98055802ff3710fc0bc" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== dependencies: - "@jest/types" "^29.3.1" + "@jest/types" "^29.6.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" -jest-validate@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.5.1.tgz#9197d54dc0bdb52260b8db40b46ae668e04df067" - integrity sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ== +jest-validate@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-29.7.0.tgz#7bf705511c64da591d46b15fce41400d52147d9c" + integrity sha512-ZB7wHqaRGVw/9hST/OuFUReG7M8vKeq0/J2egIGLdvjHCmYqGARhzXmtgi+gVeZ5uXFF219aOc3Ls2yLg27tkw== dependencies: - "@jest/types" "^27.5.1" + "@jest/types" "^29.6.3" camelcase "^6.2.0" chalk "^4.0.0" - jest-get-type "^27.5.1" + jest-get-type "^29.6.3" leven "^3.1.0" - pretty-format "^27.5.1" + pretty-format "^29.7.0" -jest-watcher@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-27.5.1.tgz#71bd85fb9bde3a2c2ec4dc353437971c43c642a2" - integrity sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw== +jest-watcher@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-29.7.0.tgz#7810d30d619c3a62093223ce6bb359ca1b28a2f2" + integrity sha512-49Fg7WXkU3Vl2h6LbLtMQ/HyB6rXSIX7SqvBLQmssRBGN9I0PNvPmAmCWSOY6SOvrjhI/F7/bGAv9RtnsPA03g== dependencies: - "@jest/test-result" "^27.5.1" - "@jest/types" "^27.5.1" + "@jest/test-result" "^29.7.0" + "@jest/types" "^29.6.3" "@types/node" "*" ansi-escapes "^4.2.1" chalk "^4.0.0" - jest-util "^27.5.1" + emittery "^0.13.1" + jest-util "^29.7.0" string-length "^4.0.1" -jest-worker@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -jest-worker@^29.3.1: - version "29.3.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.3.1.tgz#e9462161017a9bb176380d721cab022661da3d6b" - integrity sha512-lY4AnnmsEWeiXirAIA0c9SDPbuCBq8IYuDVL8PMm0MZ2PEs2yPvRA/J64QBXuZp7CYKrDM/rmNrc9/i3KJQncw== +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-29.7.0.tgz#acad073acbbaeb7262bd5389e1bcf43e10058d4a" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" - jest-util "^29.3.1" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" -jest@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/jest/-/jest-27.5.1.tgz#dadf33ba70a779be7a6fc33015843b51494f63fc" - integrity sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ== +jest@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-29.7.0.tgz#994676fc24177f088f1c5e3737f5697204ff2613" + integrity sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw== dependencies: - "@jest/core" "^27.5.1" + "@jest/core" "^29.7.0" + "@jest/types" "^29.6.3" import-local "^3.0.2" - jest-cli "^27.5.1" + jest-cli "^29.7.0" js-sha3@^0.8.0: version "0.8.0" @@ -4559,39 +4007,6 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsdom@^16.6.0: - version "16.7.0" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" - integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== - dependencies: - abab "^2.0.5" - acorn "^8.2.4" - acorn-globals "^6.0.0" - cssom "^0.4.4" - cssstyle "^2.3.0" - data-urls "^2.0.0" - decimal.js "^10.2.1" - domexception "^2.0.1" - escodegen "^2.0.0" - form-data "^3.0.0" - html-encoding-sniffer "^2.0.1" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-potential-custom-element-name "^1.0.1" - nwsapi "^2.2.0" - parse5 "6.0.1" - saxes "^5.0.1" - symbol-tree "^3.2.4" - tough-cookie "^4.0.0" - w3c-hr-time "^1.0.2" - w3c-xmlserializer "^2.0.0" - webidl-conversions "^6.1.0" - whatwg-encoding "^1.0.5" - whatwg-mimetype "^2.3.0" - whatwg-url "^8.5.0" - ws "^7.4.6" - xml-name-validator "^3.0.0" - jsesc@^2.5.1: version "2.5.2" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" @@ -4602,6 +4017,11 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-even-better-errors@^2.3.0: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -4615,26 +4035,19 @@ json-schema-traverse@^0.4.1: json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= - -json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^2.2.2: +json5@^2.2.3: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -keccak@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.3.tgz#4bc35ad917be1ef54ff246f904c2bbbf9ac61276" - integrity sha512-JZrLIAJWuZxKbCilMpNz5Vj7Vtb4scDG3dMXLOsbzBmQGyjwE61BbW7bJkfKKCShXiQZt3T6sBgALRtmd+nZaQ== +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - readable-stream "^3.6.0" + json-buffer "3.0.1" kleur@^3.0.3: version "3.0.3" @@ -4664,30 +4077,22 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - libsodium-wrappers@^0.7.6: - version "0.7.11" - resolved "https://registry.yarnpkg.com/libsodium-wrappers/-/libsodium-wrappers-0.7.11.tgz#53bd20606dffcc54ea2122133c7da38218f575f7" - integrity sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q== + version "0.7.13" + resolved "https://registry.yarnpkg.com/libsodium-wrappers/-/libsodium-wrappers-0.7.13.tgz#83299e06ee1466057ba0e64e532777d2929b90d3" + integrity sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw== dependencies: - libsodium "^0.7.11" + libsodium "^0.7.13" -libsodium@^0.7.11: - version "0.7.11" - resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.11.tgz#cd10aae7bcc34a300cc6ad0ac88fcca674cfbc2e" - integrity sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A== +libsodium@^0.7.13: + version "0.7.13" + resolved "https://registry.yarnpkg.com/libsodium/-/libsodium-0.7.13.tgz#230712ec0b7447c57b39489c48a4af01985fb393" + integrity sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw== -lilconfig@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082" - integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== +lilconfig@2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.5.tgz#19e57fd06ccc3848fd1891655b5a447092225b25" + integrity sha512-xaYmXZtTHPAw5m+xLN8ab9C+3a8YmV3asNSPOATITbtwrfbwaLJj8h66H1WMIpALCkqsIzK3h7oQ+PdX+LQ9Eg== lines-and-columns@^1.1.6: version "1.2.4" @@ -4695,26 +4100,26 @@ lines-and-columns@^1.1.6: integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== lint-staged@^12.3.8: - version "12.3.8" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.3.8.tgz#ee3fe2e16c9d76f99d8348072900b017d6d76901" - integrity sha512-0+UpNaqIwKRSGAFOCcpuYNIv/j5QGVC+xUVvmSdxHO+IfIGoHbFLo3XcPmV/LLnsVj5EAncNHVtlITSoY5qWGQ== + version "12.5.0" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.5.0.tgz#d6925747480ae0e380d13988522f9dd8ef9126e3" + integrity sha512-BKLUjWDsKquV/JuIcoQW4MSAI3ggwEImF1+sB4zaKvyVx1wBk3FsG7UK9bpnmBTN1pm7EH2BBcMwINJzCRv12g== dependencies: cli-truncate "^3.1.0" colorette "^2.0.16" - commander "^8.3.0" - debug "^4.3.3" + commander "^9.3.0" + debug "^4.3.4" execa "^5.1.1" - lilconfig "2.0.4" - listr2 "^4.0.1" - micromatch "^4.0.4" + lilconfig "2.0.5" + listr2 "^4.0.5" + micromatch "^4.0.5" normalize-path "^3.0.0" - object-inspect "^1.12.0" + object-inspect "^1.12.2" pidtree "^0.5.0" string-argv "^0.3.1" - supports-color "^9.2.1" + supports-color "^9.2.2" yaml "^1.10.2" -listr2@^4.0.1: +listr2@^4.0.5: version "4.0.5" resolved "https://registry.yarnpkg.com/listr2/-/listr2-4.0.5.tgz#9dcc50221583e8b4c71c43f9c7dfd0ef546b75d5" integrity sha512-juGHV1doQdpNT3GSTs9IUN43QJb7KHdF9uqg7Vufs/tG9VTzpFphqF4pm/ICdAABGQxsyNn9CiYA3StkI6jpwA== @@ -4735,6 +4140,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" @@ -4745,7 +4157,7 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash@^4.17.21, lodash@^4.7.0: +lodash@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -4766,9 +4178,9 @@ long@^4.0.0: integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== long@^5.2.1: - version "5.2.1" - resolved "https://registry.yarnpkg.com/long/-/long-5.2.1.tgz#e27595d0083d103d2fa2c20c7699f8e0c92b897f" - integrity sha512-GKSNGeNAtw8IryjjkhZxuKB3JzlcLTwjtiQCHKvqQet81I93kXslhDQruGI/QsddO83mcDToBVy7GqGS/zYf/A== + version "5.2.3" + resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" + integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== lru-cache@^5.1.1: version "5.1.1" @@ -4784,17 +4196,12 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.4.0: - version "7.8.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.0.tgz#649aaeb294a56297b5cbc5d70f198dcc5ebe5747" - integrity sha512-AmXqneQZL3KZMIgBpaPTeI6pfwh+xQ2vutMsyqOu1TBdEXFZgpG/80wuJ531w2ZN7TI0/oc8CPxzh/DKQudZqg== - -make-dir@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== +make-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-4.0.0.tgz#c3c2307a771277cd9638305f915c29ae741b614e" + integrity sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw== dependencies: - semver "^6.0.0" + semver "^7.5.3" make-error@^1.1.1: version "1.3.6" @@ -4820,12 +4227,12 @@ md5.js@^1.3.4: media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== merge-stream@^2.0.0: version "2.0.0" @@ -4838,40 +4245,45 @@ merge2@^1.3.0, merge2@^1.4.1: integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== merkletreejs@^0.3.9: - version "0.3.9" - resolved "https://registry.yarnpkg.com/merkletreejs/-/merkletreejs-0.3.9.tgz#cdb364a3b974a44f4eff3446522d7066e0cf95de" - integrity sha512-NjlATjJr4NEn9s8v/VEHhgwRWaE1eA/Une07d9SEqKzULJi1Wsh0Y3svwJdP2bYLMmgSBHzOrNydMWM1NN9VeQ== + version "0.3.11" + resolved "https://registry.yarnpkg.com/merkletreejs/-/merkletreejs-0.3.11.tgz#e0de05c3ca1fd368de05a12cb8efb954ef6fc04f" + integrity sha512-LJKTl4iVNTndhL+3Uz/tfkjD0klIWsHlUzgtuNnNrsf7bAlXR30m+xYB7lHr5Z/l6e/yAIsr26Dabx6Buo4VGQ== dependencies: bignumber.js "^9.0.1" buffer-reverse "^1.0.1" - crypto-js "^3.1.9-1" + crypto-js "^4.2.0" treeify "^1.1.0" web3-utils "^1.3.4" methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== -micromatch@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== +micro-ftch@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/micro-ftch/-/micro-ftch-0.3.1.tgz#6cb83388de4c1f279a034fb0cf96dfc050853c5f" + integrity sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg== + +micromatch@^4.0.4, micromatch@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: - braces "^3.0.1" - picomatch "^2.2.3" + braces "^3.0.2" + picomatch "^2.3.1" -mime-db@1.51.0: - version "1.51.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.51.0.tgz#d9ff62451859b18342d960850dc3cfb77e63fb0c" - integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-types@^2.1.12, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.34" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.34.tgz#5a712f9ec1503511a945803640fafe09d3793c24" - integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== + version "2.1.35" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: - mime-db "1.51.0" + mime-db "1.52.0" mime@1.6.0: version "1.6.0" @@ -4893,24 +4305,24 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== -minimatch@^3.0.4: - version "3.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" - integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw== +minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" -minimist@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + version "0.5.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.6.tgz#7def03d2432dcae4ba1d611445c48396062255f6" + integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: - minimist "^1.2.5" + minimist "^1.2.6" mkdirp@^1.0.4: version "1.0.4" @@ -4920,7 +4332,7 @@ mkdirp@^1.0.4: ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== ms@2.1.2: version "2.1.2" @@ -4933,14 +4345,19 @@ ms@2.1.3: integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== nan@^2.13.2: - version "2.16.0" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.16.0.tgz#664f43e45460fb98faf00edca0bb0d7b8dce7916" - integrity sha512-UdAqHyFngu7TfQKsCBgAA6pWDkT8MAO7d0jyOecVhN5354xbLqdn8mV9Tat9gepAupm0bt2DbeaSC8vS52MuFA== + version "2.18.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554" + integrity sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w== + +natural-compare-lite@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" + integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== negotiator@0.6.3: version "0.6.3" @@ -4953,24 +4370,19 @@ node-addon-api@^2.0.0: integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== node-gyp-build@^4.2.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.5.0.tgz#7a64eefa0b21112f89f58379da128ac177f20e40" - integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== + version "4.7.1" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.7.1.tgz#cd7d2eb48e594874053150a9418ac85af83ca8f7" + integrity sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg== node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" - integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= + integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw== -node-releases@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" - integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== - -node-releases@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" - integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== +node-releases@^2.0.13: + version "2.0.13" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" + integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== normalize-path@^3.0.0: version "3.0.0" @@ -4992,36 +4404,16 @@ number-to-bn@1.7.0: bn.js "4.11.6" strip-hex-prefix "1.0.0" -nwsapi@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" - integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== - -object-inspect@^1.12.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" - integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== - -object-inspect@^1.9.0: - version "1.12.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" - integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== +object-inspect@^1.12.2, object-inspect@^1.9.0: + version "1.13.1" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.13.1.tgz#b96c6109324ccfef6b12216a956ca4dc2ff94bc2" + integrity sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ== -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== -object.assign@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - on-finished@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" @@ -5032,7 +4424,7 @@ on-finished@2.4.1: once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== dependencies: wrappy "1" @@ -5043,29 +4435,17 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -optionator@^0.8.1: - version "0.8.3" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" - integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - dependencies: - deep-is "~0.1.3" - fast-levenshtein "~2.0.6" - levn "~0.3.0" - prelude-ls "~1.1.2" - type-check "~0.3.2" - word-wrap "~1.2.3" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" + integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== dependencies: + "@aashutoshrathi/word-wrap" "^1.2.3" deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" p-limit@^2.2.0: version "2.3.0" @@ -5074,6 +4454,13 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2, p-limit@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -5081,6 +4468,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" @@ -5115,11 +4509,6 @@ parse-json@^5.2.0: json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" -parse5@6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - parseurl@~1.3.3: version "1.3.3" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" @@ -5133,7 +4522,7 @@ path-exists@^4.0.0: path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" @@ -5148,30 +4537,19 @@ path-parse@^1.0.7: path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== path-type@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== -pbkdf2@^3.0.17, pbkdf2@^3.0.9: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.3: +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -5182,9 +4560,9 @@ pidtree@^0.5.0: integrity sha512-9nxspIM7OpZuhBxPg73Zvyq7j1QMPMPsGKTqRc2XOaFQauDvoNz9fM1Wdkjmeo7l9GXOZiRs97sPkuayl39wjA== pirates@^4.0.4: - version "4.0.5" - resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" - integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + version "4.0.6" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.6.tgz#3018ae32ecfcff6c29ba2267cbf21166ac1f36b9" + integrity sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg== pkg-dir@^4.2.0: version "4.2.0" @@ -5198,11 +4576,6 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prelude-ls@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" - integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - prettier-linter-helpers@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" @@ -5211,26 +4584,16 @@ prettier-linter-helpers@^1.0.0: fast-diff "^1.1.2" prettier@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" - integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== - -pretty-format@^27.5.1: - version "27.5.1" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" - integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== - dependencies: - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^17.0.1" + version "2.8.8" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" + integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== -pretty-format@^28.0.0, pretty-format@^28.1.3: - version "28.1.3" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5" - integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q== +pretty-format@^29.0.0, pretty-format@^29.7.0: + version "29.7.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.7.0.tgz#ca42c758310f365bfa71a0bda0a807160b776812" + integrity sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ== dependencies: - "@jest/schemas" "^28.1.3" - ansi-regex "^5.0.1" + "@jest/schemas" "^29.6.3" ansi-styles "^5.0.0" react-is "^18.0.0" @@ -5248,9 +4611,9 @@ prompts@^2.0.1: sisteransi "^1.0.5" protobufjs@^6.11.2, protobufjs@^6.11.3, protobufjs@^6.8.8, protobufjs@~6.11.2, protobufjs@~6.11.3: - version "6.11.3" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.3.tgz#637a527205a35caa4f3e2a9a4a13ddffe0e7af74" - integrity sha512-xL96WDdCZYdU7Slin569tFX712BxsxslWwAfAhCYjQKGTq7dAU91Lomy6nLLhh/dyGhk/YH4TwTSRxTzhuHyZg== + version "6.11.4" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" + integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== dependencies: "@protobufjs/aspromise" "^1.1.2" "@protobufjs/base64" "^1.1.2" @@ -5274,15 +4637,15 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -psl@^1.1.33: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== +punycode@^2.1.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.1.tgz#027422e2faec0b25e1549c3e1bd8309b9133b6e5" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== +pure-rand@^6.0.0: + version "6.0.4" + resolved "https://registry.yarnpkg.com/pure-rand/-/pure-rand-6.0.4.tgz#50b737f6a925468679bff00ad20eade53f37d5c7" + integrity sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA== qs@6.11.0: version "6.11.0" @@ -5296,7 +4659,7 @@ queue-microtask@^1.2.2: resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== -randombytes@^2.0.1, randombytes@^2.1.0: +randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== @@ -5318,20 +4681,15 @@ raw-body@2.5.1: iconv-lite "0.4.24" unpipe "1.0.0" -react-is@^17.0.1: - version "17.0.2" - resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== - react-is@^18.0.0: version "18.2.0" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + version "3.6.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" + integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" @@ -5353,9 +4711,9 @@ recast@^0.20: tslib "^2.0.1" regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== + version "10.1.1" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz#6b0e05489d9076b04c436f318d9b067bba459480" + integrity sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q== dependencies: regenerate "^1.4.2" @@ -5364,45 +4722,35 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.11: +regenerator-runtime@^0.13.9: version "0.13.11" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== -regenerator-runtime@^0.13.9: - version "0.13.9" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" - integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.2.tgz#5bbae58b522098ebdf09bca2f83838929001c7a4" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== dependencies: "@babel/runtime" "^7.8.4" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^5.2.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.2.2.tgz#3e4e5d12103b64748711c3aad69934d7718e75fc" - integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw== +regexpu-core@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" + integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== dependencies: + "@babel/regjsgen" "^0.8.0" regenerate "^1.4.2" regenerate-unicode-properties "^10.1.0" - regjsgen "^0.7.1" regjsparser "^0.9.1" unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.1.0" -regjsgen@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.7.1.tgz#ee5ef30e18d3f09b7c369b76e7c2373ed25546f6" - integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== - regjsparser@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" @@ -5413,7 +4761,7 @@ regjsparser@^0.9.1: require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-main-filename@^2.0.0: version "2.0.0" @@ -5437,26 +4785,17 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve.exports@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" - integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== - -resolve@^1.14.2: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" +resolve.exports@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-2.0.2.tgz#f8c934b8e6a13f539e38b7098e2e36134f01e800" + integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.20.0, resolve@^1.3.2: - version "1.22.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" - integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== +resolve@^1.14.2, resolve@^1.20.0, resolve@^1.3.2: + version "1.22.8" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.8.1" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -5478,7 +4817,7 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -5493,13 +4832,6 @@ ripemd160@^2.0.0, ripemd160@^2.0.1, ripemd160@^2.0.2: hash-base "^3.0.0" inherits "^2.0.1" -rlp@^2.2.4: - version "2.2.7" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.7.tgz#33f31c4afac81124ac4b283e2bd4d9720b30beaf" - integrity sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ== - dependencies: - bn.js "^5.2.0" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -5514,48 +4846,24 @@ rxjs@6: dependencies: tslib "^1.9.0" -rxjs@^7.4.0: - version "7.5.6" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.6.tgz#0446577557862afd6903517ce7cae79ecb9662bc" - integrity sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw== - dependencies: - tslib "^2.1.0" - -rxjs@^7.5.5: - version "7.5.5" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f" - integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== +rxjs@^7.4.0, rxjs@^7.5.5: + version "7.8.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" + integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== dependencies: tslib "^2.1.0" -safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: +safe-buffer@5.2.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - "safer-buffer@>= 2.1.2 < 3": version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -saxes@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" - integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== - dependencies: - xmlchars "^2.2.0" - -scrypt-js@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -secp256k1@^4.0.1, secp256k1@^4.0.2: +secp256k1@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.3.tgz#c4559ecd1b8d3c1827ed2d1b94190d69ce267303" integrity sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA== @@ -5565,26 +4873,19 @@ secp256k1@^4.0.1, secp256k1@^4.0.2: node-gyp-build "^4.2.0" semver@^5.3.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^7.3.2: - version "7.3.6" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b" - integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w== - dependencies: - lru-cache "^7.4.0" +semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@^7.3.2, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" @@ -5622,10 +4923,15 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA== +set-function-length@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.1.1.tgz#4bc39fafb0307224a33e106a7d35ca1218d659ed" + integrity sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ== + dependencies: + define-data-property "^1.1.1" + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" setprototypeof@1.2.0: version "1.2.0" @@ -5702,7 +5008,15 @@ slice-ansi@^5.0.0: ansi-styles "^6.0.0" is-fullwidth-code-point "^4.0.0" -source-map-support@^0.5.17, source-map-support@^0.5.6: +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.13.tgz#31b24a9c2e73c2de85066c0feb7d44767ed52932" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.17: version "0.5.21" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -5710,30 +5024,20 @@ source-map-support@^0.5.17, source-map-support@^0.5.6: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.5.0: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -source-map@^0.7.3: - version "0.7.3" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383" - integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== - sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" - integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== stack-utils@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.5.tgz#d25265fca995154659dbbfba3b49254778d2fdd5" - integrity sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA== + version "2.0.6" + resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.6.tgz#aaf0748169c02fc33c8232abccf933f54a1cc34f" + integrity sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ== dependencies: escape-string-regexp "^2.0.0" @@ -5743,9 +5047,9 @@ statuses@2.0.1: integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== string-argv@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" - integrity sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg== + version "0.3.2" + resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.2.tgz#2b6d0ef24b656274d957d54e0a4bbf6153dc02b6" + integrity sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q== string-length@^4.0.1: version "4.0.2" @@ -5755,7 +5059,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -string-width@^4.1.0, string-width@^4.2.0: +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5788,9 +5092,9 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: ansi-regex "^5.0.1" strip-ansi@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.0.1.tgz#61740a08ce36b61e50e65653f07060d000975fb2" - integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== + version "7.1.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== dependencies: ansi-regex "^6.0.1" @@ -5811,7 +5115,7 @@ strip-hex-prefix@1.0.0: dependencies: is-hex-prefixed "1.0.0" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -5823,7 +5127,7 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -supports-color@^7.0.0, supports-color@^7.1.0: +supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== @@ -5837,18 +5141,10 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-color@^9.2.1: - version "9.2.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.2.tgz#502acaf82f2b7ee78eb7c83dcac0f89694e5a7bb" - integrity sha512-XC6g/Kgux+rJXmwokjm9ECpD6k/smUoS5LKlUCcsYr4IY3rW0XyAympon2RmxGrlnZURMpg5T18gWDP9CsHXFA== - -supports-hyperlinks@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" - integrity sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ== - dependencies: - has-flag "^4.0.0" - supports-color "^7.0.0" +supports-color@^9.2.2: + version "9.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.4.0.tgz#17bfcf686288f531db3dea3215510621ccb55954" + integrity sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw== supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" @@ -5860,19 +5156,6 @@ symbol-observable@^2.0.3: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-2.0.3.tgz#5b521d3d07a43c351055fa43b8355b62d33fd16a" integrity sha512-sQV7phh2WCYAn81oAkakC5qjq2Ml0g8ozqz03wOGnx9dDlG1de6yrF+0RAzSJD8fPUow3PTSMf2SAbOGxb93BA== -symbol-tree@^3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" - integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - -terminal-link@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/terminal-link/-/terminal-link-2.1.1.tgz#14a64a27ab3c0df933ea546fba55f2d078edc994" - integrity sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - dependencies: - ansi-escapes "^4.2.1" - supports-hyperlinks "^2.0.0" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" @@ -5885,17 +5168,12 @@ test-exclude@^6.0.0: text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" - integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= - -throat@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" - integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== + integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== tiny-secp256k1@^1.1.3: version "1.1.6" @@ -5909,9 +5187,9 @@ tiny-secp256k1@^1.1.3: nan "^2.13.2" tiny-secp256k1@^2.0.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-2.2.1.tgz#a61d4791b7031aa08a9453178a131349c3e10f9b" - integrity sha512-/U4xfVqnVxJXN4YVsru0E6t5wVncu2uunB8+RVR40fYUxkKYUPS10f+ePQZgFBoE/Jbf9H1NBveupF2VmB58Ng== + version "2.2.3" + resolved "https://registry.yarnpkg.com/tiny-secp256k1/-/tiny-secp256k1-2.2.3.tgz#fe1dde11a64fcee2091157d4b78bcb300feb9b65" + integrity sha512-SGcL07SxcPN2nGKHTCvRMkQLYPSoeFcvArUSCYtjVARiFAWU44cCIqYS0mYAU6nY7XfvwURuTIGo2Omt3ZQr0Q== dependencies: uint8array-tools "0.0.7" @@ -5923,7 +5201,7 @@ tmpl@1.0.5: to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== to-regex-range@^5.0.1: version "5.0.1" @@ -5937,22 +5215,6 @@ toidentifier@1.0.1: resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== -tough-cookie@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" - integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== - dependencies: - psl "^1.1.33" - punycode "^2.1.1" - universalify "^0.1.2" - -tr46@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" - integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== - dependencies: - punycode "^2.1.1" - treeify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" @@ -5986,15 +5248,10 @@ tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1: - version "2.5.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" - integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== - -tslib@^2.1.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" - integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== +tslib@^2.0.1, tslib@^2.1.0: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== tslint@^5.20.1: version "5.20.1" @@ -6041,13 +5298,6 @@ type-check@^0.4.0, type-check@~0.4.0: dependencies: prelude-ls "^1.2.1" -type-check@~0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" - integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - dependencies: - prelude-ls "~1.1.2" - type-detect@4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" @@ -6071,22 +5321,15 @@ type-is@~1.6.18: media-typer "0.3.0" mime-types "~2.1.24" -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - typeforce@^1.11.5: version "1.18.0" resolved "https://registry.yarnpkg.com/typeforce/-/typeforce-1.18.0.tgz#d7416a2c5845e085034d70fcc5b6cc4a90edbfdc" integrity sha512-7uc1O8h1M1g0rArakJdf0uLRSSgFcYexrVoKo+bzJd32gd4gDy2L/Z+8/FjPnU9ydY3pEnVPtr9FyscYY60K1g== typescript@^4.1.3: - version "4.5.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.5.tgz#d8c953832d28924a9e3d37c73d729c846c5896f3" - integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== + version "4.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" + integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== typescript@~4.4: version "4.4.4" @@ -6098,6 +5341,11 @@ uint8array-tools@0.0.7: resolved "https://registry.yarnpkg.com/uint8array-tools/-/uint8array-tools-0.0.7.tgz#a7a2bb5d8836eae2fade68c771454e6a438b390d" integrity sha512-vrrNZJiusLWoFWBqz5Y5KMCgP9W9hnjZHzZiZRT8oNAkq3d5Z5Oe76jAvVVSRh4U8GGR90N2X1dWtrhvx6L8UQ== +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc" @@ -6121,20 +5369,15 @@ unicode-property-aliases-ecmascript@^2.0.0: resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz#43d41e3be698bd493ef911077c9b131f827e8ccd" integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== -universalify@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== -update-browserslist-db@^1.0.9: - version "1.0.10" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz#0f54b876545726f17d00cd9a2561e6dade943ff3" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== dependencies: escalade "^3.1.1" picocolors "^1.0.0" @@ -6159,47 +5402,28 @@ util-deprecate@^1.0.1: utils-merge@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== uuid@^8.3.2: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -v8-compile-cache@^2.0.3: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -v8-to-istanbul@^8.1.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz#77b752fd3975e31bbcef938f85e9bd1c7a8d60ed" - integrity sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w== +v8-to-istanbul@^9.0.1: + version "9.2.0" + resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad" + integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA== dependencies: + "@jridgewell/trace-mapping" "^0.3.12" "@types/istanbul-lib-coverage" "^2.0.1" - convert-source-map "^1.6.0" - source-map "^0.7.3" + convert-source-map "^2.0.0" vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== -w3c-hr-time@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" - integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - dependencies: - browser-process-hrtime "^1.0.0" - -w3c-xmlserializer@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" - integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== - dependencies: - xml-name-validator "^3.0.0" - -walker@^1.0.7, walker@^1.0.8: +walker@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.8.tgz#bd498db477afe573dc04185f011d3ab8a8d7653f" integrity sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ== @@ -6207,49 +5431,19 @@ walker@^1.0.7, walker@^1.0.8: makeerror "1.0.12" web3-utils@^1.3.4: - version "1.8.2" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.8.2.tgz#c32dec5e9b955acbab220eefd7715bc540b75cc9" - integrity sha512-v7j6xhfLQfY7xQDrUP0BKbaNrmZ2/+egbqP9q3KYmOiPpnvAfol+32slgL0WX/5n8VPvKCK5EZ1HGrAVICSToA== + version "1.10.3" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.10.3.tgz#f1db99c82549c7d9f8348f04ffe4e0188b449714" + integrity sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ== dependencies: + "@ethereumjs/util" "^8.1.0" bn.js "^5.2.1" ethereum-bloom-filters "^1.0.6" - ethereumjs-util "^7.1.0" + ethereum-cryptography "^2.1.2" ethjs-unit "0.1.6" number-to-bn "1.7.0" randombytes "^2.1.0" utf8 "3.0.0" -webidl-conversions@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" - integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== - -webidl-conversions@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" - integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== - -whatwg-encoding@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" - integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - dependencies: - iconv-lite "0.4.24" - -whatwg-mimetype@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" - integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - -whatwg-url@^8.0.0, whatwg-url@^8.5.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" - integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== - dependencies: - lodash "^4.7.0" - tr46 "^2.1.0" - webidl-conversions "^6.1.0" - which-module@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.1.tgz#776b1fe35d90aebe99e8ac15eb24093389a4a409" @@ -6269,11 +5463,6 @@ wif@^2.0.6: dependencies: bs58check "<3.0.0" -word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -6295,19 +5484,9 @@ wrap-ansi@^7.0.0: wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -write-file-atomic@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" - integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== - dependencies: - imurmurhash "^0.1.4" - is-typedarray "^1.0.0" - signal-exit "^3.0.2" - typedarray-to-buffer "^3.1.5" + integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -write-file-atomic@^4.0.1: +write-file-atomic@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-4.0.2.tgz#a9df01ae5b77858a027fd2e80768ee433555fcfd" integrity sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg== @@ -6320,26 +5499,11 @@ ws@^7: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591" integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q== -ws@^7.4.6: - version "7.5.7" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.7.tgz#9e0ac77ee50af70d58326ecff7e85eb3fa375e67" - integrity sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A== - -xml-name-validator@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" - integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - xml@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/xml/-/xml-1.0.1.tgz#78ba72020029c5bc87b8a81a3cfcd74b4a2fc1e5" integrity sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw== -xmlchars@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" - integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - xstream@^11.14.0: version "11.14.0" resolved "https://registry.yarnpkg.com/xstream/-/xstream-11.14.0.tgz#2c071d26b18310523b6877e86b4e54df068a9ae5" @@ -6381,10 +5545,10 @@ yargs-parser@^18.1.2: camelcase "^5.0.0" decamelize "^1.2.0" -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== +yargs-parser@^21.1.1: + version "21.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35" + integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^15.3.1: version "15.4.1" @@ -6403,18 +5567,18 @@ yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: - cliui "^7.0.2" + cliui "^8.0.1" escalade "^3.1.1" get-caller-file "^2.0.5" require-directory "^2.1.1" - string-width "^4.2.0" + string-width "^4.2.3" y18n "^5.0.5" - yargs-parser "^20.2.2" + yargs-parser "^21.1.1" yesno@^0.4.0: version "0.4.0" @@ -6425,3 +5589,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==